Multiple option not working for Prometheus template #repost

I’m trying to make the include all/multiple option work for Prometheus templates and found a lead here:

But even for this dashboard, the multiple option gives an error. Any help would be highly appreciated.

http://play.grafana.org/dashboard/db/3-promcon-templating?orgId=1&var-custom_value=&var-jobs=node&var-disk_series=node_disk_bytes_read&var-disk_series=node_disk_bytes_written&var-disk_series=node_disk_sectors_read&var-query=up{instance%3D"demo.robustperception.io:9100",job%3D"node"}%201%201482360977000&var-datasource=demo.robustperception.io

Did you try to use a regex operator in your prometheus query? example {instance=~"$instance_name"}

And the dashboard you linked works great with multiple values selected:

http://play.grafana.org/dashboard/db/3-promcon-templating?orgId=1&var-custom_value=&var-jobs=alertmanager&var-jobs=node&var-jobs=prometheus&var-disk_series=node_disk_bytes_read&var-query=up{instance%3D"demo.robustperception.io:9090",job%3D"prometheus"}%201%201494525174000&var-datasource=demo.robustperception.io

see job variable has multiple selected and is used like job=~"$job".

The disk_series variable was wrongly configured to as it was used in the metric name, where you cannot use multiple values. Only label value filters can have multiple values.

Yeah makes sense.

For my specific case I have metric names with hostnames in them; for example I have a metric called disk_series_node_1, disk_series_node_2…disk_series_node_n and there’s no way of knowing how many could be there.

That’s why I made a template for metric name and tried to use the include all option. So basically there’s no way of doing that in the same panel?

No, you need to move the host name into a label for that