Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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>
share|improve this question

3 Answers 3

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.

share|improve this answer

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.

share|improve this answer

You may want to give the script plugin a try: Hyperic HQ Script Plugin, and its tutorial.

share|improve this answer
    
Vincent, I've been there and already taken a look at it. See my new edit in the question. Thanks- –  Chris Jun 8 '09 at 14:05
    
Yes, I've read the edit. Since I haven't got an HQ running here to test it on, I can only point you to advice I followed to make such a thing work. Besides: I don't want to spoil the fun for you :) Relating to your actual technical problem: you may want to try: <plugin type="autoinventory" class="org.hyperic.hq.product.DaemonDetector"/> –  Vincent De Baere Jun 8 '09 at 14:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.