I need to get some metrics from Wildfly/Undertow, specifically open/max HTTP connections and used threads and correlate it with open database connection count, which I am able to read using jboss-cli:
/subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(recursive=true,include-runtime=true)
Is there a way to obtain the HTTP connection statistics in Wildfly 8.2?
In Wildlfy you configure the http connector thread pool specifying a worker configured via the IO subsystem:
IO Subsystem config example:
<subsystem xmlns="urn:jboss:domain:io:1.1">
<worker name="my-worker" io-threads="24" task-max-threads="30" stack-size="20"/>
<worker name="default" />
<buffer-pool name="default"/>
</subsystem>
The worker then gets added to the http-listener (or ajp-listener) using the worker attribtue:
<http-listener name="default" worker="my-worker" socket-binding="http"/>
The IO Subsystem uses the XNIO API, that exposes the statistics in the Mbean org.xnio/Xnio/nio/my-worker. You can have a look at them with a jmx-client or jvisualvm:

But I have no idea how you can read them via jboss-cli.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With