[check_postgres] nagios perfdata, consistent per-database stats

CSS css at morefoo.com
Tue May 15 05:07:03 UTC 2012


On May 14, 2012, at 11:32 AM, Christoph Berg wrote:

> Hi,
> 
> Wouldn't it be smarter to create one rrd file per database instead? Even if you have all databases included now, you'll run into trouble as soon as create a new one. Rrd doesn't like changes in the "schema" inside rrd files at all.
> 
> Christoph

Correct.

But I wouldn't want to manually keep a list of databases up to date in nagios (they vary over time as we add clients) and then have one check_pgsql_locks per database.

I can almost follow the perl in this section of the check, and I can see why the perfdata does not list all dbs - the postgres query to get the list of locks is just not going to show and dbs that have no locks held.

If I can wrap my head around all these arrays, I think the best fix for me at least would be to have the perfdata output simply tally up all locks on all dbs.  That will give me one rrd datasource for total locks and any additional lock statuses (ie: exclusive lock total, etc.) that will be consistent over time (I hope - it may not be easy to have it always output additional lock states).

Thanks,

Charles


More information about the Check_postgres mailing list