Templating DataSource not working

I cannot template a datasource. I can add the template-variable and it shows up on top and populates correctly.

However, I cannot find the template variable in the Data Source drop-down above the queries. And trying to manually write $prometheus_ds is ignored, it magically jumps “–Mixed–” instead and uses “default” for the per-query datasource, which does not change when I change template datasource value.

Am I doing anything wrong, or is this a bug in the Data Source drop-down-select function?

Grafana v4.6.2 with Prometheus datasources.

Ok, so here is proof that I’m not demented :slight_smile:

BUT, when creating a fresh dashboard, then creating the template variables, and then creating a new panel it all works!

Strange - I can’t recreate this. It works on an existing dashboard for me. Is it still like this if you save the dashboard and refresh the page?

Did you find a solution for that?

Hi @omer-wenrix,

Welcome to the :grafana: community support forums !!

This post is approx. 5 years old and I think a lot has changed. If you are having problem with similar case, then would suggest you to open a new post and give all the information so that our community members can help you out.

2 Likes