PingDirectory

Stats logging

The PingDirectory server provides a stats logger plugin that can be used to write a log file with a variety of performance metrics and other information collected within the server.

The information can be written in either CSV or JSON formats. Although CSV was originally the only format supported for this log file, use JSON for new deployments because it is easier to parse in automated form, especially given that the set of fields included in the output can change over time.

A configuration change like the following can be used to enable a stats logger instance using the JSON format.

dsconfig create-plugin \
 	--plugin-name "JSON-Formatted Stats Logger" \
 	--type periodic-stats-logger \
 	--set enabled:true \
 	--set log-file:logs/stats-log.json \
 	--set log-file-format:json \
 	--set "rotation-policy:Fixed Time Rotation Policy" \
 	--set "rotation-policy:Size Limit Rotation Policy" \
 	--set "retention-policy:File Count Retention Policy" \
 	--set "log-interval:1 s" \
 	--set "collection-interval:200 ms" \
 	--set suppress-if-idle:true \
 	--set local-db-backend-info:basic \
 	--set replication-info:basic \
 	--set included-ldap-stat:active-operations \
 	--set included-ldap-stat:num-connections \
 	--set included-ldap-stat:op-count-and-latency \
 	--set included-ldap-stat:work-queue \
 	--set included-resource-stat:memory-utilization \
 	--set histogram-op-type:all