pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Dave Hughes <dhughes20@gmail.com>
To: Rajni Baliyan <saan654@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Help with configuring pgAudit
Date: Wed, 20 Nov 2019 09:46:55 -0500
Message-ID: <d12e4783-e9a6-b42f-9f1c-aeb0629b0738@joeconway.com> (raw)
In-Reply-To: <CAFTBbFAZj0vdQxnHxd7jOD4+SPfPJa=CWumhfzbTQKXfJkNT7w@mail.gmail.com>
References: <CAFTBbFBiPFBBcQn5zs5KE4G-bMh4=AxMKbNHg0GdAwYXr2vk3g@mail.gmail.com>
	<CAG5RORORRxz6OAjsBdcF3EbB04swsAFxXZhxiMOhtJvtgop5ag@mail.gmail.com>
	<CAFTBbFAZj0vdQxnHxd7jOD4+SPfPJa=CWumhfzbTQKXfJkNT7w@mail.gmail.com>

On 11/20/19 8:09 AM, Dave Hughes wrote:
> Hey,
> Thanks for reaching out.  It looks like I have that parameter set as
> well.  Here is a list of settings I have turned on in postgresql.conf
> since I installed pgAudit:
> 
> shared_preload_libraries = 'pgaudit'
> log_destination = 'csvlog'
> logging_collector = on
> log_directory = '/work/PostgreSQL/10/data'
> log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
> log_connections = on
> log_disconnections = on
> log_line_prefix = '<%m:%r:%u@%d:[%p]:>'
> pgaudit.log = 'ddl'
> 
> Is there some other setting I may be missing?

I don't see anything wrong that jumps out except perhaps the OS postgres
user does not have sufficient permissions to write to
'/work/PostgreSQL/10/data'.

Beyond that, please see the supplemental PDF here for an example setup
instruction (section 2.2/appendix B, and possibly section 2.3 as well):


https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_PostgreSQL_9-x_V1R6_STIG.zip

Also read through the pgaudit README if you have not already done so:

  https://github.com/pgaudit/pgaudit

Finally (again if not already done), see the docs section on logging:

  https://www.postgresql.org/docs/12/runtime-config-logging.html

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

view thread (9+ messages)  latest in thread

Message-ID: <d12e4783-e9a6-b42f-9f1c-aeb0629b0738@joeconway.com>
Permalink:  ../d12e4783-e9a6-b42f-9f1c-aeb0629b0738@joeconway.com/
Also on:    postgresql.org/message-id/d12e4783-e9a6-b42f-9f1c-aeb0629b0738@joeconway.com

 · 

reply

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: <d12e4783-e9a6-b42f-9f1c-aeb0629b0738@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>

* 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