Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgaudit_analyze daemon failing to connect to "audit" database. #22

Open
tkleinrbbn opened this issue Jun 18, 2021 · 0 comments
Open

pgaudit_analyze daemon failing to connect to "audit" database. #22

tkleinrbbn opened this issue Jun 18, 2021 · 0 comments

Comments

@tkleinrbbn
Copy link

I'm having trouble setting up pgaudit_analyze.
Thus far, I have taken the following steps:

  1. Installed pgaudit.
  2. Installed pgaudit_analyze under postgres home sirectory.
  3. psql -c "CREATE DATABASE testdb"
  4. psql -f $HOME/pgaudit_analyze/sql/audit.sql testdb
  5. $HOME/pgaudit_analyze/bin/pgaudit_analyze --daemon --log-file /var/log/dbaas/pgaudit_analyze.log /var/log/postgres
  6. /var/log/dbaas/pgaudit_analyze.log is repeating the following error:

2021-06-18 19:10:18: DBI connect('dbname=audit;port=5432;','postgres',...) failed: FATAL: database "audit" does not exist at /var/lib/pgsql/pgaudit_analyze/bin/pgaudit_analyze line 166.
at /var/lib/pgsql/pgaudit_analyze/bin/pgaudit_analyze line 44, <$hFile> line 3.
main::ANON("DBI connect('dbname=audit;port=5432;','postgres',...) failed:"...) called at /usr/share/perl5/vendor_perl/Carp.pm line 167
Carp::croak("DBI connect('dbname=audit;port=5432;','postgres',...) failed:"...) called at /usr/lib64/perl5/vendor_perl/DBI.pm line 690
DBI::ANON(undef, undef) called at /usr/lib64/perl5/vendor_perl/DBI.pm line 746
DBI::connect("DBI", "dbi:Pg:dbname=audit;port=5432;", "postgres", undef, HASH(0x558d6ad00708)) called at /var/lib/pgsql/pgaudit_analyze/bin/pgaudit_analyze line 166
main::databaseGet("audit") called at /var/lib/pgsql/pgaudit_analyze/bin/pgaudit_analyze line 704
eval {...} called at /var/lib/pgsql/pgaudit_analyze/bin/pgaudit_analyze line 660

Database "audit" does not exist. The sql setup script was run against the 'testdb" database. I have verified that the associated
tables and view were created in "testdb". I cannot find "audit" configured anywhere. Is this a default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant