From b527eb1f2d7db4747cbaca94b1e4e1d909764b62 Mon Sep 17 00:00:00 2001 From: WeblWabl Date: Mon, 24 Feb 2025 09:23:18 -0600 Subject: [PATCH 1/6] feat: Update config-data-nodes for query logging This PR updates the data config documentation to include information about `query-log-path`. --- .../configure/config-data-nodes.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md b/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md index f45460a4d..51379b6ae 100644 --- a/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md +++ b/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md @@ -303,6 +303,29 @@ Very useful for troubleshooting, but will log any sensitive data contained withi Environment variable: `INFLUXDB_DATA_QUERY_LOG_ENABLED` +#### query-log-path + +Default is `""`. + +Whether queries should be logged to a file at a given path. +If the value is set to `""` (default) queries are not logged to a file. +Please make sure you are using the absolute path when configuring this. +We support `SIGHUP` based log rotation. The following is an example of a `logrotate` configuration: + +``` +/var/log/influxdb/queries.log { + rotate 5 + daily + compress + missingok + notifempty + create 644 root root + postrotate + /bin/kill -HUP `pgrep -x influxd` + endscript +} +``` + #### wal-fsync-delay Default is `"0s"`. From 15b2a76c36edc4c41794e7b29150015839ad4d5d Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Mon, 24 Feb 2025 10:01:39 -0600 Subject: [PATCH 2/6] Update content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md --- .../v1/administration/configure/config-data-nodes.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md b/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md index 51379b6ae..41f3d67d8 100644 --- a/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md +++ b/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md @@ -305,10 +305,8 @@ Environment variable: `INFLUXDB_DATA_QUERY_LOG_ENABLED` #### query-log-path -Default is `""`. - -Whether queries should be logged to a file at a given path. -If the value is set to `""` (default) queries are not logged to a file. +An absolute path to the query log file. +The default is `""` (queries aren't logged to a file). Please make sure you are using the absolute path when configuring this. We support `SIGHUP` based log rotation. The following is an example of a `logrotate` configuration: From cbe67338e523c103ebf7d12c7563d0025f630218 Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Mon, 24 Feb 2025 10:01:46 -0600 Subject: [PATCH 3/6] Update content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md --- .../v1/administration/configure/config-data-nodes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md b/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md index 41f3d67d8..b96b71e9d 100644 --- a/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md +++ b/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md @@ -307,7 +307,8 @@ Environment variable: `INFLUXDB_DATA_QUERY_LOG_ENABLED` An absolute path to the query log file. The default is `""` (queries aren't logged to a file). -Please make sure you are using the absolute path when configuring this. + + We support `SIGHUP` based log rotation. The following is an example of a `logrotate` configuration: ``` From da0cfc1871b3530daa4bd5251904935454e89fc2 Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Mon, 24 Feb 2025 10:01:53 -0600 Subject: [PATCH 4/6] Update content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md --- .../v1/administration/configure/config-data-nodes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md b/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md index b96b71e9d..b21f63774 100644 --- a/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md +++ b/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md @@ -309,7 +309,8 @@ An absolute path to the query log file. The default is `""` (queries aren't logged to a file). -We support `SIGHUP` based log rotation. The following is an example of a `logrotate` configuration: +Query logging supports SIGHUP-based log rotation. +The following is an example of a `logrotate` configuration: ``` /var/log/influxdb/queries.log { From 3b346d927d22718bd0ab76dc7d00c68162ac42e7 Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Mon, 24 Feb 2025 10:03:03 -0600 Subject: [PATCH 5/6] Update content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md --- .../v1/administration/configure/config-data-nodes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md b/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md index b21f63774..6eb3b4ec1 100644 --- a/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md +++ b/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md @@ -310,6 +310,7 @@ The default is `""` (queries aren't logged to a file). Query logging supports SIGHUP-based log rotation. + The following is an example of a `logrotate` configuration: ``` From b7dee87b03542d3838889a71d32190cb9df854ab Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Mon, 24 Feb 2025 10:03:10 -0600 Subject: [PATCH 6/6] Update content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md --- .../v1/administration/configure/config-data-nodes.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md b/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md index 6eb3b4ec1..c45d343f7 100644 --- a/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md +++ b/content/enterprise_influxdb/v1/administration/configure/config-data-nodes.md @@ -308,7 +308,6 @@ Environment variable: `INFLUXDB_DATA_QUERY_LOG_ENABLED` An absolute path to the query log file. The default is `""` (queries aren't logged to a file). - Query logging supports SIGHUP-based log rotation. The following is an example of a `logrotate` configuration: