[check_postgres] Enhancement request - configuration file

Cédric Villemain cedric.villemain at dalibo.com
Fri Aug 7 12:38:33 UTC 2009


Le vendredi 07 août 2009, Albe Laurenz a écrit :
> Greg Sabino Mullane wrote:
> > > What about an optional configuration file (something like
> > > /etc/check_postgres) from which configuration options are
> > > read if it exists?
> >
> > Done, committed, and pushed. The name is .check_postgresrc. Format is
> > simply name=value. Please give it a spin!
>
> I have spun it, and it twirled nicely!

I wonder if every option are allowed in this file ?
I get this error using 'dbuser' or 'u' in the conffile (using 'defaultuser' is 
fine): 

$ /usr/lib/nagios/plugins/check_postgres.pl -H localhost --action bloat
Can't use string ("superviseur") as an ARRAY ref while "strict refs" in use at 
/usr/lib/nagios/plugins/check_postgres.pl line 1640.

$ cat .check_postgresrc
language=en
u=superviseur

In the command line, it is ok : 
$ /usr/lib/nagios/plugins/check_postgres.pl -H localhost -u superviseur  --
action bloat
POSTGRES_BLOAT OK: DB "postgres" (host:localhost) (db postgres) table 
pg_catalog.pg_class rows:260 pages:11 shouldbe:7 (1.6X) wasted size:32768 (32 
kB) | time=0.08  pg_catalog.pg_class=32768 pg_class_relname_nsp_index=8192 
pg_catalog.pg_operator=8192


>
> Thanks indeed!
>
> Yours,
> Laurenz Albe
> _______________________________________________
> Check_postgres mailing list
> Check_postgres at bucardo.org
> https://mail.endcrypt.com/mailman/listinfo/check_postgres


-- 
----
Cédric Villemain
Administrateur de Base de Données
Cel: +33 (0)6 74 15 56 53
http://dalibo.com - http://dalibo.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : https://mail.endcrypt.com/pipermail/check_postgres/attachments/20090807/de17313e/attachment.bin 


More information about the Check_postgres mailing list