<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hugo van der Kooij wrote:
<blockquote
cite="midPine.LNX.4.58.0608120015490.19364@gandalf.hugo.vanderkooij.org"
type="cite">
<pre wrap="">On Fri, 11 Aug 2006, Hari Sekhon wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hari Sekhon wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Here is an example
CRITICAL: Only 19.11G (4%) free on 92.168.1.138ig2
Why does it seem to be mangled? Is this a character set issue or a local issue or something?
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap="">also, the web interface shows this normally:
CRITICAL: Only 18.85G (4%) free on \\192.168.1.138\big2
but the email alerts always come out as
CRITICAL: Only 18.88G (4%) free on 92.168.1.138ig2
</pre>
</blockquote>
<pre wrap=""><!---->
Which makes sense if you read the printf() documentation. You are using a
character which has a special meaning in string handling environments.
Just get rid of those backslashes or escape them properly.
</pre>
<blockquote type="cite">
<pre wrap="">It's not that terrible cos I still know what's going on but this
shouldn't happen, and I'd like to resolve it.
</pre>
</blockquote>
<pre wrap=""><!---->
You got exactly what you ordered.
Hugo.
</pre>
</blockquote>
<br>
<br>
After following your suggestion regarding prinf and checking the
previously unchanged misccommand.cfg I'm not entirely sure what is
going on here. The definition for email is below:<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
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional
Info:\n\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert -
$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$<br>
}<br>
<br>
<br>
This doesn't look bad to me, it seems to simply be using lots of Macro$
so I assume that the macro must be sending it something funny....<br>
<br>
Will have to scratch my head and try to track that down.<br>
<br>
Hari<br>
</body>
</html>