Create check called check_dns_cache in checkcommands.cfg calling check_dns or whatever you are using and use $ARG1$ as a macro thats passed to it.

In services.cfg you define the check as

check_command    check_dns_cache!1.2.3.4

where 1.2.3.4 is the IP you want to be passed to $ARG1$

Least thats how ive set it up.

Ben

On 3/29/06, David Mansfield <[EMAIL PROTECTED]> wrote:
Hi All,

I'm somewhat of a new to nagios (coming from a mon environment) and I'm
using nagios 2.0 on Centos 4, using RPMs from DAG.

I was wondering if it is possible to define 'custom macros' that can be
defined per host.

For example, we have the $HOSTADDRESS$ macro which can be referenced in
the 'command' definition, but what if I have some other attribute I'd
like to specify that's not part of the 'host' object by default.

In particular, our DNS caches run on their own IP address (interface)
different from the rest of the services on the boxes.  I don't want to
define new hosts for this because that would be ugly, mistake prone,
confusing in the HTTP UI etc.  Instead I'd like to define a new check
command called check_dnscache which uses $DNSCACHEADDRESS$ instead of
$HOSTADDRESS$ in it's command line.

Can anyone make a suggestion on how to do this?

David



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users@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



--
"A Scientist will earn a living by taking a really difficult problem and spends many years solving it, an engineer earns a living by finding really difficult problems and side stepping them"

Reply via email to