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

2009-03-11 Thread Chris Beattie
Marc Powell wrote:
 On Mar 10, 2009, at 7:38 PM, Udo Müller wrote:

 The problem is that i have the event_handler_enabled?
 
 Yes, and notify-by-email specified as the event_handler.

I had the same misconfiguration under 2.x, and when I went to 3.x I 
ended up making a cron job delete the nagios users's dead.letter file.

Thanks from me, too, for the explanation: I don't need that cron job 
anymore!

-- 
Chris Beattie

Nothing in this message is intended to make or accept and offer or to form a 
contract, except that an attachment that is an image of a contract bearing the 
signature of an officer of our company may be or become a contract. This 
message (including any attachments) is intended only for the use of the 
individual or entity to whom it is addressed. It may contain information that 
is non-public, proprietary, privileged, confidential, and exempt from 
disclosure under applicable law or may constitute as attorney work product. If 
you are not the intended recipient, we hereby notify you that any use, 
dissemination, distribution, or copying of this message is strictly prohibited. 
If you have received this message in error, please notify us immediately by 
telephone and delete this message immediately.

Thank you.

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


[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 Marc Powell

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?


 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

--
Marc


--
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:
 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 Marc Powell

On Mar 10, 2009, at 7:38 PM, Udo Müller wrote:

 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?


Yes, and notify-by-email specified as the event_handler.

 And the
 event_handler notify_by_email is used for notifications _and_ the
 event_handler?


notify_by_email isn't an eventhandler but you've appropriated it as  
one above. Event handlers are used to perform special actions like  
trying to restart a service before a notification is needed. The  
notification command that gets run is determined from the contact{}  
definition, and is not directly associated with a service. The contact  
almost certainly has notify_by_email specified as their  
service_notification_command (it's real purpose).


 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.

Yup. Event handlers are run for every retry_check_interval (1 minute  
in your case). That's one reason they're not meant to be used for  
notifications.

 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.

hth,

--
Marc


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