Hi,
I''ve been trying to create a custom plugin for my MBean and see it through the HQ UI but i cannot.
i can connect to my MBean through jconsole and see the attributes and run the operations but no luck with HQ
Here is my plugin content(Stat1, Stat1 are the attributes from my MBean)
<?xml version="1.0"?>
<plugin name="testBean" package="org.hyperic.hq.product.jmx">
<service name="HelloThere Plugin" server="Sun JVM" version="1.5">
<config>
<option name="jmx.url" description="JMX URL to MBeanServer" default="service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi"/>
<option name="jmx.username" description="JMX username" optional="true" default=""/>
<option name="jmx.password" description="JMX password" optional="true" default="" type="secret"/>
</config>
<property name="OBJECT_NAME" value="SimpleAgent:name=hellothere"/>
<plugin type="autoinventory"/>
<plugin type="measurement" class="org.hyperic.hq.product.jmx.MxMeasurementPlugin"/>
<plugin type="control" class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
<metric name="Availability"
template="${OBJECT_NAME}:Availability"
indicator="true"/>
<metric name="Used Memory"
template="${OBJECT_NAME}:Composite.Usage.used"
indicator="true"
units="B"/>
<metric name="Commited Memory"
template="${OBJECT_NAME}:Composite.Usage.committed"
indicator="true"
units="B"/>
<metric name="Status"
category="PERFORMANCE"
template="${OBJECT_NAME}:Status"
indicator="true"/>
<metric name="Status1"
template="${OBJECT_NAME}:Stat1"
indicator="true"/>
<metric name="Status2"
template="${OBJECT_NAME}:Stat2"
indicator="true"/>
<actions include="updateStats"/>
</service>
</plugin>
and when i try to run it from my agent directory with this command
java -jar pdk/lib/hq-product.jar -Dplugins.include=jmx,testBean -m discover -a metric -Dlog=debug
I get the following output
[DEBUG] ProductPluginManager - Initializing in client mode (pdk=C:\Program Files
\Hyperic HQ 3.2.3\agent-3.2.3\pdk)
[DEBUG] MIBTree - No MIBs in directory: C:\Program Files\Hyperic HQ 3.2.3\agent-
3.2.3\pdk\mibs
[INFO] ProductPluginManager - Loading plugin: system-plugin.jar
[DEBUG] SystemPlugin - sigar.mirror.procnet=null
[INFO] ProductPluginManager - Loading plugin: netservices-plugin.jar
[INFO] MeasurementPlugin - Register TCP Socket proxy for domain: socket
[INFO] MeasurementPlugin - Register HTTP proxy for domain: http
[INFO] MeasurementPlugin - Register HTTP proxy for domain: url.availability
[INFO] MeasurementPlugin - Register FTP proxy for domain: ftp
[INFO] ProductPluginManager - Loading plugin: sqlquery-plugin.jar
[DEBUG] ProductPluginManager - adding to sqlquery classpath:
[DEBUG] ProductPluginManager - d C:\Program Files\Hyperic HQ 3.2.3\agent-3.2.
3\pdk\lib\jdbc
[INFO] SQLQueryMeasurementPlugin - Registered proxy for domain: sql
[INFO] ProductPluginManager - Loading plugin: jmx-plugin.xml
[DEBUG] ProductPluginManager - adding to jmx classpath:
[DEBUG] ProductPluginManager - d C:\Program Files\Hyperic HQ 3.2.3\agent-3.2.
3\pdk\lib\mx4j
[INFO] ProductPluginManager - Loading plugin: testBean-plugin.xml
[DEBUG] ProductPluginXML - Trying data ClassLoader to load: org.hyperic.hq.produ
ct.jmx.MxControlPlugin for plugin Sun JVM 1.5 HelloThere Plugin
[DEBUG] ProductPluginXML - Unable to load org.hyperic.hq.product.jmx.MxControlPl
ugin for plugin Sun JVM 1.5 HelloThere Plugin: java.lang.ClassNotFoundException:
org.hyperic.hq.product.jmx.MxControlPlugin
[DEBUG] ProductPluginXML - Trying data ClassLoader to load: org.hyperic.hq.produ
ct.jmx.MxMeasurementPlugin for plugin Sun JVM 1.5 HelloThere Plugin
[DEBUG] ProductPluginXML - Unable to load org.hyperic.hq.product.jmx.MxMeasureme
ntPlugin for plugin Sun JVM 1.5 HelloThere Plugin: java.lang.ClassNotFoundExcept
ion: org.hyperic.hq.product.jmx.MxMeasurementPlugin
[DEBUG] PluginDiscoverer - Adding Auto Scanners=[ServerSignature {stName=Sun JVM
1.5, match=[null], exclude=[null], regMatch=[null]}]
[DEBUG] PluginDiscoverer - Adding Registry Scanners=[]
[DEBUG] AutoScan - Running AutoServerDetector for: Sun JVM 1.5
[DEBUG] WindowsRegistryScan - Windows Registry Scan starting...
[DEBUG] WindowsRegistryScan - Windows Registry Scan completed, took: 0
0 servers detected
I dunno why i get the class not found exception but even if i remove the two lines from the plugin so as to not get any exceptions i do not see the plugin in the Auto-Discovery panel in the HQ dashboard nor anywhere is. could it be working and i just dunno where to look?
Any help would be much appreciated, Thanx