Page 1 of 1

NagiosXI Host Down if no Traps under any Services

Posted: Thu May 01, 2014 2:57 pm
by mlopez
Hi All,
Thanks again for all your support in the Nagios Forums,

I am wondering if there is a way to show HOST Down if no Traps received on any Service.

Here is my config:
-> HOST
--> SERVICETEMPLATE (75 Services, 1 Service per OID and mapped in snmptt)

Below is an example of 1 Service Template:

Code: Select all

define service {
       name                                     upsFailureNotify_service
       host_name                                *
       hostgroup_name                           host
       service_description                      upsFailureNotify SNMP Traps
       servicegroups                            upsFailureNotify_servicegroup
       check_command                            check_dummy!!!!!!!!
       is_volatile                              1
       initial_state                            o
       max_check_attempts                       1
       check_interval                           1
       retry_interval                           1
       active_checks_enabled                    0
       passive_checks_enabled                   1
       check_period                             xi_timeperiod_24x7
       flap_detection_enabled                   0
       notification_interval                    1
       notification_period                      xi_timeperiod_24x7
       notification_options                     w,c,u,r,
       notifications_enabled                    1
       contacts                                 nagiosadmin
       contact_groups                           admins
       icon_image                               snmptrap.png
       register                                 0

}
Now Imagine having 75 of these services per Host, what I need to accomplish is if NONE of the Services has any DATA trigger Freshness which will trigger check_dummy!2!"No SNMP TRAP, possible issue"!!!!!!.

Now I can do this with specific Services which I have done already but sometimes a specific service might not be triggered all the time on all the hosts but we constantly receive random Traps on all hosts and wondering if I could execute HOST Down if no Service Traps received. The Services are set up as Service Templates to minimize duplication.


Any help would be greatly appreciated,
Sincerely,
Michael

Re: NagiosXI Host Down if no Traps under any Services

Posted: Thu May 01, 2014 4:19 pm
by sreinhardt
You could try to use the check_cluster check as a host check to validate the state of each service under the host. Otherwise I honestly cannot think of a default way to do it, without lots of external scripting.

Re: NagiosXI Host Down if no Traps under any Services

Posted: Wed May 28, 2014 2:38 pm
by mlopez
We can close this thread as I will be investing further as per your comments.