How to disable Service Check email notifications when host is down?

We are monitoring our servers using ssh-agent and want to know is there any option to suppress all notification emails (eg: state unknown, recovery…etc) when Host is down or is in a not reachable state?

PS: I have already created dependencies for office internet and router

You need to add service dependencies e.g.:

apply Dependency "disable-service-notification" to Service {
   parent_host_name = host.name
   disable_notifications = true
   ignore_soft_states = false

   assign where host.name
}
1 Like

Hi Roland ,

Thanks for the reply, Here “host.name” denotes any host, right?

If you mean the assign rule: yes

In my scenario, using ssh or icinga-zone CheckCommand as host check_command, so when I can’t ssh to host or icinga zone disconnected, the host state will be ‘DOWN’, and related service notification will be disabled.

1 Like

With that configuration, it is not necessary to declare the state array?
After to apply the dependency it is necessary to enable the notifications?