PgBadger - generated report is empty, but postgres log has events

I have a problem with postgresql vs. pgBadger.

HTML reports generated by pgBadger are empty (0 requests, 0 events, nothing about postgres running). But the postgres log is not empty. There are events, etc.

I've tried many combinations with parameters in postgresql.conf (e.g. log_destination = syslog, with logging_collector = off, log_line_prefix - more or less values) and still the same.

Currently, these parameters have been set in postgresql.conf:

log_destination = 'stderr'

logging_collector = on

log_directory = 'pg_log' 
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'

client_min_messages = notice
log_min_messages = notice 
log_min_error_statement = error

log_min_duration_statement = 0

log_checkpoints = on
log_connections = on
log_duration = off
log_line_prefix = '%t [%r] [%p]: [%l-1] user=%u,db=%d,e=%e '
log_statement = 'all'

lc_messages = 'en_US.UTF-8' 

      

This is how I try to use pgBadger and what I get as a result:

#pgbadger -p -l /var/lib/postgresql/9.3/main/pg_log/postgresql-2014-10-15_125036.log -f stderr -o /var/lib/postgresql/9.3/main/pg_log/report.html

      

or

#pgbadger -p -l /var/log/postgresql/postgresql-9.3-main.log -f stderr -o /var/log/postgresql/log_report.html

      

and the result is always the same:

/usr/src/pgbadger-6.2# pgbadger -p -l /var/lib/postgresql/9.3/main/pg_log/postgresql-2014-10-15_125036.log -f stderr -o /var/lib/postgresql/9.3/main/pg_log/report.html
[========================>] Parsed 12999 bytes of 12999 (100.00%), queries: 0, events: 0
LOG: Ok, generating html report...

      

I am working with: Debian 7, postgresql 9.3, pgbadger-6.2

Has anyone had a similar problem with this?

+3


source to share


2 answers


Make sure log_line_prefix

in postgresql.conf

:



log_line_prefix = '%t [%p]: [%l-1] db=%d,user=%u ' 

      

+5


source


Actually I have the same problem. Can you please follow this document and fix your problem. Thanks to

http://www.antelink.com/blog/using-pgbadger-monitor-your-postgresql-activity.html

I think you need to change the log_statement to "none". then this might solve your problem.



You must use the -v option for verbose mode.

pgbadger -f stderr -v / Data-directory / postgresql-Sat.log -o / Data-directory / postgresql-reports.html

Please change the data directory according to your PostgreSQL cluster details.

+2


source







All Articles