ManageEngine® Applications Manager


Script Monitors

<< Prev

Home

Next >>

Script Monitors

 

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:

  1. Click New Monitor. Choose Script Monitor.

  2. Enter the Display Name of the Monitor.

  3. Choose whether the script to be monitored is present in the Local Server or in a Remote Server

  4. 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.

  5. Select the script location as command or script / batch file.

  6. Specify the absolute path of the script / command to be monitored.

  7. Specify the absolute path of the execution directory from which the script should be executed.. The execution directory should in the same hierarchy of the script to be monitored directory structure.

  8. Check the Output Settings checkbox, to configure output settings
  9. 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-->
    [Script Commands]
    echo<--table <table-name> ends-->
    This would enable Applications Manager to identify the Output File's table.

    Even if you're using a command instead of a script as input, then the output of the command should be in the above format. It is also mandatory to have the headers and footer in the command output as the first line in the file.

  10. Specify the Arguments. For e.g., hostname 80 http
  11. Set the Polling Interval. By default, it is 5 minutes

  12. Specify the Timeout value in seconds. The value can be the maximum time taken by the script to execute.

  13. In Linux, Specify the mode in which script should be executed. By default, it is "sh".

  14. If the script is in a remote server, select the Host Name from the list

  15. 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.

  16. Enter the User Name and Password of the server.

  17. Enter the Port number - Default Telnet port no: 23, SSH: 22

  18. Specify the command prompt value, which is the last character in your command prompt. Default value is $ and possible values are >, #, etc.

  19. Upon adding the script monitor, you can view the details of the newly added Script Monitor

Top

Example:

 

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

 

Output settings:

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.

Top

See Also

Monitor Information - Script Monitors | Create Other New Monitors

 

 

<< Prev

Home

Next >>

Siebel Enterprise Server

Servers