Rename DS_LOCALHOST to prometheus $datasource

This is more universal approach so dashboard would work no matter how prometheus datasource is named.
This commit is contained in:
Vitaly Zhuravlev 2022-05-11 12:17:31 +04:00
parent 7017a838cf
commit f6d1b08a63

View file

@ -4,7 +4,7 @@
{
__inputs: [
{
name: 'DS_LOCALHOST',
name: 'datasource',
label: 'localhost',
description: '',
type: 'datasource',
@ -62,7 +62,7 @@
'rgba(237, 129, 40, 0.89)',
'rgba(50, 172, 45, 0.97)',
],
datasource: '${DS_LOCALHOST}',
datasource: '${datasource}',
decimals: 1,
format: 's',
gauge: {
@ -135,7 +135,7 @@
bars: false,
dashLength: 10,
dashes: false,
datasource: '${DS_LOCALHOST}',
datasource: '${datasource}',
decimals: 0,
fill: 7,
id: 5,
@ -243,7 +243,7 @@
bars: false,
dashLength: 10,
dashes: false,
datasource: '${DS_LOCALHOST}',
datasource: '${datasource}',
decimals: 2,
fill: 1,
id: 3,
@ -321,7 +321,7 @@
bars: false,
dashLength: 10,
dashes: false,
datasource: '${DS_LOCALHOST}',
datasource: '${datasource}',
decimals: 2,
fill: 1,
id: 1,
@ -411,7 +411,7 @@
bars: false,
dashLength: 10,
dashes: false,
datasource: '${DS_LOCALHOST}',
datasource: '${datasource}',
decimals: 2,
fill: 1,
id: 2,
@ -502,7 +502,7 @@
bars: false,
dashLength: 10,
dashes: false,
datasource: '${DS_LOCALHOST}',
datasource: '${datasource}',
decimals: 2,
fill: 1,
id: 7,
@ -580,7 +580,7 @@
bars: false,
dashLength: 10,
dashes: false,
datasource: '${DS_LOCALHOST}',
datasource: '${datasource}',
decimals: 2,
fill: 1,
id: 4,
@ -667,10 +667,26 @@
tags: [],
templating: {
list: [
{
current: {},
description: null,
'error': null,
hide: 0,
includeAll: false,
label: 'Data Source',
multi: false,
name: 'datasource',
options: [],
query: 'prometheus',
refresh: 1,
regex: '',
skipUrlSync: false,
type: 'datasource',
},
{
allValue: null,
current: {},
datasource: '${DS_LOCALHOST}',
datasource: '${datasource}',
hide: 0,
includeAll: false,
label: 'host',
@ -690,7 +706,7 @@
{
allValue: null,
current: {},
datasource: '${DS_LOCALHOST}',
datasource: '${datasource}',
hide: 2,
includeAll: false,
label: null,