How to wire a custom metric into WildFly is described in the "add-custom-metric / remove-custom-metric" section in mod_cluster Subsystem - WildFly 10 - Project Documentation Editor
The custom metric must implement the org.jboss.modcluster.load.metric.LoadMetric interface in a public class with a public no-arg constructor. It can expose configuration properties, a la what's shown in the doc I linked above. Your LoadMetric impl must expose a public setter for each property. Each configured property, along with the setWeight and setCapacity methods will be invoked before the system makes the first call to getLoad. The org.jboss.modcluster.container.Engine that gets passed to your getLoad(Engine) implementation gives you access to environmental information you may want to use in your calculation. You can also use standard JVM stuff like platform mbeans.
Thanks for your response Brian, its really helpful. One more query-
You mentioned about configuration properties in your response. I see below sample in the link you provided, what could be these property names and values?
I apologies if its too basic, i am new to this custom metric pluggin creation, so trying to understand.