Variable updating issue

We’re using Icinga2 to monitor our data centre and services and I have configured it to write to InfluxDB. I have created a Grafana dashboard where a user can choose a host, then select from the list of services that we monitor on that host and get an availability report.

The variables are:
$Host - SHOW TAG VALUES FROM “hostalive” WITH KEY = “hostname”
$Service - SHOW TAG VALUES WITH KEY=“service” WHERE hostname=’$Host’
$measurement - SHOW MEASUREMENTS WITH MEASUREMENT =~ /^.*/ WHERE service=’$Service’

It generally works well, the list of services updates when you select a host, except for when the selected hostname contains a dot. When you select a hostname that contains a dot the list of services does not update. If you know the name of the service you can type it in and get your dashboard.
It is also an issue when accessing the dashboard via a URL so for example going to gives a broken dashboard which can be fixed by typing host-https into the Service box.

Does this sound like a Grafana bug?

More investigation reveals that Grafana is escaping the dots with a backslash before sending the query to InfluxDB. InfluxDB does not like the backslashes.

We have found a workaround by using the following for $Service:

SHOW TAG VALUES WITH KEY=“service” WHERE hostname=~ /^$Host$/