Hi All,
I'm trying to setup a test in Hostmonitor (latest version), the custom built exe I run, returns error levels from 0 to 9, I want it to set a Warning (but keep the status ok) if it returns a 3, it's ok if it turns a 0 and everything else is bad.
So I've set the test up to alert if errorlevel <> 0 and in the Use warning status if I've put:
%reply% == 3
Now I get warning if 3 is returned, but anything else I get:
Invalid expression: Unknown operator: "Invalid"
Can anyone help me with this?
Many thanks.
Warning Status Problems
You should not use %Reply% variable, you should use %SuggestedReply%
Quote from the manual
Alex
Quote from the manual
RegardsIMPORTANT 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 and finally modifies current test status and statistisc counters (Status, Reply, Alive%, Passed tests, Failed tests, etc).
Alex
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
What test method do you use? External test?
What is test Status and Reply field?
Do you want to trigger alert and keep test status Ok?
Or may be you need to set Warning status, but do not start alert/action?
it is recommended to use "Suggested" variables in "Use warning status if", "Use Normal status if" and "Tune up Reply value" options.
E.g.
%SuggestedReply% == 3
Quote from manual:
What is test Status and Reply field?
Could you please explain what do you mean?I want it to set a Warning (but keep the status ok)
Do you want to trigger alert and keep test status Ok?
Or may be you need to set Warning status, but do not start alert/action?
Code: Select all
So I've set the test up to alert if errorlevel <> 0 and in the Use warning status if I've put:
%reply% == 3
E.g.
%SuggestedReply% == 3
Quote from manual:
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 and finally modifies current test status and statistisc counters (Status, Reply, Alive%, Passed tests, Failed tests, etc).
-
- Posts: 3
- Joined: Fri May 10, 2013 9:53 am
Thanks
That's everyone that was the problem using %SuggestedReply% stopped the error.
One other thing I was going to ask, is the external program that runs is quite heavy, I've got it running every hour but wanted to randomise the time within that hour so hostmonitor doesn't run all my checks at the same time.
I've set the options to only run 2 checks every second.
Many thanks.
One other thing I was going to ask, is the external program that runs is quite heavy, I've got it running every hour but wanted to randomise the time within that hour so hostmonitor doesn't run all my checks at the same time.
I've set the options to only run 2 checks every second.
Many thanks.
Any external process uses more resources than some simple tests like Ping, TCP, SNMP, Traffic Monitor...
How much resources are used, depends on application you are using.
If you have a lot of external tests, you may place them in one or several folders and use "Non-simultaneously test execution" option (option located in Folder Properties dialog)
http://ks-soft.net/hostmon.eng/mframe.h ... FolderTree
With this option enabled tests that located in the folder will not be executed at the same time. Test items located in different folders may be executed simultaneously even in case option is set for all of these folders. Option is useful when you need to call some non-reentrant application/script.
Regards
Alex
How much resources are used, depends on application you are using.
If you have a lot of external tests, you may place them in one or several folders and use "Non-simultaneously test execution" option (option located in Folder Properties dialog)
http://ks-soft.net/hostmon.eng/mframe.h ... FolderTree
With this option enabled tests that located in the folder will not be executed at the same time. Test items located in different folders may be executed simultaneously even in case option is set for all of these folders. Option is useful when you need to call some non-reentrant application/script.
Regards
Alex