darold / pgbadger

A fast PostgreSQL Log Analyzer
http://pgbadger.darold.net/
PostgreSQL License
3.49k stars 349 forks source link

postgresql-14.3 html report doesn't produce #735

Closed kevser2761 closed 2 years ago

kevser2761 commented 2 years ago

Hello, our cluster running postgresql-14.3 version. But when we try to take a pgbadger report, html report doesn't produce. Does pgbadger have support in this version?

/usr/bin/pgbadger -v --retention 2 -I -q $REMOTE_PG/$LOG_DIR/$LOG_FILE -O $OUTDIR -f stderr --prefix "[%m pid=%p] app=%a user=%u db=%d host=%h sessid=%c txid=%x"

darold commented 2 years ago

Please post the version of pgbadger you are using and a line of the log file you are trying to parse so that I can verify the prefix.

kevser2761 commented 2 years ago

pgbadger --version pgBadger version 11.7

show log_line_prefix ; log_line_prefix

[%m pid=%p] app=%a user=%u db=%d host=%h sessid=%c txid=%x

darold commented 2 years ago

Please upgrade to pgbadger 11.8 or, better, latest development code, there were some fixes on incremental mode and new log entries detection. Let me know if you still have the problem.

kevser2761 commented 2 years ago

I upgrade to pgbadger 11.8 version. the problem still continues

darold commented 2 years ago

Can you send to my private email a part of your log file to try to reproduce?

darold commented 2 years ago

Thanks for the log file I was able to reproduce.

Actually the problem is that you have a space character before each log line so your prefix must include it. You command should be:

/usr/bin/pgbadger -v --retention 2 -I -q $REMOTE_PG/$LOG_DIR/$LOG_FILE -O $OUTDIR -f stderr \
                                   --prefix " [%m pid=%p] app=%a user=%u db=%d host=%h sessid=%c txid=%x"

Note the space just after the starting double quote.