The problem:
- I have a few Linux machines (one of which for this example we will call empies) connecting to my server (called gaddafi) with OpenVPN.
- Because of this configuration, the reachability of empies is dependent on whether gaddafi itself is reachable or not. I mean, there is no way for the VPN to be connected if the VPN server itself is down.
- When you don't configure dependencies in nagios properly, when gaddafi goes down, I will also get notifications for empies (and the 30 odd other devices connecting to gaddafi via VPN). I would like to prevent that from happening by defining service dependencies for each VPN client to tell nagios that they are all dependent on gaddafi being up.
I have to following configuration for my nagios that doesn't work. It still sends out notifcations for both Ping services for each host if I filter all icmp packets to empies.
Code: Select all
define host{
use generic-host
host_name empies
check_command check-host-alive
address 10.8[I].x.x[/I]
max_check_attempts 3
check_interval 1
retry_interval 1
parents gaddafi
}
define hostdependency{
host_name empies
dependent_host_name gaddafi
notification_failure_criteria d,u
}
define service {
use generic-service
host_name empies
service_description Ping
check_command check_ping!700.0,20%!1200.0,60%
}
define servicedependency{
host_name empies
service_description Ping
dependent_host_name gaddafi
dependent_service_description Ping
notification_failure_criteria c
}