Nagios NRDP – Configuring Passive Checks
This following pages of this article explain how to set up the passive checks on the central Nagios server NAG-CENTRAL which will receive the host check results for NAG-REMOTE and also a service via send_nrdp.py.
To configure a passive host and check definition perform the following steps:
- Edit the nagios.cfg configuration file /usr/local/nagios/etc/nagios.cfg by executing the command below:
vi /usr/local/nagios/etc/nagios.cfg
- Find the object configuration file for localhost by searching for localhost.cfg
- Add a new line as shown below to add a new object configuration file named passive-hosts.cfg
cfg_file=/usr/local/nagios/etc/objects/passive-hosts.cfg
- Save and exit the file
- Create a new object configuration file named passive-hosts.cfg under /usr/local/nagios/etc/objects
vi /usr/local/nagios/etc/objects/passive-hosts.cfg
- Add the text below to define NAG-REMOTE
define host { use passive-host host_name NAG-REMOTE alias NAG-Remote address 10.100.100.200 hostgroups passive-hosts }
- Add the text below to define a passive service check for CPU Usage on NAG-REMOTE
define service { use passive_service_check host_name NWO-REMOTE service_description Current Load check_command check_dummy!2!"No Passive Results Received" contact_groups admins notification_period 24x7 flap_detection_enabled 0 event_handler_enabled 0 notification_interval 1440 notification_period 24x7 }
- Save and exit the file
- Restart the nagios service by executing the command below:
systemctl restart nagios
- Go to the nagios web page http://NAG-CENTRAL/nagios and logon
- Check under Hosts and there will now be new host named NAG-REMOTE showing a status of UNKNOWN.