LPS:Monitoring/pgsql
Z HelpDesk
PostgreSQL
Zde převzato z wiki. Instalovat pouze po doinstalovani nrpe, ten vytvori uzivatele nagios.
echo "local template1 nagios trust" >>/etc/postgresql/*/main/pg_hba.conf cd /tmp; su postgres createuser -S -R -D nagios # pokud nefunguje, pust bez parametru a vypln nasledujici otazky Enter name of role to add: nagios Shall the new role be a superuser? (a/n) n Shall the new role be allowed to create databases? (a/n) n Shall the new role be allowed to create more new roles? (a/n) n exit /etc/init.d/postgresql restart
Pro testování je možné lokálně použit příkaz:
su nagios -s /bin/bash -c /usr/lib/nagios/plugins/check_pgsql OK - database template1 (0 sec.)|time=0,000000s;2,000000;8,000000;0,000000