Web Application Monitoring in WildFly: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
m (Ovidiu moved page WAR Deployment Monitoring in WildFly to Web Application Monitoring in WildFly without leaving a redirect)
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
* How to monitor HTTP Sessions to count / view the number of active HTTP sessions in JBoss EAP https://access.redhat.com/solutions/22091
=Internal=
=Internal=


* [[WildFly Monitoring#Metrics|WildFly Monitoring]]
* [[WildFly Monitoring#Metrics|WildFly Monitoring]]
* [[JBossWeb WildFly Subsystem Operations|Web Subsystem Operations]]
* [[JBossWeb/Tomcat_HTTP_Session_Implementation_Details#Subjects|JBossWeb/Tomcat HTTP Session Implementation Details]]
* [[JBossWeb_Monitoring#Active_Sessions_and_other_Session_Statistics|JBossWeb Monitoring]]


=Relevance=
=Relevance=
Line 9: Line 16:
=Overview=
=Overview=


Web applications deployed using WAR deployment artifacts in JBoss are automatically instrumented to expose relevant runtime JMX statistics on the JMX bus and in CLI.
Web applications deployed as part of a WAR deployment in JBoss are automatically instrumented to expose relevant runtime [[#JMX|JMX]] statistics on the JMX bus and in  [[#CLI|CLI]]. These statistics refer mostly to HTTP session (<span id="Active_HTTP_Session_Count"></span>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_Monitoring|individual servlet level]].
 
<span id="Clustered_Web_Applications"></span>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:
 
<pre>
jboss.as:deployment=<deployment-name>,subsystem=web
</pre>
 
where <deployment-name> is the name of the deployment artifact (for example: myapp.war).
 
=CLI=
 
<pre>
[standalone@ip-address:9999 /] /deployment=${deployment-name}/subsystem=web:read-attribute(name=active-sessions)
</pre>
 
=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
 
<pre>
jboss.as:deployment=<deployment-name>,subsystem=web,servlet=<servlet-name>
</pre>
 
JMX metrics:
 
====minTime====
 
====maxTime====
 
====requestCount====
 
====loadTime====
 
====processingTime====

Latest revision as of 16:50, 11 May 2017

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