-
Notifications
You must be signed in to change notification settings - Fork 12.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dashboard + filter set to single values + influxdb breaks query #571
Comments
Yes, if filter is a string you need to wrap it in quotes. If it was done automatically it could cause issues for numeric properties, and where influxdb sql queries contain math, for example value > [[limit]] As for how to handle multiple values in filters (like 'All'), that is trickier and not supported yet. The whole filter feature is something that needs to be rewritten to better support influxdb scenarios. Something that is likely to happen some time after summer. |
we will also need to check that the future filter behaviour will fit the On 9 July 2014 17:33, Torkel Ödegaard notifications@github.com wrote:
|
Hello,
I'm using Grafana with InfluxDB backend.
I had a problem with a dashboard with a filter Server and a graph using a query that is defined like
the values for the filter is something like:
now, one of the values that this query returns is 192.168.1.2 (no single quotes surrounding this).
this is what will get executed:
which doesn't work (single quotes need to surround the [[Server]] value).
I changed the main query to
my problem is related to issue #570 I posted earlier but
slightly different.
If Grafana would expand all the values of the filter in (element1, ..., elementN) and
I manipulated the query to use a IN clause,
I have no way to surround each value with single quotes.
The where clause I would need to have generated would be this:
Possible solution 1 (broken query):
Possible solution 2 (broken query):
am I missing another alternative?
with a fix for issue #570
I'd need the ability to tell Grafana to surround values with single quotes:
I've make a hack and created yet another series just for filter values with single quotes but
it seems overkill since now I have to keep this new grafana.filters.servers up-to-date.
cheers!
The text was updated successfully, but these errors were encountered: