exometer icon indicating copy to clipboard operation
exometer copied to clipboard

Representing State in Values

Open hwinkel opened this issue 9 years ago • 1 comments

Whats the best way to representing a given state of a managed object? In example in SNMP you have Integers representing a given state on an interface:

ifOperStatus
INTEGER
Value   Label/Meaning
1   up
2   down
3   testing
4   unknown
5   dormant
6   notPresent
7   lowerLayerDown

http://www.net-snmp.org/docs/mibs/interfaces.html

should we use an exometer_function or (ab)use a gauge for that?

further, can a exometer_function represent any datatype or only numerical values?

hwinkel avatar Feb 22 '16 04:02 hwinkel

Have you looked at exometer_report_snmp?

Regarding metric values, exometer is a bit ambivalent. Basically, metric values can be of any type, but some metric types, e.g. histograms, require inputs to be numeric, but will simply discard update values that are non-numeric. The thinking behind that is that metric update operations should never crash the caller, but also, a single 'bad' update should not be allowed to crash the histogram.

The exometer_function module makes no assumptions about the return value, but function metrics can be very useful for transforming the values of other metrics ...

... or at least it could be. I tried to make a simple example, but found a number of things I'd like to fix. Thus the delay in responding. :)

uwiger avatar Feb 24 '16 17:02 uwiger