Fix unbound redis metric and normalize dashboard variables

This commit is contained in:
gbanyan
2026-02-15 11:43:03 +08:00
parent 9a90a8606c
commit 1748ad1a11
3 changed files with 18 additions and 14 deletions

View File

@@ -16,7 +16,7 @@
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
@@ -1963,7 +1963,7 @@
},
{
"editorMode": "code",
"expr": "sum by(instance) (irate(node_cpu_guest_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])) / on(instance) group_left sum by (instance)((irate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]))) \u003e 0",
"expr": "sum by(instance) (irate(node_cpu_guest_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval])) / on(instance) group_left sum by (instance)((irate(node_cpu_seconds_total{instance=\"$node\",job=\"$job\"}[$__rate_interval]))) > 0",
"format": "time_series",
"legendFormat": "Guest CPU usage",
"range": true,
@@ -4143,7 +4143,7 @@
"editorMode": "code",
"expr": "node_memory_Inactive_anon_bytes{instance=\"$node\",job=\"$job\"}",
"format": "time_series",
"legendFormat": "Inactive_anon Anonymous memory on inactive LRU (incl. tmpfs \u0026 swap cache)",
"legendFormat": "Inactive_anon Anonymous memory on inactive LRU (incl. tmpfs & swap cache)",
"range": true,
"refId": "B",
"step": 240
@@ -4161,7 +4161,7 @@
"editorMode": "code",
"expr": "node_memory_Active_anon_bytes{instance=\"$node\",job=\"$job\"}",
"format": "time_series",
"legendFormat": "Active_anon Anonymous memory on active LRU (incl. tmpfs \u0026 swap cache)",
"legendFormat": "Active_anon Anonymous memory on active LRU (incl. tmpfs & swap cache)",
"range": true,
"refId": "D",
"step": 240
@@ -15683,7 +15683,7 @@
"type": "prometheus",
"uid": "${ds_prometheus}"
},
"definition": "",
"definition": "label_values(node_uname_info, job)",
"includeAll": false,
"label": "Job",
"name": "job",

View File

@@ -5904,7 +5904,11 @@
"templating": {
"list": [
{
"current": {},
"current": {
"text": "prometheus",
"value": "ff1qkncht70n4c",
"selected": true
},
"label": "Data source",
"name": "DS_MIMIR",
"options": [],

View File

@@ -16,7 +16,7 @@
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
@@ -489,7 +489,7 @@
"pluginVersion": "12.2.1",
"targets": [
{
"expr": "redis_used_memory_bytes",
"expr": "redis_memory_used_bytes",
"legendFormat": "Used Memory",
"refId": "A"
},
@@ -504,7 +504,7 @@
"refId": "C"
}
],
"title": "Redis Memory \u0026 Key Turnover",
"title": "Redis Memory & Key Turnover",
"type": "timeseries"
},
{
@@ -1001,7 +1001,7 @@
{
"direction": "backward",
"editorMode": "code",
"expr": "topk(10, sum by (domain) (count_over_time({job=\"unbound\"} | pattern \"\u003c_\u003e \u003c_\u003e reply: \u003cclient\u003e \u003cdomain\u003e \u003cqtype\u003e \u003cclass\u003e \u003crcode\u003e \u003cduration\u003e \u003ccached\u003e \u003canswer_len\u003e\" [5m])))",
"expr": "topk(10, sum by (domain) (count_over_time({job=\"unbound\"} | pattern \"<_> <_> reply: <client> <domain> <qtype> <class> <rcode> <duration> <cached> <answer_len>\" [5m])))",
"queryType": "instant",
"refId": "A"
}
@@ -1057,7 +1057,7 @@
"pluginVersion": "12.2.1",
"targets": [
{
"expr": "{job=\"unbound\"} | pattern \"\u003c_\u003e \u003c_\u003e reply: \u003cclient\u003e \u003cdomain\u003e \u003cqtype\u003e \u003cclass\u003e \u003crcode\u003e \u003cduration\u003e \u003ccached\u003e \u003canswer_len\u003e\"",
"expr": "{job=\"unbound\"} | pattern \"<_> <_> reply: <client> <domain> <qtype> <class> <rcode> <duration> <cached> <answer_len>\"",
"refId": "A"
}
],
@@ -1587,7 +1587,7 @@
"refId": "B"
}
],
"title": "Unbound Process CPU \u0026 Memory",
"title": "Unbound Process CPU & Memory",
"type": "timeseries"
}
],