LithiumCorp Pty Ltd
Service Monitoring PDF Print E-mail
Written by Liam Elliott   
Tuesday, 19 June 2007

What is Service Montoring?

Lithium allows you to monitor the operation of applications or protocols using Service Monitoring Scripts. Like Lithium Actions, Service Monitoring is script based using Perl, Shell, Ruby, Python or any other language or object you want provided it can be executed from a shell. A Service Monitoring script checks the operation of an application by attempting to connect to the network-based service and additionally may attempt to perform a transaction using the appropriate protocols.

Image

Managing Service Scripts

A standard set of Monitoring Service Scripts is installed by default with Lithium. Additional scripts are available via the Online Community Library accessible through Console or you can create your own Service Monitoring scripts.

To manage the Service Scripts on your Lithium Core deployment, click on the "Manage Service Monitoring Scripts" item under "Device" in the toolbar or click on "Lithium Setup" in the Console window's toolbar.

The Service Scripts tab in the Lithium Setup window consists of two tabs: Installed Scripts for monitoring locally installed scripts and Community Script Library for installing scripts available through our script library.

Image

To install a script from the Community Library, select the script and click on the "Install" button.

Upload Script: To install your own scripts, or modify an existing script you will need to upload it to your Lithium server. This can be done by clicking the "Upload" button on the toolbar.  When you upload a Perl script, Lithium will first process the script and ensure that all dependent modules are installed, and install any that are missing via CPAN. Use caution when uploading scripts, the "Upload" button will automatically overwrite an existing script of the same name.

Save a local copy: If you wish to make some changes to or just examine a service script select the script from the "Installed Scripts" tab and click the "Save" button. If you do make changes, you will need to upload the script for the changes to take affect.

Removing Scripts: To remove a script, select it from the "Installed Scripts" tab and click the "Remove" button. This will permanently remove the script from your Lithium Core server.

Repairing Scripts: Most perl scripts require extra perl modules to perform their function. When you upload a script to Lithium, Lithium will ensure that all required perl modules are installed and up to date using CPAN. If for some reason one of the required modules for a script is deleted, the script will stop working. A script that has stopped working is marked with a red "X". If a script does stop running, you can make sure that all of the depentent modules are installed by clicking on the "Repair" button.

Adding a Monitored Service

Monitored Services are added to individual monitored devices. With a Device selected in the Console window, select an option under the "Add Monitored Service" menu in the "Device" toolbar item. Or, select the same via the context menu for the selected Device.

Image  

There are three steps to adding a Monitored services: Set the description, select the script to use and set the script-specific configuration variables.

Image

Description: The service description textbox, allows you to set a description for this service eg. DNS Check. Although this description doesn't have to be unique, it is recommended that each service should have a unique description.

Monitoring Script: As mentioned above, Services require scripts to monitor them. The drop down list in the "Service Monitoring Script" section contains all of the currently installed service scripts. You are required to select a script from this list (or you can upload one now by clicking the Upload Script... button) for this service to use. Once you have selected the script, the Configuration Variables table will populate.

Service Monitoring Configuration:  This section contains a list of all of the configuration variables for the selected script. For example: Alternate IP/Hostname, Alternate Port. The variables listed here depend on the script that is selected. If a variable is required it will be marked with a blue dot in the last column.

Once you have filled in all the required variables and configured the script click the Add button to add the monitored service to this device. Starting from the next refresh period of the device this service will now be monitored. You can view the details of the service by browsing to the "Services" container of the device. 

Editing/Removing a Monitored Service

Once you have added a service to monitor, you may need to update the configuration variables or even the script it uses. To Edit a monitored service, you first need to locate the service in a browser window and control-click on the required service. From the context menu select "Monitored Service" and then click "Edit Monitored Servie...".

Image

This will now open a window similar to the "Add service window", once you have made the required changes click the "Save" button. 

To remove a service, again browse to the service and select Monitored Service -> Remove Monitored Service... from the Control-Click context menu.

If you wish to modify the script a Monitored service uses, or even just the configuration variables.


Last Updated ( Wednesday, 24 October 2007 )
 

PDF Download

Quick-Start Guide