Hi,
I have read several old threads without a answers.
I have a dashboard with panel A and panel B. When a result is selected, for example a server, in panel A, I would like to see events for this specific server in panel B. Is that possible? Thanks
Hey @anders23fc – I read your question and I knew the answer should be “Yes”, and then I thought, “I need to know how to do that too!”
I worked up an example where I’m looking at the disk space on a set of hosts that I am running in a lab. The hosts are listed in a “bar gauge” panel. The dashboard has a variable called sel_hostname
which is the host I’m focusing on, but the bar gauge shows the entire set of machines, and I have a variable query that populates the list of values for the variable.
So then I had to form a “data link” that would set the sel_hostname
value based on which bar I clicked on. The tricky thing for me was figuring out what the URL should look like, specifically the “search” part (after the question mark).
Here’s the URL I settled on (redacted):
https://grafana.example.com/d/3HCocXm4k/disks?var-sel_hostname=${__field.labels.hostname}
So:
-
grafana.example.com
– the hostname to your server -
/d/3HCocXm4k/disks
– the path to the dashboard -
var-sel_hostname
– the dashboard variable to set -
hostname
– the value I clicked on in the bar gauge
Finally, I added a second panel that used that variable to display a “time series” panel for the root disk of the host I had clicked on.
Thanks for waking me up to something I needed to know how to do. The docs are pretty vague about how to do this, so I’m glad I had to figure it out!
Thanks! I will see if I can get it to work.
Is it possible for you to share your example file from the lab?