Quick Action using Free Variable - not substituting

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Quick Action using Free Variable - not substituting

Post by SteveBeauchemin »

In the Quick Action setup I am trying to use Free Variables. The code under the covers looks like it supports use of Free Variables, but I have not been able to find the magic syntax to make it work yet.

If I use %hostid% it provides me with 134 and that is good.
If I use %hoststatustext% is shows me "OK - 127.0.0.1: rta 0.691ms, lost 0%" also good.

But a Free Variable such as %_HOSTOWNER% shows me %_HOSTOWNER% and not the content of the Free Variable.
I have tried using _OWNER _HOSTOWNER %_OWNER% %_HOSTOWNER% $_OWNER$ $_HOSTOWNER$
All I get back are the same exact name. No variable substitution.

Help?

Thanks

Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Quick Action using Free Variable - not substituting

Post by lmiltchev »

But a Free Variable such as %_HOSTOWNER% shows me %_HOSTOWNER% and not the content of the Free Variable.
Try using %_HOSTHOSTOWNER% in the actions component.
Be sure to check out our Knowledgebase for helpful articles and solutions!
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: Quick Action using Free Variable - not substituting

Post by SteveBeauchemin »

I figured it out.

The Underscore stuff caught me.

The actual variable = __OWNER_POC

2 underscores in front

I use it like this %_HOST_OWNER_POC%

and it works. I'm not sure what rabbit hole I went down, but I'm good now.

Thanks.

Steve B

...close the issue please.
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Quick Action using Free Variable - not substituting

Post by mcapra »

Thanks for sharing your solution! Closing this up
Former Nagios employee
https://www.mcapra.com/
Locked