Variable on test

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
FlorianLel
Posts: 8
Joined: Thu Apr 19, 2018 1:26 am

Variable on test

Post by FlorianLel »

Hello everyone,

We have just purchased an update for our HostMonitor. We want to have a folder structure in which a variable for a specific Windows build %VAR_Build_OS% will be referenced. We want to test via a WMIC test if the build is the same as our reference variable %VAR_Build_OS%. Although the variables are correctly replaced by their values in the "Host" channel, it seems that this is not the case for the "test" channel. Indeed, when we enter the variable %VAR_Build_OS% in the 3rd channel of "Alert If", the variable is not replaced by its value (which is the case if we enter the variable in the "Target host" channel). We have tried other methods, but in all cases, it would mean that we have to massively modify the hundreds of tests one by one with each build change. Can you help us? Thank you very much.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Re: Variable on test

Post by KS-Soft »

Sorry, I do not understand what is "host channel", what is "test channel" and what is WMIC test? WMI test?

There is list of test properties where you can use folder-level and "global" variables
(basically you can use variable to specify target host)
https://www.ks-soft.net/hostmon.eng/mfr ... #templates

Regards
Alex
FlorianLel
Posts: 8
Joined: Thu Apr 19, 2018 1:26 am

Re: Variable on test

Post by FlorianLel »

Sorry, i'am french :p

Whene we setup a Test (WMI), there is channel or field:
  • Target Host : %fvar_ipaddress%
Whene you type a variable on "Target Host"'s field, whene you lost focus on the field, the "%fvar_ipaddress%" is replace by the value of the variable.

But, whene you type in "Alert"'s field a variable, the variable is not replaced...

I have a folder with 2 test and 2 variables:
Variables: %OS_Build% and %Ip_address"
Tests : Ping and WMI (SELECT BuildNumber FROM Win32_OperatingSystem)

For my WMI's test, i want to compare the result of my WMI Query (SELECT BuildNumber FROM Win32_OperatingSystem) to my variable %OS_Build%. If it's different then, alert.

But the field of the test (After operator) Seems to not support Variable Use.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Re: Variable on test

Post by KS-Soft »

I see.
You can use Optional status processing expressions, e.g.
Use Warning status if "%SuggestedReply%"<>"%fvar_osbuild%"
or
Use Warning status if "%SuggestedReply%"<>"%udv_osbuild%"
https://www.ks-soft.net/hostmon.eng/mfr ... processing
%OS_Build% and %Ip_address"
There are no such variables. You can set folder-level or global variables but such variables should start with "fvar_" or "udv_"

Regards
Alex
Post Reply