Page 1 of 1
free variable
Posted: Wed Jul 26, 2017 8:26 am
by pgh2011
Hi,
I have this command:
$USER1$/check_nwc_health --hostname $HOSTADDRESS$ --community $_HOSTCOMMUNITY$ $ARG1$
In the host definition I've created a free variable _HOSTCOMMUNITY but with the command this macro is not used.
Re: free variable
Posted: Wed Jul 26, 2017 2:42 pm
by dwhitfield
What is the actual output when you run it from the command line? Also, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.
After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
Re: free variable
Posted: Wed Jul 26, 2017 3:03 pm
by mcapra
I'd be interested in seeing the full
host definition. Specifically what the actual variable name is under the host.
pgh2011 wrote:
In the host definition I've created a free variable _HOSTCOMMUNITY
If it is literally named
_HOSTCOMMUNITY in the core config manager, then your macro would actually be
$_HOSTHOSTCOMMUNITY$ following the conventions mentioned in the official documentation:
https://assets.nagios.com/downloads/nag ... tvars.html
Re: free variable
Posted: Wed Jul 26, 2017 3:19 pm
by dwhitfield
mcapra wrote:I'd be interested in seeing the full host definition. Specifically what the actual variable name is under the host.
Even though we get this in the profile, it'd be great for you to post that here since
@mcapra won't have access to the profile if you PM it. Alternatively, you could just attach the profile in a thread post.