PingAuthorize

Profiling server performance using the Stats Logger

PingAuthorize provides a Stats Logger plugin you can use to profile server performance for a given configuration.

At a specified interval, the Stats Logger can write server statistics to a JSON file or to a log file in a comma-separated value (.csv) format.

The logger has a negligible impact on server performance unless the log-interval property is set to a very small value (less than 1 second). You can customize the statistics logged and their verbosity.

You can also use the Stats Logger to view historical information about server statistics including LDAP operations, host information, and gauges. Your options include:

  • Update the configuration of the existing Stats Logger Plugin to set the advanced gauge-info property to basic/extended to include this information.

  • Create a dedicated Periodic Stats Logger for information about statistics of interest.

Enabling the Stats Logger

By default, the Stats Logger plugin is disabled. Enable it using the dsconfig tool (and its Advanced Objects menu and Plugin option) or the administrative console (and its Advanced Configuration menu and Plugin Root option).

About this task

The steps below show how to use dsconfig to enable the plugin.

Steps

  1. Run dsconfig in interactive mode. Enter the LDAP or LDAPS connection parameters when prompted.

    Example:

    $ bin/dsconfig
  2. Enter o to change to the Advanced Objects menu.

  3. On the main menu, enter the number for the Plugin menu.

  4. On the Plugin menu, enter the number corresponding to view and edit an existing plugin.

  5. On the Plugin selection list, enter the number corresponding to the Stats Logger.

  6. On the Stats Logger Plugin menu, enter the number to set the enabled property to TRUE.

    If the server is idle, nothing is logged. You can log data even when idle by setting the suppress-if-idle property to FALSE(suppress-if-idle=false).

    On this menu, you can also change the format from csv to json.

  7. When done changing properties, enter f to save and apply the configuration.

    The default logger logs information about the server every second to <server-root>/logs/dsstats.csv. You can open the file in a spreadsheet.

Configuring multiple Periodic Stats Loggers

Create multiple, Periodic Stats Loggers to log different statistics or to view historical information about gauges. Also, you might create multiple loggers to create a log at different intervals (such as logging cumulative operations statistics every hour). To create a new log, use the existing Stats Logger as a template to get reasonable settings, including rotation and retention policy.

Steps

  1. Run dsconfig in interactive mode. Enter the LDAP or LDAPS connection parameters when prompted.

    Example:

    $ bin/dsconfig
  2. Enter o to change to the Advanced Objects menu.

  3. On the main menu, enter the number for the Plugin menu.

  4. From the Plugin management menu, enter the number to create a new plugin.

  5. Enter t to use an existing plugin as a template.

  6. Enter the number corresponding to the existing stats logger as a template.

  7. Enter a descriptive name for the new stats logger.

  8. Enter the log file path to the file.

    For example, type logs/dsstats2.csv.

  9. On the menu, make any desired changes to the properties for the logger.

    For information about the included-http-servlet-stat property, see Logging HTTP performance statistics using the Periodic Stats Logger.

    On this menu, you can also change the format from csv to json.

  10. Enter f to save and apply the configuration.

Configuring the Periodic Stats Logger non-interactively

About this task

To configure PingAuthorize Server to log to a JSON-formatted log file with various metrics, including LDAP operation counts and GC activity, run the following command non-interactively. 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