Hi!
Was this resolved?
I am struggling with the apparently similar 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=10.223.5.112:161 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=10.223.5.112:161 msg="Error parsing float64 from 
value" metric=diameterStackTotalSessionNbr value=0x0000000000000116 
regex=^(?:(.*))$ extracted_value=0x0000000000000116

Any suggestions?
I saw that for andrewd-sterling the approach worked and hex value became a 
String 
https://github.com/prometheus/snmp_exporter/issues/186#issuecomment-389914695. 
But probably this is just because snmp originally returned this value as 
STRING...

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

вторник, 13 ноября 2018 г. в 02:14:42 UTC+4, Константин Миронов: 

> This not standard OID? Why not working change type?
>
> воскресенье, 11 ноября 2018 г., 17:56:00 UTC+3 пользователь Brian Brazil 
> написал:
>
>> On Sun, 11 Nov 2018 at 12:01, Ben Kochie <[email protected]> wrote:
>>
>>> In theory, we could add a special override for this conversion.
>>>
>>
>> This one is handled by the SNMP client though.
>>
>> Brian
>>  
>>
>>>
>>> On Sun, Nov 11, 2018 at 12:43 PM Константин Миронов <
>>> [email protected]> wrote:
>>>
>>>> Are there any solutions?
>>>>
>>>> воскресенье, 11 ноября 2018 г., 14:21:44 UTC+3 пользователь Brian 
>>>> Brazil написал:
>>>>>
>>>>> On Sat, 10 Nov 2018 at 21:07, <[email protected]> wrote:
>>>>>
>>>>>> Hello.
>>>>>>
>>>>>> I have OCTET STRING OID's like this:
>>>>>>
>>>>>> rptPaTemprature OBJECT-TYPE
>>>>>>     SYNTAX  OCTET STRING(SIZE(4))
>>>>>>     MAX-ACCESS read-only
>>>>>>     STATUS  mandatory
>>>>>>     DESCRIPTION
>>>>>>         "The temperature.
>>>>>>          It should be changed to float format.
>>>>>>          The value is invalid, if the repeater is rd960."
>>>>>>     -- 1.3.6.1.4.1.40297.1.2.1.2.2
>>>>>>     ::= { rptDataInfo 2 }
>>>>>>
>>>>>> How I can collect this OID to Prometheus?
>>>>>>
>>>>>> # snmpwalk -v 1 -c public -m HYTERA-REPEATER-MIB 192.168.88.190 
>>>>>> HYTERA-REPEATER-MIB::rptPaTemprature.0
>>>>>> HYTERA-REPEATER-MIB::rptPaTemprature.0 = Hex-STRING: 00 00 C0 41
>>>>>>
>>>>>
>>>>> It looks like it's exposing it with the wrong endianness.
>>>>>
>>>>> Brian
>>>>>  
>>>>>
>>>>>>
>>>>>> -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "Prometheus Users" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to [email protected].
>>>>>> To post to this group, send email to [email protected].
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/prometheus-users/2d222ff7-387d-44e5-9737-5ccd23bf0306%40googlegroups.com
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/prometheus-users/2d222ff7-387d-44e5-9737-5ccd23bf0306%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> Brian Brazil
>>>>> www.robustperception.io
>>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Prometheus Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/prometheus-users/2556da0d-63cd-4a2e-9e6b-eaa986e4b123%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/prometheus-users/2556da0d-63cd-4a2e-9e6b-eaa986e4b123%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Prometheus Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/prometheus-users/CABbyFmo1TBpPn19hhJn_ubek9gQHPqaYmu%2BpwybF6_wDxwzThA%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/prometheus-users/CABbyFmo1TBpPn19hhJn_ubek9gQHPqaYmu%2BpwybF6_wDxwzThA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> -- 
>> Brian Brazil
>> www.robustperception.io
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/e07babea-9dd0-4787-bab7-4c90929d4ffcn%40googlegroups.com.

Reply via email to