Details
-
New Feature
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
Security Level: Default (Default Security Scheme)
-
None
-
8
-
Horizon - May 11 - 25
-
Backlog
-
NB
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:
"status": "operational" "status": "down" "status": "partial_outage"
If there was an enumeration such as:
"operational" = 0 "partial_outage" = 1 "down" = 2
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:
<resource-types> <resourceEnumeration name="myStatus"> <enumState value=0 string="operational" /> <enumState value=1 string="partial_outage" /> <enumState value=2 string="down" /> </resourceEnumeration> </resource-types>
and then collected as following, assuming the "status" xpath refers to a field that is a string in the source:
<xml-object name="status" type="GAUGE" xpath="status" enum="myStatus" />
Or I guess as a "ReverseEnumLookupPropertyExtender"