From e3e6bd786dab165bb4e46248161c656c54486753 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 7 Nov 2024 05:41:48 +1100 Subject: [PATCH] [8.16] [Observability] Fix integrations detected twice (#198670) (#199183) # Backport This will backport the following commits from `main` to `8.16`: - [[Observability] Fix integrations detected twice (#198670)](https://github.com/elastic/kibana/pull/198670) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Thom Heymann <190132+thomheymann@users.noreply.github.com> --- .../public/assets/auto_detect.sh | 30 ++++++++++++++----- .../public/assets/integrations.conf | 2 +- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/assets/auto_detect.sh b/x-pack/plugins/observability_solution/observability_onboarding/public/assets/auto_detect.sh index ebdcdeb0d81dc..c13b5cf031e0d 100755 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/assets/auto_detect.sh +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/assets/auto_detect.sh @@ -311,15 +311,31 @@ apply_elastic_agent_config() { read_open_log_file_list() { local exclude_patterns=( - "^\/Users\/.+?\/Library\/Application Support" - "^\/Users\/.+?\/Library\/Group Containers" - "^\/Users\/.+?\/Library\/Containers" - "^\/Users\/.+?\/Library\/Caches" - "^\/private" + "^\/Users\/.+?\/Library\/Application Support\/" + "^\/Users\/.+?\/Library\/Group Containers\/" + "^\/Users\/.+?\/Library\/Containers\/" + "^\/Users\/.+?\/Library\/Caches\/" + "^\/private\/" + + # Integrations only ingest a subset of application logs so there are scenarios where additional + # log files could be detected and displayed as a "custom log" alongside the detected integration + # they belong to. To avoid this UX issue we exclude all log files inside application directories + # from the custom log file detection + "^\/var\/log\/nginx\/" + "^\/var\/log\/apache2\/" + "^\/var\/log\/httpd\/" + "^\/var\/log\/mysql\/" + "^\/var\/log\/postgresql\/" + "^\/var\/log\/redis\/" + "^\/var\/log\/rabbitmq\/" + "^\/var\/log\/kafka\/" + "^\/var\/log\/mongodb\/" + "^\/opt\/tomcat\/logs\/" + "^\/var\/log\/prometheus\/" # Exclude previous installation logs - "\/opt\/Elastic\/Agent\/" - "\/Library\/Elastic\/Agent\/" + "^\/opt\/Elastic\/Agent\/" + "^\/Library\/Elastic\/Agent\/" ) # Excluding all patterns that correspond to known integrations diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/assets/integrations.conf b/x-pack/plugins/observability_solution/observability_onboarding/public/assets/integrations.conf index e6455a9170c86..e9afdc3cdfb2e 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/assets/integrations.conf +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/assets/integrations.conf @@ -34,9 +34,9 @@ patterns= title=PostgreSQL Logs patterns= /var/log/postgresql/postgresql-*-*.log* + /var/log/postgresql/postgresql-*-*.csv* /*/postgresql-logs/*.log /etc/postgresql/*/main/postgresql.conf - /var/log/postgresql/postgresql-*-*.csv* [redis] title=Redis Logs