Re: PostgreSQL monitoring

From: Cédric Villemain <cedric(dot)villemain(at)dalibo(dot)com>
To: Vladimir Rusinov <vladimir(at)greenmice(dot)info>
Cc: Jaume Sabater <jsabater(at)gmail(dot)com>, Marcelo Martins <pglists(at)zeroaccess(dot)org>, pgsql-admin(at)postgresql(dot)org
Subject: Re: PostgreSQL monitoring
Date: 2009-01-21 17:32:59
Message-ID: 49775C4B.6000402@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vladimir Rusinov a écrit :
> On Mon, Jan 19, 2009 at 6:56 PM, Jaume Sabater <jsabater(at)gmail(dot)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-----

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message paulo matadr 2009-01-21 17:44:14 Res: [GENERAL] bytea size limit?
Previous Message Jaume Sabater 2009-01-21 17:30:53 Re: PostgreSQL monitoring