Hi,
Still testing Hostmonitor for some features...
Now we can create a Shell/Active script that returns OK/Bad results...
Works great !
expect....
I would like a test that runs a Shell/activescript. That script returns a value (like "scriptval:1024 MB").
Then hostmonitor will have decide of the value is ok or not...
with a simple gt/lt/eq dropbox or a field similar to the advanced alerting feature.
That would greatly expand the possibilities to create own tests...
I have a test that reads the version of a file, and returns it as OK:versionnbr
a BAD is only returned when the file is not found.
Next I have a Alert that checks if the value is < some other value, and send an email when this is the case...
The problem with this setup is that I always get a OK even when the version returned is not a good one.
Hope you get the idea, and see the amazing things that can be done...
regards
Pieter
Custom test
- plambrecht
- Posts: 151
- Joined: Wed May 19, 2004 8:11 am
- Location: Belgium
- Contact:
- plambrecht
- Posts: 151
- Joined: Wed May 19, 2004 8:11 am
- Location: Belgium
- Contact:
I can accomplish that within the script, that is correct.
But then, for every new test I make, I have to add the code to check values.
The script wouls get a parameter like : test.vbs "%reply%" "action" "refvalue"
Then I would have to create a 'switch' statement in the script for every possible 'action' (gt, lt, ge, le, eq, ne, ...)
It would be much easier if the checking of the value was done by HM...
I would see it like this : a script is a new test that returns a value, just like all other test just return a value.
Checking if the value that is returned is valid, is done with the setup of the test. (with a dropdownbox with <, >, <=, ... of with an advanced mode like the actions)
Anyone else that has the same view on this ?
Pieter
But then, for every new test I make, I have to add the code to check values.
The script wouls get a parameter like : test.vbs "%reply%" "action" "refvalue"
Then I would have to create a 'switch' statement in the script for every possible 'action' (gt, lt, ge, le, eq, ne, ...)
It would be much easier if the checking of the value was done by HM...
I would see it like this : a script is a new test that returns a value, just like all other test just return a value.
Checking if the value that is returned is valid, is done with the setup of the test. (with a dropdownbox with <, >, <=, ... of with an advanced mode like the actions)
Anyone else that has the same view on this ?
Pieter
It makes test less flexible. Now script's behavior entirely is up to you. May be somebody want to compare file size to current date? Or set status depending on contents of the file while displaying file size? Or... I can invent a lot of examples. Even standard HTTP test may set status that depends on page contents while displaying reply time.Checking if the value that is returned is valid, is done with the setup of the test. (with a dropdownbox with <, >, <=, ... of with an advanced mode like the actions)
Why? You want to create some super-multipurpose script?Then I would have to create a 'switch' statement in the script for every possible 'action' (gt, lt, ge, le, eq, ne, ...)
Regards
Alex
- plambrecht
- Posts: 151
- Joined: Wed May 19, 2004 8:11 am
- Location: Belgium
- Contact:
Sort of.. My script checks the version of a file (dll, exe, ...), the size of a file, etc.KS-Soft wrote:Why? You want to create some super-multipurpose script?
All values that have to be compared with another value. and then return a bad/ok...
Other option is that you implement these tests...
![:-?](./images/smilies/icon_confused.gif)
I wrote these :
- Read file version
- Read file size
- Read file modified date
- Delta (difference in % between Reply and LastReply)
Anyway, if you don't see the purpose, then I'll just add comparison code to those scripts...
Greetz
Pieter