analyze_diagstats.py

The analyze_diagstats.py script analyzes each statistics file and reports any issues. For example, the analyze_diagstats.py script reports if a queue is full and is still incrementing, indicating a performance issue.

Syntax

analyze_diagstats.py [-s] [-o] [-b] [-e] [-d]

Options

The analyze_diagstats.py script has the following command line options:

-s, --settings
Settings file from which the script receives alerts. If not specified, analyze_diagstats.conf is used.
-o, --output_file
Output file name. If not specified, the output name is written to stdout.
-b, --begin_time
Begin time in the following format: YYYY-MM-DDT00:00. For example, 2021-06-16T03:15.
-e, --end_time
End time in the following format: YYYY-MM-DDT00:00. For example, 2021-06-16T03:15.
-d, --detailed
Displays alerts on a per timestamp basis, including the MIB object identifier (OID) value during that timestamp.

Settings File

The analyze_diagstats.conf file can configure some conditions to generate alerts. For example, an MIB OID variable in some condition (lesser, greater, or equal to some value).

  • Each line of the file corresponds to each test the script performs on each specified timestamp to check.
  • Any line that contains the # character is commented out and skipped by the script.
    ALERT_LESSTHAN->MATRIXX-COMMON-MIB::sysTotalMemoryPoolInUseMb,MATRIXX-COMMON-MIB::sysTotalMemoryPoolSizeMb * 0.9
These are the comments extracted from analyze_diagstats.conf:
# Here are the following functions:
# ALERT_LESSTHAN: Alert if the first input is not less than the 2nd.
# ALERT_GREATERTHAN: Alert if the first input is not greater than the 2nd.
# ALERT_EQUALS: Alert if the first input is not equal to the 2nd.
# ALERT_LEQ: Alert if the first input is not less than or equal to the 2nd.
# ALERT_GEQ: Alert if the first input is not greater than or equal to the 2nd.
# NOTES FOR THE 5 ABOVE FUNCTIONS
# Can include operators separated by spaces (+,-,*,/,%) and a float after each MIB for percentage or just a constant if necessary.
# Example:
# ALERT_LESSTHAN->MATRIXX-COMMON-MIB::sysTotalMemoryPoolInUseMb,1000000
# ALERT_LESSTHAN->MATRIXX-COMMON-MIB::sysTotalMemoryPoolInUseMb,MATRIXX-COMMON-MIB::sysTotalMemoryPoolSizeMb * 0.9
# DISPLAY_AVERAGE: Print the average of the value of this MIB OID across all timestamps.
# Example: # DISPLAY_AVERAGE->MATRIXX-MIB::txnEffectiveTxnCountPerSecond
ALERT_INCREMENTING: Alerts if the MIB OID is not incrementing across all timestamps.
# Example: ALERT_INCREMENTING->MATRIXX-MIB::sysBufferPoolStatsTotalCount