[Nagios-users] Problem after upgrade to 3.x: Recipient $

2009-03-10 Thread Udo Müller
Hi all,

I recently upgraded my nagios 2.x to 3.x. Nagios' preflight-check runs fine.

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$

If nagios runs a service event handler the only recipient is '$'

nagios.log:
SERVICE ALERT: oldmz-main-01;Jira Webservice;CRITICAL;SOFT;1;CRITICAL -
Socket timeout after 10 seconds
[1236690758] SERVICE EVENT HANDLER: oldmz-main-01;Jira
Webservice;(null);(null);(null);notify-by-email

corresponding mail.log entry:
369EEA4246: uid=117 from=nagios
369EEA4246: message-id=20090310131338.369eea4...@domain
369EEA4246: from=nag...@domain, size=635, nrcpt=1 (queue active)
369EEA4246: to=mailerr...@domain, orig_to=$,
relay=mail.domain[192.168.xx.xx]:25,
delay=0.1, delays=0.03/0/0.01/0.06, dsn=2.6.0, status=sent (250 2.6.0
20090310131338.369eea4...@domain Queued mail for delivery)
369EEA4246: removed

But the service entry has a valid contactgroup system.admins in which
are 4 persons with valid email addresses.

I can provide my configuration files if you need them.

Why does nagios send to '$'?

Regards Udo



--
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Problem after upgrade to 3.x: Recipient $

2009-03-10 Thread Udo Müller
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_enabled0
check_freshness   0
check_period  24x7
freshness_threshold   0
passive_checks_enabled1
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_attempts5
retain_nonstatus_information  0
check_command
check_https_url!https://domain/jira/secure/Dashboard.jspa
low_flap_threshold0
notification_interval 60
contact_groupstomcat.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@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


Re: [Nagios-users] Problem after upgrade to 3.x: Recipient $

2009-03-10 Thread Udo Müller
Marc Powell wrote:
 So will it help if i disable the event_handler_enabled?
 
 Absolutely. Someone seems to have been changed this in your config  
 during the upgrade. None of this behavior has changed between (many)  
 versions.

Great. Works. TY for your help and the deeper look into nagios :)

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@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