External Program error levels

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
User avatar
dimmyr
Posts: 35
Joined: Sat Dec 28, 2002 6:00 pm
Location: Detroit, MI

Post by dimmyr »

I am trying get HM to recognize the response from a perl script. I am using the External Program test, and it gives me an option to recognize error level. What is the syntax for the error level?

I can have my script return whatever is necessary, but I would really love to see a test that compares the string returned by the script or a program to a given.

How do I do that?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

"External" test cannot compare any strings because the only thing process can return to caller process is error level (just a number).
So, if your script needs to return and checks some strings, use "Script" test.

Regards
Alex
User avatar
dimmyr
Posts: 35
Joined: Sat Dec 28, 2002 6:00 pm
Location: Detroit, MI

Post by dimmyr »

My script is in Perl. The Script test only understands VBScript or JScript.

I am ok with just the error level if I was to use the External program test, I just need to know what the syntax of the error level is, so I can have my script return the error levels.

The bigger picture is that I really need a File Test that accomodates what I need. I need to find the log files that have been generated within today and I need to look for a certain string in them. Your File Test does not have the modified date specified, so I cannot use it. Your Script test does not do Perl, so I cannot use it. I am left with the External Program Test...

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

Post by KS-Soft »

>My script is in Perl. The Script test only understands VBScript or JScript.

There is quote from manual:
---------------------------
The scripting engine is the COM object that actually processes the scripts, e.g. VBScript, JScript, etc. These COM objects are usually provided by a third party (in the case of VBScript it's provided by Microsoft). On Windows 2000/XP VBScript and Jscript installed by default, also you can download and install additional script languages. If you have old version of Windows or if you want to use another script language, follow links can be useful for you:
- Visual Basic Script (VBScript) and Java Script (Jscript) for Windows 98, ME, NT 4.0, 2000 are available at http://msdn.microsoft.com/scripting
- Perl is available from http://www.activestate.com
- Python is available at the same site http://www.activestate.com
- Haskell is available at http://www.haskell.org/haskellscript
Of course we don't know about all script languages available on the Internet, these are just the most popular that we know about
---------------------------

>I am ok with just the error level if I was to use the External program test, I just need to know what the syntax of the error level is, so I can have my script return the error levels.

Sorry, I don't know Perl, I cannot answer to this question. Try to post this question into some Perl related forum. http://www.perl.org/

Regards
Alex
User avatar
dimmyr
Posts: 35
Joined: Sat Dec 28, 2002 6:00 pm
Location: Detroit, MI

Post by dimmyr »

Understood. I have Activestate's Perl installed on this W2K machine. How do I define in HM where the engine is?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

It should be installed on the same system where HostMonitor is running.
When engine is installed, just type name of the script language in "Language" field (Test Properties) dialog.

Regards
Alex

<font size=-1>[ This Message was edited by: KS-Soft on 2003-03-25 12:11 ]</font>
Post Reply