Macro Identifier and String Mixing

Scott Sugar ssugar at proserveit.com
Wed Jul 27 15:14:50 CEST 2005


Even though the nrpe daemons on the remote side do not accept command arguments, your check_nrpe command requires arguments...
 
Your command should look like this.
define command {
    command_name  check_vcs
    command_line  $USER1$/check_nrpe -H $HOSTADDRESS$ -c 'command you want to run'
}
 
when it says that you cannot send command arguments... they mean that you cannot send command arguments into the remote check you are running (ie. setting the threshold for a check_disk command)

________________________________

From: nagios-users-admin at lists.sourceforge.net on behalf of Ralph.Grothe at itdz-berlin.de
Sent: Wed 7/27/2005 6:33 AM
To: nagios-users at lists.sourceforge.net; nagiosplug-help at lists.sourceforge.net
Subject: [Nagios-users] Macro Identifier and String Mixing



Hello,

I would like to know if it is possible to mix (i.e. prefix, or
suffix, or backticks substitute)
a macro identifier (as listed in
http://nagios.sourceforge.net/docs/2_0/macros.html)
within the checkcommands.cfg file context (i.e. does it get
expanded)?

E.g.

I would like to do something like

define command {
    command_name  check_vcs_$HOSTNAME$
    command_line  $USER1$/check_nrpe
}


I want it that convoluted because I compiled nrpe daemons on
managed nodes not to accept arguments.
Thus I think I would have to wrap the distinction in the command
name.

Regards
Ralph




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050727/36bf971e/attachment.html>


More information about the Users mailing list