[ClusterLabs] resource monitor logging
Ken Gaillot
kgaillot at redhat.com
Thu May 25 17:38:08 EDT 2017
On 05/24/2017 03:44 PM, Christopher Pax wrote:
>
> I am running postgresql as a resource in corosync. and there is a
> monitor process that kicks off every few seconds to see if postgresqlis
> alive (it runs a select now()). My immediate concernis that it is
> generating alotof logs in auth.log, and I am wondering of this is normal
> behavior? Is there a way to silence this?
That's part of the operating system's security setup. I wouldn't disable
it, for security reasons. If the issue is that the logs are growing too
fast, I'd just rotate them more frequently and keep fewer old logs.
Also, consider whether running a monitor that frequently is really
necessary.
Another possibility, which probably would require modifying the resource
agent, would be to configure two monitors of different "levels". The
regular monitor, scheduled frequently, could just check that the
postgresql pid is still alive. The second level monitor, scheduled less
frequently, could try the select.
>
> ##
> ## /var/log/auth.log
> ##
> May 24 15:23:19 ssinode02-g2 runuser: pam_unix(runuser:session): session
> opened for user postgres by (uid=0)
> May 24 15:23:19 ssinode02-g2 runuser: pam_unix(runuser:session): session
> closed for user postgres
> May 24 15:23:19 ssinode02-g2 runuser: pam_unix(runuser:session): session
> opened for user postgres by (uid=0)
> May 24 15:23:19 ssinode02-g2 runuser: pam_unix(runuser:session): session
> closed for user postgres
> May 24 15:23:19 ssinode02-g2 runuser: pam_unix(runuser:session): session
> opened for user postgres by (uid=0)
> May 24 15:23:19 ssinode02-g2 runuser: pam_unix(runuser:session): session
> closed for user postgres
>
> ##
> ## /var/log/postgresql/data.log
> ##
> DEBUG: forked new backend, pid=27900 socket=11
> LOG: connection received: host=[local]
> LOG: connection authorized: user=postgres database=template1
> LOG: statement: select now();
> LOG: disconnection: session time: 0:00:00.003 user=postgres
> database=template1 host=[local]
> DEBUG: server process (PID 27900) exited with exit code 0
> DEBUG: forked new backend, pid=28030 socket=11
> LOG: connection received: host=[local]
> LOG: connection authorized: user=postgres database=template1
> LOG: statement: select now();
> LOG: disconnection: session time: 0:00:00.002 user=postgres
> database=template1 host=[local]
>
>
> ## snippit of pgsql corosync primitive
> primitive res_pgsql_2 pgsql \
> params pgdata="/mnt/drbd/postgres"
> config="/mnt/drbd/postgres/postgresql.conf" start_opt="-d 2"
> pglibs="/usr/lib/postgresql/9.5/lib"
> logfile="/var/log/postgresql/data.log" \
> operations $id=res_pgsql_1-operations \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60 \
> op monitor interval=3 timeout=60 start-delay=0
More information about the Users
mailing list