365 lines
12 KiB
Django/Jinja
365 lines
12 KiB
Django/Jinja
{
|
|
"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"
|
|
}
|
|
}
|
|
]
|
|
}
|