influx 1.4 grafana 4.x (any version 4 i tried )
I ran into this problem with 1.2.2 and 4.x of grafana which didn’t work either.
works fine grafana 3.2 and influx 1.4
I’m trying to upgrade to 4.6
I’ve had this problem for a while and have been trying to figure out a solution. I’m passing a large number of guids to a regex expression, and it is taking a long time for the query to run 7 to 8 minutes. I see that it makes the influxdb cpu spike for the amount of time it is working on it. So, it’s not waiting for anything. This works fine grafana 3.2 and influx 1.4. I’m running this my production. I can’t see the difference when grafana makes the call between the versions. Doing a “show queries” in the influx the query looks a lot like this 10 guid query excepted it has 3000 guids
(When I do a show queries from influx I see this query)
SELECT sum(success) / sum(total) * 100.000 AS success FROM rates WHERE id =~ /(3897f423-a4c1-4db2-b597-b2aee9485857|f3470a5f-20e6-496b-a490-de4541796748|2578a079-3dc6-448f-93e0-18915f429566|827f3a06-c9a4-4355-93a9-2202798441d5|fg013f23-62a8-4e10-94cd-f49ed3364b4d|530aed30-a58e-4b1f-bffa-7e06e885a55c|c908bad0-527b-483b-83f2-c18ee5179318|67b5cf45-b205-4295-820c-eba3515e713d|g096c2c0-b4c0-4db1-8304-dcea87c6ff99|25497141-5af2-4f0d-89b5-bb83b003a8f0)/ AND time > now() - 7d GROUP BY time(1d)
Two reasons I have to do the regex. 1) I need to be able to do grouping on the data after the collection so I can’t do it with tags. 2) There is no “in” clause in influx SQL.
The idFilter is generated by a SimpleJsondatasource I’m sure that this is not causing the issue because I see the query in the influx log, it looks correct, and it get’s to influx pretty quick when the dashboard is loading.
Here is the grafana query
SELECT sum(success) / sum(total) * 100.000 AS success FROM rates WHERE id =~ /$idFilter/ AND time > now() - 7d GROUP BY time(1d)
Any idea how to figure out what’s wrong with this?
Thanks