Fix dashboard for matching environment name
Change-Id: I05ad28a3b10e5ba665f61f495beec3077a0f83eb
This commit is contained in:
parent
75f38cb940
commit
308f9e4f0e
1 changed files with 49 additions and 13 deletions
|
@ -83,7 +83,7 @@
|
||||||
],
|
],
|
||||||
"measurement": "lma_components_threads",
|
"measurement": "lma_components_threads",
|
||||||
"policy": "default",
|
"policy": "default",
|
||||||
"query": "SELECT last(\"value\") FROM \"lma_components_threads\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /$server$/ AND $timeFilter GROUP BY time($interval)",
|
"query": "SELECT last(\"value\") FROM \"lma_components_threads\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"resultFormat": "time_series",
|
"resultFormat": "time_series",
|
||||||
"select": [
|
"select": [
|
||||||
|
@ -110,7 +110,13 @@
|
||||||
"condition": "AND",
|
"condition": "AND",
|
||||||
"key": "hostname",
|
"key": "hostname",
|
||||||
"operator": "=~",
|
"operator": "=~",
|
||||||
"value": "/$server$/"
|
"value": "/^$server$/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "AND",
|
||||||
|
"key": "environment_label",
|
||||||
|
"operator": "=~",
|
||||||
|
"value": "/^$environment$/"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -182,7 +188,7 @@
|
||||||
],
|
],
|
||||||
"measurement": "lma_components_memory_rss",
|
"measurement": "lma_components_memory_rss",
|
||||||
"policy": "default",
|
"policy": "default",
|
||||||
"query": "SELECT mean(\"value\") FROM \"lma_components_memory_rss\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
|
"query": "SELECT mean(\"value\") FROM \"lma_components_memory_rss\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"resultFormat": "time_series",
|
"resultFormat": "time_series",
|
||||||
"select": [
|
"select": [
|
||||||
|
@ -209,7 +215,13 @@
|
||||||
"condition": "AND",
|
"condition": "AND",
|
||||||
"key": "hostname",
|
"key": "hostname",
|
||||||
"operator": "=~",
|
"operator": "=~",
|
||||||
"value": "/$server$/"
|
"value": "/^$server$/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "AND",
|
||||||
|
"key": "environment_label",
|
||||||
|
"operator": "=~",
|
||||||
|
"value": "/^$environment$/"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -302,7 +314,7 @@
|
||||||
],
|
],
|
||||||
"measurement": "lma_components_disk_bytes_read",
|
"measurement": "lma_components_disk_bytes_read",
|
||||||
"policy": "default",
|
"policy": "default",
|
||||||
"query": "SELECT mean(\"value\") FROM \"lma_components_disk_bytes_read\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
|
"query": "SELECT mean(\"value\") FROM \"lma_components_disk_bytes_read\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"resultFormat": "time_series",
|
"resultFormat": "time_series",
|
||||||
"select": [
|
"select": [
|
||||||
|
@ -329,7 +341,13 @@
|
||||||
"condition": "AND",
|
"condition": "AND",
|
||||||
"key": "hostname",
|
"key": "hostname",
|
||||||
"operator": "=~",
|
"operator": "=~",
|
||||||
"value": "/$server$/"
|
"value": "/^$server$/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "AND",
|
||||||
|
"key": "environment_label",
|
||||||
|
"operator": "=~",
|
||||||
|
"value": "/^$environment$/"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -354,7 +372,7 @@
|
||||||
],
|
],
|
||||||
"measurement": "lma_components_disk_bytes_write",
|
"measurement": "lma_components_disk_bytes_write",
|
||||||
"policy": "default",
|
"policy": "default",
|
||||||
"query": "SELECT mean(\"value\") FROM \"lma_components_disk_bytes_write\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
|
"query": "SELECT mean(\"value\") FROM \"lma_components_disk_bytes_write\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
|
||||||
"refId": "B",
|
"refId": "B",
|
||||||
"resultFormat": "time_series",
|
"resultFormat": "time_series",
|
||||||
"select": [
|
"select": [
|
||||||
|
@ -381,7 +399,13 @@
|
||||||
"condition": "AND",
|
"condition": "AND",
|
||||||
"key": "hostname",
|
"key": "hostname",
|
||||||
"operator": "=~",
|
"operator": "=~",
|
||||||
"value": "/$server$/"
|
"value": "/^$server$/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "AND",
|
||||||
|
"key": "environment_label",
|
||||||
|
"operator": "=~",
|
||||||
|
"value": "/^$environment$/"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -474,7 +498,7 @@
|
||||||
],
|
],
|
||||||
"measurement": "lma_components_cputime_syst",
|
"measurement": "lma_components_cputime_syst",
|
||||||
"policy": "default",
|
"policy": "default",
|
||||||
"query": "SELECT mean(\"value\") FROM \"lma_components_cputime_syst\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
|
"query": "SELECT mean(\"value\") FROM \"lma_components_cputime_syst\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"resultFormat": "time_series",
|
"resultFormat": "time_series",
|
||||||
"select": [
|
"select": [
|
||||||
|
@ -501,7 +525,13 @@
|
||||||
"condition": "AND",
|
"condition": "AND",
|
||||||
"key": "hostname",
|
"key": "hostname",
|
||||||
"operator": "=~",
|
"operator": "=~",
|
||||||
"value": "/$server$/"
|
"value": "/^$server$/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "AND",
|
||||||
|
"key": "environment_label",
|
||||||
|
"operator": "=~",
|
||||||
|
"value": "/^$environment$/"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -526,7 +556,7 @@
|
||||||
],
|
],
|
||||||
"measurement": "lma_components_cputime_user",
|
"measurement": "lma_components_cputime_user",
|
||||||
"policy": "default",
|
"policy": "default",
|
||||||
"query": "SELECT mean(\"value\") FROM \"lma_components_cputime_user\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
|
"query": "SELECT mean(\"value\") FROM \"lma_components_cputime_user\" WHERE \"service\" = 'grafana-server' AND \"hostname\" =~ /^$server$/ AND $timeFilter GROUP BY time($interval) fill(0)",
|
||||||
"refId": "B",
|
"refId": "B",
|
||||||
"resultFormat": "time_series",
|
"resultFormat": "time_series",
|
||||||
"select": [
|
"select": [
|
||||||
|
@ -553,7 +583,13 @@
|
||||||
"condition": "AND",
|
"condition": "AND",
|
||||||
"key": "hostname",
|
"key": "hostname",
|
||||||
"operator": "=~",
|
"operator": "=~",
|
||||||
"value": "/$server$/"
|
"value": "/^$server$/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "AND",
|
||||||
|
"key": "environment_label",
|
||||||
|
"operator": "=~",
|
||||||
|
"value": "/^$environment$/"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -683,5 +719,5 @@
|
||||||
},
|
},
|
||||||
"timezone": "browser",
|
"timezone": "browser",
|
||||||
"title": "Grafana",
|
"title": "Grafana",
|
||||||
"version": 1
|
"version": 2
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue