Possible to add a custom variable to the alias line?
Posted: Fri Jun 28, 2013 11:16 am
I have custom variables in several of my hosts. I'm able to pass those to check commands, and that works wonderfully. What I'm looking to do is to get those custom variables added to the alias line, and I haven't found a way to do that.
As an example, I have the custom variable _mac_address defined in the host as:
And it passes that variable to a check command when its called as:
What I'm looking to have is something like:
It didn't work for me with $NAGIOS_HOSTMAC_ADDRESS$, $_HOSTMAC_ADDRESS$, nor $_mac_address$. Is it something I'm doing wrong in the name, or can custom variables not be passed in the alias line?
As an example, I have the custom variable _mac_address defined in the host as:
Code: Select all
_mac_address aa:bb:cc:11:22:33Code: Select all
command_line $USER1$/check_example $_HOSTMAC_ADDRESS$ $ARG1$ $ARG2$Code: Select all
alias A bunch of info that ends with MAC: $_HOSTMAC_ADDRESS$