homelab/ansible/ansible-old/roles/monitoring_stack/templates/grafana-blackbox-reachability.json.j2

277 lines
5.8 KiB
Django/Jinja

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "{{ grafana_prometheus_datasource_uid }}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "center",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "value"
},
"pluginVersion": "11.0.0",
"targets": [
{
"expr": "sum(probe_success{job=\"blackbox-probes\"})",
"instant": true,
"refId": "A"
}
],
"title": "Successful probes",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ grafana_prometheus_datasource_uid }}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 1
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "center",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "value"
},
"pluginVersion": "11.0.0",
"targets": [
{
"expr": "count(probe_success{job=\"blackbox-probes\"} == 0)",
"instant": true,
"refId": "A"
}
],
"title": "Failed probes",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ grafana_prometheus_datasource_uid }}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"unit": "ms"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 5
},
"id": 3,
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"expr": "probe_duration_seconds{job=\"blackbox-probes\"} * 1000",
"legendFormat": "{{ '{{' }}instance{{ '}}' }}",
"refId": "A"
}
],
"title": "Probe duration",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "{{ grafana_prometheus_datasource_uid }}"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 24,
"x": 0,
"y": 15
},
"id": 4,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "11.0.0",
"targets": [
{
"editorMode": "code",
"expr": "probe_success{job=\"blackbox-probes\"}",
"format": "table",
"instant": true,
"legendFormat": "",
"refId": "A"
}
],
"title": "Current probe state",
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"Value #A": false,
"__name__": true,
"job": true
},
"renameByName": {
"Value #A": "success",
"instance": "target"
}
}
}
],
"type": "table"
}
],
"refresh": "30s",
"schemaVersion": 39,
"style": "dark",
"tags": [
"homelab",
"blackbox",
"reachability"
],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "Blackbox Reachability",
"uid": "blackbox-reachability",
"version": 1,
"weekStart": ""
}