PingDirectory

Sending Metrics with the Periodic Stats Logger and the Splunk Universal Forwarder

A Splunk Universal Forwarder can be used to forward PingDirectory server events to Splunk.

The Periodic Stats Logger plugin writes PingDirectory server metrics to a file in the server root. A Splunk Universal Forwarder can be configured to watch this file and forward the metrics to Splunk.

Configuring the Periodic Stats Logger

The PingDirectory server can log various metrics, including LDAP operation counts and GC activity, to a JSON-formatted log.

About this task

To configure the PingDirectory server to log to a JSON-formatted log file with various metrics, including LDAP operation counts and GC activity, run the following command. The metrics will be written to logs/dsstats.json in the server root.

dsconfig set-plugin-prop \
					--plugin-name "Stats Logger" \
					--set enabled:true \
					--set log-file:logs/dsstats.json \
					--set log-file-format:json \
					--set local-db-backend-info:extended \
					--set header-prefix-per-column:true \
					--set empty-instead-of-zero:false \
					--set per-application-ldap-stats:per-application-and-aggregate

Configuring the Splunk Universal Forwarder

You can use the Splunk Universal Forwarder to monitor the logs/dsstats.json file and forward the metrics to Splunk.

About this task

The Splunk Universal Forwarder can be configured to monitor the logs/dsstats.json file and forward the metrics to Splunk. Under the Splunk Forwarder application files, update the etc/apps/search/local/inputs.conf file with the following configuration for dsstats.json:

[monitor:///path/to/PingDirectory/logs/dsstats.json]
					sourcetype=log2metrics_json
					index=pdmetrics
					disabled=false
					host=pd1

The index name can be customized, and the host value can be configured to label where the metrics are being forwarded from.