Add Active alerts panel to the top of the CNX DNS dashboard

Surfaces vmalert's firing ALERTS series as a table at the top of the dashboard,
so the minimal-delivery alerts are visible at a glance. Existing panels shift
down by one row.
This commit is contained in:
Berwn
2026-06-17 14:51:33 +07:00
parent 4c7c74836d
commit 7ae3221b83
+52 -11
View File
@@ -4,17 +4,58 @@
"tags": ["dns", "knot", "cnx"], "tags": ["dns", "knot", "cnx"],
"timezone": "browser", "timezone": "browser",
"schemaVersion": 39, "schemaVersion": 39,
"version": 1, "version": 2,
"refresh": "30s", "refresh": "30s",
"time": { "from": "now-6h", "to": "now" }, "time": { "from": "now-6h", "to": "now" },
"templating": { "list": [] }, "templating": { "list": [] },
"annotations": { "list": [] }, "annotations": { "list": [] },
"panels": [ "panels": [
{
"type": "row",
"title": "Alerts",
"id": 11,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }
},
{
"type": "table",
"title": "Active alerts",
"description": "Firing vmalert alerts (the ALERTS series vmalert writes back to VictoriaMetrics). An empty table means all clear.",
"id": 12,
"datasource": { "type": "prometheus", "uid": "victoriametrics" },
"gridPos": { "h": 7, "w": 24, "x": 0, "y": 1 },
"options": { "showHeader": true },
"fieldConfig": {
"defaults": { "custom": { "align": "auto" } },
"overrides": []
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "victoriametrics" },
"expr": "ALERTS{alertstate=\"firing\"}",
"format": "table",
"instant": true
}
],
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"Value": true,
"__name__": true,
"alertstate": true
}
}
}
]
},
{ {
"type": "row", "type": "row",
"title": "DNS / Zones", "title": "DNS / Zones",
"id": 1, "id": 1,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 } "gridPos": { "h": 1, "w": 24, "x": 0, "y": 8 }
}, },
{ {
"type": "table", "type": "table",
@@ -22,7 +63,7 @@
"description": "ns1 and ns2 should report the same serial per zone. A divergence here is the secondary-out-of-sync condition.", "description": "ns1 and ns2 should report the same serial per zone. A divergence here is the secondary-out-of-sync condition.",
"id": 2, "id": 2,
"datasource": { "type": "prometheus", "uid": "victoriametrics" }, "datasource": { "type": "prometheus", "uid": "victoriametrics" },
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 1 }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 9 },
"options": { "showHeader": true }, "options": { "showHeader": true },
"fieldConfig": { "fieldConfig": {
"defaults": { "custom": { "align": "auto" } }, "defaults": { "custom": { "align": "auto" } },
@@ -45,7 +86,7 @@
"description": "On secondaries this counts down between successful transfers; a steady decline toward zero means transfers are failing.", "description": "On secondaries this counts down between successful transfers; a steady decline toward zero means transfers are failing.",
"id": 3, "id": 3,
"datasource": { "type": "prometheus", "uid": "victoriametrics" }, "datasource": { "type": "prometheus", "uid": "victoriametrics" },
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 1 }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 9 },
"fieldConfig": { "defaults": { "unit": "s" }, "overrides": [] }, "fieldConfig": { "defaults": { "unit": "s" }, "overrides": [] },
"targets": [ "targets": [
{ {
@@ -61,7 +102,7 @@
"title": "Query rate by nameserver", "title": "Query rate by nameserver",
"id": 4, "id": 4,
"datasource": { "type": "prometheus", "uid": "victoriametrics" }, "datasource": { "type": "prometheus", "uid": "victoriametrics" },
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 9 }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 17 },
"fieldConfig": { "defaults": { "unit": "qps" }, "overrides": [] }, "fieldConfig": { "defaults": { "unit": "qps" }, "overrides": [] },
"targets": [ "targets": [
{ {
@@ -77,7 +118,7 @@
"title": "Response codes", "title": "Response codes",
"id": 5, "id": 5,
"datasource": { "type": "prometheus", "uid": "victoriametrics" }, "datasource": { "type": "prometheus", "uid": "victoriametrics" },
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 9 }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 17 },
"fieldConfig": { "defaults": { "unit": "qps" }, "overrides": [] }, "fieldConfig": { "defaults": { "unit": "qps" }, "overrides": [] },
"targets": [ "targets": [
{ {
@@ -92,14 +133,14 @@
"type": "row", "type": "row",
"title": "Hosts", "title": "Hosts",
"id": 6, "id": 6,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 17 } "gridPos": { "h": 1, "w": 24, "x": 0, "y": 25 }
}, },
{ {
"type": "timeseries", "type": "timeseries",
"title": "CPU busy %", "title": "CPU busy %",
"id": 7, "id": 7,
"datasource": { "type": "prometheus", "uid": "victoriametrics" }, "datasource": { "type": "prometheus", "uid": "victoriametrics" },
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 18 }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 26 },
"fieldConfig": { "fieldConfig": {
"defaults": { "unit": "percent", "min": 0, "max": 100 }, "defaults": { "unit": "percent", "min": 0, "max": 100 },
"overrides": [] "overrides": []
@@ -118,7 +159,7 @@
"title": "Memory used %", "title": "Memory used %",
"id": 8, "id": 8,
"datasource": { "type": "prometheus", "uid": "victoriametrics" }, "datasource": { "type": "prometheus", "uid": "victoriametrics" },
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 18 }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 26 },
"fieldConfig": { "fieldConfig": {
"defaults": { "unit": "percent", "min": 0, "max": 100 }, "defaults": { "unit": "percent", "min": 0, "max": 100 },
"overrides": [] "overrides": []
@@ -137,7 +178,7 @@
"title": "Root filesystem used %", "title": "Root filesystem used %",
"id": 9, "id": 9,
"datasource": { "type": "prometheus", "uid": "victoriametrics" }, "datasource": { "type": "prometheus", "uid": "victoriametrics" },
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 26 }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 34 },
"fieldConfig": { "fieldConfig": {
"defaults": { "unit": "percent", "min": 0, "max": 100 }, "defaults": { "unit": "percent", "min": 0, "max": 100 },
"overrides": [] "overrides": []
@@ -156,7 +197,7 @@
"title": "Load average (1m)", "title": "Load average (1m)",
"id": 10, "id": 10,
"datasource": { "type": "prometheus", "uid": "victoriametrics" }, "datasource": { "type": "prometheus", "uid": "victoriametrics" },
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 26 }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 34 },
"fieldConfig": { "defaults": { "unit": "short" }, "overrides": [] }, "fieldConfig": { "defaults": { "unit": "short" }, "overrides": [] },
"targets": [ "targets": [
{ {