I am new to Grafana, but I have created several dashboards and I am really enjoying it. However, I have hit a roadblock that I can’t seem to solve. I would like to have a page showing the up/down status of nodes. I want a filter (variable) at the top of the dashboard as a filter to show only the nodes that are down, the nodes that are up, or all nodes. I am able to create the panel to show all nodes, but I can’t figure out the proper way to filter to only show the up or down nodes.
My query is simple: up
How would I create a variable based on the result of that panel query to create a filter? I’m sure it is simple, but for the life of me I can’t figure it out.
Thanks in advance!
welcome to the forum, @grazopper
I tried a solution but I feel like there is a more elegant way to do this. I would explore the queries in some of the popular, pre-configured dashboards for Prometheus on grafana.com. Here is one method, perhaps?:
Thank you for the reply! I have checked out the pre-configured dashboards, and I think it’s getting me closer to the answer. I’ve tried a Custom Variable, but when I select the option in the drop down, the custom variable seems to actually change my query and not just filter the display.
I really appreciate the response though. It has pointed me to resources I hadn’t considered before. I just need to keep playing to get it figured it.
Well, I don’t think it is possible to do what I want. I run the query UP, and try to modify the results with the custom variable (or query, or any other method). When the panel is displayed, any result that matches my custom variable displays properly (for example, 1 shows the up nodes), however any result that doesn’t match that returns a No Value. There does not seem to be any way to dynamically hide a panel based on the No Value. For now, I can only make a panel that shows all up and down, and not just one or the other. Hopefully that changes as I have a lot of devices (~1,200) monitored and it gets very messy to see them all on one panel.
It sounds like you want to use chained variables. Here are some useful starting points and example dashboards in our public sandbox