Questions tagged [grafana-variable]
245 questions
2
votes
2 answers
How to filter out some values of grafana dashboard variable?
I have such a variable but it returns some values which I don't want to see(template0 and template1)
How can I filter them out ?
I tried to write label_values(datname!~"template.*|postgres")
But grafana says that this definition has broken syntax

gstackoverflow
- 36,709
- 117
- 359
- 710
2
votes
0 answers
Creating Grafana Variables with MongoDB Query
I have some problems with mongodb query..
I will give an example with sql query and I want to write that with mongo db query in Grafana. Grafana supports mongo db 'find' and 'aggregate'.
table name = flow , column name = level
sql query example…

Semih ATİLLA
- 23
- 3
2
votes
0 answers
Change bucket size in Grafana histogram with variable
I would like to control the bucket size in a Grafana histogram using a dashboard variable.
I have this histogram depicting the price of taxi rides (from this dataset) with the following query:
SELECT time_bucket('$date_range', pickup_datetime) AS…

Mathis Van Eetvelde
- 300
- 3
- 10
2
votes
1 answer
Use variables on grafana loki queries (LogQL)
I have succesfully installed Loki on a server and Promtail on multiple hosts of my datacenter.
Each host runs a different number of tomcats, like tomcat10, tomcat11...tomcat20.
So on promtail, my job gets a label with the hostname and __path__ is…

user2087103
- 141
- 2
- 13
2
votes
1 answer
Grafana: How To Use $__timeFilter in a Grafana Query Variable
I'm trying to create a variable in Grafana that will pull distinct servers from a BigQuery database. I would like to only pull these servers from within a given time window like one would normally with something like WHERE $__timeFilter(timestamp).…

Bwilly
- 21
- 1
- 1
- 3
2
votes
0 answers
How to solve data resolution problem when using Prometheus irate() function in the Grafana?
My exporter scrapes metrics every 5 seconds. I set the range-vector of the query to 10 seconds, which is 2x of scrape interval, in order to catch 'spikes and dips',
The problem is Grafana automatically controls the resolution(step) of the graph, and…

Park Beomsu
- 71
- 4
2
votes
0 answers
How Do I Create A Variable That References Another Variable?
I am trying to figure out to create a variable that contains the value of another variable. One variable will contain the “root” name of an API and the actual API application name. Here’s what I mean.
Fully Qualified API Name:…

KSS
- 821
- 3
- 10
- 26
2
votes
1 answer
How to select multiple variables on variables filter of Grafana?
I've configured a variable called "product" which contains the following values:
prod1,prod2,prod3,prod4
I've already selected the multi-value option as the image below:
The measurement in influxdb is something like that:
col1 col2 col3
A …

GABRIEL ANDRADE QUEIROZ
- 83
- 1
- 1
- 7
2
votes
1 answer
How to get Text of selected template variable in Grafana
Grafana version 7.3.3.
I have a Custom variable created on top of JSON Datasource. Below payload I used to populate the variable options $Project
[{"text": "Proj1", "value": "1"}, {"text": "Proj2", "value": "2"}].
Now for the templating query I want…

curiousguy
- 3,212
- 8
- 39
- 71
2
votes
0 answers
Prometheus to count unique label value
I am looking for a way to count the unique label values and show each unique label count for each customer name. Here are my metrics. I need to get the count as apple=1, orange=1.
customer_alerts(alertname="a", customername="apple")
…

shilpaadvi
- 21
- 2
2
votes
1 answer
PromQL query to find the duration of each firing alert
I am creating a Grafana dashboard to see the total alert count for each firing alert and the duration ( means it should capture how long alerts have been firing state).
PromQL query used to capture the total alert count is as follows,
count by…

akhinair
- 73
- 1
- 7
2
votes
1 answer
Disable View, Share and More menu from graph in Grafana
How to disable the View, Share and More menu from the Grafana [Panel Menu --> View, Share, More–Export CSV, JSON etc;]. I don't want to show these options to user.

Harika
- 21
- 3
2
votes
0 answers
Request count sum for last 1 hour
I have a use case where I want to set the alerts from grafana on hourly basis. In this hourly alert I want to get the request count for each API in last 1 hour and collect them and sent along with the alert. I tried different combination of…

Prateek Jain
- 260
- 1
- 3
- 15
2
votes
0 answers
Dynamic Grafana thresholds, Thresholds using Variables or Thresholds on String value
I am using Grafana to create a dashboard where my data source is SQL Server and the threshold I would like is either:
A Dashboard variable.
String value from a column
I have created a variable that queries the DB and updates the variable:…

Dilshad Abduwali
- 1,388
- 7
- 26
- 47
2
votes
0 answers
unable to connect Azure china log analytics from Grafana
Able to connect to Azure rest of world Log analytics from Grafana but not to china Azure log analytics. Followed the same steps .
Getting below error :
Successfully queried the Azure Monitor service.
Azure Log Analytics: Cannot connect to Azure…

Chakith
- 57
- 5