Hi,

 

Using nagios 3.0b5, I have the following notification command defined :

 

define command{

        command_name    notify-by-email

        command_line    /usr/bin/printf "check went wrong on host
$HOSTALIAS$\nService : $SERVICEDESC$\nCheck Command
:$SERVICECHECKCOMMAND$\nOutput summary : $

SERVICEOUTPUT$\nLong output : $LONGSERVICEOUTPUT$\n" | /bin/mail -s
'$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTEMAIL$

        }

 

When I receive an email, This is what I get :

check went wrong on host xxx Service : firewall Check Command
:check_nrpe_firewall Output summary : Connection refused by host Long
output :

 

Is it me or are the \n stripped ? Are you also facing this with 3.0b5 ?

trying the same kind of printf | mail command on the nagios host sends
me a mail with newlines, so I doubt it's the host software that's having
a problem here...

 

Regards

Frederic

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.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

Reply via email to