Saturday, February 18, 2012

How to create host dependency on Nagios

Why we need host dependency in Nagios? We can manage how nagios alert us.
For example in the images above,
 - if R1 is download the alert messages will me alert about R1, R2, R3, R4 and S1. because R2, R3, R4 and S1 will lost connection if R1 is down.
 - instead of alert all the host we use host dependency. If R1 is down, it will alert only R1, so we will know exactly that all host depend on it will be download automacticaly.

this is the sample to do so, you can named to dependency.cfg

        host_name             R1
        dependent_host_name   R2,R3,R4,S1
        notification_failure_criteria   d,u

Normally we place the dependency.cfg in /usr/local/nagios/etc/  or anywhere you define nagios to read the configuration file

Note d means down
         u means unreachable


No comments:

Post a Comment