# Send notifications while host is down or unreachable

**URL:** <https://community.icinga.com/t/send-notifications-while-host-is-down-or-unreachable/11295>\
**Category:** Icinga 2\
**Tags:** dependencies, notifications\
**Created:** [January 6, 2023, 9:26am UTC](https://community.icinga.com/t/send-notifications-while-host-is-down-or-unreachable/11295 "2023-01-06T09:26:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![IneedAnswers](https://community.icinga.com/letter_avatar_proxy/v4/letter/i/919ad9/32.png) [@IneedAnswers](https://community.icinga.com/u/IneedAnswers)\
**Post date:** [January 6, 2023, 9:26am UTC](https://community.icinga.com/t/send-notifications-while-host-is-down-or-unreachable/11295/1 "2023-01-06T09:26:16Z")

</div>

Icinga 2 implicitly suppresses notifications for hosts that are DOWN or Unreachable  
I am trying to overwrite this and enable notifications regardless of host status  
Now if I understand correctly this should be done through creating a dependency for the service I need on it’s host and setting

> disable\_notifications = false

I tried setting it like this, but the notifications still aren’t being sent

The dependency I created:

> apply Dependency “enable-notifications” to Service {
> 
> import “[template1](https://icimon.moderntv.eu/icingaweb2/director/dependency?name=template1)”
> 
> parent\_host\_name = host.vars.parent\_host\_name
> 
> disable\_notifications = false
> 
> period = “always”
> 
> assign where service.name == “websever-remote-check” && typeof(host.vars.parent\_host\_name) == String
> 
> states = [Critical]
> 
> }
> 
> apply Dependency “enable-notifications” for (host\_parent\_name in host.vars.parent\_host\_name) to Service {
> 
> import “[template1](https://icimon.moderntv.eu/icingaweb2/director/dependency?name=template1)”
> 
> parent\_host\_name = host\_parent\_name
> 
> disable\_notifications = false
> 
> period = “always”
> 
> assign where service.name == “websever-remote-check” && typeof(host.vars.parent\_host\_name) == Array
> 
> states = [Critical]
> 
> }

Would anyone be so kind and give me some advice on what am I doing wrong?

---

<div class="post-metadata">

**Author:** ![log1c](https://community.icinga.com/user_avatar/community.icinga.com/log1c/32/2071_2.png) [@log1c](https://community.icinga.com/u/log1c)\
**Post date:** [January 9, 2023, 10:27am UTC](https://community.icinga.com/t/send-notifications-while-host-is-down-or-unreachable/11295/2 "2023-01-09T10:27:13Z")

</div>

Hello and welcome 🙂

Not sure if, but it might be that the `==` operator in assignments only works for strings.

You could try `typeof(a).name == "String"`

```auto
 a = "test"
 typeof(a) == String
true
typeof(a) == "String"
false
typeof(a).name == "String"
true

```
