<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Cambria;
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Cambria","serif";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-family:"Cambria","serif";color:black'>The strange thing is..<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:black'>I replaced <b>“/usr/bin/printf "%b"</b> "***** Nagios *****\”<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:black'>With <b>“/bin/echo –e</b> **** Nagios *****” and now my alerts include the missing $SERVICEOUTPUT$ information that was not there previously.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:black'>I wonder why printf was causing this?<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:black'>Thanks.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Dorfman, Justin [mailto:justin@mahalo.com] <br><b>Sent:</b> August/24/2010 10:25 AM<br><b>To:</b> Nagios Users List<br><b>Subject:</b> Re: [Nagios-users] The output of $SERVICEOUTPUT$ macro is blank ?<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Try Replacing:<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span class=apple-style-span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Info:\n\n$SERVICEOUTPUT$</span></span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span class=apple-style-span><span style='font-family:"Arial","sans-serif"'>To:</span></span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span class=apple-style-span><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Info:\n\n $SERVICEOUTPUT$</span></b></span><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Notice the space between \n<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>Regards,<br><br>Justin Dorfman<br>Mahalo.com Inc. > Jr. Systems Engineer<br><a href="http://www.twitter.com/jdorfman" target="_blank">@jdorfman</a> | <a href="http://twitter.com/MahaloSysops" target="_blank">@MahaloSysops</a> | Blog: <a href="http://bit.ly/aNiWSk" target="_blank">http://bit.ly/aNiWSk</a><br><br><o:p></o:p></p><div><p class=MsoNormal>On Tue, Aug 24, 2010 at 9:57 AM, Mirza Dedic <<a href="mailto:mirde@oppy.com">mirde@oppy.com</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>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.<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>It is defined properly in the notification.cfg file as per below:<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>define command{<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>        command_name    notify-service-by-email<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>        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$<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>}<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>But in my email, it only has “Additional Info:” with nothing else.<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>How could I troubleshoot that $SERVICEOUTPUT$ is getting parsed properly and working? Maybe its something with my mail client?<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Any help is appreciated.<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Thanks.<o:p></o:p></p></div></div><pre>The Oppenheimer Group ---- CONFIDENTIAL<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>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.<o:p></o:p></pre><pre><o:p> </o:p></pre><p class=MsoNormal><br>------------------------------------------------------------------------------<br>Sell apps to millions through the Intel(R) Atom(Tm) Developer Program<br>Be part of this innovative community and reach millions of netbook users<br>worldwide. Take advantage of special opportunities to increase revenue and<br>speed time-to-market. Join now, and jumpstart your future.<br><a href="http://p.sf.net/sfu/intel-atom-d2d" target="_blank">http://p.sf.net/sfu/intel-atom-d2d</a><br>_______________________________________________<br>Nagios-users mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>::: Messages without supporting info will risk being sent to /dev/null<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></body></html>
<pre>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.