From 9cca4439fcfa026ce9e53854526f0de13ce637e9 Mon Sep 17 00:00:00 2001
From: Evangelos Foutras <evangelos@foutrelis.com>
Date: Sun, 6 Mar 2022 09:57:48 +0200
Subject: [PATCH] grafana: node_exporter: fix a few hardcoded fields

Fixes these display counters which were tied to aur.archlinux.org:

- Uptime
- RootFS Total
- RAM Total
- SWAP Total

Also add a decimal point to the latter two fields.
---
 .../grafana/files/dashboards/node_exporter.json  | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/roles/grafana/files/dashboards/node_exporter.json b/roles/grafana/files/dashboards/node_exporter.json
index 08cfe6fb4..aaa354cf0 100644
--- a/roles/grafana/files/dashboards/node_exporter.json
+++ b/roles/grafana/files/dashboards/node_exporter.json
@@ -23,7 +23,7 @@
   "fiscalYearStartMonth": 0,
   "gnetId": 1860,
   "graphTooltip": 0,
-  "iteration": 1646552473113,
+  "iteration": 1646553454514,
   "links": [],
   "liveNow": false,
   "panels": [
@@ -638,7 +638,7 @@
           "calcs": [
             "lastNotNull"
           ],
-          "fields": "/^{instance=\"aur.archlinux.org\", job=\"node_exporter\"}$/",
+          "fields": "",
           "values": false
         },
         "textMode": "auto"
@@ -717,7 +717,7 @@
           "calcs": [
             "lastNotNull"
           ],
-          "fields": "/^node_filesystem_size_bytes{device=\"/dev/sda2\", fstype=\"btrfs\", instance=\"aur.archlinux.org\", job=\"node_exporter\", mountpoint=\"/\"}$/",
+          "fields": "",
           "values": false
         },
         "textMode": "auto"
@@ -747,7 +747,7 @@
           "color": {
             "mode": "thresholds"
           },
-          "decimals": 0,
+          "decimals": 1,
           "mappings": [
             {
               "options": {
@@ -794,7 +794,7 @@
           "calcs": [
             "lastNotNull"
           ],
-          "fields": "/^node_memory_MemTotal_bytes{instance=\"aur.archlinux.org\", job=\"node_exporter\"}$/",
+          "fields": "",
           "values": false
         },
         "textMode": "auto"
@@ -822,7 +822,7 @@
           "color": {
             "mode": "thresholds"
           },
-          "decimals": 0,
+          "decimals": 1,
           "mappings": [
             {
               "options": {
@@ -869,7 +869,7 @@
           "calcs": [
             "lastNotNull"
           ],
-          "fields": "/^node_memory_SwapTotal_bytes{instance=\"aur.archlinux.org\", job=\"node_exporter\"}$/",
+          "fields": "",
           "values": false
         },
         "textMode": "auto"
@@ -1883,6 +1883,6 @@
   "timezone": "browser",
   "title": "Server Monitoring",
   "uid": "rYdddlPWk",
-  "version": 5,
+  "version": 6,
   "weekStart": ""
 }
-- 
GitLab