Here is an simple example of a plugin with auto discovery:
(need to post these separately because it looks like the posts are being truncated when they are too long)
${HQ_HOME}/plugins/generic/etc/hq-plugin.xml:
<plugin package="org.hyperic.hq.plugin.generic">
<server name="Generic Server"
version="1.x">
<filter name="domain"
value="generic"/>
<plugin type="measurement"
class="GenericMeasurementPlugin"/>
<plugin type="autoinventory"
class="GenericServerDetector"/>
<config>
<option name="username"
description="Generic username For Example"/>
<option name="password"
type="secret"
description="Generic password For Example"/>
</config>
<service name="Generic Service">
<config>
<option name="option1"
description="Generic Option1 For Example"/>
<option name="option2"
description="Generic Option2 For Example"/>
</config>
<filter name="template"
value="${domain}:Type=GenericService,option1=%option1%,option2=%option2%:${alias}"/>
<metrics>
<metric name="Availability"
category="AVAILABILITY"
units="percentage"
collectionType="dynamic"/>
<metric name="Space Utilization"
category="UTILIZATION"
indicator="true"
units="B"
collectionType="dynamic"/>
</metrics>
</service>
</server>
<server name="Generic Server"
version="2.x"
include="1.x">
</server>
</plugin>