Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Duplicate SNMP traps causing multiple emails

Duplicate SNMP traps causing multiple emails

Scheduled Pinned Locked Moved Support
6 Posts 2 Posters 61.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    G
    GTM
    wrote on last edited by
    #1

    I have an Aruba wireless controller which sends traps when an access point goes down, unfortunately it sends 4 of the same trap (which I've verified by sniffing the traffic).  Since one of the actions in my Event Policy is to send an email, I get 4 of the same email when this occurrs.  The Alarm Browser window shows a count of 4, so I know my Alarm Key is okay.  Is there a way to limit the number of emails to 1?  Would I need to use situations?  Is the Alarm Count available via a NXSL script for use in an Event Filtering script?

    Thanks!

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi!

      Yes, you should use situations for preventing duplicate emails. Depending on if you have paired event for access point coming up, you can either set situation's attribute to true when you process first down trap, ignore all other down traps if it's set, and clear it on access port up trap, or you can store current time in situation's attribute, and ignore all next events withing some short time interval.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • G
        G
        GTM
        wrote on last edited by
        #3

        Thanks for the reply, but I have a couple more questions:

        The AP name is sent in parameter 2, which I successfully decode, parse and include in my notification emails.  How do I go about creating the Situation?  I thought about having a situation called "APStatusTraps", but would the AP name be an instance or an attribute of the situation?  Can I use %2 as the macro in the creation of the instance/attribute?

        1 Reply Last reply
        0
        • V
          V
          Victor Kirhenshtein
          wrote on last edited by
          #4

          You should have AP name as an instance. You can create some attribute, like isDown, and set it to true on down trap and to false on up trap. Then in filtering script for down trap you can check if this attribute already set to true, and then ignore the event. And yes, you can use %2 and other macros as instance and/or attribute value.

          Best regards,
          Victor

          1 Reply Last reply
          0
          • G
            G
            GTM
            wrote on last edited by
            #5

            That worked perfectly!  Thanks!  Now, one more question:

            Is it possible to access the parameters in the SNMP traps via the $event object?  For example, the AP name is passed as parameter 2, which I've configured as "apLocation" in the Description field in the Trap Parameter Mapping dialog box.  Is it possible to get the value via something like $event->apLocation or GetEventParameter($event,"apLocation")?

            BTW: I'm migrating from OpenNMS and I love the power and flexibility of NetXMS while at the same time being easy to configure!

            1 Reply Last reply
            0
            • V
              V
              Victor Kirhenshtein
              wrote on last edited by
              #6

              You can access trap-originated event's parameters in script, but only by index, like this:

              $event->parameters[2]

              Best regards,
              Victor

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups