Skip to content

Commit ec57a21

Browse files
committed
fixed some incompatibilities with old metrics
1 parent b4b69b5 commit ec57a21

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

ansible/roles/grafana-dashboards/files/openhpc-slurm.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,15 +1950,15 @@
19501950
"allValue": null,
19511951
"current": {},
19521952
"datasource": "${DS_PROMETHEUS}",
1953-
"definition": "label_values(node_cpu_seconds_total{job=~\"node-exporter\"}, cluster_env)",
1953+
"definition": "label_values(node_cpu_seconds_total{job=~\"node-exporter\"}, env)",
19541954
"error": null,
19551955
"hide": 0,
19561956
"includeAll": true,
19571957
"label": "Environment",
19581958
"multi": true,
1959-
"name": "cluster_env",
1959+
"name": "env",
19601960
"options": [],
1961-
"query": "label_values(node_cpu_seconds_total{job=~\"node-exporter\"}, cluster_env)",
1961+
"query": "label_values(node_cpu_seconds_total{job=~\"node-exporter\"}, env)",
19621962
"refresh": 1,
19631963
"regex": "",
19641964
"skipUrlSync": false,
@@ -1994,15 +1994,15 @@
19941994
"allValue": null,
19951995
"current": {},
19961996
"datasource": "${DS_PROMETHEUS}",
1997-
"definition": "label_values(node_cpu_seconds_total{job=~\"node-exporter\", cluster_env=~\"$cluster_env\", instance=~\"$host_filter\"}, instance)",
1997+
"definition": "label_values(node_cpu_seconds_total{job=~\"node-exporter\", env=~\"$env\", instance=~\"$host_filter\"}, instance)",
19981998
"error": null,
19991999
"hide": 0,
20002000
"includeAll": true,
20012001
"label": null,
20022002
"multi": true,
20032003
"name": "instance",
20042004
"options": [],
2005-
"query": "label_values(node_cpu_seconds_total{job=~\"node-exporter\", cluster_env=~\"$cluster_env\", instance=~\"$host_filter\"}, instance)",
2005+
"query": "label_values(node_cpu_seconds_total{job=~\"node-exporter\", env=~\"$env\", instance=~\"$host_filter\"}, instance)",
20062006
"refresh": 1,
20072007
"regex": "",
20082008
"skipUrlSync": false,

ansible/roles/kube_prometheus_stack/defaults/main/helm.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,9 @@ kube_prometheus_stack_release_defaults:
181181
targetLabel: instance
182182
replacement: $1
183183
action: replace
184-
metricRelabelings:
185-
- targetLabel: cluster_env
184+
- targetLabel: env
185+
sourceLabels: [env]
186+
regex: ^$
186187
replacement: ungrouped
187188

188189
kube_prometheus_stack_release_overrides: {}

docs/monitoring-and-logging.README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ This appliance customises the default set of collectors to a minimal set, these
256256
- cpufreq
257257
- diskstats
258258
- filesystem
259+
- uname
259260

260261
The list can be customised by adding or removing `--collector` flags to Node Exporter's command line arguments. The defaults can be found in:
261262

@@ -265,7 +266,7 @@ The list can be customised by adding or removing `--collector` flags to Node Exp
265266

266267
#### prometheus_node_exporter_targets
267268

268-
Groups prometheus targets into per environment groups. The ansible variable, `cluster_env` is used to determine the grouping. The metrics for each target in the group are given the prometheus label, `cluster_env: $cluster_env`, where `$cluster_env` is the value of the `cluster_env` variable for that host.
269+
Groups prometheus targets into per environment groups. The ansible variable, `env` is used to determine the grouping. The metrics for each target in the group are given the prometheus label, `env: $env`, where `$env` is the value of the `env` variable for that host.
269270

270271
## slurm-stats
271272

environments/common/inventory/group_vars/all/node_exporter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ node_exporter_args:
1010
- --collector.cpufreq
1111
- --collector.diskstats
1212
- --collector.filesystem
13+
- --collector.uname

0 commit comments

Comments
 (0)