Problem after upgrade to 3.x: Recipient $
Udo Müller
nagios-users at cs-ol.de
Wed Mar 11 01:38:57 CET 2009
Marc Powell wrote:
> On Mar 10, 2009, at 1:20 PM, Udo Müller wrote:
>
>> Hi all,
>>
>> I recently upgraded my nagios 2.x to 3.x. Nagios' preflight-check
>> runs fine.
>
> Is this an implication that this worked under 2.x?
Correct.
>> For service notification i use this event handler:
>>
>> /usr/bin/printf "%b" "***** Nagios ***** Notification Type:
>> $NOTIFICATIONTYPE$ Service: $SERVICEDESC$ Host: $HOSTALIAS$ Address:
>> $HOSTADDRESS$ State: $SERVICESTATE$ Date/Time: $LONGDATETIME$
>> Additional
>> Info: $SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$
>> Service
>> Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
>
>
>> Why does nagios send to '$'?
>
> Event handlers are not meant to be used for notifications. The
> $CONTACTEMAIL$ macro isn't valid for them. If this was working under
> 2.x (I have doubt it was since the macro wasn't supposed to be valid
> then either), it shouldn't have been and would have been a bug.
>
> http://nagios.sourceforge.net/docs/3_0/macrolist.html
I already read this and asked myself why nagios invokes that event handler.
My configuration is e.g:
define service {
flap_detection_enabled 0
check_freshness 0
check_period 24x7
freshness_threshold 0
passive_checks_enabled 1
notification_period 24x7
retain_status_information 0
high_flap_threshold 0
service_description Jira Webservice
parallelize_check 1
notification_options w,u,c,r
normal_check_interval 1
host_name oldmz-main-01
obsess_over_service 0
retry_check_interval 1
event_handler_enabled 1
notifications_enabled 1
event_handler notify-by-email
active_checks_enabled 1
process_perf_data 1
is_volatile 0
max_check_attempts 5
retain_nonstatus_information 0
check_command
check_https_url!https://domain/jira/secure/Dashboard.jspa
low_flap_threshold 0
notification_interval 60
contact_groups tomcat.admins
}
The problem is that i have the event_handler_enabled? And the
event_handler "notify_by_email" is used for notifications _and_ the
event_handler?
With 2.x i only got a notification when the service isnt available for 5
minutes. With 3.x the event_handler is executed every minute the service
isnt available.
So will it help if i disable the "event_handler_enabled"?
Regards Udo
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
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