[check_postgres] Dealing with multiple databases

Jehan-Guillaume de Rorthais jgdr at dalibo.com
Tue Jun 2 08:35:10 UTC 2015


On Sat, 30 May 2015 14:17:32 -0400
CSS <css at morefoo.com> wrote:

> 
> On May 30, 2015, at 5:34 AM, Christoph Berg <cb at df7cb.de> wrote:
> 
> > Re: CSS 2015-05-30 <B447F831-BC33-47F0-999A-C736A8026936 at morefoo.com>
> >> Just a quick question for anyone left on the list. :)
> >> 
> >> There are a huge number of nice maintenance-related checks in this
> >> package, like “check_last_vacuum” that are pretty handy.  What I’ve
> >> noticed, unless I’m missing something in the docs, is that there’s no
> >> simple way to just point these checks at a cluster and have the check run
> >> across all databases on that cluster.
> >> 
> >> What I’m currently doing is out of maybe 150 databases, I setup nagios
> >> checks for the top 20.
> >> 
> >> I’m hoping I’m just being dense and I’ve missed some flag that makes a
> >> check non-db-specific…
> > 
> > Isn't this more a nagios/icinga/... question? I'd look into setting up
> > templates including the checks you'd want and then apply these to
> > databases.
> 
> From a monitoring standpoint, with many databases, and databases
> being created/destroyed with some regularity, an all-databases
> option would just be quite handy.  I might be being a bit dense
> here, but Im not seeing how templates could really help in this
> situation.  The closest I can come is perhaps some perl script to
> connect to the db, get a list of dbs, generate a config for nagios
> and then commit that change to our cfengine repo, but thats a bit
> much.  Id almost rather try hacking check_postgres.pl before doing
> that.

Have a look at this nagios plugin for PostgreSQL: 

  https://github.com/OPMDG/check_pgactivity

It connects and checks all databases when appropriate.

Regards,


More information about the Check_postgres mailing list