lots of stuff
This commit is contained in:
@@ -0,0 +1,215 @@
|
||||
{
|
||||
"id": null,
|
||||
"uid": "beepi-backups",
|
||||
"title": "Backups",
|
||||
"tags": ["beepi", "backup"],
|
||||
"timezone": "browser",
|
||||
"schemaVersion": 39,
|
||||
"version": 1,
|
||||
"refresh": "1m",
|
||||
"time": {"from": "now-7d", "to": "now"},
|
||||
"panels": [
|
||||
{
|
||||
"type": "table",
|
||||
"title": "Backup jobs",
|
||||
"id": 1,
|
||||
"gridPos": {"h": 7, "w": 24, "x": 0, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "age",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "time() - max by (backup_job) (backup_last_success_timestamp_seconds{backup_job!=\"\"})",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
},
|
||||
{
|
||||
"refId": "status",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "max by (backup_job) (backup_last_status{backup_job!=\"\"})",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
},
|
||||
{
|
||||
"refId": "duration",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "max by (backup_job) (backup_last_duration_seconds{backup_job!=\"\"})",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
},
|
||||
{
|
||||
"refId": "size",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "max by (backup_job) (backup_last_archive_bytes{backup_job!=\"\"})",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
}
|
||||
],
|
||||
"transformations": [
|
||||
{"id": "joinByField", "options": {"byField": "backup_job", "mode": "outer"}},
|
||||
{"id": "organize", "options": {
|
||||
"excludeByName": {"Time": true, "Time 1": true, "Time 2": true, "Time 3": true, "Time 4": true},
|
||||
"renameByName": {
|
||||
"backup_job": "Job",
|
||||
"Value #age": "Age",
|
||||
"Value #status": "Status",
|
||||
"Value #duration": "Duration",
|
||||
"Value #size": "Archive"
|
||||
}
|
||||
}}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {"custom": {"align": "auto", "cellOptions": {"type": "auto"}}},
|
||||
"overrides": [
|
||||
{"matcher": {"id": "byName", "options": "Age"}, "properties": [
|
||||
{"id": "unit", "value": "s"},
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-background"}},
|
||||
{"id": "thresholds", "value": {"mode": "absolute", "steps": [
|
||||
{"color": "green", "value": null},
|
||||
{"color": "orange", "value": 90000},
|
||||
{"color": "red", "value": 172800}
|
||||
]}}
|
||||
]},
|
||||
{"matcher": {"id": "byName", "options": "Duration"}, "properties": [{"id": "unit", "value": "s"}]},
|
||||
{"matcher": {"id": "byName", "options": "Archive"}, "properties": [{"id": "unit", "value": "bytes"}]},
|
||||
{"matcher": {"id": "byName", "options": "Status"}, "properties": [
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-background"}},
|
||||
{"id": "mappings", "value": [{"type": "value", "options": {
|
||||
"0": {"text": "FAILED", "color": "red", "index": 0},
|
||||
"1": {"text": "ok", "color": "green", "index": 1}
|
||||
}}]},
|
||||
{"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}}
|
||||
]}
|
||||
]
|
||||
},
|
||||
"options": {"showHeader": true}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Archive size",
|
||||
"id": 2,
|
||||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 7},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "backup_archive_newest_bytes",
|
||||
"legendFormat": "newest {{ '{{' }}kind{{ '}}' }}"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "backup_archive_total_bytes",
|
||||
"legendFormat": "total {{ '{{' }}kind{{ '}}' }}"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {"unit": "bytes", "custom": {"lineWidth": 2, "fillOpacity": 8}},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {"legend": {"displayMode": "list", "placement": "bottom", "showLegend": true}, "tooltip": {"mode": "multi"}}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Backup duration",
|
||||
"id": 3,
|
||||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 7},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "backup_last_duration_seconds{backup_job!=\"\"}",
|
||||
"legendFormat": "{{ '{{' }}backup_job{{ '}}' }}"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {"unit": "s", "custom": {"lineWidth": 2, "fillOpacity": 8}},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {"legend": {"displayMode": "list", "placement": "bottom", "showLegend": true}, "tooltip": {"mode": "multi"}}
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "Retained archives",
|
||||
"id": 4,
|
||||
"gridPos": {"h": 5, "w": 6, "x": 0, "y": 15},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "backup_archive_count",
|
||||
"legendFormat": "{{ '{{' }}kind{{ '}}' }}",
|
||||
"instant": true
|
||||
}
|
||||
],
|
||||
"fieldConfig": {"defaults": {"unit": "short", "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 2}]}}, "overrides": []},
|
||||
"options": {"colorMode": "background", "graphMode": "none", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}}
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "RAID mounted",
|
||||
"id": 5,
|
||||
"gridPos": {"h": 5, "w": 6, "x": 6, "y": 15},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "max(backup_raid_mounted) or vector(0)",
|
||||
"instant": true
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [{"type": "value", "options": {"0": {"text": "NOT MOUNTED", "color": "red", "index": 0}, "1": {"text": "mounted", "color": "green", "index": 1}}}],
|
||||
"thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {"colorMode": "background", "graphMode": "none", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "RAID free space",
|
||||
"id": 6,
|
||||
"gridPos": {"h": 5, "w": 12, "x": 12, "y": 15},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "node_filesystem_avail_bytes{mountpoint=\"{{ backup_raid_mount }}\"}",
|
||||
"legendFormat": "free"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {"defaults": {"unit": "bytes", "custom": {"lineWidth": 2, "fillOpacity": 8}}, "overrides": []},
|
||||
"options": {"legend": {"displayMode": "list", "placement": "bottom", "showLegend": true}, "tooltip": {"mode": "single"}}
|
||||
},
|
||||
{
|
||||
"type": "logs",
|
||||
"title": "Backup log",
|
||||
"id": 7,
|
||||
"gridPos": {"h": 12, "w": 24, "x": 0, "y": 20},
|
||||
"datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"},
|
||||
"expr": "{job=\"backup\"}",
|
||||
"queryType": "range"
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
"showTime": true,
|
||||
"sortOrder": "Descending",
|
||||
"wrapLogMessage": true,
|
||||
"enableLogDetails": true,
|
||||
"dedupStrategy": "none",
|
||||
"prettifyLogMessage": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,364 @@
|
||||
{
|
||||
"id": null,
|
||||
"uid": "beepi-map",
|
||||
"title": "Infrastructure Map",
|
||||
"tags": ["beepi", "overview"],
|
||||
"timezone": "browser",
|
||||
"schemaVersion": 39,
|
||||
"version": 1,
|
||||
"refresh": "30s",
|
||||
"time": {"from": "now-6h", "to": "now"},
|
||||
"panels": [
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "Services down",
|
||||
"id": 1,
|
||||
"gridPos": {"h": 4, "w": 4, "x": 0, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "count(min by (service) (probe_success{vantage=\"local\"}) == 0 and on (service) (max by (service) (service_enabled) == 1)) or vector(0)",
|
||||
"instant": true
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{"color": "green", "value": null},
|
||||
{"color": "red", "value": 1}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "Last daily backup",
|
||||
"id": 2,
|
||||
"gridPos": {"h": 4, "w": 4, "x": 4, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "time() - max(backup_last_success_timestamp_seconds{backup_job=\"daily\"})",
|
||||
"instant": true
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s",
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{"color": "green", "value": null},
|
||||
{"color": "orange", "value": 90000},
|
||||
{"color": "red", "value": 172800}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "Last offsite sync",
|
||||
"id": 3,
|
||||
"gridPos": {"h": 4, "w": 4, "x": 8, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "time() - max(backup_last_success_timestamp_seconds{backup_job=\"offsite\"})",
|
||||
"instant": true
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s",
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{"color": "green", "value": null},
|
||||
{"color": "orange", "value": 90000},
|
||||
{"color": "red", "value": 172800}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "Tunnel handshake",
|
||||
"id": 4,
|
||||
"gridPos": {"h": 4, "w": 4, "x": 12, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "max(wireguard_peer_handshake_age_seconds{peer=\"beepi\"})",
|
||||
"instant": true
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s",
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{"color": "green", "value": null},
|
||||
{"color": "orange", "value": 180},
|
||||
{"color": "red", "value": 300}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "Ingress",
|
||||
"id": 5,
|
||||
"gridPos": {"h": 4, "w": 4, "x": 16, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "min(up{job=\"node\",host=\"ingress\"}) or vector(0)",
|
||||
"instant": true
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
{"type": "value", "options": {"0": {"text": "DOWN", "color": "red", "index": 0}, "1": {"text": "UP", "color": "green", "index": 1}}}
|
||||
],
|
||||
"thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "RAID free",
|
||||
"id": 6,
|
||||
"gridPos": {"h": 4, "w": 4, "x": 20, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "min(node_filesystem_avail_bytes{mountpoint=\"{{ backup_raid_mount }}\"})",
|
||||
"instant": true
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "bytes",
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{"color": "red", "value": null},
|
||||
{"color": "orange", "value": 100000000000},
|
||||
{"color": "green", "value": 200000000000}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "nodeGraph",
|
||||
"title": "Infrastructure",
|
||||
"id": 10,
|
||||
"gridPos": {"h": 18, "w": 18, "x": 0, "y": 4},
|
||||
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_infinity_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_infinity_uid }}"},
|
||||
"type": "json",
|
||||
"source": "url",
|
||||
"parser": "backend",
|
||||
"format": "table",
|
||||
"url": "http://topology:8088/topology.json",
|
||||
"url_options": {"method": "GET", "data": ""},
|
||||
"root_selector": "nodes",
|
||||
"columns": [
|
||||
{"selector": "id", "text": "id", "type": "string"},
|
||||
{"selector": "title", "text": "title", "type": "string"},
|
||||
{"selector": "subtitle", "text": "subtitle", "type": "string"},
|
||||
{"selector": "mainstat", "text": "mainstat", "type": "string"},
|
||||
{"selector": "arc__ok", "text": "arc__ok", "type": "number"},
|
||||
{"selector": "arc__fail", "text": "arc__fail", "type": "number"},
|
||||
{"selector": "arc__disabled", "text": "arc__disabled", "type": "number"},
|
||||
{"selector": "arc__unknown", "text": "arc__unknown", "type": "number"},
|
||||
{"selector": "arc__used", "text": "arc__used", "type": "number"},
|
||||
{"selector": "arc__free", "text": "arc__free", "type": "number"},
|
||||
{"selector": "detail__status", "text": "detail__status", "type": "string"},
|
||||
{"selector": "detail__group", "text": "detail__group", "type": "string"},
|
||||
{"selector": "detail__used", "text": "detail__used", "type": "string"},
|
||||
{"selector": "dashboard", "text": "dashboard", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_infinity_uid }}"},
|
||||
"type": "json",
|
||||
"source": "url",
|
||||
"parser": "backend",
|
||||
"format": "table",
|
||||
"url": "http://topology:8088/topology.json",
|
||||
"url_options": {"method": "GET", "data": ""},
|
||||
"root_selector": "edges",
|
||||
"columns": [
|
||||
{"selector": "id", "text": "id", "type": "string"},
|
||||
{"selector": "source", "text": "source", "type": "string"},
|
||||
{"selector": "target", "text": "target", "type": "string"},
|
||||
{"selector": "mainstat", "text": "mainstat", "type": "string"},
|
||||
{"selector": "color", "text": "color", "type": "string"},
|
||||
{"selector": "thickness", "text": "thickness", "type": "number"}
|
||||
]
|
||||
}
|
||||
],
|
||||
"transformations": [
|
||||
{
|
||||
"id": "convertFieldType",
|
||||
"options": {
|
||||
"conversions": [
|
||||
{"targetField": "arc__ok", "destinationType": "number"},
|
||||
{"targetField": "arc__fail", "destinationType": "number"},
|
||||
{"targetField": "arc__disabled", "destinationType": "number"},
|
||||
{"targetField": "arc__unknown", "destinationType": "number"},
|
||||
{"targetField": "arc__used", "destinationType": "number"},
|
||||
{"targetField": "arc__free", "destinationType": "number"}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
"nodes": {
|
||||
"mainStatUnit": "",
|
||||
"secondaryStatUnit": "",
|
||||
"arcs": [
|
||||
{"field": "arc__ok", "color": "green"},
|
||||
{"field": "arc__fail", "color": "red"},
|
||||
{"field": "arc__disabled", "color": "text"},
|
||||
{"field": "arc__unknown", "color": "orange"},
|
||||
{"field": "arc__used", "color": "semi-dark-orange"},
|
||||
{"field": "arc__free", "color": "semi-dark-green"}
|
||||
]
|
||||
},
|
||||
"edges": {"mainStatUnit": ""},
|
||||
"zoomMode": "cooperative"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "arc__ok"},
|
||||
"properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "green"}}]
|
||||
},
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "arc__fail"},
|
||||
"properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "red"}}]
|
||||
},
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "arc__disabled"},
|
||||
"properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "text"}}]
|
||||
},
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "arc__unknown"},
|
||||
"properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "orange"}}]
|
||||
},
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "arc__used"},
|
||||
"properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "semi-dark-orange"}}]
|
||||
},
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "arc__free"},
|
||||
"properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "semi-dark-green"}}]
|
||||
},
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "id"},
|
||||
"properties": [
|
||||
{
|
||||
"id": "links",
|
||||
"value": [
|
||||
{
|
||||
"title": "Open related dashboard",
|
||||
"url": "${__data.fields.dashboard}",
|
||||
"targetBlank": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "alertlist",
|
||||
"title": "Firing alerts",
|
||||
"id": 11,
|
||||
"gridPos": {"h": 18, "w": 6, "x": 18, "y": 4},
|
||||
"options": {
|
||||
"alertInstanceLabelFilter": "",
|
||||
"alertName": "",
|
||||
"dashboardAlerts": false,
|
||||
"groupBy": [],
|
||||
"groupMode": "default",
|
||||
"maxItems": 30,
|
||||
"sortOrder": 3,
|
||||
"stateFilter": {"error": true, "firing": true, "noData": true, "normal": false, "pending": true},
|
||||
"viewMode": "list"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
{
|
||||
"id": null,
|
||||
"uid": "beepi-ingress",
|
||||
"title": "Ingress",
|
||||
"tags": ["beepi", "ingress"],
|
||||
"timezone": "browser",
|
||||
"schemaVersion": 39,
|
||||
"version": 1,
|
||||
"refresh": "30s",
|
||||
"time": {"from": "now-24h", "to": "now"},
|
||||
"panels": [
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "Ingress uptime",
|
||||
"id": 1,
|
||||
"gridPos": {"h": 4, "w": 5, "x": 0, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "time() - max(node_boot_time_seconds{host=\"ingress\"})",
|
||||
"instant": true
|
||||
}
|
||||
],
|
||||
"fieldConfig": {"defaults": {"unit": "s", "color": {"mode": "fixed", "fixedColor": "blue"}}, "overrides": []},
|
||||
"options": {"colorMode": "value", "graphMode": "none", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}}
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "Tunnel RTT",
|
||||
"id": 2,
|
||||
"gridPos": {"h": 4, "w": 5, "x": 5, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "max(probe_duration_seconds{probe=\"tunnel-rtt\"})",
|
||||
"instant": true
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {"unit": "s", "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "orange", "value": 0.1}, {"color": "red", "value": 0.3}]}},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {"colorMode": "background", "graphMode": "none", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}}
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "Banned hosts (24h)",
|
||||
"id": 3,
|
||||
"gridPos": {"h": 4, "w": 5, "x": 10, "y": 0},
|
||||
"datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"},
|
||||
"expr": "sum(count_over_time({job=\"fail2ban\", host=\"ingress\"} |= \"Ban\" [24h]))",
|
||||
"queryType": "instant"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {"defaults": {"unit": "short", "color": {"mode": "fixed", "fixedColor": "orange"}}, "overrides": []},
|
||||
"options": {"colorMode": "value", "graphMode": "none", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}}
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "Blocked packets (24h)",
|
||||
"id": 4,
|
||||
"gridPos": {"h": 4, "w": 9, "x": 15, "y": 0},
|
||||
"datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"},
|
||||
"expr": "sum(count_over_time({job=\"ufw\", host=\"ingress\"} [24h]))",
|
||||
"queryType": "instant"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {"defaults": {"unit": "short", "color": {"mode": "fixed", "fixedColor": "purple"}}, "overrides": []},
|
||||
"options": {"colorMode": "value", "graphMode": "none", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}}
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"title": "WireGuard peers",
|
||||
"id": 5,
|
||||
"gridPos": {"h": 7, "w": 12, "x": 0, "y": 4},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "age",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "max by (peer) (wireguard_peer_handshake_age_seconds)",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
},
|
||||
{
|
||||
"refId": "rx",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "max by (peer) (wireguard_peer_receive_bytes_total)",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
},
|
||||
{
|
||||
"refId": "tx",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "max by (peer) (wireguard_peer_transmit_bytes_total)",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
}
|
||||
],
|
||||
"transformations": [
|
||||
{"id": "joinByField", "options": {"byField": "peer", "mode": "outer"}},
|
||||
{"id": "organize", "options": {
|
||||
"excludeByName": {"Time": true, "Time 1": true, "Time 2": true, "Time 3": true},
|
||||
"renameByName": {"peer": "Peer", "Value #age": "Last handshake", "Value #rx": "Received", "Value #tx": "Sent"}
|
||||
}}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {"custom": {"align": "auto"}},
|
||||
"overrides": [
|
||||
{"matcher": {"id": "byName", "options": "Last handshake"}, "properties": [
|
||||
{"id": "unit", "value": "s"},
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-background"}},
|
||||
{"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "orange", "value": 300}, {"color": "red", "value": 3600}]}}
|
||||
]},
|
||||
{"matcher": {"id": "byRegexp", "options": "Received|Sent"}, "properties": [{"id": "unit", "value": "bytes"}]}
|
||||
]
|
||||
},
|
||||
"options": {"showHeader": true}
|
||||
},
|
||||
{
|
||||
"type": "state-timeline",
|
||||
"title": "Tunnel path probes",
|
||||
"id": 6,
|
||||
"gridPos": {"h": 7, "w": 12, "x": 12, "y": 4},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "min by (probe) (probe_success{vantage=\"ingress\"})",
|
||||
"legendFormat": "{{ '{{' }}probe{{ '}}' }}"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {"fillOpacity": 90, "lineWidth": 0},
|
||||
"mappings": [{"type": "value", "options": {"0": {"text": "down", "color": "red", "index": 0}, "1": {"text": "up", "color": "green", "index": 1}}}],
|
||||
"thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {"mergeValues": true, "showValue": "never", "legend": {"displayMode": "list", "placement": "bottom", "showLegend": false}}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Ingress host",
|
||||
"id": 7,
|
||||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 11},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "100 - (avg(rate(node_cpu_seconds_total{host=\"ingress\",mode=\"idle\"}[5m])) * 100)",
|
||||
"legendFormat": "cpu"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "(1 - (node_memory_MemAvailable_bytes{host=\"ingress\"} / node_memory_MemTotal_bytes{host=\"ingress\"})) * 100",
|
||||
"legendFormat": "memory"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "(1 - (node_filesystem_avail_bytes{host=\"ingress\",mountpoint=\"/\"} / node_filesystem_size_bytes{host=\"ingress\",mountpoint=\"/\"})) * 100",
|
||||
"legendFormat": "disk"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {"defaults": {"unit": "percent", "max": 100, "min": 0, "custom": {"lineWidth": 2, "fillOpacity": 8}}, "overrides": []},
|
||||
"options": {"legend": {"displayMode": "list", "placement": "bottom", "showLegend": true}, "tooltip": {"mode": "multi"}}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Ingress network",
|
||||
"id": 8,
|
||||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 11},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "rate(node_network_receive_bytes_total{host=\"ingress\",device!~\"lo\"}[5m]) * 8",
|
||||
"legendFormat": "in {{ '{{' }}device{{ '}}' }}"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "rate(node_network_transmit_bytes_total{host=\"ingress\",device!~\"lo\"}[5m]) * 8",
|
||||
"legendFormat": "out {{ '{{' }}device{{ '}}' }}"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {"defaults": {"unit": "bps", "custom": {"lineWidth": 2, "fillOpacity": 8}}, "overrides": []},
|
||||
"options": {"legend": {"displayMode": "list", "placement": "bottom", "showLegend": true}, "tooltip": {"mode": "multi"}}
|
||||
},
|
||||
{
|
||||
"type": "geomap",
|
||||
"title": "Ban origins",
|
||||
"id": 9,
|
||||
"gridPos": {"h": 11, "w": 12, "x": 0, "y": 19},
|
||||
"datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"},
|
||||
"expr": "sum by (geoip_location_latitude, geoip_location_longitude, geoip_country_name) (count_over_time({job=\"fail2ban\"} |= \"Ban\" [$__range]))",
|
||||
"queryType": "instant"
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
"basemap": {"type": "default", "name": "Basemap"},
|
||||
"layers": [
|
||||
{
|
||||
"type": "markers",
|
||||
"name": "bans",
|
||||
"location": {"mode": "coords", "latitude": "geoip_location_latitude", "longitude": "geoip_location_longitude"},
|
||||
"config": {"style": {"color": {"fixed": "red"}, "size": {"field": "Value", "min": 4, "max": 20}, "opacity": 0.6}}
|
||||
}
|
||||
],
|
||||
"view": {"id": "zero", "lat": 25, "lon": 10, "zoom": 1.6}
|
||||
},
|
||||
"fieldConfig": {"defaults": {}, "overrides": []}
|
||||
},
|
||||
{
|
||||
"type": "logs",
|
||||
"title": "Ingress journal and firewall",
|
||||
"id": 10,
|
||||
"gridPos": {"h": 11, "w": 12, "x": 12, "y": 19},
|
||||
"datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"},
|
||||
"expr": "{host=\"ingress\"}",
|
||||
"queryType": "range"
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
"showTime": true,
|
||||
"sortOrder": "Descending",
|
||||
"wrapLogMessage": true,
|
||||
"enableLogDetails": true,
|
||||
"dedupStrategy": "none",
|
||||
"prettifyLogMessage": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
{
|
||||
"id": null,
|
||||
"uid": "beepi-services",
|
||||
"title": "Services",
|
||||
"tags": ["beepi", "services"],
|
||||
"timezone": "browser",
|
||||
"schemaVersion": 39,
|
||||
"version": 1,
|
||||
"refresh": "30s",
|
||||
"time": {"from": "now-24h", "to": "now"},
|
||||
"panels": [
|
||||
{
|
||||
"type": "table",
|
||||
"title": "Service health",
|
||||
"id": 1,
|
||||
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "enabled",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "max by (service) (service_enabled)",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
},
|
||||
{
|
||||
"refId": "units",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "max by (service) (service_units_active) / max by (service) (service_units_total)",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
},
|
||||
{
|
||||
"refId": "local",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "min by (service) (probe_success{vantage=\"local\"})",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
},
|
||||
{
|
||||
"refId": "vhost",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "min by (service) (probe_success{vantage=\"nginx\"})",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
},
|
||||
{
|
||||
"refId": "latency",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "max by (service) (probe_duration_seconds{vantage=\"nginx\"})",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
}
|
||||
],
|
||||
"transformations": [
|
||||
{"id": "joinByField", "options": {"byField": "service", "mode": "outer"}},
|
||||
{"id": "organize", "options": {
|
||||
"excludeByName": {"Time": true, "Time 1": true, "Time 2": true, "Time 3": true, "Time 4": true, "Time 5": true},
|
||||
"renameByName": {
|
||||
"service": "Service",
|
||||
"Value #enabled": "Expected",
|
||||
"Value #units": "Units",
|
||||
"Value #local": "Local probe",
|
||||
"Value #vhost": "Public vhost",
|
||||
"Value #latency": "Latency"
|
||||
}
|
||||
}}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {"custom": {"align": "auto", "cellOptions": {"type": "auto"}}},
|
||||
"overrides": [
|
||||
{"matcher": {"id": "byName", "options": "Expected"}, "properties": [
|
||||
{"id": "mappings", "value": [{"type": "value", "options": {"0": {"text": "disabled", "color": "text", "index": 0}, "1": {"text": "yes", "color": "green", "index": 1}}}]},
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-text"}}
|
||||
]},
|
||||
{"matcher": {"id": "byName", "options": "Units"}, "properties": [
|
||||
{"id": "unit", "value": "percentunit"},
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-background"}},
|
||||
{"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 0.5}, {"color": "green", "value": 1}]}}
|
||||
]},
|
||||
{"matcher": {"id": "byName", "options": "Local probe"}, "properties": [
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-background"}},
|
||||
{"id": "mappings", "value": [
|
||||
{"type": "value", "options": {"0": {"text": "DOWN", "color": "red", "index": 0}, "1": {"text": "up", "color": "green", "index": 1}}},
|
||||
{"type": "special", "options": {"match": "null", "result": {"text": "no check", "color": "#3a3f47", "index": 2}}}
|
||||
]},
|
||||
{"id": "noValue", "value": "no check"},
|
||||
{"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}}
|
||||
]},
|
||||
{"matcher": {"id": "byName", "options": "Public vhost"}, "properties": [
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-background"}},
|
||||
{"id": "mappings", "value": [
|
||||
{"type": "value", "options": {"0": {"text": "DOWN", "color": "red", "index": 0}, "1": {"text": "up", "color": "green", "index": 1}}},
|
||||
{"type": "special", "options": {"match": "null", "result": {"text": "internal only", "color": "#3a3f47", "index": 2}}}
|
||||
]},
|
||||
{"id": "noValue", "value": "internal only"},
|
||||
{"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}}
|
||||
]},
|
||||
{"matcher": {"id": "byName", "options": "Latency"}, "properties": [{"id": "unit", "value": "s"}]}
|
||||
]
|
||||
},
|
||||
"options": {"showHeader": true, "sortBy": [{"displayName": "Service", "desc": false}]}
|
||||
},
|
||||
{
|
||||
"type": "state-timeline",
|
||||
"title": "Probe history",
|
||||
"id": 2,
|
||||
"gridPos": {"h": 9, "w": 24, "x": 0, "y": 10},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "min by (service) (probe_success{vantage=\"local\"})",
|
||||
"legendFormat": "{{ '{{' }}service{{ '}}' }}"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {"fillOpacity": 90, "lineWidth": 0},
|
||||
"mappings": [{"type": "value", "options": {"0": {"text": "down", "color": "red", "index": 0}, "1": {"text": "up", "color": "green", "index": 1}}}],
|
||||
"thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {"mergeValues": true, "showValue": "never", "legend": {"displayMode": "list", "placement": "bottom", "showLegend": false}}
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"title": "Units and containers",
|
||||
"id": 3,
|
||||
"gridPos": {"h": 10, "w": 12, "x": 0, "y": 19},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "service_unit_active",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
}
|
||||
],
|
||||
"transformations": [
|
||||
{"id": "organize", "options": {
|
||||
"excludeByName": {"Time": true, "__name__": true, "instance": true, "job": true, "host": true},
|
||||
"renameByName": {"service": "Service", "unit": "Unit", "kind": "Kind", "Value": "Active"}
|
||||
}}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {"custom": {"align": "auto"}},
|
||||
"overrides": [
|
||||
{"matcher": {"id": "byName", "options": "Active"}, "properties": [
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-background"}},
|
||||
{"id": "mappings", "value": [{"type": "value", "options": {"0": {"text": "stopped", "color": "red", "index": 0}, "1": {"text": "running", "color": "green", "index": 1}}}]},
|
||||
{"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}}
|
||||
]}
|
||||
]
|
||||
},
|
||||
"options": {"showHeader": true}
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"title": "TLS certificates",
|
||||
"id": 4,
|
||||
"gridPos": {"h": 10, "w": 12, "x": 12, "y": 19},
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"},
|
||||
"expr": "min by (service, instance) (probe_ssl_earliest_cert_expiry - time())",
|
||||
"instant": true,
|
||||
"format": "table"
|
||||
}
|
||||
],
|
||||
"transformations": [
|
||||
{"id": "organize", "options": {
|
||||
"excludeByName": {"Time": true},
|
||||
"renameByName": {"service": "Service", "instance": "Endpoint", "Value": "Expires in"}
|
||||
}}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {"custom": {"align": "auto"}},
|
||||
"overrides": [
|
||||
{"matcher": {"id": "byName", "options": "Expires in"}, "properties": [
|
||||
{"id": "unit", "value": "s"},
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-background"}},
|
||||
{"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 1209600}, {"color": "green", "value": 2592000}]}}
|
||||
]}
|
||||
]
|
||||
},
|
||||
"options": {"showHeader": true}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
{
|
||||
"id": null,
|
||||
"uid": "beepi-uptimerobot",
|
||||
"title": "External Checks",
|
||||
"tags": ["beepi", "uptimerobot"],
|
||||
"timezone": "browser",
|
||||
"schemaVersion": 39,
|
||||
"version": 1,
|
||||
"refresh": "5m",
|
||||
"time": {"from": "now-24h", "to": "now"},
|
||||
"panels": [
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "Monitors down",
|
||||
"id": 1,
|
||||
"gridPos": {"h": 5, "w": 6, "x": 0, "y": 0},
|
||||
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_uptimerobot_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_uptimerobot_uid }}"},
|
||||
"type": "json",
|
||||
"source": "url",
|
||||
"parser": "backend",
|
||||
"format": "table",
|
||||
"url": "https://api.uptimerobot.com/v2/getMonitors?format=json&custom_uptime_ratios=1-7-30",
|
||||
"url_options": {"method": "POST", "data": ""},
|
||||
"root_selector": "monitors",
|
||||
"columns": [
|
||||
{"selector": "friendly_name", "text": "Monitor", "type": "string"},
|
||||
{"selector": "status", "text": "Status", "type": "number"}
|
||||
],
|
||||
"filterExpression": "status == 8 || status == 9"
|
||||
}
|
||||
],
|
||||
"transformations": [{"id": "reduce", "options": {"reducers": ["count"]}}],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "red", "value": 1}]},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"textMode": "value",
|
||||
"reduceOptions": {"calcs": ["lastNotNull"], "fields": "/^Status$/", "values": false}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"title": "UptimeRobot monitors",
|
||||
"id": 2,
|
||||
"gridPos": {"h": 12, "w": 18, "x": 6, "y": 0},
|
||||
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_uptimerobot_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_uptimerobot_uid }}"},
|
||||
"type": "json",
|
||||
"source": "url",
|
||||
"parser": "backend",
|
||||
"format": "table",
|
||||
"url": "https://api.uptimerobot.com/v2/getMonitors?format=json&custom_uptime_ratios=1-7-30",
|
||||
"url_options": {"method": "POST", "data": ""},
|
||||
"root_selector": "monitors",
|
||||
"columns": [
|
||||
{"selector": "friendly_name", "text": "Monitor", "type": "string"},
|
||||
{"selector": "status", "text": "Status", "type": "number"},
|
||||
{"selector": "custom_uptime_ratio", "text": "Uptime 1d-7d-30d", "type": "string"},
|
||||
{"selector": "interval", "text": "Interval", "type": "number"},
|
||||
{"selector": "url", "text": "URL", "type": "string"}
|
||||
]
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {"custom": {"align": "auto", "cellOptions": {"type": "auto"}}},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "Status"},
|
||||
"properties": [
|
||||
{"id": "custom.cellOptions", "value": {"type": "color-background"}},
|
||||
{"id": "mappings", "value": [{"type": "value", "options": {
|
||||
"0": {"text": "paused", "color": "text", "index": 0},
|
||||
"1": {"text": "not checked", "color": "blue", "index": 1},
|
||||
"2": {"text": "UP", "color": "green", "index": 2},
|
||||
"8": {"text": "SEEMS DOWN", "color": "orange", "index": 3},
|
||||
"9": {"text": "DOWN", "color": "red", "index": 4}
|
||||
}}]},
|
||||
{"id": "custom.width", "value": 130}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "Interval"},
|
||||
"properties": [{"id": "unit", "value": "s"}, {"id": "custom.width", "value": 100}]
|
||||
},
|
||||
{
|
||||
"matcher": {"id": "byName", "options": "Uptime 1d-7d-30d"},
|
||||
"properties": [{"id": "custom.width", "value": 190}]
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {"showHeader": true, "sortBy": [{"displayName": "Status", "desc": true}]}
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"title": "Monitors configured",
|
||||
"id": 3,
|
||||
"gridPos": {"h": 5, "w": 6, "x": 0, "y": 5},
|
||||
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_uptimerobot_uid }}"},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_uptimerobot_uid }}"},
|
||||
"type": "json",
|
||||
"source": "url",
|
||||
"parser": "backend",
|
||||
"format": "table",
|
||||
"url": "https://api.uptimerobot.com/v2/getMonitors?format=json",
|
||||
"url_options": {"method": "POST", "data": ""},
|
||||
"root_selector": "monitors",
|
||||
"columns": [{"selector": "status", "text": "Status", "type": "number"}]
|
||||
}
|
||||
],
|
||||
"transformations": [{"id": "reduce", "options": {"reducers": ["count"]}}],
|
||||
"fieldConfig": {
|
||||
"defaults": {"color": {"mode": "fixed", "fixedColor": "blue"}, "unit": "short"},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "none",
|
||||
"textMode": "value",
|
||||
"reduceOptions": {"calcs": ["lastNotNull"], "fields": "/^Status$/", "values": false}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"title": "About",
|
||||
"id": 4,
|
||||
"gridPos": {"h": 4, "w": 24, "x": 0, "y": 12},
|
||||
"options": {
|
||||
"mode": "markdown",
|
||||
"content": "External reachability is checked by UptimeRobot from outside the network, which is the one thing this stack cannot do for itself: everything else runs on beepi, so it cannot report that beepi is down.\n\nThe free plan allows 10 API requests per minute. This dashboard refreshes every 5 minutes."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user