Re: Help with configuring pgAudit
Joe Conway <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.general |
|---|---|
| Message-ID | <[email protected]> |
On 11/21/19 1:27 PM, Dave Hughes wrote:
> Thank you so much for all your help! I found out my issue on accident
> actually. I backed up all my user accounts into a SQL scripts and after
> reviewing it, I noticed there were some lines that said:
> ALTER ROLE postgres SET "pgauid.log" to 'Role';
> ALTER ROLE postgres SET "pgaudit.log_level" to 'notice';
> ALTER ROLE postgres SET "pgaudit.log_client" to 'on';
>
> I think these commands were leftover from when I ran an integrity check
> on the pgaudit install (it crashed for other reasons) so it never
> cleaned up these settings. Once I reset those settings back, it's
> working perfectly now.
>
> Thanks again for helping me getting this thing setup and working!
Ah, makes sense now.
For future reference, you can inspect the pgaudit (and other) active
settings using the pg_settings system view, e.g.:
select name, setting, source
from pg_settings where name like 'pgaudit.%';
name | setting | source
----------------------------+-----------------+--------------------
pgaudit.log | ddl, role, read | configuration file
pgaudit.log_catalog | on | configuration file
pgaudit.log_client | off | default
pgaudit.log_level | log | configuration file
pgaudit.log_parameter | on | configuration file
pgaudit.log_relation | off | configuration file
pgaudit.log_statement_once | off | configuration file
pgaudit.role | | default
(8 rows)
HTH,
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEg14x9eymXoJyHrH+N/L3QzX32GUFAl3W2R0ACgkQN/L3QzX3 2GUFlg//VvTT9NGJ+lXHMWTq2NtwjICbbIVTJSL6jOczfqx9/Og0xqPL1I2yyuwP s8Nz/1Kop2D144FxR3t2ddRjm2WPGI74QPNag0dXEFaQdh9WX96GF7TyoMGiWnES eF2vfH7RQdJf1Ca4h5RJhc/poBHgOiVEMwuv0Gx/OdvWZ6VmQT7sKTu6MKs44tSr TbHC+mB9ySunWHDX3yEHdCJo0i9uFckavsJFF8099PNPLoyc2ELZhowPnsyj2bkn 1TFehM+Oit4B9nvkzOkZ6vPf0wmDHrVAac8jTbOjgkwzXkl3vI35rPMjimvN82cC jlcQx8lV6MvO/zmQpzfDukBS3oxiWz+5nqxtfuqyMw6SAElLg7YK7+N/CjDS/gQI mAkLJU/CzjvhHPq/t8W7hKt3uLhgwtx0EXs7e8hOVUslr4CPnWk9KJZFGklK+ZX2 ppu7g26iSP0pJm6lFCHCbvnLE+b0voJCD8LYhQwrPX835rtRZOq1XiA69zvYyPkf +BvDSq37wPNM20n6YfFNNyHDb/QJQW6rXMlKzBma/t9loWD4c5s7LFH2cvsC2TXP 2Da7qQpEsCXVU0ayIgTojreCxGmhEAu4YqNb43QOIRXCaCQfmDtyDa3TXq4rUUUT aHcmJlZcd1MTH5/c7xRZv3yYVo/Kw+KvPT7GdKQ2ZGpzPbDDg8Y= =JjEH -----END PGP SIGNATURE-----