The strange thing is..

I replaced "/usr/bin/printf "%b" "***** Nagios *****\"

With "/bin/echo -e **** Nagios *****" and now my alerts include the missing 
$SERVICEOUTPUT$ information that was not there previously.

I wonder why printf was causing this?

Thanks.

From: Dorfman, Justin [mailto:[email protected]]
Sent: August/24/2010 10:25 AM
To: Nagios Users List
Subject: Re: [Nagios-users] The output of $SERVICEOUTPUT$ macro is blank ?

Try Replacing:

Info:\n\n$SERVICEOUTPUT$

To:

Info:\n\n $SERVICEOUTPUT$

Notice the space between \n


Regards,

Justin Dorfman
Mahalo.com Inc. > Jr. Systems Engineer
@jdorfman<http://www.twitter.com/jdorfman> | 
@MahaloSysops<http://twitter.com/MahaloSysops> | Blog: http://bit.ly/aNiWSk

On Tue, Aug 24, 2010 at 9:57 AM, Mirza Dedic 
<[email protected]<mailto:[email protected]>> wrote:
I recently upgraded my Ubuntu OS (8.04 >> 10.04) and Nagios from 3.0 to 3.1.2, 
and recently I ran into an issue where the data for "$SERVICEOUTPUT$" is never 
included in my email notification.

It is defined properly in the notification.cfg file as per below:

define command{
        command_name    notify-service-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios 
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: 
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: 
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** 
$NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ 
**" $CONTACTEMAIL$
}

But in my email, it only has "Additional Info:" with nothing else.

How could I troubleshoot that $SERVICEOUTPUT$ is getting parsed properly and 
working? Maybe its something with my mail client?

Any help is appreciated.

Thanks.

The Oppenheimer Group ---- CONFIDENTIAL



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.



------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Nagios-users mailing list
[email protected]<mailto:[email protected]>
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


The Oppenheimer Group ---- CONFIDENTIAL

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Nagios-users mailing list
[email protected]
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

Reply via email to