<div align='left'><a href='http://mercimail.tiscali.co.za/sup/goto/GHtWLLAZaxwN1e1lpL5DGZVq_m1jEzEaDAeDV2RT-EYfAM7FAFFqFzMrGfD-n3eIIoEK88yiWKV-Aa0afIg8BV' target='_blank'><img src='http://mercimail.tiscali.co.za/sup/image/GHtWLLAZaxwN1e1lpL5DGZVq_m1jEzEaDAeDV2RT-EYfAM7FAFFqFzMrGfD-n3eIIoEK88yiWKV-Aa0afIg8BV.gif' border='0' alt='Please visit www.tiscali.co.za

'></a></div><br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6249.1">
<TITLE>$HOSTNAME$</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Is this a bug?  I don't get the host associated with the service when I try to use $HOSTNAME$ as a macro when sending service notifications.  Instead I get my local shell environment variable $HOSTNAME.  In other words, if I run nagios on box X, monitoring a service A on box Z, then I get X as my $HOSTNAME$ instead of Z.  Should I be defining my commands differently perhaps?</FONT></P>

<P><FONT SIZE=2 FACE="Arial">my notify-by-email command has changed to this:</FONT>

<BR><FONT SIZE=2 FACE="Arial">define command {</FONT>

<BR><FONT SIZE=2 FACE="Arial">command_name                   host-notify-by-email</FONT>

<BR><FONT SIZE=2 FACE="Arial">command_line                   /usr/local/nagios/libexec/host-notify-by-email.pl "$NOTIFICATIONTYPE$" "$HOSTNAME$" "$HOSTSTATE$" "$HOSTADDRESS$" "$HOSTALIAS$" "$OUTPUT$" "$DATETIME$" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$</FONT></P>

<P><FONT SIZE=2 FACE="Arial">}</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">where I wrote my own script to form my email (/usr/local/nagios/libexec/host-notify-by-email.pl).</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Ta</FONT>
</P>

<P><SPAN LANG="en-za"><B><FONT COLOR="#0000FF" FACE="Helvetica">Fred Albrecht</FONT></B><BR>
<FONT COLOR="#0000FF" FACE="Helvetica">Engineering: Senior Specialist Authentication</FONT><BR>
<BR>
<B></B><B><FONT COLOR="#0000FF" FACE="Helvetica">TISCALI (PTY) LTD</FONT></B><BR>
<B></B><B><FONT COLOR="#0000FF" FACE="Helvetica">THE COMMUNICATION COMPANY</FONT></B><BR>
<FONT COLOR="#0000FF" FACE="Helvetica">Techno Centre, 082 Alexandra Road, Bellville, 7530<BR>
Mobile : +27 825200165<BR>
Office : 021 940 9807<BR>
Fax : +27 21 940 9103<BR>
E-Mail :<U> <Fred.Albrecht@za.tiscali.com></U><BR>
<U><<A HREF="http://www.tiscali.co.za">http://www.tiscali.co.za</A>></U></FONT><U></U><BR>
<BR>
<B></B><B><FONT COLOR="#000000" FACE="Helvetica">Disclaimer:</FONT></B><FONT COLOR="#000000" FACE="Helvetica"> This email is considered a business record and is therefore property of Tiscali. This email, and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. This communication represents the originator's personal views and opinions, which do not necessarily reflect those of Tiscali. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately notify</FONT><U> <FONT COLOR="#0000FF" FACE="Helvetica">disclaimer@za.tiscali.com <<A HREF="mailto:disclaimer@za.tiscali.com.">mailto:disclaimer@za.tiscali.com.</A>></FONT></U><FONT COLOR="#000000" FACE="Helvetica">.</FONT><BR>
</SPAN>
</P>
<BR>

</BODY>
</HTML>