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. Display custom value in the Alarm event text.

Display custom value in the Alarm event text.

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

    Hi All,

    Is it possible to pass a custom value from the DCI to the event processing?
    e.g. There is a DCI element that queries the state (value) of a device input. If this polled value exceeds  the configured threshold range, an event is generated based on the rules set in the Threshold section of DCI. For this event, I would like to add the name of the device input (value in string format), which I request from the device via SNMP using DCI's Transformation script. I would like to display this string value in the text of the alarm event.

    Thanks in advance for any solutions or ideas.

    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #2

      Hi!

      Simplest would be to store this in DCI's comment, and since recently we have %D macro that resolves to that comment, but the problem is that editing that comment from NXSL (e.g. in transformation script) is not currently possible. But we will add that at some point.

      Currently you can use custom attributes on node to store such information, e.g. if DCI's tranformation script has
      $node->setCustomAttribute("DCI_DESC_".$dci->name, 123);
      this will update a custom attribute.

      Then in script library you can have e.g. GetDciDescFromCustomAttribute script with the following:
      return $node->getCustomAttribute("DCI_DESC_" . $dci->name);

      And now in event's message you can have %[GetDciDescFromCustomAttribute] macro that would call above script and will get value of the custom attribute.

      1 Reply Last reply
      0
      • C
        C
        cserzs
        wrote on last edited by
        #3

        Hi Filipp, Thank you very much for your support.

        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