Questions tagged [grafana-variable]
245 questions
13
votes
2 answers
Define default value for Grafana dashboard variable
I have defined a variable in a Grafana dashboard through Grafana dashboard settings
Variable is of "Custom" type.
I want this variable having a default value when dashboard is opened.
How can I set a default value ?

RandomCoder
- 6,606
- 6
- 22
- 28
8
votes
1 answer
Grafana Dashboard show/hide row based on variable value
So, I have a Grafana dashboard to show the logs of various services running inside a host.
Now, I have different rows for different service because metrics and there titles are specific to the service - Such as for Apache Service, we have log…

shiva2492
- 409
- 3
- 10
6
votes
1 answer
Grafana - Is it possible to use variables in Loki-based dashboard query?
I am working on a Loki-based Dashboard on Grafana. I have one panel for searching text in the Loki trace logs, the current query is like:
{job="abc-service"}
|~ "searchTrace"
|json
|line_format "{if .trace_message}} Message: \t{{.trace_message}}…

Ken Tsoi
- 1,195
- 1
- 17
- 37
6
votes
0 answers
How to make Grafana send alert messages with values coming from relational database query
I have a grafana dashboard.
And I need to send alerts messages with especific values.
I need an alert message with values returned by query (text, tags).
Time series query:
Alert configuration:
I'm receiving this alert:
As we see, I tried diffent…

Uenderley Montenegro
- 83
- 6
6
votes
1 answer
How to support global variable in Grafana common to all dashboards?
I am using a custom formula in a variable that I want to use across multiple dashboards. Is there a way to make global variable in grafana?

Harshit Vijayvargia
- 173
- 2
- 12
6
votes
1 answer
Grafana variable for all prometheus metrics with prefix
I would like a Grafana variable that contains all the Prometheus metric names with a given prefix. I would like to do this so I can control what graphs are displayed with a drop down menu. I'd like to be able to display all the metrics matching the…

Stratus3D
- 4,648
- 4
- 35
- 67
6
votes
1 answer
Grafana user variables
is it possible to use Grafana's userID or user variables in MySQL query ?
For example :
SELECT id,name FROM table WHERE user_id=$Grafana.User.id
Or is there another way to assign a custom variable to specific user within Grafana ?

user1972670
- 397
- 1
- 4
- 15
5
votes
1 answer
Grafana message templates
I am currently setting up grafana alerts. How do I customize my message template so my alert email shows The ip address of the server, the state of the server and the node/instance?
Thank you.

vinisha harinarain
- 51
- 2
5
votes
3 answers
Show or hide query result depending on variable value in Grafana
I'm trying to show/hide queries on the graph panel depending on the dashboard variable values.
Motivation.
On the same graph panel (which is used to display several hosts) I have two…

Pavel Sapezhko
- 661
- 1
- 6
- 24
5
votes
3 answers
How can I use key/value dashboard variables in Grafana + InfluxDB?
I’m trying to suss out how to format my key/value pair dashboard variable. I’ve got a variable whose definitions are:
sensor_list = 4431,8298,11041,13781
sensor_kv = 4431 : Storage,8298 : Stairs,11041 : Closet,13781 : Attic
However, I can't seem to…

Chris R
- 17,546
- 23
- 105
- 172
5
votes
1 answer
Chaining grafana variables
How do you chain grafana variables to filter template panels
Grafanav6.2.5
Datasource: prometheus
Data: Kubernetes metrics
I want to be able to select the first variable e.g. Cluster, then select the second variable which shows only say nodes in…

Andy Brannelly
- 53
- 1
- 5
4
votes
1 answer
Error updating options: "expanding series: block: XXXXXXXXXXXXXXX : decode postings: invalid size"
I am getting following error while fetching metrics from prometheus, not able to find anything related on internet also not finding anything related in the logs .. please help what's going wrong here
Error updating options: "expanding series: block:…

Amit Pundir
- 41
- 3
4
votes
0 answers
how to regex replace when defining grafana variables
In grafana variable, after query (domain:$domain workflow:$workflow | tag type), the values are all with /
how to use regex to replace / with _ ?
Thanks

BAE
- 8,550
- 22
- 88
- 171
4
votes
3 answers
Grafana :: Cannot login to http://localhost:3000/login
I freshly installed Grafana and I cannot login at http://localhost:3000/login
All documentation shows that the default user/password should be admin/admin but I'm locked out.
If I go to check into the file C:\Program…

Francesco Mantovani
- 10,216
- 13
- 73
- 113
4
votes
4 answers
How to plot horizontal line in Timeseries in Grafana
I use grafana to plot timeseries data. In a timeseries plot i want to add a constant line which comes from a monitoring level. The value of that level is dynamic (from a postgres database) the timeseries come from a ifluxdb Datasource.
The…

renzop
- 1,194
- 2
- 12
- 26