I'm wondering, when the %LastStatus% variable is set (and maybe other %Lastxxx% variables).
It seems that it is set after we have passed the expressions for Normal and Warning. I think it should be set before evaluationg Normal and Warning expression.
See the following two exmples (don't think too much about the sense, just see the difference in using %LastStatus% and %Status%)
CPU Test 90 % all recurrences will be < 90 %
[x] Use "Normal" status if: (%CurrentStatusIteration% > 2) or ("%LastStatus%" == "Normal")
Ok - OK - Ok - Normal - Ok - Normal - Ok - Normal - Ok .....
Why does it switch back to "Ok". Only reason could be that the %LastStatus% is currently not set to "Normal" while we evaluate the expression.
While the following behaves as I would expect the above example should do.
[x] Use "Normal" status if: (%CurrentStatusIteration% > 2) or ("%Status%" == "Normal")
Ok - OK - Ok - Normal - Normal - Normal - Normal - Normal - Normal ....
Is that desired behaviour ?
The use of the %Lastxxx% variables is not described in the manual
Code: Select all
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% and %SuggestedRecurrences%) without touching regular counters (Status, Reply, Recurrences);
then HostMonitor evaluates "Warning" and "Normal" expressions and finally modifies current test status and statistisc counters (Status, Reply, Alive%, Passed tests, Failed tests, etc).
But I would expect the %Lastxx% variables to be already set for the last completly passed test.
[EDIT: on the other hand we have one more history level to evaluate - maybe that is worth keeping things as they are

[EDIT 2: The more I think about that, the more I agree to the things as they are. Maybe just add a note to the manual to make the use of %Lastxxx% a bit more clear]
What do you think ?
Best regards
Juergen