Files
2026-08-16 14:48:04 +02:00

196 lines
8.5 KiB
Django/Jinja

{
"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}
}
]
}