From 7d54425d8797300aa36462b362f3ca235b8081a6 Mon Sep 17 00:00:00 2001 From: Florian Sesser <florian@private.storage> Date: Sat, 10 Sep 2022 19:35:09 +0000 Subject: [PATCH] Monitoring: Set data source UIDs so they are the same on every system --- .../server/grafana-dashboards/backups.json | 26 +- .../node-exporter-full.json | 270 +++++++++--------- .../server/grafana-dashboards/payments.json | 12 +- .../resources-overview.json | 30 +- .../server/grafana-dashboards/tahoe-lafs.json | 12 +- nixos/modules/monitoring/server/grafana.nix | 2 + 6 files changed, 177 insertions(+), 175 deletions(-) diff --git a/nixos/modules/monitoring/server/grafana-dashboards/backups.json b/nixos/modules/monitoring/server/grafana-dashboards/backups.json index 51c6ec60..e1962b3d 100644 --- a/nixos/modules/monitoring/server/grafana-dashboards/backups.json +++ b/nixos/modules/monitoring/server/grafana-dashboards/backups.json @@ -164,7 +164,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "sum(node_systemd_unit_state{name=\"borgbackup-job-daily.timer\", state=~\"active\"})", @@ -176,7 +176,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "sum(node_systemd_unit_state{name=\"borgbackup-job-daily.service\", state=\"failed\"})", @@ -320,7 +320,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "sum(node_systemd_unit_state{name=\"borgbackup-check-repo.timer\", state=\"active\"})", @@ -332,7 +332,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "sum(node_systemd_unit_state{name=\"borgbackup-check-repo.service\", state=\"failed\"})", @@ -465,7 +465,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": false, "expr": "node_systemd_timer_last_trigger_seconds{name=\"borgbackup-job-daily.timer\"} - time()", @@ -600,7 +600,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": false, "expr": "node_systemd_timer_last_trigger_seconds{name=\"borgbackup-check-repo.timer\"} - time()", @@ -735,7 +735,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "node_systemd_unit_state{name=\"borgbackup-job-daily.service\", state=\"active\"}", @@ -869,7 +869,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "node_systemd_unit_state{name=\"borgbackup-check-repo.service\", state=\"active\"}", @@ -892,7 +892,7 @@ { "datasource": { "type": "loki", - "uid": "000000002" + "uid": "LocalLoki" }, "description": "The \"duration\" that borgbackup status reports.", "fieldConfig": { @@ -970,7 +970,7 @@ { "datasource": { "type": "loki", - "uid": "000000002" + "uid": "LocalLoki" }, "expr": "{unit=\"borgbackup-job-daily.service\"} |= \"duration\" | pattern \"<_>\\\"duration\\\": <duration>,\"", "legendFormat": "{{host}}", @@ -1011,7 +1011,7 @@ { "datasource": { "type": "loki", - "uid": "000000002" + "uid": "LocalLoki" }, "fieldConfig": { "defaults": { @@ -1083,7 +1083,7 @@ { "datasource": { "type": "loki", - "uid": "000000002" + "uid": "LocalLoki" }, "expr": "{unit=\"borgbackup-job-daily.service\"} |= \"compressed_size\" | pattern \"<_>\\\"compressed_size\\\": <compressed_size>,\"", "hide": false, @@ -1093,7 +1093,7 @@ { "datasource": { "type": "loki", - "uid": "000000002" + "uid": "LocalLoki" }, "expr": "{unit=\"borgbackup-job-daily.service\"} |= \"unique_csize\" | pattern \"<_>\\\"unique_csize\\\": <unique_csize>,\"", "hide": false, diff --git a/nixos/modules/monitoring/server/grafana-dashboards/node-exporter-full.json b/nixos/modules/monitoring/server/grafana-dashboards/node-exporter-full.json index da166818..adb222cf 100644 --- a/nixos/modules/monitoring/server/grafana-dashboards/node-exporter-full.json +++ b/nixos/modules/monitoring/server/grafana-dashboards/node-exporter-full.json @@ -48,7 +48,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -64,7 +64,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Busy state of all CPU cores together", "fieldConfig": { @@ -143,7 +143,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Busy state of all CPU cores together (5 min average)", "fieldConfig": { @@ -222,7 +222,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Busy state of all CPU cores together (15 min average)", "fieldConfig": { @@ -300,7 +300,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Non available RAM memory", "fieldConfig": { @@ -379,7 +379,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Used Swap", "fieldConfig": { @@ -456,7 +456,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Used Root FS", "fieldConfig": { @@ -534,7 +534,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Total number of CPU cores", "fieldConfig": { @@ -610,7 +610,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "System uptime", "fieldConfig": { @@ -686,7 +686,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Total RootFS", "fieldConfig": { @@ -767,7 +767,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Total RAM", "fieldConfig": { @@ -842,7 +842,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Total SWAP", "fieldConfig": { @@ -918,7 +918,7 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -1023,7 +1023,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "sum by (instance)(rate(node_cpu_seconds_total{mode=\"system\",instance=\"$node\",job=\"$job\"}[$__rate_interval])) * 100", @@ -1038,7 +1038,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "sum by (instance)(rate(node_cpu_seconds_total{mode='user',instance=\"$node\",job=\"$job\"}[$__rate_interval])) * 100", @@ -1053,7 +1053,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "sum by (instance)(rate(node_cpu_seconds_total{mode='iowait',instance=\"$node\",job=\"$job\"}[$__rate_interval])) * 100", @@ -1067,7 +1067,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "expr": "sum by (instance)(rate(node_cpu_seconds_total{mode=~\".*irq\",instance=\"$node\",job=\"$job\"}[$__rate_interval])) * 100", "format": "time_series", @@ -1079,7 +1079,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "expr": "sum (rate(node_cpu_seconds_total{mode!='idle',mode!='user',mode!='system',mode!='iowait',mode!='irq',mode!='softirq',instance=\"$node\",job=\"$job\"}[$__rate_interval])) * 100", "format": "time_series", @@ -1091,7 +1091,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "expr": "sum by (mode)(rate(node_cpu_seconds_total{mode='idle',instance=\"$node\",job=\"$job\"}[$__rate_interval])) * 100", "format": "time_series", @@ -1163,7 +1163,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "description": "Basic memory usage", @@ -1340,7 +1340,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Basic network info per interface", "fieldConfig": { @@ -1451,7 +1451,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 3, "description": "Disk space used of all filesystems mounted", @@ -1548,7 +1548,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -1576,7 +1576,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "description": "", @@ -1760,7 +1760,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "description": "", @@ -1940,7 +1940,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -2049,7 +2049,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 3, "description": "", @@ -2149,7 +2149,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fieldConfig": { @@ -2342,7 +2342,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 3, "description": "", @@ -2478,7 +2478,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 3, "description": "", @@ -2581,7 +2581,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -2616,7 +2616,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -2739,7 +2739,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -2871,7 +2871,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -3013,7 +3013,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -3140,7 +3140,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -3293,7 +3293,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -3413,7 +3413,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -3543,7 +3543,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -3656,7 +3656,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -3780,7 +3780,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -3902,7 +3902,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -4031,7 +4031,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -4152,7 +4152,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -4283,7 +4283,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -4405,7 +4405,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fieldConfig": { @@ -4499,7 +4499,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -4516,7 +4516,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -4616,7 +4616,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -4734,7 +4734,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fill": 2, @@ -4869,7 +4869,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 2, "fill": 2, @@ -4962,7 +4962,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -4979,7 +4979,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fieldConfig": { @@ -5100,7 +5100,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fieldConfig": { @@ -5194,7 +5194,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fieldConfig": { @@ -5299,7 +5299,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fieldConfig": { @@ -5400,7 +5400,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -5417,7 +5417,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -5521,7 +5521,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -5618,7 +5618,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -5715,7 +5715,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -5841,7 +5841,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -5954,7 +5954,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -6065,7 +6065,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -6179,7 +6179,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -6196,7 +6196,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -6299,7 +6299,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -6411,7 +6411,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -6516,7 +6516,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -6612,7 +6612,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -6708,7 +6708,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -6804,7 +6804,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -6915,7 +6915,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -6932,7 +6932,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -7080,7 +7080,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -7192,7 +7192,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -7289,7 +7289,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -7306,7 +7306,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -7400,7 +7400,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -7551,7 +7551,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -7568,7 +7568,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "The number (after merges) of I/O requests completed per second for the device", "fieldConfig": { @@ -7778,7 +7778,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "The number of bytes read from or written to the device per second", "fieldConfig": { @@ -7969,7 +7969,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "The average time for requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.", "fieldConfig": { @@ -8164,7 +8164,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "The average queue length of the requests that were issued to the device", "fieldConfig": { @@ -8346,7 +8346,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "The number of read and write requests merged per second that were queued to the device", "fieldConfig": { @@ -8537,7 +8537,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Percentage of elapsed time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100% for devices serving requests serially. But for devices serving requests in parallel, such as RAID arrays and modern SSDs, this number does not reflect their performance limits.", "fieldConfig": { @@ -8727,7 +8727,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "The number of outstanding requests at the instant the sample was taken. Incremented as requests are given to appropriate struct request_queue and decremented as they finish.", "fieldConfig": { @@ -8909,7 +8909,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fieldConfig": { @@ -9117,7 +9117,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -9134,7 +9134,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "decimals": 3, "description": "", @@ -9253,7 +9253,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fieldConfig": { @@ -9352,7 +9352,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fieldConfig": { @@ -9455,7 +9455,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fieldConfig": { @@ -9554,7 +9554,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fieldConfig": { @@ -9665,7 +9665,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -9687,7 +9687,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -9789,7 +9789,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -9893,7 +9893,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -9997,7 +9997,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -10101,7 +10101,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -10197,7 +10197,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -10301,7 +10301,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -10401,7 +10401,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -10492,7 +10492,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -10588,7 +10588,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -10692,7 +10692,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -10779,7 +10779,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -10867,7 +10867,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -10955,7 +10955,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -11043,7 +11043,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -11152,7 +11152,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -11246,7 +11246,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fill": 2, "fillGradient": 0, @@ -11345,7 +11345,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -11362,7 +11362,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -11497,7 +11497,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -11613,7 +11613,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -11722,7 +11722,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -11836,7 +11836,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -11935,7 +11935,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -11952,7 +11952,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -12069,7 +12069,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -12172,7 +12172,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -12285,7 +12285,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -12389,7 +12389,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -12506,7 +12506,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -12640,7 +12640,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -12758,7 +12758,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fieldConfig": { @@ -12898,7 +12898,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -13017,7 +13017,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fieldConfig": { @@ -13144,7 +13144,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -13253,7 +13253,7 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "gridPos": { "h": 1, @@ -13270,7 +13270,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fill": 2, @@ -13360,7 +13360,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "", "fill": 2, @@ -13498,7 +13498,7 @@ }, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "definition": "label_values(node_uname_info, job)", "hide": 0, @@ -13528,7 +13528,7 @@ }, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "definition": "label_values(node_uname_info{job=\"$job\"}, instance)", "hide": 0, diff --git a/nixos/modules/monitoring/server/grafana-dashboards/payments.json b/nixos/modules/monitoring/server/grafana-dashboards/payments.json index 331e623d..3f35bdea 100644 --- a/nixos/modules/monitoring/server/grafana-dashboards/payments.json +++ b/nixos/modules/monitoring/server/grafana-dashboards/payments.json @@ -215,7 +215,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "payment_redemption_signatures_issued", @@ -226,7 +226,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "payment_redemption_vouchers_redeemed", @@ -1035,7 +1035,7 @@ { "datasource": { "type": "loki", - "uid": "000000002" + "uid": "LocalLoki" }, "description": "Exercise in counting maybe interesting lines. This can be alerted on.", "fieldConfig": { @@ -1114,7 +1114,7 @@ { "datasource": { "type": "loki", - "uid": "000000002" + "uid": "LocalLoki" }, "expr": "count_over_time({host=\"payments\",unit=\"zkapissuer.service\"} !~ \"200|/metrics|Accept\" [5m])", "refId": "A" @@ -1127,7 +1127,7 @@ { "datasource": { "type": "loki", - "uid": "000000002" + "uid": "LocalLoki" }, "description": "Exercise in filtering the payment server logs.", "gridPos": { @@ -1151,7 +1151,7 @@ { "datasource": { "type": "loki", - "uid": "000000002" + "uid": "LocalLoki" }, "expr": "{host=\"payments\",unit=\"zkapissuer.service\"} !~ \"200|/metrics|Accept\"", "refId": "A" diff --git a/nixos/modules/monitoring/server/grafana-dashboards/resources-overview.json b/nixos/modules/monitoring/server/grafana-dashboards/resources-overview.json index 8547575f..31004178 100644 --- a/nixos/modules/monitoring/server/grafana-dashboards/resources-overview.json +++ b/nixos/modules/monitoring/server/grafana-dashboards/resources-overview.json @@ -397,7 +397,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes unless node_zfs_arc_size", @@ -411,7 +411,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "1 - (node_memory_MemAvailable_bytes + node_zfs_arc_size) / node_memory_MemTotal_bytes", @@ -887,7 +887,7 @@ }, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Network errors, drops etc. Should all be 0.", "fieldConfig": { @@ -965,7 +965,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "rate(node_network_transmit_errs_total{device!=\"lo\"}[5m])\n", @@ -976,7 +976,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "rate(node_network_transmit_drop_total{device!=\"lo\"}[5m])", @@ -987,7 +987,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "- rate(node_network_receive_drop_total{device!=\"lo\"}[5m])", @@ -998,7 +998,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "- rate(node_network_receive_errs_total{device!=\"lo\"}[5m])", @@ -1201,7 +1201,7 @@ }, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "How much user data do we store", "fieldConfig": { @@ -1282,7 +1282,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "1 - (node_filesystem_avail_bytes{mountpoint=\"/storage\"} / node_filesystem_size_bytes{mountpoint=\"/storage\"})", @@ -1621,7 +1621,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -1695,7 +1695,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "rate(node_pressure_cpu_waiting_seconds_total[5m])", @@ -1710,7 +1710,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -1784,7 +1784,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "rate(node_pressure_memory_waiting_seconds_total[5m])", @@ -1799,7 +1799,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "fieldConfig": { "defaults": { @@ -1873,7 +1873,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "rate(node_pressure_io_waiting_seconds_total[5m])", diff --git a/nixos/modules/monitoring/server/grafana-dashboards/tahoe-lafs.json b/nixos/modules/monitoring/server/grafana-dashboards/tahoe-lafs.json index 47f916bf..4fc78ea0 100644 --- a/nixos/modules/monitoring/server/grafana-dashboards/tahoe-lafs.json +++ b/nixos/modules/monitoring/server/grafana-dashboards/tahoe-lafs.json @@ -1075,7 +1075,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "File count of /storage/corruption-advisories/", "fieldConfig": { @@ -1148,7 +1148,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "tahoe_corruption_advisories_total", @@ -1198,7 +1198,7 @@ }, "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "description": "Rate of new files in /storage/corruption-advisories/", "fieldConfig": { @@ -1269,7 +1269,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "rate(tahoe_corruption_advisories_total[5m])", @@ -1376,7 +1376,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "tahoe_incident_reports_total", @@ -1494,7 +1494,7 @@ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "LocalPrometheus" }, "exemplar": true, "expr": "rate(tahoe_incident_reports_total[5m])", diff --git a/nixos/modules/monitoring/server/grafana.nix b/nixos/modules/monitoring/server/grafana.nix index 0923885f..8b9c262d 100644 --- a/nixos/modules/monitoring/server/grafana.nix +++ b/nixos/modules/monitoring/server/grafana.nix @@ -127,12 +127,14 @@ in { datasources = [{ name = "Prometheus"; type = "prometheus"; + uid = "LocalPrometheus"; access = "proxy"; url = cfg.prometheusUrl; isDefault = true; } { name = "Loki"; type = "loki"; + uid = "LocalLoki"; access = "proxy"; url = cfg.lokiUrl; }]; -- GitLab