Re: pgBadger with Pgaudit

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Daulat <daulat(dot)dba(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: pgBadger with Pgaudit
Date: 2024-04-05 11:10:24
Message-ID: CAECtzeX0FwCtqskSCFPhMM+HtY7ceukCHMQkPjyrRGJXNk8-MA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello,

Le ven. 5 avr. 2024 à 11:55, Daulat <daulat(dot)dba(at)gmail(dot)com> a écrit :

> We are using pgaudit with our postgres v.14.6 with the following audit
> options. But there are no details in the pgbadger report for insert, delete
> and update while generating except select queries.
>
> log_destination = 'csvlog'
> logging_collector = on
> log_directory = '/postgres/dblogs'
> log_filename = 'postgresql_%A-%d-%B-%Y_%H%M'
> log_truncate_on_rotation = on
> log_rotation_size = 0
> log_rotation_age = 1d
> log_min_duration_statement = -1
> log_checkpoints = on
> log_connections = on
> log_disconnections = on
> log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h'
> log_lock_waits = on
> log_statement = 'none'
> log_timezone = 'US/Eastern'
> timezone = 'US/Eastern'
>
> pgaudit.log = 'ddl,write'
> pgaudit.log_relation = 'on'
> shared_preload_libraries = 'pgaudit'
>
> Does the pgbadger tool support DML operations /queries in their report?
>
> If yes , please suggest how we can do it.
>
>
AFAIK, pgbadger isn't compatible with pgaudit log lines. You need to
configure PostgreSQL so that it logs queries, for example with
log_min_duration_statement, just as the documentation says (
https://pgbadger.darold.net/documentation.html#LOG-STATEMENTS)

--
Guillaume.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Claudio Nasuti 2024-04-05 11:10:27 server log error on conflict do nothing
Previous Message Samed YILDIRIM 2024-04-05 09:55:54 Re: Table DML status check per day