Data shipper for JBoss application server

Hello,
I would like to create a data shipper for metrics/logs from Jboss application servers and was wondering if there is already an example I can follow.

I would like to embed this in the app server as a module so that it can ship metrics about the datasource, etc. Is there a java-only version of beats that I can extend/use and embed as a jar(s) into a module?

Perhaps in a future iteration apps deployed into the server can also publish their metrics using the JBoss subsystem mechanism to expose it to apps.