You must be already aware of the Script Monitor .A flexible mechanism to Monitor custom applications or devices and integrate existing system management scripts to the Applications Manager environment. Applications Manager provides Script Monitoring functionality to automatically monitor the output of ad-hoc Windows/Linux/Solaris scripts that are used in-house.
Script Monitor DetailsScript Monitor-Edit
We had a question from one of our customers on how they could use Script Monitor without having to create an output file. Evaluate the script output directly, without having to write it to a file.

During creation of a new script monitor, you NORMALLY need to give the location of the custom script (local/remote), attributes (numeric/string) to be monitored, the Output File in which the output is going to be redirected and the polling interval etc.

However we can create script monitor without an output file. We can monitor the Availability of the script and also get Alerted if the execution of the script was unsuccessful. This is achieved in Applications Manager by parsing the “Error-levels” returned after executing the script from Applications Manager.

Error-levels can be thought of as return codes or “Exit Code” as used  in Linux. Generally an error-level ‘0’ means the command executed successfully, and an error-level 1 or higher usually indicates error. Applications Manager will report the Script monitor status as down for a return code of more than 0. This could be used to send out email alerts or alert the Operations team via the “Alarms Tab”. This will also affect the status of the Monitor Group in which the script is present. Thus helping you track Business Service Availability. 


Shown below is a general outline of a Unix Shell Script.

We can make use of echo commands to return the status of the script:

#!/bin/sh
##This is an example script.

…(script commands and logic here)…

echo “Return Code: 1”    (This would indicate that script failed)

…(more script commands and logic here)…

echo “Return Code: 0”    (This would indicate script completed successfully)

Also note, any data obtained via a script monitor can also work along with the contextual integration in custom dashboards and the flexible alarm framework Applications Manager has. 

Thanks & Regards,
Paul Jacob