On-Demand Macros issue

Werner Flamme werner.flamme at ufz.de
Thu May 26 09:33:23 CEST 2005


Bryan Loniewski schrieb am 25.05.05 17:31:
> To answer my own question..
> 
> After looking through the code, it appears what I want is not possible. The code seems 
> to parse on the ":" and believes what follows it ($ARG1$) to be the hostname which is 
> then passed to a function that looks up other attributes for that hostname in memory.
> 
> Thus, the expansion of $ARG1$ is not possible inside an On-Demand macro.
> 
> Would others find this useful if a patch is applied?

Yes. I am someone, am I ;-)

Will be useful when monitoring virtual hosts (webserver) on one machine or
some similar things...

Regards,
Werner

> 
> _________________________
> Bryan Loniewski
> Rutgers University
> NBCS - Systems Programmer
> 
> On Wed, 25 May 2005, Bryan Loniewski wrote:
> 
> 
>>After traversing through the archives for an answer and coming up short.. has 
>>anyone found it possible to do the following?
>>
>>define command{
>>       command_name    foo
>>#        command_line    $USER2$/foo $HOSTADDRESS:some_host_name$ # WORKS 
>>FINE
>>       command_line    $USER2$/foo $HOSTADDRESS:$ARG1$$ # Where 
>>$ARG1$=some_host_name
>>       }
>>
>>that is, namely having $ARG1$ expanded *first* followed by the whole 
>>On-Demand macro?
>>I've tried all sorts of combo's to get this to work but no luck..
>>
>>Any ideas?
>>
>>
>>_________________________
>>Bryan Loniewski
>>Rutgers University
>>NBCS - Systems Programmer
>>
> 
> 
> 
>

-- 
Werner Flamme, Abt. WKDV
UFZ Umweltforschungszentrum Leipzig-Halle GmbH
Permoserstr. 15, 04318 Leipzig
eMail: werner.flamme at ufz.de, Tel.: (0341) 235-2500






-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&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





More information about the Users mailing list