Skip to content

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

Description

@tkleinrbbn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions