Better solution for node-id selector in grafana
This commit is contained in:
parent
e533d466d1
commit
8112426135
|
@ -22,7 +22,7 @@
|
|||
"fiscalYearStartMonth": 0,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1637358897801,
|
||||
"iteration": 1637412949229,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
|
@ -124,7 +124,7 @@
|
|||
"refId": "C"
|
||||
}
|
||||
],
|
||||
"title": "Traffic - $node_id - $hostname -",
|
||||
"title": "Traffic - $node_id",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
|
@ -686,12 +686,12 @@
|
|||
{
|
||||
"allValue": null,
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "30b5c2cb6e20",
|
||||
"value": "30b5c2cb6e20"
|
||||
"selected": true,
|
||||
"text": "60e32724578a - mw-cpe210-1",
|
||||
"value": "60e32724578a"
|
||||
},
|
||||
"datasource": null,
|
||||
"definition": "label_values(nodeid)",
|
||||
"definition": "query_result(label_join( max by (hostname,nodeid) (node_clients.total[1y]) , \"result\", \" - \", \"nodeid\", \"hostname\"))",
|
||||
"description": null,
|
||||
"error": null,
|
||||
"hide": 0,
|
||||
|
@ -701,41 +701,14 @@
|
|||
"name": "node_id",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(nodeid)",
|
||||
"query": "query_result(label_join( max by (hostname,nodeid) (node_clients.total[1y]) , \"result\", \" - \", \"nodeid\", \"hostname\"))",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"regex": "/nodeid=\"(?<value>[^\"]+)|result=\"(?<text>[^\"]+)/g",
|
||||
"skipUrlSync": false,
|
||||
"sort": 5,
|
||||
"type": "query"
|
||||
},
|
||||
{
|
||||
"allValue": null,
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "BHC-West02-Outdoor",
|
||||
"value": "BHC-West02-Outdoor"
|
||||
},
|
||||
"datasource": null,
|
||||
"definition": "query_result( max by (hostname) (node_clients.total{nodeid=\"$node_id\"}[1y]) )",
|
||||
"description": null,
|
||||
"error": null,
|
||||
"hide": 2,
|
||||
"includeAll": false,
|
||||
"label": null,
|
||||
"multi": false,
|
||||
"name": "hostname",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "query_result( max by (hostname) (node_clients.total{nodeid=\"$node_id\"}[1y]) )",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "/hostname=\"(?<value>[^\"]+)/g",
|
||||
"skipUrlSync": false,
|
||||
"sort": 0,
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -747,5 +720,5 @@
|
|||
"timezone": "",
|
||||
"title": "Node (public)",
|
||||
"uid": "KoKOqJc7k",
|
||||
"version": 14
|
||||
"version": 15
|
||||
}
|
Reference in New Issue