Grafana template "Refresh On Dashboard Load" not working

I am using Grafana v4.4.3 (commit: 54c79c5) for displaying Prometheus metrics.
For my Grafana Dashboard, I created a template variable of type Query with query

label_values(node_boot_time, job)

and set it to “Refresh On Dashboard Load”.

In the beginning, my prometheus.yml had 2 scraping targets, hence I got 2 jobs in my template drop-down.

After deleting 1 target from prometheus.yml and restarting Grafana & Prometheus, I expected the drop-down to contain 1 job.

But it is still showing the previous 2 jobs in the template variable drop-down. The variable value is not being updated.

Can anyone please help me out here?

A screenshot of my Grafana template variable is attached for reference

I found the problem.

Grafana will continue to show the template variable as long as it has some data to display.
As soon as I changed Quick Ranges from “Last 6 hours” to “Last 1 hours”, the deleted job disappeared.

1 Like