macro to convert ping ms to value without ms

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
johnm
Posts: 117
Joined: Fri Apr 01, 2005 9:49 pm

macro to convert ping ms to value without ms

Post by johnm »

trying to tune-up reply of ping response time and need to do calculation on reply but the "ms" is causing a problem. have tried using %reply_number% and %reply_integer% but these are 0 because ping reply is in ms which is < zero.


Suggestions? I am thinking I need to create a macro var but do not know how to.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

trying to tune-up reply of ping response time and need to do calculation on reply but the "ms" is causing a problem
I assume you forgot to use quotation marks.
Quote from the manual
================
numbers and strings (in quotes). Strings that contain a number plus one of the following unit specificators [ms, Kb, Mb, Gb, %] are compared as numbers, so that '900 Kb' is equivalent to 921600
================
In other words:
100 ms*5 - invalid expression
'100 ms'*5 - correct expression
have tried using %reply_number% and %reply_integer% but these are 0 because ping reply is in ms which is < zero
ms is < zero?? No, '100 ms' is greater than 0
However you should not use %reply_number% and %reply_integer% for "tune up reply" expression. You should use %SuggestedReply% variable.
Another quote from the manual
================
1) HostMonitor performs the test;
2) processes "Reverse alert" option;
3) sets "suggested" macro variables (%SuggestedStatus%, %SuggestedSimpleStatus%, %SuggestedReply%, %SuggestedRecurrences% and %FailureIteration%) without touching regular counters (%Status%, %Reply%, %Recurrences%, etc);
4) then HostMonitor evaluates "Warning", "Normal" and "Tune up Reply" expressions and finally modifies current test status, reply field and statistics counters (Status, Reply, Alive%, Passed tests, Failed tests, etc).
================

Regards
Alex
johnm
Posts: 117
Joined: Fri Apr 01, 2005 9:49 pm

Post by johnm »

I did forget the quotation marks. Thanks.

Also, can't argue with the truth about < 0. I meant < 1. Sorry.

Thanks for the advice. I'll give it a try.
Post Reply