mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 00:26:36 +03:00
Changes: - Added the number of `pending alerts` and `firing alerts` - Improvement `transormations` for panel - FIRING over time by group and rules - Added sort for panel - FIRING over time by rule Signed-off-by: sias32 <sias.32@yandex.ru> Co-authored-by: Max Kotliar <mkotlyar@victoriametrics.com>
835 lines
20 KiB
JSON
835 lines
20 KiB
JSON
{
|
|
"__inputs": [],
|
|
"__elements": {},
|
|
"__requires": [
|
|
{
|
|
"type": "grafana",
|
|
"id": "grafana",
|
|
"name": "Grafana",
|
|
"version": "12.0.2"
|
|
},
|
|
{
|
|
"type": "datasource",
|
|
"id": "prometheus",
|
|
"name": "Prometheus",
|
|
"version": "1.0.0"
|
|
},
|
|
{
|
|
"type": "panel",
|
|
"id": "stat",
|
|
"name": "Stat",
|
|
"version": ""
|
|
},
|
|
{
|
|
"type": "panel",
|
|
"id": "state-timeline",
|
|
"name": "State timeline",
|
|
"version": ""
|
|
},
|
|
{
|
|
"type": "panel",
|
|
"id": "table",
|
|
"name": "Table",
|
|
"version": ""
|
|
}
|
|
],
|
|
"annotations": {
|
|
"list": [
|
|
{
|
|
"builtIn": 1,
|
|
"datasource": {
|
|
"type": "grafana",
|
|
"uid": "-- Grafana --"
|
|
},
|
|
"enable": true,
|
|
"hide": true,
|
|
"iconColor": "rgba(0, 211, 255, 1)",
|
|
"name": "Annotations & Alerts",
|
|
"target": {
|
|
"limit": 100,
|
|
"matchAny": false,
|
|
"tags": [],
|
|
"type": "dashboard"
|
|
},
|
|
"type": "dashboard"
|
|
}
|
|
]
|
|
},
|
|
"description": "Overview of alerts state in time based on metrics generated by VictoriaMetrics vmalert.",
|
|
"editable": true,
|
|
"fiscalYearStartMonth": 0,
|
|
"graphTooltip": 0,
|
|
"id": null,
|
|
"links": [
|
|
{
|
|
"icon": "doc",
|
|
"tags": [],
|
|
"targetBlank": true,
|
|
"title": "Docs",
|
|
"type": "link",
|
|
"url": "https://docs.victoriametrics.com/victoriametrics/vmalert/"
|
|
},
|
|
{
|
|
"icon": "info",
|
|
"tags": [],
|
|
"targetBlank": true,
|
|
"title": "Community support",
|
|
"type": "link",
|
|
"url": "https://victoriametrics.com/support/community-support/"
|
|
},
|
|
{
|
|
"asDropdown": false,
|
|
"icon": "bolt",
|
|
"includeVars": false,
|
|
"keepTime": false,
|
|
"tags": [],
|
|
"targetBlank": true,
|
|
"title": "Enterprise support",
|
|
"tooltip": "",
|
|
"type": "link",
|
|
"url": "https://victoriametrics.com/support/enterprise-support/"
|
|
}
|
|
],
|
|
"panels": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"description": "Shows the state of alerts on the selected time interval.\n\n Color represents the frequency of state changes: red is frequent, green is no state changes.",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"custom": {
|
|
"axisPlacement": "auto",
|
|
"fillOpacity": 70,
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
},
|
|
"insertNulls": false,
|
|
"lineWidth": 0,
|
|
"spanNulls": false
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": 0
|
|
},
|
|
{
|
|
"color": "yellow",
|
|
"value": 1
|
|
},
|
|
{
|
|
"color": "orange",
|
|
"value": 2
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 3
|
|
},
|
|
{
|
|
"color": "dark-red",
|
|
"value": 5
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 14,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"id": 7,
|
|
"options": {
|
|
"alignValue": "center",
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": false
|
|
},
|
|
"mergeValues": true,
|
|
"rowHeight": 0.9,
|
|
"showValue": "never",
|
|
"tooltip": {
|
|
"hideZeros": false,
|
|
"mode": "single",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"pluginVersion": "12.0.2",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"editorMode": "code",
|
|
"exemplar": false,
|
|
"expr": "sort_desc(topk_max($topk, sum(vmalert_alerts_firing{job=~\"$job\",instance=~\"$instance\",group=~\"$group\"}) by (alertname)))",
|
|
"format": "time_series",
|
|
"instant": false,
|
|
"legendFormat": "__auto",
|
|
"range": true,
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Firing state of alerting rules on timeline",
|
|
"type": "state-timeline"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "$ds"
|
|
},
|
|
"description": "Shows the total number of loaded alerting rules across selected instances and groups.",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [],
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 6,
|
|
"x": 0,
|
|
"y": 14
|
|
},
|
|
"id": 5,
|
|
"options": {
|
|
"colorMode": "none",
|
|
"graphMode": "none",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"percentChangeColorMode": "standard",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"last"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"showPercentChange": false,
|
|
"text": {
|
|
"valueSize": 80
|
|
},
|
|
"textMode": "auto",
|
|
"wideLayout": true
|
|
},
|
|
"pluginVersion": "12.0.2",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"editorMode": "code",
|
|
"exemplar": false,
|
|
"expr": "count(count(vmalert_alerting_rules_errors_total{job=~\"$job\",instance=~\"$instance\",group=~\"$group\"}) by (group))",
|
|
"interval": "",
|
|
"legendFormat": "",
|
|
"range": true,
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Alerting groups",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "$ds"
|
|
},
|
|
"description": "Shows the total number of loaded alerting rules across selected instances and groups.",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [],
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 6,
|
|
"x": 6,
|
|
"y": 14
|
|
},
|
|
"id": 8,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"percentChangeColorMode": "standard",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"last"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"showPercentChange": false,
|
|
"text": {
|
|
"valueSize": 80
|
|
},
|
|
"textMode": "auto",
|
|
"wideLayout": true
|
|
},
|
|
"pluginVersion": "12.0.2",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"editorMode": "code",
|
|
"exemplar": false,
|
|
"expr": "count(vmalert_alerting_rules_errors_total{job=~\"$job\",instance=~\"$instance\",group=~\"$group\"})",
|
|
"instant": false,
|
|
"interval": "",
|
|
"legendFormat": "",
|
|
"range": true,
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Alerting rules",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "$ds"
|
|
},
|
|
"description": "Shows the total number of pendings alerts in selected instances and grouping groups.",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [],
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "yellow",
|
|
"value": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 6,
|
|
"x": 12,
|
|
"y": 14
|
|
},
|
|
"id": 9,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"percentChangeColorMode": "standard",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"last"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"showPercentChange": false,
|
|
"text": {
|
|
"valueSize": 80
|
|
},
|
|
"textMode": "auto",
|
|
"wideLayout": true
|
|
},
|
|
"pluginVersion": "12.0.2",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"editorMode": "code",
|
|
"exemplar": false,
|
|
"expr": "sum(vmalert_alerts_pending{job=~\"$job\",instance=~\"$instance\",group=~\"$group\"})",
|
|
"instant": false,
|
|
"interval": "",
|
|
"legendFormat": "",
|
|
"range": true,
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Alerting pending",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "$ds"
|
|
},
|
|
"description": "Shows the total number of firing alerts in selected instances and grouping groups.",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [],
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "red",
|
|
"value": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 6,
|
|
"x": 18,
|
|
"y": 14
|
|
},
|
|
"id": 10,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"percentChangeColorMode": "standard",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"last"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"showPercentChange": false,
|
|
"text": {
|
|
"valueSize": 80
|
|
},
|
|
"textMode": "auto",
|
|
"wideLayout": true
|
|
},
|
|
"pluginVersion": "12.0.2",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"editorMode": "code",
|
|
"exemplar": false,
|
|
"expr": "sum(vmalert_alerts_firing{job=~\"$job\",instance=~\"$instance\",group=~\"$group\"})",
|
|
"instant": false,
|
|
"interval": "",
|
|
"legendFormat": "",
|
|
"range": true,
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Alerting firing",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"align": "auto",
|
|
"cellOptions": {
|
|
"type": "auto"
|
|
},
|
|
"footer": {
|
|
"reducers": []
|
|
},
|
|
"inspect": false
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": 0
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Count"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.width",
|
|
"value": 100
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 13,
|
|
"w": 9,
|
|
"x": 0,
|
|
"y": 18
|
|
},
|
|
"id": 2,
|
|
"options": {
|
|
"cellHeight": "sm",
|
|
"frameIndex": 1,
|
|
"showHeader": true,
|
|
"sortBy": [
|
|
{
|
|
"desc": true,
|
|
"displayName": "Count"
|
|
}
|
|
]
|
|
},
|
|
"pluginVersion": "12.0.2",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"editorMode": "code",
|
|
"exemplar": false,
|
|
"expr": "topk_max(100, sum(increases_over_time(vmalert_alerts_firing{job=~\"$job\",instance=~\"$instance\",group=~\"$group\"}[$__range])) by(group) > 0)",
|
|
"format": "table",
|
|
"instant": true,
|
|
"key": "Q-3934f0fb-8ad6-4519-a98d-c26d0fc6b312-0",
|
|
"legendFormat": "__auto",
|
|
"range": false,
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "FIRING over time by group",
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Time": true,
|
|
"alertname": true
|
|
},
|
|
"includeByName": {},
|
|
"indexByName": {
|
|
"Time": 0,
|
|
"Value": 3,
|
|
"alertname": 2,
|
|
"group": 1
|
|
},
|
|
"renameByName": {
|
|
"Value": "Count",
|
|
"alertname": "Alert",
|
|
"group": "Group"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"type": "table"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"align": "auto",
|
|
"cellOptions": {
|
|
"type": "auto"
|
|
},
|
|
"inspect": false
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": 0
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Count"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.width",
|
|
"value": 100
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Group"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.width",
|
|
"value": 200
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Alert"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "links",
|
|
"value": [
|
|
{
|
|
"targetBlank": true,
|
|
"title": "Alert",
|
|
"url": "/alerting/${ds:text}/${__value.text}/find"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 13,
|
|
"w": 15,
|
|
"x": 9,
|
|
"y": 18
|
|
},
|
|
"id": 1,
|
|
"options": {
|
|
"cellHeight": "sm",
|
|
"frameIndex": 1,
|
|
"showHeader": true,
|
|
"sortBy": [
|
|
{
|
|
"desc": true,
|
|
"displayName": "Count"
|
|
}
|
|
]
|
|
},
|
|
"pluginVersion": "12.0.2",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"editorMode": "code",
|
|
"exemplar": false,
|
|
"expr": "topk_max($topk, sum(increases_over_time(vmalert_alerts_firing{job=~\"$job\",instance=~\"$instance\",group=~\"$group\"}[$__range])) by (group, alertname) > 0)",
|
|
"format": "table",
|
|
"instant": true,
|
|
"key": "Q-3934f0fb-8ad6-4519-a98d-c26d0fc6b312-0",
|
|
"legendFormat": "__auto",
|
|
"range": false,
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "FIRING over time by rule",
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Time": true
|
|
},
|
|
"indexByName": {
|
|
"Time": 0,
|
|
"Value": 3,
|
|
"alertname": 2,
|
|
"group": 1
|
|
},
|
|
"renameByName": {
|
|
"Time": "",
|
|
"Value": "Count",
|
|
"alertname": "Alert",
|
|
"group": "Group",
|
|
"range": ""
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"type": "table"
|
|
}
|
|
],
|
|
"refresh": "",
|
|
"schemaVersion": 41,
|
|
"tags": [],
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"current": {},
|
|
"includeAll": false,
|
|
"label": "Datasource",
|
|
"name": "ds",
|
|
"options": [],
|
|
"query": "prometheus",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"type": "datasource"
|
|
},
|
|
{
|
|
"allValue": ".*",
|
|
"current": {},
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"definition": "label_values(vm_app_version{version=~\"^vmalert.*\"},job)",
|
|
"includeAll": true,
|
|
"multi": true,
|
|
"name": "job",
|
|
"options": [],
|
|
"query": {
|
|
"query": "label_values(vm_app_version{version=~\"^vmalert.*\"},job)",
|
|
"refId": "StandardVariableQuery"
|
|
},
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"type": "query"
|
|
},
|
|
{
|
|
"allValue": ".*",
|
|
"current": {},
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"definition": "label_values(vm_app_version{job=~\"$job\"},instance)",
|
|
"includeAll": true,
|
|
"multi": true,
|
|
"name": "instance",
|
|
"options": [],
|
|
"query": {
|
|
"query": "label_values(vm_app_version{job=~\"$job\"},instance)",
|
|
"refId": "StandardVariableQuery"
|
|
},
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"type": "query"
|
|
},
|
|
{
|
|
"allValue": ".*",
|
|
"current": {},
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "${ds}"
|
|
},
|
|
"definition": "label_values(vmalert_iteration_duration_seconds{}, group)",
|
|
"includeAll": true,
|
|
"multi": true,
|
|
"name": "group",
|
|
"options": [],
|
|
"query": {
|
|
"query": "label_values(vmalert_iteration_duration_seconds{}, group)",
|
|
"refId": "StandardVariableQuery"
|
|
},
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"type": "query"
|
|
},
|
|
{
|
|
"current": {
|
|
"text": "10",
|
|
"value": "10"
|
|
},
|
|
"includeAll": false,
|
|
"name": "topk",
|
|
"options": [
|
|
{
|
|
"selected": false,
|
|
"text": "5",
|
|
"value": "5"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "10",
|
|
"value": "10"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "20",
|
|
"value": "20"
|
|
},
|
|
{
|
|
"selected": true,
|
|
"text": "30",
|
|
"value": "30"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "50",
|
|
"value": "50"
|
|
}
|
|
],
|
|
"query": "5, 10, 20, 30, 50",
|
|
"type": "custom"
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"from": "now-7d",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {},
|
|
"timezone": "",
|
|
"title": "VictoriaMetrics - Alert statistics",
|
|
"uid": "ehXxUsGSk",
|
|
"version": 1,
|
|
"weekStart": ""
|
|
} |