# Disable notification on some service if host is up

**URL:** <https://community.icinga.com/t/disable-notification-on-some-service-if-host-is-up/8358>\
**Category:** Icinga 2\
**Created:** [October 2, 2021, 8:58pm UTC](https://community.icinga.com/t/disable-notification-on-some-service-if-host-is-up/8358 "2021-10-02T20:58:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![10RUPTiV](https://community.icinga.com/user_avatar/community.icinga.com/10ruptiv/32/6724_2.png) [@10RUPTiV](https://community.icinga.com/u/10RUPTiV)\
**Post date:** [October 2, 2021, 8:58pm UTC](https://community.icinga.com/t/disable-notification-on-some-service-if-host-is-up/8358/1 "2021-10-02T20:58:37Z")

</div>

Hey guys…

We are monitoring value from snmp from some appliance BUT sometimes, snmp stop responding on the appliance and we got notification 'cause the service is now “CRITICAL”.

Is there a way we can disable notification IF the host is still UP for those services ?

---

<div class="post-metadata">

**Author:** ![steaksauce](https://community.icinga.com/user_avatar/community.icinga.com/steaksauce/32/1831_2.png) [@steaksauce](https://community.icinga.com/u/steaksauce)\
**Post date:** [October 3, 2021, 5:13pm UTC](https://community.icinga.com/t/disable-notification-on-some-service-if-host-is-up/8358/2 "2021-10-03T17:13:16Z")

</div>

In some plugins, there is a default or flag to make timeouts return as unknown – if that’s the case with your current plugin, you can filter out unknown on your notification rule.

Otherwise, it sounds like you would never want a problem notification (or at least critical), so perhaps you could filter out critical, or just skip problem notifications on the service all together.

Edit to add: you might see what is causing SNMP to timeout as well. In our environment is it usually due to packet loss (check\_ping) or high resource utilization on the target. If it’s just randomly intermittent, you could also increase the timeout value (start low, by increasing 5 or 10 seconds)

---

<div class="post-metadata">

**Author:** ![10RUPTiV](https://community.icinga.com/user_avatar/community.icinga.com/10ruptiv/32/6724_2.png) [@10RUPTiV](https://community.icinga.com/u/10RUPTiV)\
**Post date:** [October 4, 2021, 1:02pm UTC](https://community.icinga.com/t/disable-notification-on-some-service-if-host-is-up/8358/3 "2021-10-04T13:02:49Z")

</div>

@steaksauce  
We already told the appliance company about that, but in the mean time we need to do something 😉

Currently we are using this:

```auto
object Service "Mail Queue [Active]" {
  host_name = "hostname.local"
  check_command = "snmp"

  vars.snmp_oid = ".1.3.6.1.4.1.2021.8.1.101.1"
  vars.snmp_community = "public"
  vars.snmp_warn = "30"
  vars.snmp_crit = "50"
}

```

and the result is

**Output:** CRITICAL - Plugin timed out while executing system call

The only option will be to create a custom snmp script to handle the timeout and make it Unknown ?

---

<div class="post-metadata">

**Author:** ![10RUPTiV](https://community.icinga.com/user_avatar/community.icinga.com/10ruptiv/32/6724_2.png) [@10RUPTiV](https://community.icinga.com/u/10RUPTiV)\
**Post date:** [October 4, 2021, 1:12pm UTC](https://community.icinga.com/t/disable-notification-on-some-service-if-host-is-up/8358/4 "2021-10-04T13:12:04Z")

</div>

I think this will solve the problem…

> [@Disable Notification](https://community.icinga.com/t/disable-notification/1664/12):
>
> Ok I have following set-up one master and two satellites. On one satellite Iam using nagios plugins with check\_snmp v2.2.1.git (nagios-plugins 2.2.1) that has timeout:state option. On another satellite Iam using check\_snmp v2.1.1 (monitoring-plugins 2.1.1) which doesnt have timeout:state option. I will update another satellite to use nagios-plugins 2.2.1 as well. It should not be a issue switching from monitoring-plugins 2.1.1 to nagios-plugins 2.2.1? Thanks

Looks like we need to specify the timeout value to return an unknown!
