grafana: fix datasource UIDs for VictoriaMetrics migration
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
Update all dashboard datasource references from "prometheus" to "victoriametrics" to match the declared datasource UID. Enable prune and deleteDatasources to clean up the old Prometheus (monitoring01) datasource from Grafana's database. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
{
|
||||
"name": "vm",
|
||||
"type": "query",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"query": "label_values(pve_guest_info{template=\"0\"}, name)",
|
||||
"refresh": 2,
|
||||
"includeAll": true,
|
||||
@@ -30,7 +30,7 @@
|
||||
"title": "VMs Running",
|
||||
"type": "stat",
|
||||
"gridPos": {"h": 4, "w": 4, "x": 0, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "count(pve_up{id=~\"qemu/.*\"} * on(id) pve_guest_info{template=\"0\"} == 1)",
|
||||
@@ -56,7 +56,7 @@
|
||||
"title": "VMs Stopped",
|
||||
"type": "stat",
|
||||
"gridPos": {"h": 4, "w": 4, "x": 4, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "count(pve_up{id=~\"qemu/.*\"} * on(id) pve_guest_info{template=\"0\"} == 0)",
|
||||
@@ -87,7 +87,7 @@
|
||||
"title": "Node CPU",
|
||||
"type": "gauge",
|
||||
"gridPos": {"h": 4, "w": 4, "x": 8, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "pve_cpu_usage_ratio{id=~\"node/.*\"} * 100",
|
||||
@@ -120,7 +120,7 @@
|
||||
"title": "Node Memory",
|
||||
"type": "gauge",
|
||||
"gridPos": {"h": 4, "w": 4, "x": 12, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "pve_memory_usage_bytes{id=~\"node/.*\"} / pve_memory_size_bytes{id=~\"node/.*\"} * 100",
|
||||
@@ -153,7 +153,7 @@
|
||||
"title": "Node Uptime",
|
||||
"type": "stat",
|
||||
"gridPos": {"h": 4, "w": 4, "x": 16, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "pve_uptime_seconds{id=~\"node/.*\"}",
|
||||
@@ -180,7 +180,7 @@
|
||||
"title": "Templates",
|
||||
"type": "stat",
|
||||
"gridPos": {"h": 4, "w": 4, "x": 20, "y": 0},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "count(pve_guest_info{template=\"1\"})",
|
||||
@@ -206,7 +206,7 @@
|
||||
"title": "VM Status",
|
||||
"type": "table",
|
||||
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 4},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "pve_guest_info{template=\"0\", name=~\"$vm\"}",
|
||||
@@ -362,7 +362,7 @@
|
||||
"title": "VM CPU Usage",
|
||||
"type": "timeseries",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 14},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "pve_cpu_usage_ratio{id=~\"qemu/.*\"} * on(id) group_left(name) pve_guest_info{template=\"0\", name=~\"$vm\"} * 100",
|
||||
@@ -391,7 +391,7 @@
|
||||
"title": "VM Memory Usage",
|
||||
"type": "timeseries",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 14},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "pve_memory_usage_bytes{id=~\"qemu/.*\"} * on(id) group_left(name) pve_guest_info{template=\"0\", name=~\"$vm\"}",
|
||||
@@ -420,7 +420,7 @@
|
||||
"title": "VM Network Traffic",
|
||||
"type": "timeseries",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 22},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "rate(pve_network_receive_bytes{id=~\"qemu/.*\"}[5m]) * on(id) group_left(name) pve_guest_info{template=\"0\", name=~\"$vm\"}",
|
||||
@@ -453,7 +453,7 @@
|
||||
"title": "VM Disk I/O",
|
||||
"type": "timeseries",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 22},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "rate(pve_disk_read_bytes{id=~\"qemu/.*\"}[5m]) * on(id) group_left(name) pve_guest_info{template=\"0\", name=~\"$vm\"}",
|
||||
@@ -486,7 +486,7 @@
|
||||
"title": "Storage Usage",
|
||||
"type": "bargauge",
|
||||
"gridPos": {"h": 6, "w": 12, "x": 0, "y": 30},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "pve_disk_usage_bytes{id=~\"storage/.*\"} / pve_disk_size_bytes{id=~\"storage/.*\"} * 100",
|
||||
@@ -531,7 +531,7 @@
|
||||
"title": "Storage Capacity",
|
||||
"type": "table",
|
||||
"gridPos": {"h": 6, "w": 12, "x": 12, "y": 30},
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"datasource": {"type": "prometheus", "uid": "victoriametrics"},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "pve_disk_size_bytes{id=~\"storage/.*\"}",
|
||||
|
||||
Reference in New Issue
Block a user