Guardian properties
A guardian property file must contain all of the required properties to connect to the MBean, detect an anomaly, and trigger an alarm.
Purpose
You use the guardian utility to detect anomalies based on a linear regression model from a sliding window of a fixed number of samples. If the predicted value crosses the threshold that is specified for the anomaly detection, then an alarm is logged.
JMX properties are used to construct the JMX MBean call, by using the following syntax: <jmxDomain>:type=<jmxType><jmxQuery>. The resulting MBean instance must be of type <jmxClassName>, and is filtered based on the <jmxName> attribute and the <jmxNameFilter>. The <jmxAttributeName> is the attribute of the MBean that is used as the value to be analyzed.
Description
The following tables list the properties for each guardian property file.
| Property | Description | Default value |
|---|---|---|
alarmCondition |
Defines when an alarm must be raised. If the value of a MBean attribute (or aggregated attribute) is less than or greater than the threshold. You use the following syntax to define the alarm condition:[Slope].[Total].[attribute key] [operator] [numeric value]. The supported operators are <, <=, >, and >=. |
none |
enabled |
In each property file, set this property to false to disable the monitoring of a property file. The property file can be enabled or disabled. |
true |
frequencySeconds |
Specifies how often the anomaly detection must be run. The value is defined in seconds. |
60 |
sampleCount |
Specifies how many samples the guardian utility can keep. A minimum of 3 samples is required to create a linear regression model from the samples. |
16 |
samplesRequired |
Specifies the minimum number of samples that are needed before attempting to detect an anomaly. |
4 |
timewindowMinutes |
Specifies how far into the future the guardian utility can predict a potential threshold breach by using a linear regression model. The value is defined in minutes. If the value is set to zero, then you get notification when the attribute value has breached the threshold. This can be useful when dealing with rapidly changing values that lead to false positives. |
60 |
severity |
Specifies the log level that must be used to log the alarm when a predicted or actual threshold breach is detected. |
SEVERE |
| Property | Description |
|---|---|
| jmxAttributeUnits |
Specifies in bytes the units to use for the JMX attribute. For example: MILLISECONDS. |
| jmxDomain |
Specifies the domain for the JMX MBean call. For example: com.ibm.websphere.objectgrid. |
| jmxType |
Specifies the JMX type to query. For example: ObjectMap, ObjectGridServer, ObjectGrid. |
| jmxQuery |
Specifies extra JMX query string. For example: ,* |
| jmxClassName |
Specifies the JMX class name that is expected from the query. For example: com.ibm.websphere.objectgrid.management.ObjectGridMBean, com.ibm.websphere.objectgrid.management.MapMBean, com.ibm.websphere.objectgrid.management.DynamicServerMBean |
| jmxNameKey |
Specifies the JMX property to use as the name of the sample. For example: name, ogServerName. |
| jmxNameFilter |
Specifies the JMX property to use to filter names. For example: EventQueue, DelayTimer, Entity, EventStore, OutboundQueue. |
| jmxAttributeName |
Specifies the name of the JMX attribute to retrieve. For example: FreeMemory, MapUsedBytes, OGMeanTranTime. |
The following example retrieves all MBeans with the ObjectName: com.ibm.websphere.objectgrid:type=ObjectMap,*:
# ***** ANOMALY DETECTOR SETTINGS *****
enabled=true
alarmCondition=EventQueue@Total.MapUsedBytes > 1024
sampleCount=32
samplesRequired=4
timewindowMinutes=10
severity=SEVERE
frequencySeconds=10
# ***** JMX POLLING SETTINGS *****
jmxDomain = com.ibm.websphere.objectgrid
jmxType=ObjectMap
jmxQuery=,*
jmxClassName=com.ibm.websphere.objectgrid.management.MapMBean
jmxNameKey=name
jmxNameFilter=EventQueue@
jmxAttributeName=MapUsedBytes