You can specify custom macros in resources.cfg: $USER2$="192.168.0.30"
However, this is not what you want and is no different than specifying it in the command itself with $ARG#$ rather than using the $hostaddress$. Pass the dnscacheaddress onto the command via the argument. check_dnscache -H $ARG1$ service foo { check_command check_dnscache!192.168.0.1 .... 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 > ------------------------------------------------------- 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&kid0944&bid$1720&dat1642 _______________________________________________ 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