Add the ability to define an enumeration to convert collected strings into numeric values

Description

When collecting some values, especially from REST APIs via an XML Collector, the provided data comes back as a string value.  Sometimes this string value represents a state that we can't currently persist over time.  If we were able to send the value through an enumeration, the value could be persisted as an integer to track over time.

such as:

If there was an enumeration such as:

these numbers could easily be persisted with our current JRB/RRD models.

 My initial though would be for this to be an extension of resource types, where enumerations could be defined like:

and then collected as following, assuming the "status" xpath refers to a field that is a string in the source:

 Or I guess as a "ReverseEnumLookupPropertyExtender"

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Christian Pape May 24, 2022 at 7:45 AM

Merged.

Christian Pape May 19, 2022 at 2:52 PM

fooker April 26, 2022 at 2:05 PM

Another approach is to add a option for a mangle script to the resource type. This script could manipulate the collected data at will.

Mark Mahacek April 25, 2022 at 4:40 PM

I had kinda forgotten about the property extender when I submitted this.  Being able to use it in reverse would achieve a similar result.  Though, my proposal above creates the enum definition as a reusable object that could be used in places where different metrics use the same enum values.  Having a property on the metric object to indicate direction could allow it to be used either way.  

 

 

Justin Wood April 14, 2022 at 8:30 PM

We also have a similar use case with SNMP attributes, such as Checkpoint Firewall OID .1.3.6.1.4.1.2620.1.16.22.1.1.9 (vsxStatusEntry[].vsxStatusHAState), which returns either "Active" or "Standby"

Similar functionality to EnumLookupPropertyExtender's default-value parameter would be desirable as well, in case the OID emits strings that were not documented.

Fixed

Details

Assignee

Reporter

HB Grooming Date

HB Backlog Status

Doc Backlog Status

Story Points

Components

Sprint

Fix versions

Priority

PagerDuty

Created March 16, 2022 at 10:21 PM
Updated May 24, 2022 at 7:45 AM
Resolved May 24, 2022 at 7:45 AM