-
What Grafana version and what operating system are you using?
I am using a Docker Container of Grafana and don’t have access to the docker host to tell me what version it is running. -
What are you trying to achieve?
I want to be able to select different data sets based on a server name. I have built the dashboard completely but i cant work out how to be able to select different server names and have that selection change the query to for the dashboard. -
How are you trying to achieve it?
I don’t know how to achieve this, that is why I am posting this message in the hope that someone can point me in the right direction to either a written or video tutorial on how to do it. I dont even know the key words to be searching for to achieve this. -
What happened?
Data doesnt change from server 01 -
What did you expect to happen?
For the data to change to server 02 if i select it. -
Can you copy/paste the configuration(s) that you are having problems with?
How do I do that? -
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
No -
Did you follow any online instructions? If so, what is the URL?
So far i taught myself everything, but am stuck on this part.
Hello,
to know which version you’re on click on this icon:
In order to add a variable, go to the dashboards’ settings → Variables → Add variable → Select variable type (either Query if you need to fetch its values from a datasource or Custom if you want to manually write the values). The other settings are simple, configure them to your needs and click Apply.
Now back to the Dashboard, for each Panel’s query, type $<variable-name>
to filter the data. Example:
cpu_time_up{server="$server"}
–
select *
from table1
where server = '$server'
So the Server Names are under the _measurement variable, What is the flux query i need to return just the _measurement names?
I think i worked it out.
import "influxdata/influxdb/v1"
v1.measurements(bucket: "ddc2")
Can you explain how it worked?
And by “_measurement”, were you referring to the Grafana variable?
The _measurement variable is the servername in my data schema (I know, most probably wrong thing to do but it seems to work) Then all the data elements are fields to that _measurement.