Web Application Monitoring in WildFly

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Relevance

  • EAP 6.4.10

Overview

Web applications deployed as part of a WAR deployment in JBoss are automatically instrumented to expose relevant runtime JMX statistics on the JMX bus and in CLI. These statistics refer mostly to HTTP session (active sessions, created sessions, max active sessions, expired sessions, session maximum and average alive time), but other information such as the virtual host or the context root is exposed. Statistics are also generated at individual servlet level.

If the web application is clustered (declared <distributable>), the CLI/JMX session metrics are cluster-wide metrics. For example, active session refers to the number of active sessions across the entire cluster.

JMX

The web application metrics are available under the following ObjectName:

jboss.as:deployment=<deployment-name>,subsystem=web

where <deployment-name> is the name of the deployment artifact (for example: myapp.war).

CLI

[standalone@ip-address:9999 /] /deployment=${deployment-name}/subsystem=web:read-attribute(name=active-sessions)

Metrics

These metrics are accessible both via JMX and CLI.

Active Sessions

Exposed as "activeSessions" in JMX, "active-sessions" in CLI.

"active session" metric is managed by the web subsystem, which does not know what the underlying store is. The metric will reflect the Infinispan cache's numberOfEntries without backups, for the node in question and not cluster-wide. Essentially, it tells how many active sessions are managed by the node being read.

Created Sessions

JMX "sessionsCreated"

Max Active Sessions

JMX "maxActiveSessions"

Expired Sessions

JMX "expiredSessions"

Rejected Sessions

JMX "rejectedSessions"

Session Maximum Alive Time

JMX "sessionMaxAliveTime"

Session Average Alive Time

JMX "sessionAvgAliveTime"

Duplicate Session IDs

JMX "duplicatedSessionIds"

Context Root

JMX "contextRoot"

Virtual Host

JMX "virtualHost"

Individual Servlet Monitoring

Statistics for individual servlets are also exposed as

jboss.as:deployment=<deployment-name>,subsystem=web,servlet=<servlet-name>

JMX metrics:

minTime

maxTime

requestCount

loadTime

processingTime