<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I've had a google for this but can't see anyone else reporting it.<br>
<br>
I have a website which I'd like to monitor, however it will be
loadbalanced and HA'd between two machines. I'd therefore like to
monitor, webA, webB and the external address.<br>
<br>
define hostgroup{<br>
hostgroup_name ext_web<br>
alias External webservers<br>
contact_groups web-admins<br>
members webA,webB<br>
}<br>
<br>
define host{<br>
use generic-host<br>
host_name webA<br>
alias webA (HA-1)<br>
}<br>
define host{<br>
use generic-host<br>
host_name webB<br>
alias webB (HA-2)<br>
}<br>
<br>
define command{<br>
command_name check_ext_web<br>
command_line /usr/lib/nagios/plugins/check_http -H
<a class="moz-txt-link-abbreviated" href="http://www.example.com">www.example.com</a> -I $ARG1$ -u "/" -s "Welcome to Example.com" -w 2 -c 10<br>
}<br>
<br>
define service{<br>
use frequent-service<br>
hostgroup_name mgmt<br>
service_description external web<br>
contact_groups web-admins<br>
check_command check_ext_web!www.example.com<br>
event_handler_enabled 1<br>
event_handler event-handler<br>
}<br>
<br>
define service{<br>
use frequent-service<br>
hostgroup_name ext_web<br>
service_description external web<br>
contact_groups web-admins<br>
check_command check_ext_web!$HOSTADDRESS$<br>
event_handler_enabled 1<br>
event_handler event-handler<br>
}<br>
<br>
However although the first service works fine, the second one doesn't.
check_http ends up being called with "$" instead of the address of webA
and webB. I've left out the details of the "mgmt" group.<br>
<br>
This is nagios 1.3 I'm afraid. Looking at the docs and reading between
the lines a little am I correct in saying that macros are _only_
supported in commands in v1.3?<br>
<br>
<a class="moz-txt-link-freetext" href="http://nagios.sourceforge.net/docs/1_0/macros.html">http://nagios.sourceforge.net/docs/1_0/macros.html</a><br>
<br>
Many thanks,<br>
<br>
Adrian<br>
<div class="moz-signature">-- <br>
<meta content="text/html;" http-equiv="Content-Type">
<title></title>
<p><strong><b><font color="#4a0b71" face="Times New Roman" size="4"><span
style="font-size: 14pt; color: rgb(74, 11, 113); font-weight: normal;"
lang="EN-GB">Adrian Bridgett<br>
</span></font></b></strong></p>
</div>
</body>
</html>