System alarms, alerts, and gauges
An alarm represents a stateful condition of the server or a resource that might indicate a problem, such as low disk space or external server unavailability. A gauge defines a set of threshold values with a specified severity that, when crossed, cause the server to enter or exit an alarm state. Gauges are used for monitoring continuous values like CPU load or free disk space (Numeric Gauge), or an enumerated set of values such as 'server available' or ‘server unavailable’ (Indicator Gauge). Gauges generate alarms, when the gauge’s severity changes because of changes in the monitored value. Like alerts, alarms have severity (NORMAL, WARNING, MINOR, MAJOR, CRITICAL), name, and message. Alarms will always have a Condition
property, and can have a Specific Problem or Resource property. If surfaced through SNMP, a ProbableCause
property and AlarmType
property are also listed. Alarms can be configured to generate alerts when the alarm’s severity changes.
There are two alert types supported by the server - standard and alarm-specific. The server constantly monitors for conditions that might need attention by administrators, such as low disk space. For this condition, the standard alert is low-disk-space-warning
, and the alarm-specific alert is alarm-warning
. The server can be configured to generate alarm-specific alerts instead of, or in addition to, standard alerts. By default, standard alerts are generated for conditions internally monitored by the server. However, gauges can only generate alarm-alerts.
The server installs a set of gauges that are specific to the product and that can be cloned or configured through the dsconfig
tool. Existing gauges can be tailored to fit each environment by adjusting the update interval and threshold values. Configuration of system gauges determines the criteria by which alarms are triggered. The Stats Logger can be used to view historical information about the value and severity of all system gauges.
PingDirectory servers are compliant with the International Telecommunication Union CCITT Recommendation X.733 (1992) standard for generating and clearing alarms. If configured, entering or exiting an alarm state can result in one or more alerts. An alarm state is exited when the condition no longer applies. An alarm_cleared
alert type is generated by the system when an alarm’s severity changes from a non-normal severity to any other severity. An alarm_cleared
alert will correlate to a previous alarm when Condition and Resource property are the same. The Alarm Manager, which governs the actions performed when an alarm state is entered, is configurable through the dsconfig
tool and Administrative Console.
Like the Alerts Backend, which stores information in cn=alerts
, the Alarm Backend stores information within the cn=alarms
backend. Unlike alerts, alarm thresholds have a state over time that can change in severity and be cleared when a monitored value returns to normal. Alarms can be viewed with the status
tool. As with other alert types, alert handlers can be configured to manage the alerts generated by alarms. A complete listing of system alerts, alarms, and their severity is available in <server-root>/docs/admin-alerts-list.csv
.
Alert handlers
Alert notifications can be sent to administrators when significant problems or events occur during processing, such as problems during server startup or shutdown. The server provides several alert handler implementations configured with the confined
tool, including:
- Error Log Alert Handler
-
Sends administrative alerts to the configured server error logger(s).
- JMX Alert Handler
-
Sends administrative alerts to clients using the Java Management Extensions (JMX) protocol. The server uses JMX for monitoring entries and requires that the JMX connection handler be enabled.
- SNMP Alert Handler
-
Sends administrative alerts to clients using the Simple Network Monitoring Protocol (SNMP). The server must have an SNMP agent capable of communicating via SNMP 2c.
If needed, the Server SDK can be used to implement additional, third-party alert handlers.
Configure alert handlers
Alert handlers can be configured with the dsconfig
tool. PingDirectory servers support JMX, SMTP, and SNMP. Use the --help
option for a list of configuration options. The following is a sample command to create and enable an SMTP Alert handler from the command line:
$ bin/dsconfig create-alert-handler \
--handler-name "SMTP Alert Handler" \
--type smtp \
--set enabled:true \
--set "sender-address:alerts@example.com" \
--set "recipient-address:administrators@example.com" \
--set "message-subject:Directory Admin Alert \%\%alert-type\%\%" \
--set "message-body:Administrative alert:\\n\%\%alert-message\%\%"