How to find out the source of queries which are getting executed in InfluxDB

Hi All,

We are facing a situation related to the number of queries which are getting executed in our InfluxDB instance. We have observed that during certain period of hours every day the total no. of query counts increases 30 times of normal query counts. So I would like to know if there is a way we can identify the source of all the queries. This way we will be able to do some analysis & can get fair amount of idea on the source of these queries. I am using below query to get last 24 hours data to find out the difference in the query count per hour :
SELECT non_negative_derivative(max(“queriesExecuted”),1h) FROM “_internal”.“monitor”.“queryExecutor” WHERE time > now() - 24h GROUP BY time(1h)

Any help on this will be much appreciated.
Thanks,
Sushil

Hello @teotiasushil,
What version of InfluxDB are you using?

Hi,

We are using 1.5 version of influxdb OSS.

Thanks,
Sushil

Hello @Anaisdg ,

Any help will be appreciated.

Thanks,
Sushil

I think your best bet is the HTTP access log, afaik it’s the only one that shows you the IP of the caller.

Other logs or queries (SHOW QUERIES) might report the query, but not where it came from

1 Like

Thanks @Giovanni_Luisotto. I will try this out.