Thanks for the help Mirko.
I added the code you suggested.
After adding the code you suggested, I saw the following lines in the agent log.
2009-01-12 09:12:47,906 DEBUG [AutoScan] Running AutoServerDetector for: A2iA_Service
2009-01-12 09:12:47,906 DEBUG [DaemonDetector] No PROC_QUERY defined for: A2iA_Service
So, I added the following line to the plugin
<property name="PROC_QUERY" value="State.Name.eq=A2iA_Service"/>
Now when I browse resources, I see A2iA_Service listed in the drop down list. When I select A2iA_Service I see one item. The availability is gray. When I click on the A2iA server I do NOT see any services listed..
If I go to browse resources, services, I do NOT see “A2iA dongle” service.
The A2iA_Service program is running.
I have stopped and started both the HQ server and agent. I have waited more than 15 minutes for HQ to discover the server.
I can manually add the dongle service to A2iA. The metrics look good. I was hoping the dongle metrics would be auto discovered.
The plugin now looks like
<?xml version="1.0"?>
<!--
A2iA dongle metrics
-->
<plugin>
<server name="A2iA_Service">
<config>
<option name="process.query"
description="Process Query"
default="State.Name.ct=A2iA_Service"/>
</config>
<plugin type="autoinventory"
class="org.hyperic.hq.product.DaemonDetector"/>
<property name="PROC_QUERY" value="State.Name.eq=A2iA_Service"/>
<metric name="Availability"
alias="Availability"
template="sigar:Type=ProcState,Arg=%process.query%:State"
category="AVAILABILITY"
indicator="true"
units="percentage"
collectionType="dynamic"/>
<service name="A2iA dongle">
<config>
<option name="script"
description="Query A2iA dongle for current stats"
default="C:\Program Files\agent-3.1.0\pdk\scripts\DongleMetrics.bat"/>
</config>
<property name="HAS_BUILTIN_SERVICES" value="true"/>
<plugin type="autoinventory"/>
<filter name="template"
value="exec:file=%script%,args="/>
<metric name="Availability"
template="${template}:Availability"
indicator="true"/>
<metric name="Status"
template="${template}:Status"
indicator="true"/>
<metric name="Clicks Used"
category="PERFORMANCE"
template="${template}:ClicksUsed"
indicator="true"/>
<metric name="Clicks Left"
category="PERFORMANCE"
template="${template}:ClicksLeft"
indicator="true"/>
<metric name="Days Used"
category="PERFORMANCE"
template="${template}:DaysUsed"
indicator="true"/>
<metric name="Days Left"
category="PERFORMANCE"
template="${template}:DaysLeft"
indicator="true"/>
</service>
</server>
</plugin>