From: Joe Conway <mail@joeconway.com>
To: Dave Hughes <dhughes20@gmail.com>
Cc: Rajni Baliyan <saan654@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Help with configuring pgAudit
Date: Thu, 21 Nov 2019 13:36:12 -0500
Message-ID: <3ae19a7d-0dd3-052b-5094-464f91786902@joeconway.com> (raw)
In-Reply-To: <CAFTBbFAzoAhmH16Hpsxd8R5hU1PMwLwgZXxJ-y8Yc3nSsiK5zg@mail.gmail.com>
References: <CAFTBbFBiPFBBcQn5zs5KE4G-bMh4=AxMKbNHg0GdAwYXr2vk3g@mail.gmail.com>
<CAG5RORORRxz6OAjsBdcF3EbB04swsAFxXZhxiMOhtJvtgop5ag@mail.gmail.com>
<CAFTBbFAZj0vdQxnHxd7jOD4+SPfPJa=CWumhfzbTQKXfJkNT7w@mail.gmail.com>
<d12e4783-e9a6-b42f-9f1c-aeb0629b0738@joeconway.com>
<CAFTBbFCC995b_PBAHkMgwTCUe5X+4LdaB1u+M7NxD1zeHgZ4NQ@mail.gmail.com>
<8054efc8-cbb9-75ae-e347-b4e340ae5cc3@joeconway.com>
<CAFTBbFAzoAhmH16Hpsxd8R5hU1PMwLwgZXxJ-y8Yc3nSsiK5zg@mail.gmail.com>
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
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: mail@joeconway.com, dhughes20@gmail.com, saan654@gmail.com
Subject: Re: Help with configuring pgAudit
In-Reply-To: <3ae19a7d-0dd3-052b-5094-464f91786902@joeconway.com>
References: <CAFTBbFBiPFBBcQn5zs5KE4G-bMh4=AxMKbNHg0GdAwYXr2vk3g@mail.gmail.com> <CAG5RORORRxz6OAjsBdcF3EbB04swsAFxXZhxiMOhtJvtgop5ag@mail.gmail.com> <CAFTBbFAZj0vdQxnHxd7jOD4+SPfPJa=CWumhfzbTQKXfJkNT7w@mail.gmail.com> <d12e4783-e9a6-b42f-9f1c-aeb0629b0738@joeconway.com> <CAFTBbFCC995b_PBAHkMgwTCUe5X+4LdaB1u+M7NxD1zeHgZ4NQ@mail.gmail.com> <8054efc8-cbb9-75ae-e347-b4e340ae5cc3@joeconway.com> <CAFTBbFAzoAhmH16Hpsxd8R5hU1PMwLwgZXxJ-y8Yc3nSsiK5zg@mail.gmail.com> <3ae19a7d-0dd3-052b-5094-464f91786902@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox