Passive Service Notifications

Scott, Casey Casey.Scott at wizards.com
Wed Mar 1 21:22:14 CET 2006


I am attempting to configure Nagios to work with SNMP traps. As of now,
I can write events to the Nagios external command file
(/var/log/nagios/rw/nagio.cmd). Nagios notices these events, and logs
them to the nagios.log.


e.g.
/var/log/nagios/rw/nagios.log contains:
[1141242013] EXTERNAL COMMAND:
PROCESS_SERVICE_CHECK_RESULT;10.12.3.118;2;w32_time;W32Time Event


I can't get Nagios to send out notifications as a result though. My
service definition is like this:

define service {
name                           generic-service  ; The 'name' of this
service template, referenced in other service definitions
active_checks_enabled          1        ; Active service checks are
enabled
passive_checks_enabled         1        ; Passive service checks are
enabled/accepted
parallelize_check              1        ; Active service checks should
be parallelized (disabling this can lead to major performance problems)
obsess_over_service            1        ; We should obsess over this
service (if necessary)
check_freshness                0        ; Default is to NOT check
service 'freshness'
notifications_enabled          1        ; Service notifications are
enabled
event_handler_enabled          1        ; Service event handler is
enabled
flap_detection_enabled         1        ; Flap detection is enabled
process_perf_data              1        ; Process performance data
retain_status_information      1        ; Retain status information
across program restarts
retain_nonstatus_information   1        ; Retain non-status information
across program restarts
register                       0        ; DONT REGISTER THIS DEFINITION
- ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}

define service{
          use                             generic-service
          host_name                       *
          service_description             TRAP
          is_volatile                     1
          check_period                    24x7
          contact_groups                  linux-admins
          passive_checks_enabled          1
          active_checks_enabled           0
          max_check_attempts              1
          normal_check_interval           5
          retry_check_interval            1
          notification_interval           5
          notification_period             24x7
          notification_options            w,u,c,r
          notifications_enabled           1
          check_command                   check-host-alive
}


I am unclear on what the check_command needs to do in this case. It
seems that it doesn't matter as long as it returns OK.  Can someone help
fill in the gaps here? What do I need to do to get Nagios to finish the
task, and actually send a SERVICE ALERT out?

Regards,
Casey


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list