Custom Macros in Service Definitions?
Marcel
mitsuto at gmail.com
Tue Nov 17 17:45:14 CET 2009
Hi,
I have several webservers that have over 20 (virtual)interfaces each.
So I've defined the host with custom macros for each private IP:
define host{
use linux-server
_ip_private_VIP_1 10.4.200.101
_ip_private_VIP_2 10.4.201.101
...
}
Now I want to refer to this $_HOSTip_provate_VIP_1$ macro in services
definitions, but nagios is complaining about not finding the service.
The documentation isn't clear whether or not custom macros could be used in
service definitions.
I've a command like this:
define command{
command_name check_http_str_return_args
command_line $USER1$/check_http -I $ARG1$ $ARG2$
}
And the service definition:
define service{
use generic-service
(...)
check_command check_http_str_return_args!$_HOSTip_private_VIP_1$!-u / -t
10 -w 3 -c 5 -e HTTP/1.1 200 OK
}
My question is:
Is it by design that custom macros should NOT be used in service
definitions?
Because I'd need to create ONE COMMAND per VIP just to use custom macros?
I would like to set just one services, to use just ONE command, and be able
to check the whole webserver farm.
Best regards,
Marcel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091117/deb0cf75/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list