Page tree

This section contains information about the features in version 1.0.00 of the PATROL for Scripting product. The PATROL for Scripting KM allows you to write a script in the language of your choice, use the script to discover instances and collect performance metrics and send it to the TrueSight Operations Management.

The KM provides great flexibility and gives you the ability to add additional data collection without having to understand or write PSL. The KM provides the following features:

Related topics

Ability to add multiple hosts for monitoring 

You can create text files to define all hosts you would like to execute scripts on. PATROL Agent will read these files and configure the devices and scripts within each file. Also, any changes made to the file will be synchronized by the PATROL Agent. All the files defined for file based configuration must be located at %PATROL_HOME%\TRO\Conf\ImportDevices

For more information about how to configure devices from files by using file based monitoring configuration, see File based configuration.

Ability to distribute the script files 

You can execute scripts remotely or locally as per your requirement.If script files do not exist on remote computer, PATROL for Scripting copies the respective script to the remote computer for execution. The KM supports multiple script file formats like .sh, .bash, .pl and so on. 

If you want to execute a script that has dependencies on other files, you can create a ZIP or a TAR file with the required files and the script. All the files will be extracted and copied to the remote device. The KM also supports .zip and .tar file formats. 

 The script files that are to be distributed to different remote computers must be located at one of the following locations:

  • %PATROL_HOME%\TRO\Conf\Scripts\ScriptFileTransfer
  • %PATROL_HOME%\TRO\Conf\Scripts\ScriptFileTransfer\Devices\deviceName
  • %PATROL_HOME%\TRO\Conf\Scripts\Samples

The configured script file to be executed will be copied from any of the above locations to the remote device. If the files on the monitoring system are modified, the KM transfers the files again to the remote device. For more information, see Distributing script files to remote computer.

Ability to define default configuration

The KM enables you to define the default configuration settings that can be used if some fields in the device configuration are left blank. For example, you might define the user name and password in the default configuration and leave the fields blank in the device configuration or in the file based configuration. You can also have multiple devices that use the same configuration by configuring this option. For more information, see Configuring LINUX-UNIX shell script monitor type

Built in scripts for configuration

The KM provides some scripts to help you get started with the monitoring. These out of the box scripts are ready to use scripts and you can run them on your remote hosts. The following table lists the available sample scripts:

Script name

Description

cron-monitor.sh

Monitors cron jobs execution. The script runs on a host for which the root username and password have been provided. By setting a recurrent check on the /var/log/cron file the script reports the number of jobs that were executed during the last polling cycle. If the number is greater than zero, an annotation message is displayed with the job details. This script shows how to read the latest content from a file, for example, from the last 180 seconds.

conditional-monitor.shMonitors and collects data at the specified time.

netstat-monitor.sh script

Monitors the network load per NIC by using the netstat command line tool. The netstat-monitor.sh script allows you to remotely monitor the network activity of a given host. The script uses the netstat -interfaces operating system command. The script accepts an argument of the host, and reports the network load of that host. The following attributes are provided:

  • bytes in (per NIC)
  • bytes out (per NIC)
  • packets dropped (per NIC)
  • packets overrun (per NIC)
  • packets error (per NIC)

It shows how to present delta values and average instead of absolute value into TrueSight Operations Management.

ping3rdParty.sh script

Monitors network connectivity between a configured device (not where the PATROL Agent is running) and a third party device. This script allows the user to know the network response time between a defined host and a third party host. This script can prove helpful in an IT industry where there is a requirement to ensure that all the different gateways across all data centers can reach one another. The script uses ping (ICMP) in an unbuffered mode to test the connectivity.

rpcinfo-monitor.sh script

Monitors the NFS (Storage Area Network) service availability. The script is executed on a target NFS client host, and tests if the client can access the centralized SAN over NFS and automounter daemon.

traceroute-monitor.sh script

Monitors the network traceability by using the traceroute command line tool. You can run the script on Host A and provide an argument of Host B. The KM discovers all the network servers on the route Host A → Host B. The script monitors the response time of each server, which helps identify any bottlenecks on the route.

This script accepts an argument with the host name. While execution, it performs a traceroute action to that host, and instantiates parameters to show the performance and response times of all the different hosts in the chain of routers and switches. The instances are sorted according to the routing order and their FQDN or IP.

echo-test-multiple-instance.sh

Provides information about the output format expected by the KM when multiple instances of the same monitor type are created. The echo-test-multiple-instance.sh script is like a sample hello world kind of script that displays a valid output with multiple instances and parameters.

echo-test-single-instance.sh

Provides information about the output format expected by the KM for a single instance. The echo-test-single-instance.sh script is like a sample hello world kind of script that displays a valid output with a single value and an annotation.

hogging-process.shIdentifies the process with highest CPU utilization in percent.
informix-monitor.sh

Helps you set up monitoring of the remote Informix database.

zvm-monitor.shProvides information about how to use Perl telnet and ping modules to setup monitoring of zOS systems by polling on their telnet service and requesting login per defined application name.