https://assets.nagios.com/downloads/nag ... 1438027273
Here is my setup. I need to make sure that there are no notifications sent if Windows10 device is down, IF MyPC device is up. If MyPC is down, then send out notifications.
Code: Select all
# Define a template for switches that we can reuse
define host{
name generic-switch ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, switches are monitored round the clock
check_interval 1 ; Switches are checked every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 1 ; Check each switch 10 times (max)
check_command check-host-alive ; Default command to check if routers are "alive"
notification_period 24x7 ; Send notifications at any time
notification_interval 0 ; Resend notifications every 30 minutes
notification_options d,r,u ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
define host{
use generic-switch ; Inherit default values from a template
host_name MyPC ; The name we're giving to this switch
alias Main Device ; A longer name associated with the switch
address 10.2.20.83 ; IP address of the switch
active_checks_enabled 1
notification_period extendhours
}
define host{
use generic-switch ; Inherit default values from a template
host_name Windows10 ; The name we're giving to this switch
alias Dependent Device ; A longer name associated with the switch
address 10.2.10.166 ; IP address of the switch
}
define hostdependency{
host_name MyPC
dependent_host_name Windows10
notification_failure_criteria d,u
}Thanks...