Check pgsql - NRPE PostgreSQL check: Difference between revisions
From TykWiki
Jump to navigationJump to search
Created page with 'By default NRPE includes a plugin to check a PostgreSQL server. Follow the instructions on this page to enable it. == Configuring Nagios == Define a new service on the Nagios se…' |
No edit summary |
||
| Line 1: | Line 1: | ||
By default NRPE includes a plugin to check a PostgreSQL server. Follow the instructions on this page to enable it. | By default NRPE includes a plugin (you need to enable it in the <code>make config</code> screen when installing <code>net-mgmt/nagios-plugins</code>) to check a PostgreSQL server. Follow the instructions on this page to enable it. | ||
== Configuring Nagios == | == Configuring Nagios == | ||
Revision as of 00:58, 26 February 2010
By default NRPE includes a plugin (you need to enable it in the make config screen when installing net-mgmt/nagios-plugins) to check a PostgreSQL server. Follow the instructions on this page to enable it.
Configuring Nagios
Define a new service on the Nagios server, in /usr/local/etc/nagios/objects/services.cfg:
define service{
use generic-service
hostgroup_name postgresql-servers
service_description nrpe_check_pgsql
check_command check_nrpe2!check_pgsql
}
The FreeBSD servers I monitor that has PostgreSQL installed are all members of the hostgroup postgresql-servers.
Configuring NRPE
Add the following line to /usr/local/etc/nrpe.cfg:
command[check_pgsql]=/usr/local/libexec/nagios/check_pgsql -H 10.16.255.64
Replacing 10.16.255.64 with the IP address the PostgreSQL server is listening on.
Remember to restart NRPE after changing the config:
sudo /usr/local/etc/rc.d/nrpe2 restart