diff --git a/app/models/miq_server/log_management.rb b/app/models/miq_server/log_management.rb index 5a31deb0fb9..416553871ef 100644 --- a/app/models/miq_server/log_management.rb +++ b/app/models/miq_server/log_management.rb @@ -78,7 +78,7 @@ def pg_log_patterns return [] unless pg_data pg_data = Pathname.new(pg_data) - [pg_data.join("*.conf"), pg_data.join("pg_log/*"), Pathname.new("/etc/manageiq/postgresql.conf.d/*")] + [pg_data.join("*.conf"), pg_data.join("log/*"), Pathname.new("/etc/manageiq/postgresql.conf.d/*")] end def log_start_and_end_for_pattern(pattern) diff --git a/spec/models/miq_server/log_management_spec.rb b/spec/models/miq_server/log_management_spec.rb index 79daf924c89..ce07c6b9ab3 100644 --- a/spec/models/miq_server/log_management_spec.rb +++ b/spec/models/miq_server/log_management_spec.rb @@ -96,7 +96,7 @@ def stub_vmdb_util_methods_for_collection_log it "pg_data_dir set" do allow(@miq_server).to receive_messages(:pg_data_dir => '/var/lib/pgsql/data') - expected = %w(/var/lib/pgsql/data/*.conf /var/lib/pgsql/data/pg_log/* /etc/manageiq/postgresql.conf.d/*) + expected = %w(/var/lib/pgsql/data/*.conf /var/lib/pgsql/data/log/* /etc/manageiq/postgresql.conf.d/*) expect(@miq_server.pg_log_patterns.collect(&:to_s)).to match_array expected end end diff --git a/tools/collect_logs/collect_archive_logs.sh b/tools/collect_logs/collect_archive_logs.sh index da320ffe2ac..f2803de6b3a 100755 --- a/tools/collect_logs/collect_archive_logs.sh +++ b/tools/collect_logs/collect_archive_logs.sh @@ -15,10 +15,10 @@ source /etc/default/evm tarball="log/evm_archive_$(uname -n)_$(date +%Y%m%d_%H%M%S).tar.xz" -if [[ -n "$APPLIANCE_PG_DATA" && -d "$APPLIANCE_PG_DATA/pg_log" ]]; then +if [[ -n "$APPLIANCE_PG_DATA" && -d "$APPLIANCE_PG_DATA/log" ]]; then echo "This ManageIQ appliance has a Database server and is running version: $(psql --version)" echo " Log collection starting:" - XZ_OPT=-9 tar -cJvf ${tarball} --sparse --warning=no-file-changed -X $collect_logs_directory/exclude_files BUILD GUID VERSION log/* config/* /var/log/* log/apache/* $APPLIANCE_PG_DATA/pg_log/* $APPLIANCE_PG_DATA/postgresql.conf + XZ_OPT=-9 tar -cJvf ${tarball} --sparse --warning=no-file-changed -X $collect_logs_directory/exclude_files BUILD GUID VERSION log/* config/* /var/log/* log/apache/* $APPLIANCE_PG_DATA/log/* $APPLIANCE_PG_DATA/postgresql.conf else echo "This ManageIQ appliance is not a Database server" echo " Log collection starting:" diff --git a/tools/collect_logs/collect_current_logs.sh b/tools/collect_logs/collect_current_logs.sh index fd98f30f2d5..249d17de4b2 100755 --- a/tools/collect_logs/collect_current_logs.sh +++ b/tools/collect_logs/collect_current_logs.sh @@ -15,10 +15,10 @@ source /etc/default/evm tarball="log/evm_current_$(uname -n)_$(date +%Y%m%d_%H%M%S).tar.xz" -if [[ -n "$APPLIANCE_PG_DATA" && -d "$APPLIANCE_PG_DATA/pg_log" ]]; then +if [[ -n "$APPLIANCE_PG_DATA" && -d "$APPLIANCE_PG_DATA/log" ]]; then echo "This ManageIQ appliance has a Database server and is running version: $(psql --version)" echo " Log collection starting:" - XZ_OPT=-9 tar -cJvf ${tarball} --sparse --warning=no-file-changed -X $collect_logs_directory/exclude_files --exclude="/var/log/messages-*" --exclude="/var/log/journal/*/system@*.journal" BUILD GUID VERSION log/*.log log/*.txt config/* /var/log/* log/apache/*.log $APPLIANCE_PG_DATA/pg_log/* $APPLIANCE_PG_DATA/postgresql.conf + XZ_OPT=-9 tar -cJvf ${tarball} --sparse --warning=no-file-changed -X $collect_logs_directory/exclude_files --exclude="/var/log/messages-*" --exclude="/var/log/journal/*/system@*.journal" BUILD GUID VERSION log/*.log log/*.txt config/* /var/log/* log/apache/*.log $APPLIANCE_PG_DATA/log/* $APPLIANCE_PG_DATA/postgresql.conf else echo "This ManageIQ appliance is not a Database server" echo " Log collection starting:"