darold / pgbadger

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

Installing Pgbadger on Azure PostgreSQL Flexible Server 13 #797

Closed sivaram-winfo closed 7 months ago

sivaram-winfo commented 9 months ago

Can you please help me in generating pgBadger report from Azure Database for PostgreSQL Flexible Server (13 Version). we have Azure Log Analytics workspace in place.

Configured the below configuration Server parameters:

log_line_prefix ='%t-%r:' log_lock_waits = on log_temp_files = 0 log_autovacuum_min_duration = 0 log_min_duration_statement=0

pgbadger --prefix='%t-%r' query_data_28_09_2023.log -o pgbadger.html -f stderr

Awaiting Your inputs in generating this Pg Badger in no sooner.

darold commented 9 months ago

Please have look to documentation especially at section "POSTGRESQL CONFIGURATION":

...
pgBadger supports any custom format set in the log_line_prefix directive of
your postgresql.conf file as long as it at least specifies a time escape sequence
(%t, %m or %n) and a process-related escape sequence (%p or %c).

everything is explain in this section to have pgbadger recognize your log. If you can not change the PostgreSQL configuration then pgbadger will not be able to parse your log file asis.