VMware Cloud Community
critch_hyperic
Contributor
Contributor

Metric Manipulation, additional metric types, SNMP question.

I suspect most people wouldn't like to have all 3 questions in one posting, but here goes.

I am working on a new plugin for monitoring APC power equipment. Problem is there is no current metric for power such as amps. Is there an easy way to add more metrics to hyperic?

Also, the values returned by the SNMP queries are off by a decimal point. Example, the APC web interface reports usage as 2.7 amps, but all SNMP values come back as 27. This is the same values that snmpwalk report, so this isn't a hyperic problem. But I would like to see if there is a way to manipulate the value to something other than the returned value without resorting to some java programming.

Also, how can one decode a string result from SNMP. When I use snmpwalk to check a value, it comes back as a STRING: "VALUE", but when I set units to none in the plugin, I get back an array of 3 digit numbers. I would like to collect these values for properties, not really for a metric.
0 Kudos
3 Replies
excowboy
Virtuoso
Virtuoso

Hi Steven,

> I suspect most people wouldn't like to have all 3
> questions in one posting, but here goes.
>
> I am working on a new plugin for monitoring APC power
> equipment. Problem is there is no current metric for
> power such as amps. Is there an easy way to add more
> metrics to hyperic?

Predefined metrics for Hyperic are listed here:
http://support.hyperic.com/confluence/display/DOC/Measurement+Plugin#MeasurementPlugin-metrictag
I didn't read anything about adding metrics yet. It's not necessary do define a Unit to make the plugin work.

>
> Also, the values returned by the SNMP queries are off
> by a decimal point. Example, the APC web interface
> reports usage as 2.7 amps, but all SNMP values come
> back as 27. This is the same values that snmpwalk
> report, so this isn't a hyperic problem. But I would
> like to see if there is a way to manipulate the value
> to something other than the returned value without
> resorting to some java programming.

Sorry, but you cannot calculate in SNMP plugins.

>
> Also, how can one decode a string result from SNMP.
> When I use snmpwalk to check a value, it comes back
> as a STRING: "VALUE", but when I set units to none
> in the plugin, I get back an array of 3 digit
> numbers. I would like to collect these values for
> properties, not really for a metric.

It's definetly possible to define more cutomized properties, for example:

<properties>
<property name="unitName" description="Host Name" />
<property name="unitModel" description="Device Name"/>
<property name="unitManufacturer" description="Manufactor"/>
<property name="configData" description="Manufactor"/>
</properties>

Values can be String formated. They appear on top of the page.

Hope this helps
Mirko
0 Kudos
critch_hyperic
Contributor
Contributor

> Predefined metrics for Hyperic are listed here:
> http://support.hyperic.com/confluence/display/DOC/Meas
> urement+Plugin#MeasurementPlugin-metrictag
> I didn't read anything about adding metrics yet. It's
> not necessary do define a Unit to make the plugin
> work.

I was aware of the current metrics. I was I guess more hopefull to a simple way of adding metric names if not more to Hyperic without editing code. And barring that, hoping someone with dev access would consider adding more metrics so that as others look into more and more monitoring, the metrics would already be available.

Some metric types that should be added would be for temperature, power, pressure(?)... Hmmm, some of these only seem really only useful if we could also provide some functionality to convert to other units. Outside of conversion, just being able to tag the value would be nice.

> > Also, the values returned by the SNMP queries are
> off
> > by a decimal point. Example, the APC web interface
> > reports usage as 2.7 amps, but all SNMP values
> come
> > back as 27. This is the same values that snmpwalk
> > report, so this isn't a hyperic problem. But I
> would
> > like to see if there is a way to manipulate the
> value
> > to something other than the returned value without
> > resorting to some java programming.
>
> Sorry, but you cannot calculate in SNMP plugins.

Is that true for all plugins outside of scripted ones, or just SNMP? Do you have a suggestion as to how to deal with the decimal error besides doing a in my head conversion for all dealings with the value?

> > Also, how can one decode a string result from
> SNMP.
> > When I use snmpwalk to check a value, it comes
> back
> > as a STRING: "VALUE", but when I set units to none
> > in the plugin, I get back an array of 3 digit
> > numbers. I would like to collect these values for
> > properties, not really for a metric.
>
> It's definetly possible to define more cutomized
> properties, for example:
>
> <properties>
> <property name="unitName" description="Host
> Name" />
> <property name="unitModel" description="Device
> Name"/>
> <property name="unitManufacturer"
> description="Manufactor"/>
> <property name="configData"
> description="Manufactor"/>
> /properties>
>
> Values can be String formated. They appear on top of
> the page.
>
> Hope this helps

Will see if they show up right under properties, didn't work for metrics.
0 Kudos
bdinnerv_hyperi
Contributor
Contributor

Would it be possible to perform simple math / manipulation of the result returned by SNMP by using a template instead of the alias parameter?
0 Kudos