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. One kind of trap that covers dozens of alarms - how to configure

One kind of trap that covers dozens of alarms - how to configure

Scheduled Pinned Locked Moved Support
13 Posts 2 Posters 25.0k 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.
  • V
    V
    Victor Kirhenshtein
    wrote on last edited by
    #4

    Alarm severity may or may not be of same severity as originating event. When you create alarm from event in event processing policy, you have an option to set same severity as in event or any other fixed severity.

    Best regards,
    Victor

    1 Reply Last reply
    0
    • Y
      Y
      Yarda
      wrote on last edited by
      #5

      Yes, that's what I meant; in my case where I am gonna generate multiple Alarms out of one Event, I will decide manually what would be their statuses. So that my Event's status is nothing else but only color label in the Event Monitor.

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

        Yes, exactly.

        1 Reply Last reply
        0
        • Y
          Y
          Yarda
          wrote on last edited by
          #7

          I was successful with my configuration of multiple event policies. I've got good feelings. Tho' there is one extension to my situation. Imagine that for some of my numeric trap parameters I need to see a written description in alert's message.

          ID parameter is a good example in my case. We have around 100 possible ids... It would be nice to be able to map numbers to some hardcoded/configured string values.

          So, I need to go for the hard-core way, at least partially, anyway, don't I...?

          What approach would you recommend? I am thinking of tweaking (somehow :)) every relevant trap and adding some special parameter that I can refer to as $(X+1) (where X is the number of properly mapped parameters in my SNMP trap mapping config)...

          Thank you for your opinion.

          Yarda.

          1 Reply Last reply
          0
          • Y
            Y
            Yarda
            wrote on last edited by
            #8

            Also, I noted, and cannot explain it myself (yet), that when I generate my alarms, I have CRITICAL, MAJOR, MINOR and NORMAL all triggered by one "NORMAL" event, only sometimes I get change of the node's status.

            Only sporadically (but not rarely :)) I see the following events in the Event Monitor:

            Major SYS_NODE_MAJOR Node status changed to MAJOR
            Critical SYS_NODE_CRITICAL Node status changed to CRITICAL
            Warning SYS_NODE_WARNING Node status changed to WARNING
            Normal SYS_NODE_NORMAL Node status changed to NORMAL

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

              Hi!

              For showing text instead of code in events and alarms, you can use script in script library and macro like %[script_name]. For example, if you have some code as parameter number 5 in trap-generated event, you can create script called CodeToText in library:

              switch($5)
              {
                 case 1: return "CODE 1";
                 case 2: return "CODE 2";
                 // and so on...
                 default: return "Unknown code " . $5;
              }
              

              and then use

              %[CodeToText]

              in event and alarm message template.

              Best regards,
              Victor

              1 Reply Last reply
              0
              • Y
                Y
                Yarda
                wrote on last edited by
                #10

                If my script contains:

                return "HELLO";
                

                ...I get this string properly in my alarm's message.

                In case of your suggested code that I simplified (for test purposes) down to:

                return "HELLO" . $3;
                

                I get:

                Script (CodeToText) execution error: Error 5 in line 1: Invalid operation with NULL value

                ...the same failure with any other parameters, like $2, $4, $5, $6 ... Only $1 doesn't complain, cos' it is an empty string.

                Definition of my alarm's message follows:

                Alarm Card%5 %4: %3 Status: %2, Direction: %8, Port Level: %6, Port Number: %7 %[CodeToText]

                Misunderstood your comments?

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

                  Sorry, that was my mistake. Script called via %[] didn't get event's parameters in $1, $2, etc. Instead, you should use $event variable to access event attributes. Event class described here: http://wiki.netxms.org/wiki/NXSL:Event. To access parameters, you can use $event->parameters array. So, correct code in my example would be

                  default: return "Unknown code " . $event->parameters[5];
                  

                  Best regards,
                  Victor

                  1 Reply Last reply
                  0
                  • Y
                    Y
                    Yarda
                    wrote on last edited by
                    #12

                    The $event->... works like a charm. And that seems to cover all my needs. I am a happy hippo.

                    Will you have any advice also for the previously posted sub-question:

                    @yarda said in One kind of trap that covers dozens of alarms - how to configure:

                    Also, I noted, and cannot explain it myself (yet), that when I generate my alarms, I have CRITICAL, MAJOR, MINOR and NORMAL all triggered by one "NORMAL" event, only sometimes I get change of the node's status.

                    Only sporadically (but not rarely :)) I see the following events in the Event Monitor:

                    Major SYS_NODE_MAJOR Node status changed to MAJOR
                    Critical SYS_NODE_CRITICAL Node status changed to CRITICAL
                    Warning SYS_NODE_WARNING Node status changed to WARNING
                    Normal SYS_NODE_NORMAL Node status changed to NORMAL

                    Thank you,
                    Yarda.

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

                      Hi!

                      Can you describe this situation with more details? I'm not sure that I understand it correctly...

                      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