Wednesday 25 June 2014

nagios service dependencies

Nagios service dependencies:

Some time we don't want to keep alerting for the child alert check which is dependent on another service:

Example:

we have a mysql slave running on host "db_slave_1" and it dependent on the mysql_master that is running on the "db_master".

But we don't want to get mysql slave alert if the mysql is not working on the db_master host.

To have this parent slave relationship we have "Nagios service dependency":


define servicedependency {
 
  host_name  db_master
  service_description  mysql_master

  dependent_host_name  db_slave_1
  dependent_service_description  db_slave_status

  execution_failure_criteria w,u,c
  notification_failure_criteria  w,u,c

}



Few more example: for logical understanding:

define servicedependency {

host_name                                      master_host
service_description                        master_service
dependent_host_name                    slave_host
dependent_service_description      slave_service
execution_failure_criteria w,u,c
notification_failure_criteria  w,u,c

}



Another example:

define servicedependency {
host_name                                                   ram_the_father's house
service_description                                     ram_the_father
dependent_host_name                                 ram_the_father's house
dependent_service_description                   kid
execution_failure_criteria                            w,u,c
notification_failure_criteria                          w,u,c

}




Further information:

http://nagios.sourceforge.net/docs/3_0/dependencies.html
http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html

No comments:

Post a Comment