I previously posted this question of the Grafana forums. I’m curious if there is an InfluxDB setting that will help. I’m running into the the issue of Grafana letting people easily query too much data which is bogging down the server. Does InfluxDB have a method to limit requests coming from a specific host? It would be nice to limit Grafana requests while keeping things open for data writing.
I’m currently using Grafana to view InfluxDB data. Occasionally, we will have users submit a very large queries with small update intervals (i.e. query last 7 days, update browser every 5 seconds).
Essentially, the Grafana query doesn’t respond within 5 seconds before a new query is issued. These queries seem to cascade overtime and bog down the server’s NIC.
Are there any methods to prevent this behavior? Specifically I’m looking for a way to disable these queries from piling up.
In Grafana you can delete the 5 sec option from the list in the dashboard. I know some other people are using gateways/proxies to edit the query in real time to limit people from doing something like this. I think they also use it to select the right retention policy for down sampled data. Maybe you could down sample it faster if you don’t need the precision with every request, particularly with 7 day queries. I want to say there is an option for the number of responses as well but I would need to verify. That should be in the query options at the top. Do you control these queries and they are just selecting the time frame or is it a free for all?
As of currently, it’s somewhat of a free-for-all but are looking for better “controls”. The biggest issue right now is that there are valid reasons when we should be querying 1ms data, however, it would be nice to only allow those for small time ranges. It would be nice to dynamically reduce this if the time range was large.
However, I think the realistic solution is going to come from better Grafana controls to limit bad queries.
Wow, 1ms? That’s very low resolution. Most of what Grafana is used for is machine metrics. I am ingesting OPC data and even that is at 200ms subscriptions. That’s a lot of data coming back over the wire for all but the shortest time frames. It sounds like this is a lot of ad hoc usage still. Use the max data point limit on the query options for sure. I assume your not running a 10Gbit network if the NIC is easily saturated.