Sending statistics to Statsd

WebSEAL provides a series of built-in software modules that, when enabled, can monitor specific server activity and collect information about those activities.

This statistical information is periodically sent to a remote statsd server over UDP.

The information that is gathered by WebSEAL statistics provides a relative view of the activity being recorded. If statistics are captured at regular intervals over a period of time, you can generate a graphical view of the relative relationship of the server activities.

Configuration

In order to enable statistics gathering the settings must be added to the WebSEAL configuration file in the [statistics] stanza. See the configuration options that are detailed here [statistics] stanza.

Example

An example configuration to enable statistics gathering is provided below:

[statistics]

server=statsd.ibm.com
port=8125
frequency=30
component= pweb.https
component = pdweb.junctions

Components

This topic lists the types of components for which statistics will be sent to the statsd server.

pdweb.authn

The pdweb.authn statistics component gathers information related to WebSEAL authentication. The following table describes the statistical information available:
Name Description Type
pdweb.authn.pass The total number of successful authentications. Counter
pdweb.authn.fail The total number of failed authentications. Counter
pdweb.authn.time The time, in milliseconds, that it took to process an authentication operation. Timer

pdweb.http

The pdweb.http statistics component gathers information about WebSEAL HTTP communication. The following table describes the statistical information available:
Name Description Type
pdweb.http.reqs The total number of HTTP requests received. Counter
pdweb.http.worker.time The time, in milliseconds, that is used by a single worker thread to process a HTTP request. Timer
pdweb.http.process.time The time, in milliseconds, that is used to process a single HTTP request -measured inside the worker thread, after the request headers are read, and eliminating connection setup overhead. Timer

pdweb.https

The pdweb.https statistics component gathers information about WebSEAL HTTPS communication. The following table describes the statistical information available:
Name Description Type
pdweb.https.reqs The total number of HTTPS requests received. Counter
pdweb.https.worker.time The time, in milliseconds, that is used by a single worker thread to process a HTTP request. Timer
pdweb.https.process.time The time, in milliseconds, that is used to process a single HTTP request -measured inside the worker thread, after the request headers are read, and eliminating connection setup overhead. Timer

pdweb.http2

The pdweb.http2 statistics component gathers information about WEBSEALHTTP/2 communication. The following table describes the statistical information available:
Name Description Type
pdweb.http2.browser_total_connections The total number of HTTP/2 requests received. Counter
pdweb.http2.browser_current_connections The number of active HTTP/2 connections. Gauge
pdweb.http2.application_total_connections The total number of requests sent to HTTP/2 resource servers. Counter
pdweb.http2.application_current_connections The number of active HTTP/2 connections to resource servers. Gauge
pdweb.http2.browser_total_streams The total number of HTTP/2 streams created. Counter
pdweb.http2.browser_current_streams Number of active HTTP/2 streams. Gauge
pdweb.http2.application_total_streams Total number of streams sent to HTTP/2 resource servers. Counter
pdweb.http2.application_current_streams Current active streams over HTTP/2 resource servers. Gauge
pdweb.http2.browser_idle_timeouts Number of HTTP/2 client connections closed due to idle timeout. Counter
pdweb.http2.browser_full_timeouts Number of HTTP/2 client connections closed due to session timeout. Counter
pdweb.http2.browser_exceeded_max_connections Number of HTTP/2 client connections closed due to exceeding max connections. Counter
pdweb.http2.browser_stream_read_timeouts Number of HTTP/2 client connections closed waiting on a response. Counter
pdweb.http2.application_stream_read_timeouts Number of HTTP/2 resource server connections closed waiting on a response. Counter

pdweb.jct

The pdweb.jct statistics component gathers information about configured junctions. The following table describes the statistical information available:
Name Description Type
pdweb.jct.<jct-id>.reqs The total number of requests that are routed to this junction. Counter
pdweb.jct.<jct-id>.time The time, in milliseconds, that is consumed by a single request to this junction. Timer

The <jct-id> component of the statistic name will match the name of the hosting junction,where the ':' character in the name is replaced with '_'. For standard junctions this will correspond to the configured 'path', and for virtual host junctions this will correspond to the configured 'virtual host'.

pdweb.redis

The pdweb.redis statistics component gathers information related to WebSEAL communication with Redis servers for remote session storage. The following table describes the statistical information available:
Name Description Type
pdweb.redis.<collection-name>.time The time, in milliseconds, that is consumed by a single request to this collection of replicated Redis servers. Timer
pdweb.redis.<collection-name>.reqs The total number of requests which have been set to this collection of replicated Redis servers. Counter

The <collection-name> component of the statistic name refers to the configured name of the collection of replicated Redis servers for which the statistic applies.

pdweb.sescache

The pdweb.sescache statistics component gathers information related to the WebSEAL session cache activity. The following table describes the statistical information available:
Name Description Type
pdweb.sescache.hit The number of requests that resulted in a session cache hit -that is, the user had a session cache entry and it was successfully referenced. Counter
pdweb.sescache.miss The number of requests that missed a session cache hit. Counter
pdweb.sescache.add The number of entries that have been added to the session cache. Counter
pdweb.sescache.del The number of entries that have been deleted from the cache. Counter
pdweb.sescache.inactive The number of entries removed from the cache because the inactivity timeout value had expired. Counter
pdweb.sescache.lifetime The number of entries removed from the cache because the lifetime timeout value had expired. Counter
pdweb.sescache.lru_expired The number of times a "Least Recently Used" cache entry is expired or removed to make room for a new entry. Counter

pdweb.threads

The pdweb.threads statistics component gathers information about WebSEAL worker thread activity. It reports the overall thread usage statistics that include not just request traffic, but all of the worker threads for the WebSEAL process. The following table describes the statistical information available:
Name Description Type
pdweb.threads.active The total number of active worker threads that are handling requests. Gauge
pdweb.threads.total The total number of worker threads that are configured. Gauge

pdweb.websocket

The pdweb.websocket statistics component gathers information related to WebSEALWebSocket communication. The following table describes the statistical information available:
Name Description Type
pdweb.websocket.requests Total WebSocket proxy requests received. Counter
pdweb.websocket.rejected Total WebSocket proxy requests rejected. Counter
pdweb.websocket.timeouts The number of timeouts that have occurred when reading or writing through a proxied WebSocket connection. Counter
pdweb.websocket.active The current number of WebSocket connections that are proxied. Gauge
pdweb.websocket.client_bytes The number of bytes read from the client side. Counter
pdweb.websocket.application_bytes The number of bytes read from the resource server. Counter

Metric name

The name of the metrics which are sent to the statsd component will be of the format: {<prefix>}<component>.<stat>. For example, instanceA.pdweb.https.req. The prefix is an optional component which can be used to help identify the WebSEAL instance which generated the statistic. The prefix is specified by using [statistics] prefix configuration entry.

Example output

Example 'statsd' output is shown below:
pdweb.authn.pass:2|c
pdweb.authn.time:392.5|ms|@0.5
pdweb.https.reqs:8|c
pdweb.https.worker.time:587.625|ms|@0.125
pdweb.https.process.time:99|ms|@0.125
pdweb.jct./.reqs:5|c
pdweb.jct./.time:0.4|ms|@0.2
pdweb.https.reqs:8|c
pdweb.https.worker.time:492|ms|@0.125
pdweb.https.process.time:1.5|ms|@0.125
pdweb.jct./.reqs:2|c
pdweb.jct./.time:1.5|ms|@0.5
Note: The protocol supports sending multiple metrics in a single packet by separating the metrics with a newline (\n) character. When you are using this method, it is important that the packet size does not exceed the Maximum Transmission Unit (MTU) of any single machine in the network traversal path. For this reason, an MTU size of 512 will be assumed, and a single packet will never exceed this length.