Skip to content

Commit

Permalink
Capture additional components in prometheus sample dashboard
Browse files Browse the repository at this point in the history
When querying the breakdown of hardware components, the prometheus query may
be too narrow and exclude components that didn't match but should have been
included. For instance the previous hardware query:

```
ohm_hdd_load_percent{instance="$instance"}
```

Will exclude hard drives without load percentages.

The fix is to match on name prefix, so anything that starts with `ohm_hdd_` is
considered a harddrive and will have its own details section.

Grafana version was updated in the meantime, as there are still some
UI oddities in the dashboard remaining, which may be fixed in a future
update
  • Loading branch information
nickbabcock committed Oct 23, 2021
1 parent a82e0ff commit 6e2b241
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions assets/dashboards/ohm-prometheus.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "8.2.1"
"version": "8.2.2"
},
{
"type": "datasource",
Expand Down Expand Up @@ -71,7 +71,7 @@
"gnetId": null,
"graphTooltip": 1,
"id": null,
"iteration": 1634402682284,
"iteration": 1635027549465,
"links": [],
"liveNow": false,
"panels": [
Expand Down Expand Up @@ -156,7 +156,7 @@
"showUnfilled": true,
"text": {}
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -236,7 +236,7 @@
"showUnfilled": true,
"text": {}
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -316,7 +316,7 @@
"showUnfilled": true,
"text": {}
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -409,7 +409,7 @@
"showUnfilled": true,
"text": {}
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -479,7 +479,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -537,7 +537,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -595,7 +595,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -692,7 +692,7 @@
}
]
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -773,7 +773,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -830,7 +830,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -887,7 +887,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -968,7 +968,7 @@
"showUnfilled": true,
"text": {}
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -1048,7 +1048,7 @@
"showUnfilled": true,
"text": {}
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -1128,7 +1128,7 @@
"showUnfilled": true,
"text": {}
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -1208,7 +1208,7 @@
"showUnfilled": true,
"text": {}
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -1265,7 +1265,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -1325,7 +1325,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -2867,7 +2867,7 @@
"showHeader": true,
"sortBy": []
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -3061,7 +3061,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"repeat": null,
"targets": [
{
Expand Down Expand Up @@ -3781,7 +3781,7 @@
}
]
},
"pluginVersion": "8.2.1",
"pluginVersion": "8.2.2",
"targets": [
{
"exemplar": true,
Expand Down Expand Up @@ -3978,7 +3978,7 @@
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"definition": "ohm_hdd_load_percent{instance=\"$instance\"}",
"definition": "{__name__=~\"ohm_hdd_.*\",instance=\"$instance\"}",
"description": null,
"error": null,
"hide": 2,
Expand All @@ -3988,7 +3988,7 @@
"name": "hdd",
"options": [],
"query": {
"query": "ohm_hdd_load_percent{instance=\"$instance\"}",
"query": "{__name__=~\"ohm_hdd_.*\",instance=\"$instance\"}",
"refId": "StandardVariableQuery"
},
"refresh": 2,
Expand All @@ -4001,7 +4001,7 @@
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"definition": "ohm_nic_bytes_per_second{instance=\"$instance\"}",
"definition": "{__name__=~\"ohm_nic_.*\",instance=\"$instance\"}",
"description": null,
"error": null,
"hide": 2,
Expand All @@ -4011,7 +4011,7 @@
"name": "network",
"options": [],
"query": {
"query": "ohm_nic_bytes_per_second{instance=\"$instance\"}",
"query": "{__name__=~\"ohm_nic_.*\",instance=\"$instance\"}",
"refId": "StandardVariableQuery"
},
"refresh": 1,
Expand All @@ -4024,7 +4024,7 @@
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"definition": "ohm_cpu_load_percent{instance=\"$instance\"}",
"definition": "{__name__=~\"ohm_cpu_.*\",instance=\"$instance\"}",
"description": null,
"error": null,
"hide": 2,
Expand All @@ -4034,7 +4034,7 @@
"name": "cpu",
"options": [],
"query": {
"query": "ohm_cpu_load_percent{instance=\"$instance\"}",
"query": "{__name__=~\"ohm_cpu_.*\",instance=\"$instance\"}",
"refId": "StandardVariableQuery"
},
"refresh": 1,
Expand All @@ -4047,7 +4047,7 @@
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"definition": "ohm_gpunvidia_load_percent{instance=\"$instance\"}",
"definition": "{__name__=~\"ohm_gpu.*\",instance=\"$instance\"}",
"description": null,
"error": null,
"hide": 2,
Expand All @@ -4057,7 +4057,7 @@
"name": "gpu",
"options": [],
"query": {
"query": "ohm_gpunvidia_load_percent{instance=\"$instance\"}",
"query": "{__name__=~\"ohm_gpu.*\",instance=\"$instance\"}",
"refId": "StandardVariableQuery"
},
"refresh": 1,
Expand All @@ -4076,5 +4076,5 @@
"timezone": "",
"title": "Ohm Windows Desktop",
"uid": "EEQD4wv7z",
"version": 35
"version": 38
}

0 comments on commit 6e2b241

Please sign in to comment.