LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Nagios dependencies.cfg example file (https://www.linuxquestions.org/questions/linux-software-2/nagios-dependencies-cfg-example-file-795762/)

rutledgetome 03-16-2010 07:24 AM

Nagios dependencies.cfg example file
 
Does anyone have a working example of a dependencies.cfg file for nagios?

I have not been successful in setting one up that works, and need guidance. (none of the books or documents have helped with this)

For instance, if one of my checked systems goes down, and therefore fails a PING check, I do NOT need to be notified that a file system is unavailable, or that SSH is down, too.

Thank you for any assistance you can provide.

centosboy 03-16-2010 09:31 AM

Quote:

Originally Posted by rutledgetome (Post 3900262)
Does anyone have a working example of a dependencies.cfg file for nagios?

I have not been successful in setting one up that works, and need guidance. (none of the books or documents have helped with this)

For instance, if one of my checked systems goes down, and therefore fails a PING check, I do NOT need to be notified that a file system is unavailable, or that SSH is down, too.

Thank you for any assistance you can provide.


example

Code:

# NRPE
define servicedependency{
        host_name                      server1
        service_description            NRPE
        dependent_host_name            server1
        dependent_service_description  ^.* (NRPE)$
        execution_failure_criteria      c
        notification_failure_criteria  w,u,c
}



server1 has a check to check NRPE is listening on its port.
It also has disk check (NRPE)
CPU (NRPE)
QMAIL (NRPE)


so....if NRPE goes down, any other services that have (NRPE) in the services description will not alert.

rutledgetome 03-17-2010 11:08 AM

Nagios dependencies.cfg example - follow up
 
Thank you for your example on setting up dependencies.cfg for Nagios. My test is working perfectly now.

One thing I have found in my testing is that the primary service (service_description item) must have a shorter check period or fewer re-checks than any service dependent upon it (dependent_service_description item). Otherwise, if the dependent service fails first (after all its retries) then it WILL send a notice out.

Again, Thanks for your help!

- Tom Rutledge


All times are GMT -5. The time now is 08:01 AM.