11.2. Web Container metrics

  1. ActiveSessionsLoadMetric
    • Requires an explicit capacity.
    • Uses SessionLoadMetricSource to query session managers
    • Analogous to method=S in mod_jk
    For example:
    <bean name="ActiveSessionsLoadMetric" class="org.jboss.modcluster.load.metric.impl.ActiveSessionsLoadMetric" mode="On Demand">
      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ActiveSessionsLoadMetric",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
      <constructor>
        <parameter><inject bean="SessionLoadMetricSource"/></parameter>
      </constructor>
      <property name="capacity">1000</property>
    </bean>
    <bean name="SessionLoadMetricSource" class="org.jboss.modcluster.load.metric.impl.SessionLoadMetricSource" mode="On Demand">
      <constructor>
        <parameter class="javax.management.MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></parameter>
      </constructor>
    </bean>
  2. BusyConnectorsLoadMetric
    • Returns the percentage of connector threads from the thread pool that are busy servicing requests
    • Uses ThreadPoolLoadMetricSource to query connector thread pools
    • Analogous to method=B in mod_jk
    For example:
    <bean name="BusyConnectorsLoadMetric" class="org.jboss.modcluster.load.metric.impl.BusyConnectorsLoadMetric" mode="On Demand">
      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=BusyConnectorsLoadMetric",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
      <constructor>
        <parameter><inject bean="ThreadPoolLoadMetricSource"/></parameter>
      </constructor>
    </bean>
    <bean name="ThreadPoolLoadMetricSource" class="org.jboss.modcluster.load.metric.impl.ThreadPoolLoadMetricSource" mode="On Demand">
      <constructor>
        <parameter class="javax.management.MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></parameter>
      </constructor>
    </bean>
  3. ReceiveTrafficLoadMetric
    • Returns the incoming request traffic in KB/sec
    • Requires an explicit capacity
    • Uses RequestProcessorLoadMetricSource to query request processors
    • Analogous to method=T in mod_jk
    For example:
    <bean name="ReceiveTrafficLoadMetric" class="org.jboss.modcluster.load.metric.impl.ReceiveTrafficLoadMetric" mode="On Demand">
      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ReceiveTrafficLoadMetric",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
      <constructor>
        <parameter class="org.jboss.modcluster.load.metric.impl.RequestProcessorLoadMetricSource"><inject bean="RequestProcessorLoadMetricSource"/></parameter>
      </constructor>
      <property name="capacity">1024</property>
    </bean>
    <bean name="RequestProcessorLoadMetricSource" class="org.jboss.modcluster.load.metric.impl.RequestProcessorLoadMetricSource" mode="On Demand">
      <constructor>
        <parameter class="javax.management.MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></parameter>
      </constructor>
    </bean>
  4. SendTrafficLoadMetric
    • Returns the outgoing request traffic in KB/sec
    • Requires an explicit capacity
    • Uses RequestProcessorLoadMetricSource to query request processors
    • Analogous to method=T in mod_jk
    For example:
    <bean name="SendTrafficLoadMetric" class="org.jboss.modcluster.load.metric.impl.SendTrafficLoadMetric" mode="On Demand">
      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=SendTrafficLoadMetric",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
      <constructor>
        <parameter class="org.jboss.modcluster.load.metric.impl.RequestProcessorLoadMetricSource"><inject bean="RequestProcessorLoadMetricSource"/></parameter>
      </constructor>
      <property name="capacity">512</property>
    </bean>
  5. RequestCountLoadMetric
    • Returns the number of requests/sec
    • Requires an explicit capacity
    • Uses RequestProcessorLoadMetricSource to query request processors
    • Analogous to method=R in mod_jk
    For example:
    <bean name="RequestCountLoadMetric" class="org.jboss.modcluster.load.metric.impl.RequestCountLoadMetric" mode="On Demand">
      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=RequestCountLoadMetric",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
      <constructor>
        <parameter class="org.jboss.modcluster.load.metric.impl.RequestProcessorLoadMetricSource"><inject bean="RequestProcessorLoadMetricSource"/></parameter>
      </constructor>
      <property name="capacity">1000</property>
    </bean>