Monitoring
Version 8.1 by Vincent Massol on 2011/05/19
There are 2 solutions you can use to monitor a running XWiki instance:
- Use a Profiler. This has the advantage of providing advanced information, but has the drawback of being resource intensive and thus slowing the XWiki instance. It also requires a special startupscript.
- Starting with XWiki Enterprise 2.4M2 we're now using the JMX Technology to provide runtime monitoring of XWiki instances. The following features are currently available:
- Monitor the Velocity macro caches
- Monitor the JBossCache caches XWiki is using to cache Document data, Users & Groups data and more
- (starting with XE 3.1) Monitor the JGroups channel and protocols (when the XWiki Cluster feature is turned on)
- (starting with XE 3.1) Monitor the Logback Logging configuration and change it
JMX Console
Since JMX is a standard you can use any JMX-compatible monitoring console (most application servers provide a web-based JMX console). There's also such a console called JConsole and which is bundled by default in the Java Runtime you're using. To start it, simply execute the jconsole executable.
Velocity Cache Monitoring
JConsole examples showing the Velocity Cache monitoring:
JGroups Monitoring
JConsole example showing the JGroups monitoring:
Interesting things to do on JGroups in the JMX console:
- Change the log level on the protocols to enable logging
- Disconnect a node from the cluster and reconnect it
Tomcat JMX Proxy Servlet
Tomcat has a JMX Proxy Servlet bundled in their manager webapp (see here and here for more details on Tomcat and JMX]].
Here's some useful URLs to use the JMX Servlet Proxy to list and set JGroups Protocol Levels:
- To display the current log level for the TCPPING protocol: http://localhost:8080/manager/jmxproxy?qry=jgroups:type=protocol,cluster=event,protocol=TCPPING
- To set the log level to info for the TCPPING protocol: http://localhost:8080/manager/jmxproxy?set=jgroups:type=protocol,cluster=event,protocol=TCPPING&att=Level&val=info