[Xymon] clientlaunch.cfg question

J.C. Cleaver cleaver at terabithia.org
Tue Feb 18 21:10:10 CET 2014


The string in the CMD line is either executed directly (if it's a single
block), or sent off to the shell (if there are arguments).

In your case, a line of:
   CMD $XYMONCLIENTHOME/ext/check_mpaths --foo=bar --blah -v
 should do what's expected.


Although some shells might parse environment variables like that, I tend
to use the 'env' command when controlling something from the command line
like that:

   CMD env TTOLIV=5 ASERV=60.75.1.171 BOGO=FOO
$XYMONCLIENTHOME/ext/check_mpaths


HTH,

-jc


On Tue, February 18, 2014 11:24 am, Bakkies Gatvol wrote:
> Answering my own question.
>
> I still don't know what the manpage means exactly, but I discovered
> complete by accident -
>
>  the values I specified at the end of the CMD line is loaded into the
> environment.
>
> I was trying to access $1 and $2 but instead got ASERV and TTOLIV (and
> BOGO) set in the environment.  I can work with that!
>
> here is what I have in clientlaunch.cfg
>
> [check_mpaths]
>         ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
>         CMD $XYMONCLIENTHOME/ext/check_mpaths TTOLIV=5 ASERV=60.75.1.171
> BOGO=FOO
>         LOGFILE $XYMONCLIENTHOME/logs/check_mpaths.log
>         INTERVAL 5m
>
>
> From: bakgat8 at hotmail.com
> To: xymon at xymon.com
> Date: Tue, 18 Feb 2014 13:10:13 -0500
> Subject: [Xymon] clientlaunch.cfg question
>
>
>
>
>        The  command  is  defined  by  the  CMD keyword. This is the full
> command
>        including any options you want to use for this task. This is
> required for
>        all tasks.
>
> When is says
>
> including any options you want to use for this task.
>
>
> what does it mean?
>
> I was hoping I can pass in some arguments to my script, but it does not
> work.
>
> So what would be an example of an option for this task?
>
> Befuddled.
>
> Bakkies
>
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>





More information about the Xymon mailing list