vCenter

 View Only
  • 1.  multiple metric values in one call

    Posted Jan 14, 2013 01:45 PM

    If I define 3 metrics in hq-plugin.xml , the measurement class is called/invoked 3 seperate times.

    Example - I have defined 3 metrics - X1 , X2 , X3 in the plugin xml file. Collection frequency is set at 5 mins.

    Every 5 minutes, the measurement class is invoked by agent. this invokation happens 3 times. Each time, the measurement class has to return a value corresponding to the metric for which the invocation was made.

    Is it possible to return multiple metric values within one invocation?

    That is, the measurement class is invoked once, and it returns values for X1 , X2 and X3.

    And are there any plugins in the HQ codebase that do this already ?

    Danke.



  • 2.  RE: multiple metric values in one call

    Posted Jan 22, 2013 05:52 PM

    anyone ?



  • 3.  RE: multiple metric values in one call

    Posted Jan 22, 2013 07:15 PM

    From Scott F:

    there is another type of measurement plugin called a collector. 

    An example of this is in the sybase plugin and here is a code example of the declaration in the plugin:

       <plugin type="collector"
                class="SybaseSysmonCollector"/>
    instead of:
        <plugin type="measurement"
                class="org.hyperic.hq.product.MeasurementPlugin"/>
    check the SybaseSysmonCollector class to see how it is used.


  • 4.  RE: multiple metric values in one call

    Posted Jan 24, 2013 11:27 PM

    awesome, thanks!



  • 5.  RE: multiple metric values in one call

    Posted Jan 25, 2013 06:08 PM

    Also found a simpler/less complex example of a collector implementation  - The NTP plugin.

    Java class is here - /src/org/hyperic/hq/plugin/ntp/NTPDCollector.java

    You can also find it here - http://git.springsource.org/hq/hq/blobs/master/hq-plugin/ntp-plugin/src/main/java/org/hyperic/hq/plugin/ntp/NTPDCollector.java