Hi,
We're polling a table including two DateAndTime OIDs. Often times the format returned by walking the device comes in a string format such as 2021-11-25,4:32:48.7, but in other occasions, the values are returned in raw HEX format. See below screenshot:
The curious thing is that looking at the Wireshark traces for these polling actions, we see that the raw HEX value is returned, which indicates this is either an applicational issue with the MIB Browser softwares (we've tested with two) or with the SNMP Agent these applications are using.
Have you ever encountered such an issue? This is important because if we are to build a connector for this device, we need to know in advance which format to parse.
Reference: https://www.webnms.com/snmp/help/snmpapi/snmpv3/using_mibs_in_applns/tcs_dateandtime.html
Thank you,
Hi Bruno,
The formatting will normally be done by the Mib-browser, so the inconsistency lays there.
As you have mentioned: when looking at the raw data you always see the same format. It is this format we will retrieve in the connector.
It will be up to the connector to translate this to a nice DateTime format:
- use of a QAction
- set it as OADate in a parameter with the measurement option "datetime"
Hi Mieke, where would you specify OADate in the parameter?
Hi, this is a standard numeric representation of a datetime.
See microsoft doc here: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tooadate?view=net-8.0
For DataMiner, you simply make sure the param is a numeric one with 8 decimals and has the option datetime in the measurement.
See dataminer doc here: https://docs.dataminer.services/develop/schemadoc/Protocol/Protocol.Params.Param.Measurement.Type-options.html#datetime
To set the value in the param, you will need to use a qaction.
For example: you receive a string value from snmp representing a datetime.
For this you will require a qaction to:
1. Convert the text to a proper datetime based on the format/documentation of the snmp datasource.
2. Convert the datetime to an OADate
3. Set the OADate number ( a double) in a new parameter defined as number with 8 decimals and the datetime option.
To completely rule out if the SNMP Agent is inconsistent I would be interesting to see what the SNMP response looks like.
Could you include a screenshot of the OID and the PDU when the MIB Browser interprets the date correctly and one when it doesn’t?