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
    • 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
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Learn more about 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)
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Program
    • DataMiner DevOps Support
    • Feature Suggestions
  • Downloads
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

Mapping SNMP Trap Values to Custom Parameter Values

61 views6 hours ago
1
Wade Press [DevOps Member]60 1 day ago 0 Comments

Hi Skyline team,

I’m implementing SNMP traps in a connector to reduce reliance on polling.
However, the traps returned by the device use different severity codes from those used in the parameter.

For example:
The parameter reports: 0 = Locked, 1 = Unlocked
The trap reports: 2 = Locked, 3 = Unlocked

Because of this mismatch, I can’t simply use setBindings to update the parameter directly.

Is there a way to map incoming trap values to custom values (e.g. 2→0 and 3→1) without using a QAction?
Alternatively, is there a way to achieve this using Trigger + Action (for example, to set a literal value based on a trap message)?

I considered chaining increment and copy actions, but that gets messy, and using a QAction feels overkill for such a simple conversion.

Let me know if you have any ideas that could help my use case.

Robin Spruytte [SLC] [DevOps Advocate] Answered question 7 hours ago

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Robin Spruytte [SLC] [DevOps Advocate]742 Posted 7 hours ago 1 Comment

Hi Wade,

Although the docs states to only use it on polled parameters (which you could argue is the case for a trap), you could use a Sequence with a modulo operation 'rest:2' or '%:2'. This will end up setting 0 for all even values and 1 for all odd values, which would work in the case you explained.

If that does not work as expected, You could also mimic the logic that you would do in a QAction by doing something like below. It is however not fullproof (see at the end)

Let's assume the original param is (A)

Make a 'fixed' (B) param with value 0 to represent the Locked value

Make a 'fixed' (C) param with value 1 to represent the Unlocked value

Make a new param to receive the value of the trap binding (D)

Create an action to 'copy' value from (B) to (A) = (Set Locked)

Create an action to 'copy' value from (C) to (A) = (Set Unlocked)

Create a trigger 'on change' for param (D) with a condition to check value in (D) for 2 or 3 and 'execute next' either action (Set Locked) or (Set Unlocked) accordingly.

The issue with the last method is that the chain will only trigger if the received value on D is different than the previous value. However, in this case you might not need to update A anyway.

Wade Press [DevOps Member] Posted new comment 3 hours ago
Wade Press [DevOps Member] commented 3 hours ago

Hi Robin,

Thanks for your helpful reply.

I'll experiment with the sequence function, perhaps that could work in this use case but may have limitations elsewhere.

I also thought about the same logic wrt trigger + action but wondered if it would just be simpler to call a QAction instead. From an efficiency point of view, and not to overload the agent, would the trigger + action be preferred over a QAction?

I also tried another method with using copy + increment, but this resulted in the wrong value to be in the parameter until the increment action had completed. Is there a way to combine two actions into the same Action?

<Action id="1">
<Name>AsiStatusTrapAction1</Name>
<On id="2002">parameter</On>
<Type id="10004">copy</Type>
</Action>
<Action id="2">
<Name>AsiStatusTrapAction2</Name>
<On id="2002">parameter</On>
<Type value="-1">increment</Type>
</Action>

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

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin