Recovery Notification

Matt Millard jjnp4m102 at sneakemail.com
Fri Jul 16 21:22:45 CEST 2004


I'd like to have a separate command ran when a service or host goes into a recovery state.  I've tried placing two different contacts in a contact group.  One contact to notify for everything but recovery and one to notify for only recovery.  nagios -v nagios.cfg claims that this doesn't make sense to only specify r for notification.  It is only a warning though.  Here are the nagios.log entries for a Nagios restart, cron failure/recovery event.



[1090003698] Warning: Host recovery notification option for contact 'midrange-tec-process-reset' doesn't make any sense - specify down and/or unreachable options as well

[1090003698] Warning: Service recovery notification option for contact 'midrange-tec-process-reset' doesn't make any sense - specify critical and/or warning options as well

[1090003698] Finished daemonizing... (New PID=18443)

[1090003808] SERVICE ALERT: ua044;CRON;CRITICAL;SOFT;1;Process 'cron' is not running

[1090003848] SERVICE ALERT: ua044;CRON;CRITICAL;SOFT;2;Process 'cron' is not running

[1090003919] SERVICE ALERT: ua044;CRON;CRITICAL;HARD;3;Process 'cron' is not running

[1090003919] SERVICE NOTIFICATION: midrange-tec-process;ua044;CRON;CRITICAL;notify-by-email;Process cron is not running

[1090003920] SERVICE NOTIFICATION: midrange-tec-process;ua044;CRON;CRITICAL;notify-by-tec-process;Process cron is not running

[1090004129] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;ua044;CRON;1090004127

[1090004138] SERVICE ALERT: ua044;CRON;OK;HARD;3;Process 'cron' is running:     root 21122     1   0 13:54:48      -  0:00 /usr/sbin/cron



I basically need to send a notification to Tivoli with a HARMLESS parameter to close the CRITICAL ticket created by notify-by-tec-process. 



Here are the misccommands.cfg entries:

# 'notify-by-tec-process' command definition

define command{

   command_name notify-by-tec-process

   command_line /usr/local/bin/sendevent.ksh -s CRITICAL -m "$OUTPUT$" -t Nagios -u "$HOSTALIAS$:process" -p midrange

   }



# 'notify-by-tec-process-reset' command definition

define command{

   command_name notify-by-tec-process-reset

   command_line /usr/local/bin/sendevent.ksh -s HARMLESS -m "$OUTPUT$" -t Nagios -u "$HOSTALIAS$:process" -p midrange

   }



Any suggestions for what the correct way to do this is.



Matt


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
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