Questions tagged [grafana-templating]

Add this tag to questions regarding Grafana Templating.

188 questions
2
votes
1 answer

Dynamic dropdown values grafana with prometheus

This is probably simple and I am missing some piece. I have a grafana dashboard backed by prometheus. Prometheus is running in two different kubernetes cluster. What I want is the first dropdown to be the cluster - say A and B. And based on what I…
user2237511
  • 1,089
  • 2
  • 13
  • 20
2
votes
1 answer

How to query influxdb within grafana dashboard to create a template variable

I am collecting metrics using telegraf and the system plugin on influxdb, I am trying to create some singlestats pannels to measure the load average on multiple instances with accurate "warnings" For doing this I need to create a template variable…
nbari
  • 25,603
  • 10
  • 76
  • 131
2
votes
1 answer

Multi series line graph in GRAFANA

I am trying to develop a multi series line graph in grafana with mysql queries. Here I had two mysql query , but the graphs appear in continuous manner and not in multi series line manner. Below I pasted the graph. Here the x-axis (months) are…
user28094
  • 41
  • 1
  • 4
2
votes
1 answer

Grafana: avoid variable interpolation by escaping $

I have a query in Grafana for templating (against Influx) which has a tag which key contains the $ character. How can I escape $ to avoid its interpolation with the variable? Query: SHOW TAG VALUES FROM "exdemon-analysis" WITH KEY =…
DLanza
  • 113
  • 9
2
votes
2 answers

InfluxDB - Drop series is not working

I want to delete some hosts that I'm not using anymore because show up on grafana with templates and I don't want that. I execute drop series from measurement where host = 'hostName' Then I execute show series from measurement The host still there.…
FranAguiar
  • 637
  • 3
  • 14
  • 31
2
votes
2 answers

Grafana: global variables to access [from,to] values of the time range

I am doing some tests with a MySQL data-source and make use of the timefilter inside the SQL query: // my query goes here... WHERE $__timeFilter(time_start); which generates something like the following: WHERE time_start >=…
tgogos
  • 23,218
  • 20
  • 96
  • 128
1
vote
0 answers

How to add node_filesystem_avail_bytes metric value to description grafana?

I'm having a problem. When I set up alert rules in prometheus, I had a disk space monitoring rule that showed me the percentage of remaining space and humanize the value of the node_filesystem_avail_bytes metric. Now my rule looks like this: -…
1
vote
1 answer

Combine two log and calculate the timestamp gap

Is it possible to combine two log which has same related_id and both also has a timestamp field and compute time gap between their timestamp, right now I has extracted them and give them two label to mark their time and related_id low below…
lee_zone
  • 11
  • 2
1
vote
1 answer

Grafana Variable based on other variables

I have a Grafana dashboard panel, it does have a variable called host, host can be domain1.com, domain2.com, domain3.com, domain4.com. I need another custom variable (var2) that be somehow connected to the host, for instance when user choose…
SMA
  • 157
  • 1
  • 1
  • 11
1
vote
1 answer

How to pass notification template from values.yaml for Grafana Helm chart

have been trying to create a notification template from values but it doesn't seem to be working. Code: alerting: rules.yaml: apiVersion: 1 templates: - orgID: 1 name: Slack Template template: | …
1
vote
1 answer

Prometheus query not working for Grafana Variable

I am trying to create a variable in Grafana using below query to return me a number based on cpu usage percentage. This works fine for panels but it throws an error when I try to create a variable out of it. (vector(1) and on()…
PratikKGupta
  • 343
  • 1
  • 3
  • 11
1
vote
1 answer

In Grafana, is there a way to re-use parts of Prometheus queries with templated parameters?

I find myself repeating very similar Prometheus queries in Grafana, with minor differences (mostly to the metric name). Is there a way to reuse these and supply the metric name as a parameter? As an example, I have the following…
Adam Lindberg
  • 16,447
  • 6
  • 65
  • 85
1
vote
0 answers

How to use regex in the Grafana Message Template and replace it

When an alert occurs, I want to create a template using Prometheus metric and value. There was no problem when the value string is 1 array string, but there is a problem when there are N. e.g) ValueString: [ var='A0' metric='a' labels={labelA=a}…
Rightly
  • 31
  • 2
1
vote
0 answers

Grafana: How to avoid executing query while zoom in or out?

I have 4 timeseries panels in my dashboard and the query does not have any timefilter in it. So, all the data is fetched. Now, when ever I zoom in or out, these queries are re-executed. Since, they are going to fetch same results, there is no use in…
Selva
  • 951
  • 7
  • 23
1
vote
1 answer

Dynamic Recipient using Grafana Slack Contact Point

I have a Grafana question. I have multiple alerts set up based on different services. Each service has its own dedicated slack channel. I want an alert to trigger a slack notification and dynamically have the recipient (slack channel) to be chosen.…
fixnode
  • 97
  • 3
  • 8
  • 32