free variable

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
pgh2011
Posts: 11
Joined: Tue Feb 28, 2017 7:36 am

free variable

Post 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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: free variable

Post 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.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: free variable

Post 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
Former Nagios employee
https://www.mcapra.com/
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: free variable

Post 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.
Locked