Enabling Statistics Gathering
IBM Application Gateway (IAG) 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 gathered by IAG 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 IAG configuration YAML file in the logging statistics node. The configuration options are detailed in the YAML reference documentation: Statistics.
Example
An example configuration to enable statistics gathering is provided below:
logging:
statistics:
server: 127.0.0.1
port: 8125
frequency: 10
components:
- iag.https
- iag.resource_servers
Components
iag.authn
The iag.authn statistics component gathers information related to IAG authentication. The following table describes the statistical information available:
Name | Description | Type |
---|---|---|
iag.authn.pass | The total number of successful authentications. | Counter |
iag.authn.fail | The total number of failed authentications. | Counter |
iag.authn.time | The time that it took to process an authentication operation. | Timer |
iag.https
The iag.https statistics component gathers information about IAG HTTPS communication. The following table describes the statistical information available:
Name | Description | Type |
---|---|---|
iag.http.reqs | The total number of HTTPS requests received. | Counter |
iag.http.worker.time | The time that is used by a single worker thread to process a HTTPS request. | Timer |
iag.http.process.time | The time that is used to process a single HTTPS request - measured inside the worker thread, after the request headers are read, and eliminating connection setup overhead. | Timer |
iag.http2
The iag.http2stats statistics component gathers information about IAG HTTP/2 communication. The following table describes the statistical information available:
Name | Description | Type |
---|---|---|
iag.http2.browser_total_connections | The total number of HTTP/2 requests received. | Counter |
iag.http2.browser_current_connections | The number of active HTTP/2 connections. | Gauge |
iag.http2.application_total_connections | The total number of requests sent to HTTP/2 resource servers. | Counter |
iag.http2.application_current_connections | The number of active HTTP/2 connections to resource servers. | Gauge |
iag.http2.browser_total_streams | The total number of HTTP/2 streams created. | Counter |
iag.http2.browser_current_streams | Number of active HTTP/2 streams. | Gauge |
iag.http2.application_total_streams | Total number of streams sent to HTTP/2 resource servers. | Counter |
iag.http2.application_current_streams | Current active streams over HTTP/2 resource servers. | Gauge |
iag.http2.browser_idle_timeouts | Number of HTTP/2 client connections closed due to idle timeout. | Counter |
iag.http2.browser_full_timeouts | Number of HTTP/2 client connections closed due to session timeout. | Counter |
iag.http2.browser_exceeded_max_connections | Number of HTTP/2 client connections closed due to exceeding max connections. | Counter |
iag.http2.browser_stream_read_timeouts | Number of HTTP/2 client connections closed waiting on a response. | Counter |
iag.http2.application_stream_read_timeouts | Number of HTTP/2 resource server connections closed waiting on a response. | Counter |
iag.redis
The iag.redis statistics component gathers information related to IAG communication with Redis servers for remote session storage. The following table describes the statistical information available:
Name | Description | Type |
---|---|---|
iag.redis..time | The time that is consumed by a single request to this collection of replicated Redis servers. | Timer |
iag.redis..reqs | The total number of requests which have been set to this collection of replicated Redis servers. | Counter |
iag.resource_servers
The iag.resource_servers statistics component gathers information about configured resource servers. The following table describes the statistical information available:
Name | Description | Type |
---|---|---|
iag.rs.<rs-id>.reqs | The total number of requests that are routed to this resource server. | Counter |
iag.rs.<rs-id>.time | The time that is consumed by a single request to this resource server. | Timer |
The <rs-id> component of the statistic name will match the name of the hosting resource server, where the ':' character in the name is replaced with '_'. For path based resource servers this will correspond to the configured 'path', and for virtual host based resource servers this will correspond to the configured 'host'.
iag.sescache
The iag.sescache statistics component gathers information related to the IAG session cache activity. The following table describes the statistical information available:
Name | Description | Type |
---|---|---|
iag.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 |
iag.sescache.miss | The number of requests that missed a session cache hit. | Counter |
iag.sescache.add | The number of entries that have been added to the session cache. | Counter |
iag.sescache.del | The number of entries that have been deleted from the cache. | Counter |
iag.sescache.inactive | The number of entries removed from the cache because the inactivity timeout value had expired. | Counter |
iag.sescache.lifetime | The number of entries removed from the cache because the lifetime timeout value had expired. | Counter |
iag.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 |
iag.threads
The iag.threads statistics component gathers information about IAG worker thread activity. It reports the overall thread usage statistics that include not just request traffic, but all of the worker threads for the IAG process. The following table describes the statistical information available:
Name | Description | Type |
---|---|---|
iag.threads.active | The total number of active worker threads that are handling requests. | Gauge |
iag.threads.total | The total number of worker threads that are configured. | Gauge |
iag.websocket
The iag.websocket statistics component gathers information related to IAG WebSocket communication. The following table describes the statistical information available:
Name | Description | Type |
---|---|---|
iag.websocket.requests | Total WebSocket proxy requests received. | Counter |
iag.websocket.rejected | Total WebSocket proxy requests rejected. | Counter |
iag.websocket.timeouts | The number of timeouts that have occurred when reading or writing through a proxied WebSocket connection. | Counter |
iag.websocket.active | The current number of WebSocket connections that are proxied. | Gauge |
iag.websocket.client_bytes | The number of bytes read from the client side. | Counter |
iag.websocket.application_bytes | The number of bytes read from the resource server. | Counter |
Example Output
Example 'statsd' output is shown below:
iag.authn.pass:2|c
iag.authn.time:392.5|ms|@0.5
iag.https.reqs:8|c
iag.https.worker.time:587.625|ms|@0.125
iag.https.process.time:99|ms|@0.125
iag.rs./.reqs:5|c
iag.rs./.time:0.4|ms|@0.2
iag.https.reqs:8|c
iag.https.worker.time:492|ms|@0.125
iag.https.process.time:1.5|ms|@0.125
iag.rs./.reqs:2|c
iag.rs./.time:1.5|ms|@0.5
Please note that the protocol supports sending multiple metrics in a single packet by separating the metrics with a newline (\n) character. When 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.
Updated over 2 years ago