Re: pgBadger with Pgaudit

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: pgBadger with Pgaudit
Дата
Msg-id CAECtzeX0FwCtqskSCFPhMM+HtY7ceukCHMQkPjyrRGJXNk8-MA@mail.gmail.com
обсуждение исходный текст
Ответ на [MASSMAIL]pgBadger with Pgaudit  (Daulat <daulat.dba@gmail.com>)
Список pgsql-admin
Hello,

Le ven. 5 avr. 2024 à 11:55, Daulat <daulat.dba@gmail.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.

В списке pgsql-admin по дате отправления:

Предыдущее
От: Samed YILDIRIM
Дата:
Сообщение: Re: Table DML status check per day
Следующее
От: Claudio Nasuti
Дата:
Сообщение: [MASSMAIL]server log error on conflict do nothing