Invalid expression: ConditionEval

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
jordydk
Posts: 51
Joined: Tue Apr 02, 2024 5:25 am

Invalid expression: ConditionEval

Post by jordydk »

Hello,

Hopefully you can help me out.

I have made an alert for the Last OS update.
The settings I have made is "Alert if no updates for 60 days"

In the Use "Warning" status if, i have set (%Reply%>30).

Normal I get the warning state with X days for last OS update.
This morning the alert has changed to Unkown test with the reply:

Invalid expression: ConditionEval: Unknown operator: "Reboot"

What did i do wrong?

What i want is, when the test is checking for the OS update, the test is good if the last OS update is less then 30 days, when it is 31 to 59 days, i want the status get to warning and 60+ days needs to be bad.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Re: Invalid expression: ConditionEval

Post by KS-Soft »

1) usually in such expressions you should use %SuggestedReply%, %SuggestedStatus% variables, not %Reply% or %Status% because
IMPORTANT note: HostMonitor checks logical expressions after test check is done and "reverse alert" option is processed.
I.e.
- HostMonitor performs the test;
- processes "Reverse alert" option;
- sets "suggested" macro variables (%SuggestedStatus%, %SuggestedSimpleStatus%, %SuggestedReply%, %SuggestedRecurrences% and %FailureIteration%) without touching regular counters (%Status%, %Reply%, %Recurrences%, etc);
- then HostMonitor checks "Warning" and "Normal" expressions, processes "Tune up Reply" option
- finally modifies current test status and statistisc counters (Status, Reply, Alive%, Passed tests, Failed tests, etc).
https://www.ks-soft.net/hostmon.eng/mfr ... processing

2) %Reply% and %SuggestedReply% can return a string, not a number (e.g. "Reboot pending") and you forgot to use quotation marks

So correct expression may look like ("%SuggestedReply%">30)

Regards
Alex
Post Reply