I am struggling with the following issue:
diameterStackTotalSessionNbr OBJECT-TYPE
SYNTAX HpeTasLong
MAX-ACCESS read-only
STATUS current
DESCRIPTION “The total number of ProtocolSession(s) of the DiameterStack since service start, or last reset”
::= { diameterStackEntry 3 }
HpeTasLong is OctetString type
Here is the snmpwalk result:
SNMPv2-SMI::enterprises.47196.2.1.2.1.3.5.4.1.1.3.1.2.1.1 = Hex-STRING: 00 00 00 00 00 00 00 F1
When trying to override with gauge type it returns the following:
diameterStackTotalSessionNbr{diameterStackStackIdx=“1”,serverHostIdx=“1”,serverProgIdx=“2”,serviceServiceIdx=“1”} 0
For type: DisplayString + regex_replaces the metric is not displayed at all. But log shows:
level=debug ts=2022-06-02T12:34:48.856Z caller=collector.go:428 module=hpe_scp target= msg=“Error parsing float64 from value” metric=diameterStackTotalSessionNbr value="\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0016" regex=^(?:(.*))$ extracted_value="\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0016"
For type: OctetString the metric is displayed along with the label with hex value:
diameterStackTotalSessionNbr{diameterStackStackIdx=“1”,diameterStackTotalSessionNbr=“0x0000000000000116”,serverHostIdx=“1”,serverProgIdx=“2”,serviceServiceIdx=“1”} 1
after attempting to add regex_replaces - there is no metric and log shows:
level=debug ts=2022-06-02T12:38:54.999Z caller=collector.go:428 module=hpe_scp target= msg=“Error parsing float64 from value” metric=diameterStackTotalSessionNbr value=0x0000000000000116 regex=^(?:(.*))$ extracted_value=0x0000000000000116
Any suggestions?
In case if this is not yet supported and if any additional code change is required we might try to contribute conversion of such hex values with PR.
Thanks,
Gleb