I am currently running RHQ server v4.13.1. We have installed ZooKeeper v3.4.6 and I am trying to have RHQ monitor my ZK instances with a plugin (trying to develop). Once I build the jar file, I load this into my ‘plugins’ RHQ directory, and perform a
Scan via the RHQ GUI to load in the module. I then bounce my RHQ agent on the ZK server. I can see that the JMX server is being monitored, but when I add traits/metrics to the mix, I do not see these appearing in RHQ. The logs say the traits have been loaded,
but again, I don’t see them in the GUI. Can anyone advise on what I might be doing incorrectly in my Plugin code?
<?xml version="1.0"
encoding="UTF-8" ?>
<plugin name="Apache-Zookeeper-RHQ-Plugin"
displayName="Apache Zookeeper RHQ Plugin"
description="Apache Zookeeper RHQ Plugin"
version="1.0"
xmlns="urn:xmlns:rhq-plugin"
xmlns:c="urn:xmlns:rhq-configuration">
<depends plugin="JMX" useClasses="true"/>
<!-- ZooKeeperService -->
<service name="ZooKeeperService"
description="ZooKeeperService"
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
class="org.rhq.plugins.jmx.MBeanResourceComponent">
<runs-inside>
<parent-resource-type name="JMX Server" plugin="JMX"/>
</runs-inside>
<plugin-configuration>
<!-- properties used by JMXDiscoveryComponent -->
<c:simple-property name="connectorAddress" required="false"
type="string"
default="service:jmx:rmi:///jndi/rmi://localhost:20000/jmxrmi" description="JMX
Service URL"/>
<c:simple-property name="principal" required="false"
type="string"
default="admin" description="JMX login principal/username"/>
<c:simple-property name="credentials" required="false"
type="password"
default="activemq" description="JMX login credentials/password"/>
<c:simple-property name="objectName" default="org.apache.ZooKeeperService:name0=%id%"
readOnly="true"/>
</plugin-configuration>
<metric
description="QuorumSize"
displayName="QuorumSize"
displayType="summary"
dataType="trait"
property="QuorumSize"/>
</service>
</plugin>
Regards,
Barry