All checks were successful
deploy / ansible (push) Successful in 8m12s
Monitoring covered availability only: a new WireGuard peer, a machine on the private network, an extra account or key, or a login from outside the VPN would have gone unnoticed. security-metrics runs every minute on both hosts and exports what it finds for node_exporter: WireGuard peers and where they connect from, addresses answering a ping sweep of the VPC, login accounts, sudo and docker members, listening ports, containers with host-level access, and fingerprints of the account, sudoers, sshd, WireGuard and authorized_keys files. Each item is compared with a baseline in the role defaults and host_vars and exported with known="true|false", so a deliberate change has to update the baseline with it. On ops it also counts Forgejo users, keys and runners. Grafana gets a Security dashboard and an alert group for anything unknown, a changed access file, an SSH login from outside WireGuard, failed-login bursts on SSH, Forgejo, Grafana and the asxp.io admin, a new container, and for logs or the collector itself going quiet, which would otherwise blind the rest. It never reads `wg show dump`, which prints preshared keys. Assisted-by: Claude:fable-5-2
2057 lines
No EOL
46 KiB
JSON
2057 lines
No EOL
46 KiB
JSON
{
|
|
"uid": "asxpio-security",
|
|
"title": "Security",
|
|
"tags": [
|
|
"asxpio",
|
|
"security"
|
|
],
|
|
"timezone": "browser",
|
|
"editable": false,
|
|
"refresh": "1m",
|
|
"time": {
|
|
"from": "now-24h",
|
|
"to": "now"
|
|
},
|
|
"schemaVersion": 39,
|
|
"graphTooltip": 1,
|
|
"links": [
|
|
{
|
|
"title": "Dashboards",
|
|
"type": "dashboards",
|
|
"asDropdown": true,
|
|
"includeVars": false,
|
|
"keepTime": true,
|
|
"tags": []
|
|
}
|
|
],
|
|
"panels": [
|
|
{
|
|
"type": "row",
|
|
"title": "Unexpected (each of these alerts)",
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"panels": [],
|
|
"id": 1
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "WireGuard peers",
|
|
"description": "Peers not in wireguard_clients",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "count(security_wg_peer_info{known=\"false\"}) or vector(0)",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 3,
|
|
"x": 0,
|
|
"y": 1
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"noValue": "0",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"textMode": "value"
|
|
},
|
|
"id": 2
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "VPC devices",
|
|
"description": "Addresses answering ping on the private network, not in security_vpc_hosts",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "count(group by (ip) (security_vpc_host_info{known=\"false\"})) or vector(0)",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 3,
|
|
"x": 3,
|
|
"y": 1
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"noValue": "0",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"textMode": "value"
|
|
},
|
|
"id": 3
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Accounts",
|
|
"description": "Login accounts, and members of sudo or docker, outside the baseline",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "count(security_user_info{known=\"false\"} or security_group_member_info{known=\"false\"}) or vector(0)",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 3,
|
|
"x": 6,
|
|
"y": 1
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"noValue": "0",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"textMode": "value"
|
|
},
|
|
"id": 4
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Listening ports",
|
|
"description": "",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "count(security_listening_port_info{known=\"false\"}) or vector(0)",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 3,
|
|
"x": 9,
|
|
"y": 1
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"noValue": "0",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"textMode": "value"
|
|
},
|
|
"id": 5
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Containers",
|
|
"description": "Privileged, host network or PID, host root or the Docker socket, outside the baseline",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "count(security_container_privileged_info{known=\"false\"}) or vector(0)",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 3,
|
|
"x": 12,
|
|
"y": 1
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"noValue": "0",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"textMode": "value"
|
|
},
|
|
"id": 6
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "File changes (24 h)",
|
|
"description": "accounts, sudoers, sshd, wireguard, authorized_keys",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "sum(changes(security_fileset_hash[24h]))",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 3,
|
|
"x": 15,
|
|
"y": 1
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"noValue": "0",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "orange",
|
|
"value": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"textMode": "value"
|
|
},
|
|
"id": 7
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "SSH logins (24 h)",
|
|
"description": "",
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"expr": "sum(count_over_time({job=\"journal\", unit=\"ssh.service\"} |~ `Accepted \\S+ for ` [24h]))",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false,
|
|
"queryType": "instant"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 3,
|
|
"x": 18,
|
|
"y": 1
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"noValue": "0",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "blue",
|
|
"value": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"textMode": "value"
|
|
},
|
|
"id": 8
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Failed SSH (24 h)",
|
|
"description": "",
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"expr": "sum(count_over_time({job=\"journal\", unit=\"ssh.service\"} |~ `Failed \\S+ for |Invalid user |Connection closed by (authenticating|invalid) user ` [24h]))",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false,
|
|
"queryType": "instant"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 3,
|
|
"x": 21,
|
|
"y": 1
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"noValue": "0",
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "blue",
|
|
"value": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"textMode": "value"
|
|
},
|
|
"id": 9
|
|
},
|
|
{
|
|
"type": "row",
|
|
"title": "Networks",
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 5
|
|
},
|
|
"panels": [],
|
|
"id": 10
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "WireGuard peers",
|
|
"description": "",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "security_wg_peer_last_handshake_seconds * 1000 * on (host, interface, peer) group_left (allowed_ips, known) security_wg_peer_info",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false,
|
|
"format": "table"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 10,
|
|
"x": 0,
|
|
"y": 6
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "known"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"true": {
|
|
"text": "yes",
|
|
"color": "green"
|
|
},
|
|
"false": {
|
|
"text": "NO",
|
|
"color": "red"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-background"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Value"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "displayName",
|
|
"value": "last handshake"
|
|
},
|
|
{
|
|
"id": "unit",
|
|
"value": "dateTimeFromNow"
|
|
},
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"0": {
|
|
"text": "never"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Time": true,
|
|
"__name__": true,
|
|
"instance": true,
|
|
"job": true
|
|
},
|
|
"indexByName": {
|
|
"host": 0,
|
|
"interface": 1,
|
|
"peer": 2,
|
|
"allowed_ips": 3,
|
|
"known": 4,
|
|
"Value": 5
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm"
|
|
},
|
|
"id": 11
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "WireGuard endpoints",
|
|
"description": "Where each peer last connected from. A network (/16) not seen for that peer in 14 days alerts.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "security_wg_peer_endpoint_info",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false,
|
|
"format": "table"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 7,
|
|
"x": 10,
|
|
"y": 6
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "known"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"true": {
|
|
"text": "yes",
|
|
"color": "green"
|
|
},
|
|
"false": {
|
|
"text": "NO",
|
|
"color": "red"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-background"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Value"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.hidden",
|
|
"value": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Time": true,
|
|
"__name__": true,
|
|
"instance": true,
|
|
"job": true
|
|
},
|
|
"indexByName": {
|
|
"host": 0,
|
|
"peer": 1,
|
|
"endpoint": 2,
|
|
"net": 3
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm"
|
|
},
|
|
"id": 12
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "Private network (VPC) devices",
|
|
"description": "Ping sweep of the VPC from both hosts, every minute. A device that drops ICMP is not seen.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "group by (ip, known) (security_vpc_host_info)",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false,
|
|
"format": "table"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 7,
|
|
"x": 17,
|
|
"y": 6
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "known"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"true": {
|
|
"text": "yes",
|
|
"color": "green"
|
|
},
|
|
"false": {
|
|
"text": "NO",
|
|
"color": "red"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-background"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Value"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.hidden",
|
|
"value": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Time": true,
|
|
"__name__": true,
|
|
"instance": true,
|
|
"job": true
|
|
},
|
|
"indexByName": {
|
|
"ip": 0,
|
|
"known": 1
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm"
|
|
},
|
|
"id": 13
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "Listening ports",
|
|
"description": "Outside loopback. Known entries show the allowlist entry (a range or *), others the port.",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "security_listening_port_info",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false,
|
|
"format": "table"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 9,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 14
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "known"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"true": {
|
|
"text": "yes",
|
|
"color": "green"
|
|
},
|
|
"false": {
|
|
"text": "NO",
|
|
"color": "red"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-background"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Value"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "displayName",
|
|
"value": "sockets"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Time": true,
|
|
"__name__": true,
|
|
"instance": true,
|
|
"job": true
|
|
},
|
|
"indexByName": {
|
|
"host": 0,
|
|
"scope": 1,
|
|
"proto": 2,
|
|
"port": 3,
|
|
"process": 4,
|
|
"known": 5,
|
|
"Value": 6
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm"
|
|
},
|
|
"id": 14
|
|
},
|
|
{
|
|
"type": "row",
|
|
"title": "Accounts and keys",
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 23
|
|
},
|
|
"panels": [],
|
|
"id": 15
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "Login accounts",
|
|
"description": "",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "security_user_info",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false,
|
|
"format": "table"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 8,
|
|
"x": 0,
|
|
"y": 24
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "known"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"true": {
|
|
"text": "yes",
|
|
"color": "green"
|
|
},
|
|
"false": {
|
|
"text": "NO",
|
|
"color": "red"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-background"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Value"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.hidden",
|
|
"value": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Time": true,
|
|
"__name__": true,
|
|
"instance": true,
|
|
"job": true
|
|
},
|
|
"indexByName": {
|
|
"host": 0,
|
|
"user": 1,
|
|
"uid": 2,
|
|
"shell": 3,
|
|
"known": 4
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm"
|
|
},
|
|
"id": 16
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "sudo and docker members",
|
|
"description": "",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "security_group_member_info",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false,
|
|
"format": "table"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 6,
|
|
"x": 8,
|
|
"y": 24
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "known"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"true": {
|
|
"text": "yes",
|
|
"color": "green"
|
|
},
|
|
"false": {
|
|
"text": "NO",
|
|
"color": "red"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-background"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Value"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.hidden",
|
|
"value": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Time": true,
|
|
"__name__": true,
|
|
"instance": true,
|
|
"job": true
|
|
},
|
|
"indexByName": {
|
|
"host": 0,
|
|
"group": 1,
|
|
"user": 2,
|
|
"known": 3
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm"
|
|
},
|
|
"id": 17
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "authorized_keys",
|
|
"description": "",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "security_authorized_keys",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false,
|
|
"format": "table"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 10,
|
|
"x": 14,
|
|
"y": 24
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "known"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"true": {
|
|
"text": "yes",
|
|
"color": "green"
|
|
},
|
|
"false": {
|
|
"text": "NO",
|
|
"color": "red"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-background"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Value"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "displayName",
|
|
"value": "keys"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Time": true,
|
|
"__name__": true,
|
|
"instance": true,
|
|
"job": true
|
|
},
|
|
"indexByName": {
|
|
"host": 0,
|
|
"user": 1,
|
|
"file": 2,
|
|
"Value": 3
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm"
|
|
},
|
|
"id": 18
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "Watched files: last change",
|
|
"description": "",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "security_fileset_mtime_seconds * 1000",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false,
|
|
"format": "table"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 8,
|
|
"x": 0,
|
|
"y": 32
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "known"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"true": {
|
|
"text": "yes",
|
|
"color": "green"
|
|
},
|
|
"false": {
|
|
"text": "NO",
|
|
"color": "red"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-background"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Value"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "displayName",
|
|
"value": "changed"
|
|
},
|
|
{
|
|
"id": "unit",
|
|
"value": "dateTimeFromNow"
|
|
},
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"0": {
|
|
"text": "never"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Time": true,
|
|
"__name__": true,
|
|
"instance": true,
|
|
"job": true
|
|
},
|
|
"indexByName": {
|
|
"host": 0,
|
|
"set": 1,
|
|
"Value": 2
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm"
|
|
},
|
|
"id": 19
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "Open sessions",
|
|
"description": "",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "security_sessions",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false,
|
|
"format": "table"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 6,
|
|
"x": 8,
|
|
"y": 32
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "known"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"true": {
|
|
"text": "yes",
|
|
"color": "green"
|
|
},
|
|
"false": {
|
|
"text": "NO",
|
|
"color": "red"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-background"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Value"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "displayName",
|
|
"value": "sessions"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Time": true,
|
|
"__name__": true,
|
|
"instance": true,
|
|
"job": true
|
|
},
|
|
"indexByName": {
|
|
"host": 0,
|
|
"user": 1,
|
|
"origin": 2,
|
|
"Value": 3
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm"
|
|
},
|
|
"id": 20
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "Containers with host access",
|
|
"description": "",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "security_container_privileged_info",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false,
|
|
"format": "table"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 10,
|
|
"x": 14,
|
|
"y": 32
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "known"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"true": {
|
|
"text": "yes",
|
|
"color": "green"
|
|
},
|
|
"false": {
|
|
"text": "NO",
|
|
"color": "red"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-background"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Value"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.hidden",
|
|
"value": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Time": true,
|
|
"__name__": true,
|
|
"instance": true,
|
|
"job": true
|
|
},
|
|
"indexByName": {
|
|
"host": 0,
|
|
"name": 1,
|
|
"flags": 2,
|
|
"known": 3
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm"
|
|
},
|
|
"id": 21
|
|
},
|
|
{
|
|
"type": "row",
|
|
"title": "SSH",
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 39
|
|
},
|
|
"panels": [],
|
|
"id": 22
|
|
},
|
|
{
|
|
"type": "timeseries",
|
|
"title": "Logins by user and source",
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"expr": "sum by (host, user, src) (count_over_time({job=\"journal\", unit=\"ssh.service\"} |~ `Accepted \\S+ for ` | regexp `Accepted \\S+ for (?P<user>\\S+) from (?P<src>\\S+)` [$__interval]))",
|
|
"legendFormat": "{{host}}: {{user}} from {{src}}",
|
|
"refId": "A",
|
|
"instant": false,
|
|
"range": true
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 12,
|
|
"x": 0,
|
|
"y": 40
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"drawStyle": "bars",
|
|
"fillOpacity": 60,
|
|
"stacking": {
|
|
"mode": "normal"
|
|
}
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "desc"
|
|
}
|
|
},
|
|
"id": 23
|
|
},
|
|
{
|
|
"type": "timeseries",
|
|
"title": "Failed logins",
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"expr": "sum by (host) (count_over_time({job=\"journal\", unit=\"ssh.service\"} |~ `Failed \\S+ for |Invalid user |Connection closed by (authenticating|invalid) user ` [$__interval]))",
|
|
"legendFormat": "{{host}}",
|
|
"refId": "A",
|
|
"instant": false,
|
|
"range": true
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 12,
|
|
"x": 12,
|
|
"y": 40
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"drawStyle": "bars",
|
|
"fillOpacity": 60,
|
|
"stacking": {
|
|
"mode": "normal"
|
|
}
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "desc"
|
|
}
|
|
},
|
|
"id": 24
|
|
},
|
|
{
|
|
"type": "logs",
|
|
"title": "Logins",
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"expr": "{job=\"journal\", unit=\"ssh.service\"} |~ `Accepted \\S+ for `",
|
|
"refId": "A",
|
|
"instant": false,
|
|
"range": true
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 9,
|
|
"w": 12,
|
|
"x": 0,
|
|
"y": 47
|
|
},
|
|
"options": {
|
|
"showTime": true,
|
|
"showLabels": false,
|
|
"wrapLogMessage": true,
|
|
"sortOrder": "Descending",
|
|
"enableLogDetails": true
|
|
},
|
|
"id": 25
|
|
},
|
|
{
|
|
"type": "logs",
|
|
"title": "sudo, su and account changes",
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"expr": "{job=\"journal\"} |~ `sudo:.*COMMAND|su\\[\\d+\\]|useradd|usermod|userdel|groupadd|gpasswd|chpasswd|passwd\\[\\d+\\]`",
|
|
"refId": "A",
|
|
"instant": false,
|
|
"range": true
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 9,
|
|
"w": 12,
|
|
"x": 12,
|
|
"y": 47
|
|
},
|
|
"options": {
|
|
"showTime": true,
|
|
"showLabels": false,
|
|
"wrapLogMessage": true,
|
|
"sortOrder": "Descending",
|
|
"enableLogDetails": true
|
|
},
|
|
"id": 26
|
|
},
|
|
{
|
|
"type": "row",
|
|
"title": "Forgejo and web logins",
|
|
"collapsed": false,
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 56
|
|
},
|
|
"panels": [],
|
|
"id": 27
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Forgejo",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"description": "Growth in users, admins, keys or runners alerts.",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"expr": "security_forgejo_objects",
|
|
"legendFormat": "{{kind}}",
|
|
"refId": "A",
|
|
"instant": true,
|
|
"range": false
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 8,
|
|
"x": 0,
|
|
"y": 57
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "fixed",
|
|
"fixedColor": "blue"
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"textMode": "value_and_name"
|
|
},
|
|
"id": 28
|
|
},
|
|
{
|
|
"type": "timeseries",
|
|
"title": "Failed web logins",
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"expr": "sum(count_over_time({container=\"forgejo\"} |= `Failed authentication attempt` [$__interval]))",
|
|
"legendFormat": "Forgejo",
|
|
"refId": "A",
|
|
"instant": false,
|
|
"range": true
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"expr": "sum(count_over_time({job=\"traefik-access\"} |= `\"grafana@docker\"` |~ `\"POST /login HTTP/[0-9.]+\" 401 ` [$__interval]))",
|
|
"legendFormat": "Grafana",
|
|
"refId": "B",
|
|
"instant": false,
|
|
"range": true
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"expr": "sum(count_over_time({job=\"traefik-access\"} |= `\"asxpio@docker\"` |~ `\"POST /admin/login HTTP/[0-9.]+\" (401|429) ` [$__interval]))",
|
|
"legendFormat": "asxp.io admin",
|
|
"refId": "C",
|
|
"instant": false,
|
|
"range": true
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 16,
|
|
"x": 8,
|
|
"y": 57
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"drawStyle": "bars",
|
|
"fillOpacity": 60,
|
|
"stacking": {
|
|
"mode": "normal"
|
|
}
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "desc"
|
|
}
|
|
},
|
|
"id": 29
|
|
},
|
|
{
|
|
"type": "logs",
|
|
"title": "Failed web logins",
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"expr": "{container=\"forgejo\"} |= `Failed authentication attempt`",
|
|
"refId": "A",
|
|
"instant": false,
|
|
"range": true
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"expr": "{job=\"traefik-access\"} |~ `\"POST /(admin/)?login HTTP/[0-9.]+\" (401|429) `",
|
|
"refId": "B",
|
|
"instant": false,
|
|
"range": true
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 64
|
|
},
|
|
"options": {
|
|
"showTime": true,
|
|
"showLabels": false,
|
|
"wrapLogMessage": true,
|
|
"sortOrder": "Descending",
|
|
"enableLogDetails": true
|
|
},
|
|
"id": 30
|
|
}
|
|
]
|
|
} |