Script Monitors

Introduction:

This section is common to all the editions of IT360 - Professional Edition, Enterprise Edition (Probes only) and MSP Edition (Probes only).

Custom script monitoring can be a tedious task, if the output of the scripts that are run, are to be monitored manually. IT360 provides with script monitoring functionality, to ease the process, by automatically monitoring the output of in-house custom scripts (Windows/Linux), and by creating alerts, 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.

Steps to add a Script Monitor:

To add a Script Monitor, follow the below steps;

  1. Login to IT360 console with the Username and Password of an Admin user.

  2. Click the Admin tab in the header pane.

  3. Click Discover/Add under Discovery.

  4. Choose the option Add from the Discover / Add type dropdown and select the Application radio button.

  5. In the Add New Monitor wizard displayed, click Script Monitor under Custom Monitors. Fill-in the following details:

  6. Enter the Display Name of the Monitor.
  7. Choose the Script Location, i.e.whether the script to be monitored is present in a Local Server or in a Remote Server.

  8. 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 be in the same hierarchy of the 'script to be monitored' directory structure. If you choose Remote Server, then enter the Host, where the script is located. Now, proceed to the next point below.

  9. Under Output Settings, Give the Output file name with absolute path.

  10. Enter the Name of the String and Numeric attributes, as requested.

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

  12. 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: In order 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 IT360 to identify the Output File's table. And also, it is mandatory to have the file headers, as the first line in the file.

  13. Specify the Arguments. For e.g., hostname 80 http.

  14. Set the Polling Interval. By default, it is 5 minutes.

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

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

  17. If the script is in a Remote server, select the Hostname from the list.

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

  1. Now, Associate the above Monitor Instances to a Business Service. i.e. choose the Business Service, to which you want to associate the Script monitor, from the combo box. If no Business Service is found, Create one by clicking the Create New Business Service link.

  1. Click Add Monitor(s). This discovers the Script monitor from the network and starts monitoring them.

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

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



Copyright © 2013, ZOHO Corp. All Rights Reserved.