<br><br><div><span class="gmail_quote">On 7/28/06, <b class="gmail_sendername">Aaron Segura</b> <<a href="mailto:Aaron.Segura@cabelas.com">Aaron.Segura@cabelas.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Shameless plug:<br><br><a href="http://www.nagiosexchange.org/Notifications.35.0.html?&tx_netnagext_pi1[p_view]=627">http://www.nagiosexchange.org/Notifications.35.0.html?&tx_netnagext_pi1[p_view]=627</a><br><br>Maybe try this?  That way you don't have to put anything "tricky" on the cmdline.  It all just goes into the template.  No worries about escaping special shell characters, etc...
<br><br>-----Original Message-----<br>From: <a href="mailto:nagios-users-bounces@lists.sourceforge.net">nagios-users-bounces@lists.sourceforge.net</a> [mailto:<a href="mailto:nagios-users-bounces@lists.sourceforge.net">nagios-users-bounces@lists.sourceforge.net
</a>] On Behalf Of Felipe Tocchetto<br>Sent: Tuesday, July 25, 2006 3:31 PM<br>To: Marc Powell<br>Cc: Nagios Users Mailinglist<br>Subject: Re: [Nagios-users] not receiving the nagios notifications<br><br>Hi Marc<br><br>Here some tests
<br><br>The command:<br><br>id;/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: Host<br>Notification\nHost: teste.xxx.xxxx.br\nState: CRITICAL\nAddress:<br>200.xxx.xx.xx\nInfo: CRITICAL - Plugin timed out after 10
<br>seconds\n\nDate//Time: 24/07/2006 11:11:11\n" | /usr/bin/mail -s<br>"alert" <a href="mailto:felipe@tocchetto.com">felipe@tocchetto.com</a><br><br>just 1 line!<br><br>The output for the command:<br><br>uid=100(nagios) gid=1(other)
<br><br>And I receive the email:<br><br>***** Nagios *****<br><br>Notification Type: Host<br>Notification<br>Host: <a href="http://teste.xxx.xxxx.br">teste.xxx.xxxx.br</a><br>State: CRITICAL<br>Address:<br>200.xxx.xx.xx<br>
Info: CRITICAL - Plugin timed out after 10<br>seconds<br><br>Date/Time: 24/07/2006 11:11:11<br><br>All commands are in just 1 line...<br><br>I am using the default commands from the nagios instalation, I didnīt<br>change anything.
<br><br><br><br>2006/7/24, Marc Powell <<a href="mailto:marc@ena.com">marc@ena.com</a>>:<br>><br>><br>> > -----Original Message-----<br>> > From: <a href="mailto:nagios-users-bounces@lists.sourceforge.net">
nagios-users-bounces@lists.sourceforge.net</a> [mailto:<a href="mailto:nagios-users-">nagios-users-</a><br>> > <a href="mailto:bounces@lists.sourceforge.net">bounces@lists.sourceforge.net</a>] On Behalf Of Felipe Tocchetto
<br>> > Sent: Monday, July 24, 2006 3:34 PM<br>> > To: Nagios Users Mailinglist<br>> > Subject: Re: [Nagios-users] not receiving the nagios notifications<br>> ><br>> > I am using the default command.
<br>> ><br>> > Manually it works, without the vars.<br>> > Thanks a lot.<br>> ><br>> > I really dont know how to fix it.<br>><br>><br>> I see a couple more things that I originally attributed to my mail
<br>> client formatting of your original message. They may actually be<br>> problems with your config.<br>><br>> # 'host-notify-by-email' command definition<br>> define command{<br>>        command_name    host-notify-by-email
<br>>        command_line    /usr/bin/printf "%b" "***** Nagios<br>> *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\<br>> nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:<br>> $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "Host
<br>> $HOS<br>> TSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$<br>>        }<br>><br>> In the above definition I see a carriage returns between "$HOSTNAME\"<br>> and "nState:" as well as between "Host $HOS" and "TSTATE$". Do they
<br>> really exist in your config file? They should not. If no, can you send<br>> the output of the following command when run as the nagios user?<br>><br>> id;/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: Host
<br>> Notification\nHost: teste.xxx.xxxx.br\nState: CRITICAL\nAddress:<br>> 200.xxx.xx.xx\nInfo: CRITICAL - Plugin timed out after 10<br>> seconds\n\nDate/Time: 24/07/2006 11:11:11\n" | /usr/bin/mail -s "Host
<br>> CRITICAL alert for Test Machine!"  <a href="mailto:felipe@tocchetto.com">felipe@tocchetto.com</a><br>><br>><br>><br>> ------<br>><br>> # 'notify-by-email' command definition<br>> define command{
<br>>        command_name    notify-by-email<br>>        command_line    /usr/bin/printf "%b" "***** Nagios<br>> *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVI<br>> CEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
<br>> $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\<br>> n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert -<br>> $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTE
<br>> MAIL$<br>>        }<br>><br>> In the above command I see a carriage returns between "$SERIV" and<br>> "CEDESC$" as well as between "$CONTACTE" and "MAIL$". Do they really
<br>> exist in your config file? They should not.<br>><br>> --<br>> Marc<br>><br>> -------------------------------------------------------------------------<br>> Take Surveys. Earn Cash. Influence the Future of IT
<br>> Join SourceForge.net's Techsay panel and you'll get the chance to share your<br>> opinions on IT & business topics through brief surveys -- and earn cash<br>> <a href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV">
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</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">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<br>><br><br><br>--<br>Felipe L. Tocchetto<br><a href="http://felipe.tocchetto.com">http://felipe.tocchetto.com</a><br><br>-------------------------------------------------------------------------
<br>Take Surveys. Earn Cash. Influence the Future of IT<br>Join SourceForge.net's Techsay panel and you'll get the chance to share your<br>opinions on IT & business topics through brief surveys -- and earn cash<br><a href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV">
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</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">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<br><br>-------------------------------------------------------------------------<br>Take Surveys. Earn Cash. Influence the Future of IT<br>Join SourceForge.net
's Techsay panel and you'll get the chance to share your<br>opinions on IT & business topics through brief surveys -- and earn cash<br><a href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV">
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</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">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<br></blockquote></div><br>Since you are using Solaris, you may need to change the command to use /usr/bin/mailx instead of /usr/bin/mail<br>