Introduction:
In production environments, applications can become unavailable due to failures to correct mount disk volumes or through disk capacity being completely used (leading to out of space errors).
A perl script (DiskSpace.txt - attached below) was created to help detect significant changes in capacity on servers where critical components for the web infrastructure execute.
This enables operations to quickly identify disk resource shortages that could lead to failures unless they are quickly addressed.
This example shows all the mounts and the percentage of capacity.
Instructions:
The DiskSpace.pl script returns the name of the mount and the capacity used as a percentage.
The fully qualified metric name is SuperDomain|hostname|EPAgentProcess|EPAgent|Diskspace:Capacity/mountname
One entry will be returned for each disk that is mounted on the server.
Element | Description | Type |
Capacity/mountname | The name of the mount point and the percentage of capacity used. | Integer |
The DiskSpace.pl script is delivered as a perl script, which requires no arguments.
The following is an example of the stateless EPA definition for the provided DiskSpace.pl script.
introscope.epagent.plugins.stateless.names=DISKSTATS
introscope.epagent.stateless.DISKSTATS.command=perl ./config/linux /DiskSpace.pl
introscope.epagent.stateless.DISKSTATS.delayInSeconds=900
The perl script uses strings to match the standard output to known strings in the output of server-status and strings to locate the substring position of data used in the Introscope metric.
This means if the output of the DiskSpace.pl changes due to configuration differences that perl should tolerate these environmental differences.
If the perl script requires alteration, then a number of variables are available to provide the matching criteria. These are:
Variable | Description |
$match | Matching string that must be found in the output |
$type | The metric type which will be returned from the EPAgent |
$name | This defines the name hierarchy of the metric |
This script requires the following items to be available within the environment.
Additional Information: