From 8c2deef0b70b990093aa9589bd67a5e1f5c4ecf6 Mon Sep 17 00:00:00 2001 From: Pritiks23 Date: Fri, 27 Mar 2026 17:59:28 -0700 Subject: [PATCH] Show hostname in GPU legends for Grafana dashboard (#630); add doc --- grafana/HOSTNAME_LEGEND_UPDATE.md | 13 +++++++++++++ grafana/dcgm-exporter-dashboard.json | 8 ++++---- 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 grafana/HOSTNAME_LEGEND_UPDATE.md diff --git a/grafana/HOSTNAME_LEGEND_UPDATE.md b/grafana/HOSTNAME_LEGEND_UPDATE.md new file mode 100644 index 00000000..729446f3 --- /dev/null +++ b/grafana/HOSTNAME_LEGEND_UPDATE.md @@ -0,0 +1,13 @@ +# Dashboard Update: Hostname in GPU Legends + +The Grafana dashboard now displays the hostname in all GPU graph legends (e.g., "GPU 0 on myhost"). + +**How it works:** +- The `legendFormat` for each GPU panel now includes `{{hostname}}`. +- This helps distinguish metrics from GPUs with the same number on different hosts. + +**No changes are needed to your Prometheus queries or exporters if you already have the `hostname` label in your metrics.** + +--- + +_This change addresses: https://github.com/NVIDIA/dcgm-exporter/issues/630_ diff --git a/grafana/dcgm-exporter-dashboard.json b/grafana/dcgm-exporter-dashboard.json index c1681041..4137adec 100644 --- a/grafana/dcgm-exporter-dashboard.json +++ b/grafana/dcgm-exporter-dashboard.json @@ -245,7 +245,7 @@ { "expr": "DCGM_FI_DEV_POWER_USAGE{instance=~\"$instance\", gpu=~\"$gpu\"}", "interval": "", - "legendFormat": "GPU {{gpu}}", + "legendFormat": "GPU {{gpu}} on {{hostname}}", "refId": "A" } ], @@ -405,7 +405,7 @@ "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "GPU {{gpu}}", + "legendFormat": "GPU {{gpu}} on {{hostname}}", "refId": "A" } ], @@ -496,7 +496,7 @@ { "expr": "DCGM_FI_DEV_GPU_UTIL{instance=~\"$instance\", gpu=~\"$gpu\"}", "interval": "", - "legendFormat": "GPU {{gpu}}", + "legendFormat": "GPU {{gpu}} on {{hostname}}", "refId": "A" } ], @@ -586,7 +586,7 @@ { "expr": "DCGM_FI_DEV_FB_USED{instance=~\"$instance\", gpu=~\"$gpu\"}", "interval": "", - "legendFormat": "GPU {{gpu}}", + "legendFormat": "GPU {{gpu}} on {{hostname}}", "refId": "A" } ],