influxdb
influxdb copied to clipboard
must set query-log-enabled = true when want to log slow query only.
Bug report
Influxdb version = 1.3.5
I must set 'query-log-enabled = true' when I want to log slow query.
when I configure the influxdb.conf below: influxdb.conf [data] ... query-log-enabled = false
[coordinator] query-timeout = "60s" log-queries-after = "10ms"
The result is that influxdb didn't ouput log about any query. Then I set query-log-enabled = true, I can see all query log including 'slow query log'. I think it is not reasonable. May be have any better workaround to log slow query only?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.
Guess that a doc notice for log-queries-after
will be enough to workaround this issue in many cases.
@dgnorton could you maybe reopen the issue? Is there a way to log the slow queries, without logging all queries? If not, then I believe this is still a valid issue.
@jimis did you try setting log-queries-after
? https://docs.influxdata.com/influxdb/v1.7/troubleshooting/query_management/#log-queries-after
Yes of course, I have set it to log-queries-after = 1s
together with query-log-enabled = false
. It's not clear from the page you linked, if that combination works. I assumed it doesn't after finding this bug report.
This is apparently still an issue in version 1.9.3. Will there be a fix?
This is still an issue in version 1.9.5 , when we set [data] ... query-log-enabled = true [coordinator] query-timeout = "60s" log-queries-after = "2ms"
It logs all the queries even which are shorter than 2ms.