Closed MichalPP closed 5 years ago
Hi, This is a normal behavior, the documentation says:
pgBadger supports any custom format set into the log_line_prefix directive of
your postgresql.conf file as long as it at least specify the %t and %p patterns.
that mean that a log_line_prefix: %t [%p]:
should be enough.
thanks
for those searching:
you have to change postgresql.conf settings so that variable log_line_prefix
includes %t
and %p
. for example %t [%p]:
. then postgresql will produce log parsable by pgbadger. posgresql variable log_line_prefix
must match pgbadger --prefix
%t and %p are described in postgresql documentation:
# %a = application name
# %u = user name
# %d = database name
# %r = remote host and port
# %h = remote host
# %p = process ID
# %t = timestamp without milliseconds
# %m = timestamp with milliseconds
# %n = timestamp with milliseconds (as a Unix epoch)
# %i = command tag
# %e = SQL state
# %c = session ID
# %l = session line number
# %s = session start timestamp
# %v = virtual transaction ID
# %x = transaction ID (0 if none)
# %q = stop here in non-session
pgbadger v10.2 fails to find any queries in the following log (by postgresql 10):
command that should work, is
pgbadger -f stderr --prefix '%t ' /tmp/pg/t.log -o out.html
pgbadger produces histogram of queries, but it does not display any individual slow queries entry.
however, if I remove the first query from the above log (first two lines), pgbadger finds just one query (the second one), the other queries are ignored.
any hints on how to solve?