View previous topic :: View next topic |
Author |
Message |
Kris
Joined: 12 May 2010 Posts: 375
|
Posted: Thu Jul 13, 2023 2:47 am Post subject: V 14.01: Errors when using 'Use warning status if' |
|
|
Hi guys,
Just updated to 14.01
Several test that have a 'Use "Warning" status if..' setting now give errors like:
Invalid expression: ConditionEval: Unknown operator:
followed by the condition value itself.
These are Shell scripts, returning a value from the script, either a string or numeric value.
It happens with both string and numeric condition.
Maybe something changed in the syntax?
When I remove the 'Use warning' setting, the tests run fine, returning the actual value of the test. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Thu Jul 13, 2023 3:29 am Post subject: |
|
|
We need to see expression and all data (e.g. if you are using variable %AverageReply% we need to know what is AverageReply is)
Regards
Alex |
|
Back to top |
|
|
Kris
Joined: 12 May 2010 Posts: 375
|
Posted: Thu Jul 13, 2023 4:08 am Post subject: |
|
|
An actual test (not a ShellScript btw):
Windows Performance Counter (Exchange Queue size):
\MSExchangeTransport Queues(_total)\External Aggregate Delivery Queue Length (All External Queues)
--> The test returns a 2-decimal numeric value (e.g. 0.00 or 7.00 or whatever...)
Use warning if expression:
%SuggestedReply% > 0 and %SuggestedReply% < 10
--> Test status 'bad' after 10 fails
Test result:
13/07/2023 10:35:22 Exchange External Delivery Queue Length (PerfCounter) Unknown Invalid expression: ConditionEval: Unknown operator: "0,00" Perf Counter test (External Aggregate Delivery Queue Length (All External Queues))
If you need more info, just let me know |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Thu Jul 13, 2023 5:06 am Post subject: |
|
|
1) you forgot to use "" or '' around %SuggestedReply%
This may work when Reply is correct number but in case of some problem Reply may return text, not a number, e.g. "Access is denied" error. So expression will not be processed
2) If your system is uses dot as decimal separator (0.00 and 7.00 in your sentence above) then 0,00 is not a valid number. That's why error raised.
In other words: use expression like ("%SuggestedReply%" > 0) and ("%SuggestedReply%" < 10)
Regards
Alex |
|
Back to top |
|
|
Kris
Joined: 12 May 2010 Posts: 375
|
Posted: Thu Jul 13, 2023 6:15 am Post subject: |
|
|
Hi Alex,
Your solution works.
However, I'm still puzzled on how this has worked until the 14.01 update.
Anyway, thanks for helping me out once again...
Have a good one! |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Thu Jul 13, 2023 6:29 am Post subject: |
|
|
Quote: | This may work when Reply is correct number but in case of some problem Reply may return text, not a number, e.g. "Access is denied" error. So expression will not be processed |
|
|
Back to top |
|
|
Kris
Joined: 12 May 2010 Posts: 375
|
Posted: Thu Jul 13, 2023 6:53 am Post subject: |
|
|
Ok ok. got it
Suppose I have been lucky all the time for the test working with my dodgy use of syntax hehehehe |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Thu Jul 13, 2023 7:22 am Post subject: |
|
|
I think that was the case ..
Regards
Alex |
|
Back to top |
|
|
|