How to monitor a MBean on WebSphere
rafaelri Dec 4, 2008 8:48 AMHi all,
 I am trying to monitor a custom MBean on WebSphere. I've followed the steps described at http://management-platform.blogspot.com/2008/11/monitoring-custom-jmx-mbeans-with-jopr.html but it seems like discovery is not working neither the manual addition of the service.
 I've packaged the rhq-plugin.xml file inside a jar (named: rhq-gife-jmx-1.0.jar) and deployed it inside rhq-plugins folder. As I mentioned, it is loaded fine but does not show on resources tab.
 I even tried to run a manual update and discovery on agent console but with no success.
 I am pasting here the contents of my rhq-plugin.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<plugin name="GifeJmx"
 displayName="Gife JMX Plugin"
 version="1.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns="urn:xmlns:rhq-plugin"
 xmlns:c="urn:xmlns:rhq-configuration">
 <depends plugin="JMX"/>
 <service name="GifeManagement"
 description="GifeManagement"
 discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
 class="org.rhq.plugins.jmx.MBeanResourceComponent"
 supportsManualAdd="true">
 <runs-inside>
 <parent-resource-type name="JMX Server" plugin="JMX"/>
 </runs-inside>
 <plugin-configuration>
 <c:simple-property name="objectName" readOnly="true" default="gife:cell=%cell%,name=PontuacaoManagement,type=PontuacaoManagement,node=%node%,process=%process%"/>
 <c:simple-property name="nameTemplate" default="PontuacaoManagement on #{server}"/>
 <c:simple-property name="descriptionTemplate" default="PontuacaoManagement on #{server}"/>
 <c:simple-property name="cell" type="string" description="Cell of the PontuacaoManagement"/>
 <c:simple-property name="server" type="string" description="Server of the PontuacaoManagement"/>
 <c:simple-property name="node" type="string" description="Server of the PontuacaoManagement"/>
 </plugin-configuration>
 <operation name="atualizarUltimaPontuacao"
 displayName="atualizarUltimaPontuacao"
 description="atualizarUltimaPontuacao">
 <parameters>
 <c:simple-property name="chave" type="string" required="true"/>
 <c:simple-property name="fila" type="long" required="true"/>
 <c:simple-property name="pontuacao" type="integer" required="true"/>
 </parameters>
 </operation>
 <operation name="obterUltimaPontuacao"
 displayName="obterUltimaPontuacao"
 description="obterUltimaPontuacao">
 <parameters>
 <c:simple-property name="chave" type="string" required="true"/>
 <c:simple-property name="fila" type="long" required="true"/>
 </parameters>
 <results>
 <c:simple-property name="operationResult" type="integer"/>
 </results>
 </operation>
 <metric property="NumeroPontuacoes"
 displayName="NumeroPontuacoes"
 defaultOn="true"
 displayType="summary"
 defaultInterval="30000"
 description="Numero Aleatorio"/>
 </service>
</plugin>
Am I missing some configuration or some entry on the xml file for the plugin? I've opened the JMX plugin file and saw an entry related to the WebSphere template but I couldn't figure out what I am missing, but I really feel like I am missing something since I've not specified the JMX url.
best regards,
Rafael Ribeiro
 
    