From: Cédric Villemain <cedric.villemain@dalibo.com>
To: Vladimir Rusinov <vladimir@greenmice.info>
Cc: Jaume Sabater <jsabater@gmail.com>
Cc: Marcelo Martins <pglists@zeroaccess.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: PostgreSQL monitoring
Date: Wed, 21 Jan 2009 18:32:59 +0100
Message-ID: <49775C4B.6000402@dalibo.com> (raw)
In-Reply-To: <f6fdfb550901210851x437a08day8f964b48e32f5fc1@mail.gmail.com>
References: <14369888-7712-48EC-966C-7A0878360C22@zeroaccess.org>
<3786f7bb0901190756h5079eb3ap12bcedbe4ff2053@mail.gmail.com>
<f6fdfb550901210851x437a08day8f964b48e32f5fc1@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vladimir Rusinov a écrit :
> On Mon, Jan 19, 2009 at 6:56 PM, Jaume Sabater <jsabater@gmail.com> wrote:
>
>> And I am in the process of writing a bunch of scripts that the Zabbix
>> agent will execute to feed the server with information, so that alerts
>> and graphs can be produced.
>
>
> Oh, I have exactly the same in my plans. Where it would possible to download
> them (if would)?
>
I did something in that way, check_postgres.pl is a good script to start from
(add a zabbix output perhaps). I stop working on that because zabbix is too
painfull to use (*for me*).
Here some draft note about zabbix+check_postgres...Hope it can help.
Agent side:
zabbix_agentd.conf :
UserParameter=pgs[*],sudo -u postgres
/usr/local/share/zabbix/check_postgres.pl --output=simple --db=$2 --action=$1 $3
| head -n 1
UserParameter=pgm[*],sudo -u postgres /usr/local/share/zabbix/check_postgres.pl
- --output=mrtg --db=$2 --action=$1 $3 | head -n 1
sudoers :
Runas_Alias DB = postgres
User_Alias SUPERVISOR = zabbix
Cmnd_Alias CHECK_PG = /usr/local/share/zabbix/check_postgres.pl
SUPERVISOR ALL=(DB) NOPASSWD: CHECK_PG
init checksum :
sudo su -s /bin/bash - zabbix
sudo -u postgres /usr/local/share/zabbix/check_postgres.pl --db=DBNAME
- --action=settings_checksum --critical=0
Server side:
pgs :
check_postgres.pl output simple
pgs[ACTION,DBNAME]
pgm :
check_postgres.pl output mrtg
pgs[ACTION,DBNAME,EXTRA]
- --
Cédric Villemain
Administrateur de Base de Données
Cel: +33 (0)6 74 15 56 53
http://dalibo.com - http://dalibo.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkl3XDgACgkQo/dppWjpEvz1LQCcDpd88zLVFSiFpqmA6Fr6y7rF
LqMAn2z2SdI4BoceJf9elq72c1OytiHE
=J5LP
-----END PGP SIGNATURE-----
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: cedric.villemain@dalibo.com, vladimir@greenmice.info, jsabater@gmail.com, pglists@zeroaccess.org
Subject: Re: PostgreSQL monitoring
In-Reply-To: <49775C4B.6000402@dalibo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox