AntonO
Contributor
Contributor

Hyperic 5.0 exporting custom MBeans in JBoss

1. We have a JBoss as application server, and Spring Integration as EIP implementaion.
2. We want to export Spring Integration MBeans statistics to monitoring in Hyperic 5.0 Enterprise, which is used by our company.

While trying to do it with following JMX configuration
<config>
   <option name="jmx.url" description="JMX URL to MBeanServer" default="service:jmx:remoting-jmx://localhost:9999" />
   <option name="jmx.username" description="JMX username" optional="true" />
   <option name="jmx.password" description="JMX password" optional="true" type="secret" />
</config>

I receive NPE in Hyperic agent

java.lang.NullPointerException

     at org.hyperic.hq.product.jmx.MxUtil$JMXConnectorKey.hashCode(MxUtil.java:495)

     at java.util.HashMap.get(Unknown Source)

     at org.hyperic.hq.product.jmx.MxUtil.getCachedMBeanConnector(MxUtil.java:435)

     at org.hyperic.hq.product.jmx.MxUtil.getValue(MxUtil.java:654)

     at org.hyperic.hq.product.jmx.MxUtil.getValue(MxUtil.java:313)

     at org.hyperic.hq.product.jmx.MxMeasurementPlugin.getValue(MxMeasurementPlugin.java:58)

     at org.hyperic.hq.product.MeasurementPluginManager.getPluginValue(MeasurementPluginManager.java:171)

     at org.hyperic.hq.product.MeasurementPluginManager.getValue(MeasurementPluginManager.java:269)

     at org.hyperic.hq.product.MeasurementPluginManager.getValue(MeasurementPluginManager.java:130)

     at org.hyperic.hq.product.MeasurementPluginManager.getValue(MeasurementPluginManager.java:122)

     at org.hyperic.hq.measurement.agent.server.MeasurementCommandsService.getMeasurements(MeasurementCommandsService.java:212)

     at org.hyperic.hq.measurement.agent.server.MeasurementCommandsServer.dispatchCommand(MeasurementCommandsServer.java:174)

     at org.hyperic.hq.agent.server.CommandDispatcher.processRequest(CommandDispatcher.java:113)

     at org.hyperic.hq.agent.server.CommandListener.handleConn(CommandListener.java:216)

     at org.hyperic.hq.agent.server.CommandListener.access$100(CommandListener.java:57)

     at org.hyperic.hq.agent.server.CommandListener$AgentDispatchTask.run(CommandListener.java:200)

     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

     at java.lang.Thread.run(Unknown Source)

1. Where can I find source code for this?
2. How to do it right?

I saw some old references, but they seems to be invalid by now, is there a comprehensive description for this.

Tags (4)
0 Kudos
6 Replies
BharaniRaviKant
Contributor
Contributor

Which version of JBOSS AS you are using?

0 Kudos
AntonO
Contributor
Contributor

JBoss 7.1.1

0 Kudos
admin
Immortal
Immortal

Hi,

Are you trying to monitor the JBoss server? becasue Currently now Hyperic 5 doesn't support JBoss 7.1.1,

Hyperic team is working on it.

Yaron

0 Kudos
AntonO
Contributor
Contributor

Yes we are trying to export custom MBeans from JBoss 7.1.1 JMX component.


Can you send me a reference to the bug, so I could track it?

We are able to monitor JBoss 7.1.1 metrics, using Hyperic agent, the problem is MBeans that we export as part of our application, that we want to track

0 Kudos
laullon
VMware Employee
VMware Employee

Can you attach your XML file?

0 Kudos
AntonO
Contributor
Contributor

<plugin>
    <service name="Spring Integration" server="JBoss" version="7.1">
        <config>
            <option name="jmx.url" description="JMX URL to MBeanServer" default="service:jmx:remoting-jmx://localhost:9999" />
            <option name="jmx.username" description="JMX username" optional="true">admin</option>
            <option name="jmx.password" description="JMX password" optional="true" type="secret" >1234</option>
        </config>
        <plugin type="control" class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
        <plugin type="measurement" class="org.hyperic.hq.product.jmx.MxMeasurementPlugin"/>
       
        <property name="AUTOINVENTORY_NAME" value="%platform.name% Spring Integration"/>
        <plugin type="autoinventory"/>
   
        <filter name="template" value="${OBJECT_NAME}:${alias}" />

        <property name="OBJECT_NAME" value="org.springframework.integration:type=MessageChannel,name=brChannel,bean=anonymous" />
       
        <metric name="Availability" template="${OBJECT_NAME}:Availability" indicator="true"/>
       
        <metric name="Blocking Queue Recived Messages" alias="ReceiveCount" category="UTILIZATION" indicator="true"/>
        <metric name="Blocking Queue Sent Messages" alias="SendCount" category="UTILIZATION" indicator="true"/>

    </service>
</plugin>

This is the last configuration, that I tried, there were many others, that did not work, prior to that one.

0 Kudos