NagiosXI not seeing WARNING traps on Service Status

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mlopez
Posts: 62
Joined: Fri Oct 19, 2012 11:35 am

NagiosXI not seeing WARNING traps on Service Status

Post by mlopez »

Hi All,
I've made some modifications and I'm not sure what happened but I not longer can see WARNING traps under the "Service Details" but I do see them under "Notifications" and when I see all alerts for a certain host.

Below is an example of one of my services:

Code: Select all

define service {
        host_name                       20840
        service_description             upsFailureNotify
        use                             upsFailureNotify_service
        servicegroups                   upsFailureNotify_servicegroup
        is_volatile                     1
        max_check_attempts              1
        check_interval                  1
        retry_interval                  1
        passive_checks_enabled          1
        check_period                    none
        notification_interval           31536000
        notification_options            w,
        notifications_enabled           1
        contacts                        nagiosadmin
        icon_image                      snmptrap.png
        _xiwizard                       snmp_trap
        register                        1
        }
also an example of my host

Code: Select all

define host {
        host_name                       20840
        use                             snmptrap_host
        alias                           HOSTNAME
        address                         192.168.1.1
        hostgroups                      group_host
        check_command                   check_dummy!2 "No Traps Detected"!!!!!!!
        max_check_attempts              1
        check_interval                  1
        retry_interval                  1
        passive_checks_enabled          1
        check_period                    none
        check_freshness                 1
        freshness_threshold             2
        contacts                        nagiosadmin
        notification_interval           31536000
        notification_options            d,
        notifications_enabled           1
        _xiwizard                       passivecheck
        register                        1
        }
any help would be greatly appreciated.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: NagiosXI not seeing WARNING traps on Service Status

Post by sreinhardt »

You have isVolatile set, which should make any result send a notification, and you have warning set for the service notifications. What do you have defined currently for the contact nagiosadmin?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
mlopez
Posts: 62
Joined: Fri Oct 19, 2012 11:35 am

Re: NagiosXI not seeing WARNING traps on Service Status

Post by mlopez »

Hi Spenser,
I have the following:

Code: Select all

define contact {
        contact_name                            nagiosadmin
        alias                                   Nagios Administrator
        host_notification_period                nagiosadmin_notification_times
        service_notification_period             nagiosadmin_notification_times
        host_notification_options               d,u,r,f,s
        service_notification_options            w,u,c,r,f,s
        host_notification_commands              xi_host_notification_handler
        service_notification_commands           xi_service_notification_handler
        email                                   nagios@localhost
        use                                     xi_contact_generic
        }

slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NagiosXI not seeing WARNING traps on Service Status

Post by slansing »

Can you provide screenshots of what you are talking about specifically? It's a bit difficult to understand exactly what you are trying to get across. One thing I did notice is that your notification interval is set to 525600 hours.
mlopez
Posts: 62
Joined: Fri Oct 19, 2012 11:35 am

Re: NagiosXI not seeing WARNING traps on Service Status

Post by mlopez »

Hi Sam,

Quote:
Can you provide screenshots of what you are talking about specifically? It's a bit difficult to understand exactly what you are trying to get across.

Service Status (I do not see any WARNING Traps except for CRITICAL) BTW This was working before but do not know exactly what settings were changed and I no longer have the older config)
TRAP1.jpg
Stat HIstory of the specific HOST thich is TM835 (As you can see the serverFanNotify which is a Warning came after the ieUnsolicited but it did not display in the Service Status)
TRAP2.jpg
I can also see the Warning Alerts under Notification.
TRAP3.jpg

Code: Select all

define host {
        host_name                       TM835
        use                             snmptrap_host
        alias                           TM835-TEST
        address                         192.168.1.1
        hostgroups                      host
        check_command                   check_dummy!2 "No Traps Detected"!!!!!!!
        max_check_attempts              1
        check_interval                  1
        retry_interval                  1
        passive_checks_enabled          1
        check_period                    none
        check_freshness                 1
        freshness_threshold             2
        contacts                        nagiosadmin
        contact_groups                  admins,xi_contactgroup_all
        notification_interval           31536000
        notification_period             24x7
        notification_options            d,u,
        notifications_enabled           1
        register                        1
        }

Code: Select all

define service {
       name                                     serverFanNotify_service
       host_name                                *
       hostgroup_name                           host
       service_description                      serverFanNotify SNMP Traps
       servicegroups                            serverFanNotify_servicegroup
       use                                          generic-service
       check_command                            check_dummy!!!!!!!!
       is_volatile                              1
       initial_state                            o
       max_check_attempts                       1
       active_checks_enabled                    0
       passive_checks_enabled                   1
       flap_detection_enabled                   0
       notification_period                      24x7
       notifications_enabled                    1
       contacts                                 nagiosadmin
       contact_groups                           admins
       stalking_options                         o,w,c,u,
       icon_image                               snmptrap.png
       register                                 0

}


<quote>One thing I did notice is that your notification interval is set to 525600 hours.</quote>

Code: Select all

The reason I did this is because of the following:
http://xavier.dusart.free.fr/nagios/en/snmptraps.html

Notice in red check-host-alive command (a dumb ping) that resets service state to OK when you force an active check. Also notice that notification interval is strangely long - one year - to avoid receiving regularly notifications for the same trap (as long as the service hasn't been reset to OK), which would let you think that a new trap, similar to the previous, has been received. Don't forget to restart Nagios once a year to reset that counter.

Restart Nagios, the job is done. Check that it works by generating a trap on a monitored host. Service "TRAP" associated with that host should change to WARNING state, check output being the string sent by SNMPTT.
----
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NagiosXI not seeing WARNING traps on Service Status

Post by tmcdonald »

Did you attempt the last part?
Check that it works by generating a trap on a monitored host. Service "TRAP" associated with that host should change to WARNING state, check output being the string sent by SNMPTT.
It could be that the warnings are not sticking around long enough to show up in the interface.
Former Nagios employee
mlopez
Posts: 62
Joined: Fri Oct 19, 2012 11:35 am

Re: NagiosXI not seeing WARNING traps on Service Status

Post by mlopez »

Issue resolved, I did the following to the service configuration:

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

}

You may close this Thread as issue has been resolved.
Locked