Follow these steps on the monitoring system to watch the 10.0.30.1 server, which is the first node of our PostgreSQL cluster:
- Use the following directory for Debian-based systems:
/etc/nagios4
- Use this directory for Red Hat derivatives:
/etc/nagios
- As a root-level user, create a file named conf.d/db_conf.cfg in the preceding path. It may be necessary to create the conf.d directory itself on some systems.
- Make sure the following line appears in the nagios.cfg file on Debian-based systems:
cfg_dir=/etc/nagios4/conf.d
- Otherwise, make sure this line appears in nagios.cfg on Red Hat-based systems:
cfg_dir=/etc/nagios/conf.d
- In the db_conf.cfg file, define a command entry by adding this text:
define command { command_name ...