dashboards: respect $job var in sub-vars for cluster dash (#3487)

Previously, $job_select, $job_storage and $job_insert
didn't respect the $job filter. This change updates
the variable queries to account for set $job variable.

Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
Roman Khavronenko 2022-12-16 09:53:32 +01:00 committed by GitHub
parent 17a244571b
commit e40c7d6efa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8646,81 +8646,6 @@
"skipUrlSync": false,
"type": "datasource"
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"definition": "label_values(vm_app_version{version=~\"^vminsert.*\"}, job)",
"hide": 2,
"includeAll": false,
"multi": false,
"name": "job_insert",
"options": [],
"query": {
"query": "label_values(vm_app_version{version=~\"^vminsert.*\"}, job)",
"refId": "VictoriaMetrics-job_insert-Variable-Query"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"definition": "label_values(vm_app_version{version=~\"^vmselect.*\"}, job)",
"hide": 2,
"includeAll": false,
"multi": false,
"name": "job_select",
"options": [],
"query": {
"query": "label_values(vm_app_version{version=~\"^vmselect.*\"}, job)",
"refId": "VictoriaMetrics-job_select-Variable-Query"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"definition": "label_values(vm_app_version{version=~\"^vmstorage.*\"}, job)",
"hide": 2,
"includeAll": false,
"multi": false,
"name": "job_storage",
"options": [],
"query": {
"query": "label_values(vm_app_version{version=~\"^vmstorage.*\"}, job)",
"refId": "VictoriaMetrics-job_storage-Variable-Query"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"current": {},
"datasource": {
@ -8746,6 +8671,81 @@
"type": "query",
"useTags": false
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"definition": "label_values(vm_app_version{job=~\"$job\", version=~\"^vminsert.*\"}, job)",
"hide": 2,
"includeAll": false,
"multi": false,
"name": "job_insert",
"options": [],
"query": {
"query": "label_values(vm_app_version{job=~\"$job\", version=~\"^vminsert.*\"}, job)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"definition": "label_values(vm_app_version{job=~\"$job\", version=~\"^vmselect.*\"}, job)",
"hide": 2,
"includeAll": false,
"multi": false,
"name": "job_select",
"options": [],
"query": {
"query": "label_values(vm_app_version{job=~\"$job\", version=~\"^vmselect.*\"}, job)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"definition": "label_values(vm_app_version{job=~\"$job\", version=~\"^vmstorage.*\"}, job)",
"hide": 2,
"includeAll": false,
"multi": false,
"name": "job_storage",
"options": [],
"query": {
"query": "label_values(vm_app_version{job=~\"$job\", version=~\"^vmstorage.*\"}, job)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": ".*",
"current": {},