Is there an easy way to get metrics on all processes that start with the letters XYZ? I have about 80 processes that I have to monitor individually that all start with the prefix XYZ.
I have created a query using the sigar shell: ps State.Name.sw=XYZ, which will give me a list of the processes that I want. What I need to do is define this list of processes through said query and collect and track statistics from the Process service: http://support.hyperic.com/display/hypcomm/Process+service
What I need is 3 or 4 key statistics for each of the XYZ processes defined by my query to show up as graphs in the web front end.
Note: Hyperic HQ server is installed on a windows machine and I'm monitoring a Linux box via an agent.
Thanks,
Chris
Edit: Here is my try at a plugin that may give me what I want, but it's not being inventoried/detected by the Hyperic web UI. Simply pointing me to one of Hyperic's tutorials won't do. Thanks.
<!DOCTYPE plugin [
<!ENTITY process-metrics SYSTEM "/pdk/plugins/process-metrics.xml">]>
<plugin>
<server name="ABCStats">
<config>
<option name="process.query"
description="Process Query"
default="State.Name.sw=XYZ"/>
</config>
<metric name="Availability"
alias="Availability"
template="sigar:Type=ProcState,Arg=%process.query%:State"
category="AVAILABILITY"
indicator="true"
units="percentage"
collectionType="dynamic"/>
&process-metrics;
<plugin type="autoinventory"/>
<plugin type="measurement"
class="org.hyperic.hq.product.MeasurementPlugin"/>
</server>
</plugin>
When it comes to any kinda of trending data my current favorite approach is to use munin and it's plugin architecture. Munin plugins are extremely simple to write so it's really easy to trend all sorts of data. If you already have a script that grabs each process you should be able to generate data for each process and have munin stick it in an rrd db to generate graphs on.
It's interesting to see all the custom agents/protocols out there for process monitoring. Part of this is because of net-snmp's utter failure to be useful in monitoring data per-process, and common clients wanting to rely on SNMP.
I've usually seen this solved with custom scripts that run ps using a custom set of options, parse the resulting output, and handle it as needed. This leads to scalability problems in managing many variations on this solution across a large enterprise.
You may want to give the script plugin a try: Hyperic HQ Script Plugin, and its tutorial.