%LastStatus% set after evaluating the Expressions

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
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

%LastStatus% set after evaluating the Expressions

Post by JuergenF »

Hi Alex,

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). 
When I'm evaluating the current test, I can understand, that the "current" counters are not set and I have to use the %Suggestedxx% variables.

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 :roll: ]
[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
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

When I'm evaluating the current test, I can understand, that the "current" counters are not set and I have to use the %Suggestedxx% variables.
But I would expect the %Lastxx% variables to be already set for the last completly passed test.
Its not logical. If HostMonitor have not set current status yet, why it should modify previous status?
Also, If HostMonitor changes LastStatus before changing CurrentStatus, you will see the same information in both fields (CurrentStatus=LastStatus) and you will not have any information about last test result

Regards
Alex
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

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.
Correct

Regards
Alex
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Post by JuergenF »

Dear Alex,

in the meantime - after some more testing with the new warning and normal statuses - I fully agree to your statements.

It's good as it is now.
JuergenF wrote:..Maybe just add a note to the manual to make the use of %Lastxxx% a bit more clear]
Many thanks for your help

Juergen
Post Reply