[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: systemd & postgresql - flooding system log

On Sat, 08 Jul 2017, Václav Ovsík wrote:

> On Fri, Jul 07, 2017 at 10:34:20PM +0200, Michael Biebl wrote:
> >...
> > You create 19 PAM sessions for the postgres user per minute. What
> > exactly are you doing here?
> This morning refreshed my mind :)
> I completely forget about monitoring of the host yesterday.
> There was installed plugin for Postgres in CheckMK agent monitoring agent.
> http://mathias-kettner.com/checkmk.html
> http://git.mathias-kettner.de/git/?p=check_mk.git;a=blob;f=agents/plugins/mk_postgres;h=1de9b6de2d536b5d254888e6188fa3ec8b64c9bc;hb=HEAD
> The plugin can be improved the switch to database user will be done only
> one time per run probably.

This plugin is horribly designed, and runs su - $DBUSER -c [...] for its

It should instead just su $DBUSER -c [...]; or better yet, not actually
su to the database user, and instead run as a user which only has the
ability to read the appropriate tables and cannot also write to.

If you fix that so that it doesn't start a login session, you'll fix
the excessive number of sessions created.

Don Armstrong                      https://www.donarmstrong.com

He no longer wished to be dead. At the same time, it cannot be said
that he was glad to be alive. But at least he did not resent it. He
was alive, and the stubbornness of this fact had little by little
begun to fascinate him -- as if he had managed to outlive himself, as
if he were somehow living a posthumous life.
 -- Paul Auster _City of Glass_

Reply to: