ManageEngine® Applications Manager
Custom script monitoring can be a tedious task if the output of the scripts that are run, are to be monitored manually. Applications Manager provides with script monitoring functionality to ease the process by automatically monitoring the output of in-house custom scripts (Windows/Linux) and by creating alarms as per the configuration. Script monitor allows you to monitor the script that is present in the local system or in the remote system, transfers the output to an Output File, parses the output and executes the actions configured.
To add Script Monitor, follow the given steps:
Click New Monitor. Choose Script Monitor.
Enter the Display Name of the Monitor.
Choose whether the script to be monitored is present in the Local Server or in a Remote Server
If it is Local Server, Give the absolute path of the Script to be Monitored and also the absolute path of the directory from which the script should be executed. The execution directory should in the same hierarchy of the 'script to be monitored' directory structure.
Under Output Settings, Give the Output file name with absolute path.
Enter the Name of the String and Numeric attributes.
Enter the value of Delimiter used in the output file. By default, it is "=". If you don't specify a delimiter, then 'space' would be considered as a delimiter.
If you want to monitor a tabular Output file, enter the
details of the tables - Name, String and Numeric column attributes, delimiter
and also specify which attribute is the Unique Column.
Note: Inorder to identify a tabular output file, execute the following commands before and after the actual script.
echo<--table <table-name> starts-->
echo<--table <table-name> ends-->
This would enable Applications Manager to identify the Output File's table.
And also, it is mandatory to have the file headers as the first line in the file.
Specify the Arguments. For e.g., hostname 80 http
Set the Polling Interval. By default, it is 5 minutes
Specify the Timeout value in seconds. The value can be the maximum time taken by the script to execute.
In Linux, Specify the mode in which script should be executed. By default, it is "sh".
If the script is in a remote server, select the Host Name from the list
If the remote server is a new host, then enter the server's Host Name / IP Address. Choose the mode of monitoring - Telnet or SSH.
Enter the User Name and Password of the server.
Enter the Port number - Default Telnet port no: 23, SSH: 22
Specify the command prompt value, which is the last character in your command prompt. Default value is $ and possible values are >, #, etc.
Upon adding the script monitor, you can view the details of the newly added Script Monitor
To monitor a script interfacestatus.bat that creates a user defined table called InterfaceStats and user defined parameters like DiskStatus, DiskErrors and No. ofProcess, in the output file interfacestatusoutput.txt
In the Script Monitor creation form, give the absolute path of the script : c:\interfacestatus.bat
Give the absolute path of Output file: c:\interfacestatusoutput.txt
Give DiskStatus as the string attribute, No.ofProcess and DiskErrors are the numeric attributes with Delimiter "="
If you want to monitor statistics in a table format , select Tables in output file.
Here, we have the table InterfaceStats with the stats Name, IP, Status, In, Out where Name, IP, Status are string attributes; In & Out are numeric attributes. The Delimiter is the separater between the two column names -> space. If tab is the delimiter, then give \t . Usually tab will be the delimiter for sql queries results.
Note: The starting tag of the table, InterfaceStats is "<--table InterfaceStats starts-->" and the end tag is "<--table InterfaceStats ends-->". Also, the first line of the table should contain the attribute names. The attribute names or the column names should also be separated by the same delimiter used to separate the data rows and that is specified as the column delimiter. In this case, they are Name, IP, Status, In and out. The remaining lines between the start and end tag should comprise of the actual data. Make sure that the delimiter for the table is unique and you should specify that as the column delimiter.
Unique Column is the attribute that doesn't repeat itself in the rows and identify the row by that value. Here it is IP.
Monitor Information - Script Monitors | Create Other New Monitors
SAP Server Monitors