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. Script to analyze trap message content and generate event

Script to analyze trap message content and generate event

Scheduled Pinned Locked Moved Support
2 Posts 1 Posters 23.3k 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.
  • C
    C
    CrUser
    wrote on last edited by
    #1

    Hi,

    I would ask for help with processing the content of the trap message.
    The idea is that when receiving a trap message, I can use a script and expression filter to categorize some special events in accordance with the content of the message and create special events for them, and process all other traps that do not contain the required text in the message to the standard event creation process.
    When I manage to get extracted events for such traps of special content then I can generate separate alarms via event policy and action scripts and send them for example via emails
    If anyone has experience in writing such scripts and ways to do so please help.

    best regards,
    Tomislav

    1 Reply Last reply
    0
    • C
      C
      CrUser
      wrote on last edited by
      #2

      Hi,

      I may not have clearly defined the issue but I have managed to solve this message filtering problem in the meantime through Event processing policy.
      I set up a script to filter by event content in a filtering script.
      if ($event->message ~= "something to filter")
      {
      return true;
      }

      I used regular expresions to filter the content of the event and thus run server actions only for messages that contain post text.

      For now, everything works so I hope I did it correctly

      Tomislav

      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