Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

SNMP – DateAndTime OID returns conflicting formats

Solved1.42K views17th July 2023DateAndTime OIDs SNMP SNMP tables
3
Bruno Nogueira [SLC]50 19th January 2022 1 Comment

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,

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 17th July 2023
Peter Vanpoucke [SLC] [DevOps Advocate] commented 19th January 2022

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?

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Mieke Dryepondt [SLC] [DevOps Advocate]3.60K Posted 21st January 2022 2 Comments

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”
Mieke Dryepondt [SLC] [DevOps Advocate] Edited comment 12th February 2024
Trong Huynh [DevOps Member] commented 5th February 2024

Hi Mieke, where would you specify OADate in the parameter?

Mieke Dryepondt [SLC] [DevOps Advocate] commented 12th February 2024

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.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs