Questions tagged [grafana-variable]
245 questions
0
votes
1 answer
Grafana Query Variables - Functions
I am creating observability metrics which needs some variables. The variables I am looking for is currentDate or currentHour. I am adding Query type and Data Source is Prometheus, however I am not able to get result for hour() function. It is giving…

hakash
- 1
- 1
0
votes
1 answer
How to query for Servers from Prometheus target endpoints in Grafana variables?
I have prometheus target endpoint http://10.x.x.x/9090/targets .
I am able to see the endpoints which are scraping metrics from the node.
I want to get those endpoints as servers in grafana dashboard dropdown. Currentyl it is being displayed as…
0
votes
0 answers
Why Grafana Variables query from data source ElasticSearch returned None?
In elastic exist index
gitlab-ci-store
create POST
PUT gitlab-ci-store
{
"mappings": {
"properties": {
"gitlab-ci-store": {
"properties": {
"project_root": { "type": "keyword"},
"project_name": { "type":…

Nikolay Baranenko
- 1,582
- 6
- 35
- 60
0
votes
0 answers
Using JSON on Grafana's Worldmap Panel
The Worldmap Panel plugin for Grafana's documentation specifies the necessary input data like the following:
[
{
"key": "SE",
"latitude": 60.128161,
"longitude": 18.643501,
"name": "Sweden"
},
{
"key": "US",
"latitude":…

johnwayne6969
- 15
- 1
- 4
0
votes
0 answers
How to use auth0 token data in Grafana variable dropdown
I have set up a Grafana instance and connected it with the oauth_generix provider to auth0.com. All works fine, group and role sync is working as well. I have > 1000 users in auth0 and each has his own data to view (separated by a user id).
What I…

Reggi
- 402
- 8
- 21
0
votes
0 answers
Grafana Postgres ERROR when using Variables with ALL in WHERE clause multi value case when did not work
In Grafana Postgres Datasource has been integrated. For the report Generation, I have added Variables, for example, type. I have used case when clause in this variable filter.
case when type 0 then "ZERO" when type 1 then "ONE", when type 2 then…

user1631072
- 51
- 2
- 9
0
votes
0 answers
Grafana - Change a value in the query result of a variable
I have a variable that is getting set using a query from a dynamic data source. But the issue here is that one of the values contain special characters i.e. '+'. Due to which I am unable to visualize this variable in the Grafana dashboard.
E.g.
The…

Syed Samad Shakeel
- 27
- 3
0
votes
0 answers
Usage of dashboard variable in queries
I'm fairly new to grafana and I am confused how to solve this elegantly:
I have a custom dashboard variable ["device1", "device2", "device3"].
I know how to use the $(variablename) Syntax to query for the currently selected option.
But in an…

MarkusCZ
- 1
0
votes
0 answers
Can we create a custom variable using multiple custom variables
I have some custom variables like CPU usage, Memory Usage, CPU cores, and Total Memory.
Now I want to create another custom variable with values 3,5,10. But for every value in the new custom variable, I want to pass values using in above custom…

KUMAR
- 1
- 1
0
votes
0 answers
Dashboard is frozen - no recent changes
When I try to load my Grafana dashboard , it sometimes freezes and the page becomes unresponsive. I can’t click anything. Only a couple panels show data before it freezes, and the rest of the panels are stuck with the rotating arrows.
I have not…

user9387
- 41
- 7
0
votes
2 answers
Why single quote escape cannot be used in QuestDB, Error: dangling expression
I'm trying to use Query Variables in Grafana, the panel query source is PostgreSQL for QuestDB.
I have added the variable without any issue, but I'm unable to use the variable in Panel query since the variable values contains the spaces (SENSOR01…

Shekar Kola
- 1,287
- 9
- 15
0
votes
1 answer
Grafana Graph CPU for multiple hosts based on variable
I am using GrafanaCloud. I have a dashboard variable to create a list of nodes:
node -> label_values(agent_hostname)
Then I have my query to graph CPU for the selected hostname:
instance:node_cpu_utilisation:rate5m{agent_hostname="$node"}
This…

jonny
- 508
- 5
- 11
0
votes
2 answers
How to find the instance status based on the Loki logs?
I am creating a panel to show the instance's health status. In LOKI, If "ERROR" is present in the log then the instance status should be in Red else it should be in Green.
I'm using the following query,
{component="dz-snmp",…

Roopchand
- 33
- 5
0
votes
1 answer
Grafana dashboard using start: ${__from}, stop: ${__to} stopped working
I have a dashboard in grafana (v 8.4.4) that uses InfluxDB with Flux query which looks something like this:
from(bucket: "landscape_sizing")
|> range(start: ${__from}, stop: ${__to})
|> filter(fn: (r) => r["_measurement"] == "old_snapshots")
If I…

cvyrtik
- 15
- 4
0
votes
1 answer
How to have a variable save from previous queries? (Prometheus/Grafana)
I currently have a custom variable that saves the names of the branches I am testing, for example a and b. However, in the future I will have branches with different names and instead of manually putting in the names I would like to autofill it with…

bag24
- 1
- 1