Hi All,
I'm trying to monitor a time parameter from a device which tells me the last change time. The time is formatted as below and when I use MibBrowser this in the result I get from the device: 2024-2-28,1:46:27.0,+0:0 When I try do the same with DataMiner I get different results, but not what I want. When I monitor the packet response with Wireshark (between the device and DataMiner) for this OID I get the follow data: 07e8021c012e1b002b0000. Trying to read this data without having to create a Q/A. I'm gussing I'm going to have to but want to ask if anyone has run into this before.
******
Name/OID: configLocalTableLastChangedTime.0; Value (OctetString): 2024-2-28,1:46:27.0,+0:0
SNMP Description - The date and time when the current configuration was last
changed.
******
Wireshark SNMP Packet response.
07e8021c012e1b002b0000
******
<Type>read</Type>
<Interprete>
<RawType>other</RawType>
<Type>double</Type>
<LengthType>next param</LengthType>
</Interprete>
<SNMP>
<Enabled>true</Enabled>
<OID type="complete">1.3.6.1.4.1.2928.2.1.1.6.1.8</OID>
<Type>timeticks</Type>
</SNMP>
<Display>
<RTDisplay>true</RTDisplay>
</Display>
<Measurement>
<Type options ="time">number</Type>
</Measurement>
</Param>
Result:
810 days 04h 26m 40s
******
<Type>read</Type>
<Interprete>
<RawType>other</RawType>
<Type>double</Type>
<LengthType>next param</LengthType>
</Interprete>
<SNMP>
<Enabled>true</Enabled>
<OID type="complete">1.3.6.1.4.1.2928.2.1.1.6.1.8</OID>
<Type>timeticks</Type>
</SNMP>
<Display>
<RTDisplay>true</RTDisplay>
</Display>
<Measurement>
<Type>number</Type>
</Measurement>
</Param>
Result:
70000000
*****
<Type>read</Type>
<Interprete>
<RawType>other</RawType>
<Type>string</Type>
<LengthType>next param</LengthType>
</Interprete>
<SNMP>
<Enabled>true</Enabled>
<OID type="complete">1.3.6.1.4.1.2928.2.1.1.6.1.8</OID>
<Type>octetstring</Type>
</SNMP>
<Display>
<RTDisplay>true</RTDisplay>
</Display>
<Measurement>
<Type>number</Type>
</Measurement>
</Param>
Result:
07.E7.0B.09.17.28.1F.00.2B.00.00
Hi David, typically the "octetstring" SNMP type should be correct. However as one of the bytes has value "E7", this is outside of the normal range of the octetstring and as a result the string is displayed in hex format. This is documented in https://docs.dataminer.services/develop/schemadoc/Protocol/Protocol.Params.Param.SNMP.Type.html?q=octetstringhex. Perhaps you can try the "OctetStringAscii" or "OctetStringUTF8" types as an alternative?
Thank you. That makes sense. I tried both OctetStringAscii & UT8 and got the following result..
ç#1
ý#1
Hi David, that is not the desired result. I think you best check with the device manufacturer for more details on the exact format they are using. If it were sending the string “2024-2-28,1:46:27.0,+0:0” as per documentation, I would expect the octet string bytes to be something like “323032342d322d32382c313a34363a32372e302c2b303a30”
Hi David, I found some more information on the used format here: https://net-snmp.sourceforge.io/docs/mibs/host.html#DateAndTime
A date-time specification.
field octets contents range
—– —— ——– —–
1 1-2 year* 0..65536
2 3 month 1..12
3 4 day 1..31
4 5 hour 0..23
5 6 minutes 0..59
6 7 seconds 0..60
(use 60 for leap-second)
7 8 deci-seconds 0..9
8 9 direction from UTC ‘+’ / ‘-‘
9 10 hours from UTC* 0..13
10 11 minutes from UTC 0..59
* Notes:
– the value of year is in network-byte order
– daylight saving time in New Zealand is +13
For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be
displayed as:
1992-5-26,13:30:15.0,-4:0
Note that if only local time is known, then timezone
information (fields 8-10) is not present.
At this time, we do not have support for this format directly in the connector parameter settings, so you will have to process it using a QAction.
Documentation says
Time stamp of the last change of the configuration. In the format: YYYY MM DD hh:mm:ss TZD. The time zone will always be displayed as UTC (Coordinated Universal Time).