$HOSTNAME$

Fred Albrecht Fred.Albrecht at za.tiscali.com
Fri May 16 10:21:13 CEST 2003


--------------------------------------
   Please visit www.tiscali.co.za
--------------------------------------
Hi 

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?

my notify-by-email command has changed to this:
define command {
command_name                   host-notify-by-email
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$
}

where I wrote my own script to form my email (/usr/local/nagios/libexec/host-notify-by-email.pl).

Ta

Fred Albrecht
Engineering: Senior Specialist Authentication

TISCALI (PTY) LTD
THE COMMUNICATION COMPANY
Techno Centre, 082 Alexandra Road, Bellville, 7530
Mobile : +27 825200165
Office : 021 940 9807
Fax : +27 21 940 9103
E-Mail : <Fred.Albrecht at za.tiscali.com>
<http://www.tiscali.co.za>

Disclaimer: 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 disclaimer at za.tiscali.com <mailto:disclaimer at za.tiscali.com.>.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030516/b6ab0a65/attachment.html>


More information about the Users mailing list