Grafana templates for Prometheus

2.6k views Asked by At

I am trying to update the node-exporter-full Grafana dashboard with some of our internal labels as templates. We have labels for "pod" and "servertype" which can be used to get a subset of "nodes" to list at the top of the dashboard.

I can add "pod" like:

label_values(pod)

Then I can reference "pod" in the node query as follows:

label_values(node_boot_time{job="clients",pod="$pod"}, instance)

This works. If I want to add servertype in the middle how would I pull a list of "servertype" based on "pod" which is selected?

I already know the "node" can be filtered with:

label_values(node_boot_time{job="clients",pod="$pod"},servertype="$servertype", instance)
2

There are 2 answers

0
tavor999 On BEST ANSWER

Answer was pretty simple once I reread the documentation. Using "up" function currently and it is working fine but there may be a better solution.

enter image description here

1
dibya ranjan mishra On

node_boot_time has been changed to node_boot_time_seconds

Refer to this link to get all the name changes since prometheus 0.16.0 https://github.com/prometheus/node_exporter/issues/830