Skip to content

Commit

Permalink
Merge pull request #18262 from yrudman/add-etc_manageiq_postgresql_co…
Browse files Browse the repository at this point in the history
…nf_d-directory-to-log-collection

Include  /etc/manageiq/postgresql.conf.d/ directory to log collection

(cherry picked from commit e91f6b8)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1672694
  • Loading branch information
jrafanie authored and simaishi committed Feb 5, 2019
1 parent f76db89 commit 0c2fad6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/miq_server/log_management.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def pg_log_patterns
return [] unless pg_data

pg_data = Pathname.new(pg_data)
[pg_data.join("*.conf"), pg_data.join("pg_log/*")]
[pg_data.join("*.conf"), pg_data.join("pg_log/*"), Pathname.new("/etc/manageiq/postgresql.conf.d/*")]
end

def log_start_and_end_for_pattern(pattern)
Expand Down
2 changes: 1 addition & 1 deletion spec/models/miq_server/log_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,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/*)
expected = %w(/var/lib/pgsql/data/*.conf /var/lib/pgsql/data/pg_log/* /etc/manageiq/postgresql.conf.d/*)
expect(@miq_server.pg_log_patterns.collect(&:to_s)).to match_array expected
end
end
Expand Down

0 comments on commit 0c2fad6

Please sign in to comment.