From 2b706c6ef54a06988886c5c663eb97c19bc0113f Mon Sep 17 00:00:00 2001 From: Othello Maurer Date: Mon, 25 Nov 2024 08:15:36 +0100 Subject: [PATCH 1/2] Fix line wrapping in sidecar default configs --- .../V20180212165000_AddDefaultCollectors.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/graylog2-server/src/main/java/org/graylog/plugins/sidecar/migrations/V20180212165000_AddDefaultCollectors.java b/graylog2-server/src/main/java/org/graylog/plugins/sidecar/migrations/V20180212165000_AddDefaultCollectors.java index 34f6974e6229..075be0cf1f83 100644 --- a/graylog2-server/src/main/java/org/graylog/plugins/sidecar/migrations/V20180212165000_AddDefaultCollectors.java +++ b/graylog2-server/src/main/java/org/graylog/plugins/sidecar/migrations/V20180212165000_AddDefaultCollectors.java @@ -131,13 +131,15 @@ private void ensureFilebeatCollectorsAndConfig() { BEATS_PREAMBEL)); String apacheConfigType = """ + - type: filestream id: apache-filestream enabled: true %s fields_under_root: true fields: - event_source_product: apache_httpd"""; + event_source_product: apache_httpd + """; ensureCollector( "filebeat", @@ -183,8 +185,8 @@ private void ensureFilebeatCollectorsAndConfig() { - /var/log/apache2/access.log - /var/log/apache2/error.log - /var/log/httpd/access_log - - /var/log/httpd/error_log - """)) + - /var/log/httpd/error_log""" + )) .toString() ).ifPresent(collector -> ensureDefaultConfiguration("filebeat-linux-default", collector)); @@ -199,8 +201,8 @@ private void ensureFilebeatCollectorsAndConfig() { .append(f(apacheConfigType, """ paths: - /var/log/httpd-access.log - - /var/log/httpd-error.log - """)) + - /var/log/httpd-error.log""" + )) .toString() ).ifPresent(collector -> ensureDefaultConfiguration("filebeat-freebsd-default", collector)); @@ -215,8 +217,8 @@ private void ensureFilebeatCollectorsAndConfig() { .append(f(apacheConfigType, """ paths: - /etc/httpd/log/access_log - - /etc/httpd/log/error_log - """)) + - /etc/httpd/log/error_log""" + )) .toString() ).ifPresent(collector -> ensureDefaultConfiguration("filebeat-darwin-default", collector)); From 5abe91c5a8ac54ef693aa281e49b860ea193d97a Mon Sep 17 00:00:00 2001 From: Othello Maurer Date: Mon, 25 Nov 2024 08:46:26 +0100 Subject: [PATCH 2/2] add changelog --- changelog/unreleased/pr-21043.toml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog/unreleased/pr-21043.toml diff --git a/changelog/unreleased/pr-21043.toml b/changelog/unreleased/pr-21043.toml new file mode 100644 index 000000000000..76fe389d5558 --- /dev/null +++ b/changelog/unreleased/pr-21043.toml @@ -0,0 +1,4 @@ +type = "fixed" +message = "Fix line wrapping in new sidecar default configurations for filebeat." + +pulls = ["21043"]