|
I've had a google for this but can't see anyone else reporting it. 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. define hostgroup{ hostgroup_name ext_web alias External webservers contact_groups web-admins members webA,webB } define host{ use generic-host host_name webA alias webA (HA-1) } define host{ use generic-host host_name webB alias webB (HA-2) } define command{ command_name check_ext_web command_line /usr/lib/nagios/plugins/check_http -H www.example.com -I $ARG1$ -u "/" -s "Welcome to Example.com" -w 2 -c 10 } define service{ use frequent-service hostgroup_name mgmt service_description external web contact_groups web-admins check_command check_ext_web!www.example.com event_handler_enabled 1 event_handler event-handler } define service{ use frequent-service hostgroup_name ext_web service_description external web contact_groups web-admins check_command check_ext_web!$HOSTADDRESS$ event_handler_enabled 1 event_handler event-handler } 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. 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? http://nagios.sourceforge.net/docs/1_0/macros.html Many thanks, Adrian --
Adrian Bridgett |
- [Nagios-users] macros in check_command Adrian Bridgett
- Re: [Nagios-users] macros in check_command Hugo van der Kooij
- Re: [Nagios-users] macros in check_command Adrian Bridgett
