Hello,
I want to run some commands like this :
/path/to/my/tool tool $ARGS1$@$HOSTADDRESS$
Where $ARGS1$ is the argument passed in each service and $HOSTADDRESS$ the address of the host hosting this service.
but the macros seems to not be interpreted when I run it, do you have any clues ? or I'm using this wrong ?
thank you for your answer
Actions component
Re: Actions component
Can you show us the command / service definition you're attempting to use?
Former Nagios Employee
-
nagios_aws
- Posts: 76
- Joined: Wed May 18, 2016 3:34 am
Re: Actions component
I'm using a script that I developed myself in the service, i'm using it like this :
$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_flex.pl -a $ARG1$
it works very well for every services.
I tried to set up an action in another way to do the same thing, but arguments doesn't seem to work.
you can see the actions in attached file.
the tool is called, I get the output, but no parameters are given to this tool
$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_flex.pl -a $ARG1$
it works very well for every services.
I tried to set up an action in another way to do the same thing, but arguments doesn't seem to work.
you can see the actions in attached file.
the tool is called, I get the output, but no parameters are given to this tool
You do not have the required permissions to view the files attached to this post.
Re: Actions component
The $MACRO$-style macros will not work that way in the Actions component:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
The macros are formatted like %macro% and the above documentation has a list on the last page of which macros are available.
Also note that things like $ARG1$ will not have any meaning since that only applies when a check is being run.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
The macros are formatted like %macro% and the above documentation has a list on the last page of which macros are available.
Also note that things like $ARG1$ will not have any meaning since that only applies when a check is being run.
Former Nagios employee