-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNMP plugin HEX STRING conversion #3478
Comments
This is a really, really, obscure (and bad IMHO) way of encoding a date/time into a value.
@danielnelson thoughts? |
I think we probably can't add a converter for this date since it is such a custom format, the best we can probably do is have a general purpose converter for binary to hex string. |
I think I found another usecase for OCTET STRING to INT conversion. I want to collect interface metrics of a fibre channel switch, which are stored inside For example
|
@thechristschn That's not the same as what this issue is about. For your case see the documentation on the |
@phemmer ok, then I'm sorry.
So I guess I should open a bug, that in my case HEX STRINGS aren't converted to meaningful integers if conversion is set to INT? |
An octet string isn't a "hex string". Hex encoding is a method of representing an octet string, useful when the string contains binary data. This request was to perform hex encoding for such binary data. Your OID you pasted sounds like you want |
@thechristschn this is the same case ... 14 years ago ... https://cricket-users.narkive.com/jmzeDk9Q/dealing-with-snmp-datasource-in-hex |
For this issue .. tested whit
The magic is in: $(( 16#$to_convert )) |
Hi, Its necessary to have another type of conversion, when the value are hex string like this example: SNMPv2-SMI::enterprises.2011.6.128.1.1.2.43.1.3.4194312192.0 = Hex-STRING: 48 57 54 43 33 D9 B4 12 In this example the return are Serial Number, one solution is transform in string but like hwaddr with more bytes, example: |
I am going to close this as |
Feature Request
Opening a feature request kicks off a discussion.
Proposal:
I would like to read and convert snmp HEX(octet) STRING values to something more readable.
Current behavior:
HEX(octet) STRINGS are not translated, not even read correctly
Desired behavior:
HEX(octet) STRINGS are translated to STRING, INT or FLOAT.
Use case: [Why is this important (helps with prioritizing requests)]
For example i have HP server related mib, which contains:
I would like to get those values in any readable form. Right now i get something like:
The text was updated successfully, but these errors were encountered: