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. Calculated DCI

Calculated DCI

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 22.6k 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
    #1

    From messages:

    @rando said:

    Sorry, I didn't read the last part of the message.  Yes, you can transfer this to the forum.  I'm still struggling with the scripting.  Is there any examples with descriptions I can look at to see the structure and usage?  I'm just going through the manual right now.

    @victor said:

    @rando said:

    I'm still learning the NetXMS software and have a wireless base station and remote wireless radios which is SNMP capable and I do get a signal value and a noise value.  For me to calculate the signal to noise ratio I have to subtract these two numbers to create a 3rd value that I would need to track.  Is there any way NetXMS can do this?

    Yes, it's possible. You should define two DCIs, one will collect signal value, and other noise value. Then, for one DCI you can create transformation script, which will access last value of other DCI and use it in transformation. You can access other DCI value using built-in functions GetDCIValue and FindDCIByName or FindDCIByDescription. See user's manual for description of these functions (section 8.5.3).
    You script may looks like following (assuming that you are transforming signal value and your noise DCI called "Noise Level"):

    $1 - GetDCIValue($node, FindDCIByDescription($node, "Noise Level"))
    

    Best regards,
    Victor

    P.S. Can we move this discussion to the forum because this information may be useful for others?

    1 Reply Last reply
    0
    • S
      S
      sunil2suss
      wrote on last edited by
      #2

      Hi Victor,

      I have defined two DCI for my Layer-2 switch. I need to add them together and generate as a third DCI. Is it possible to do?

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

        Hi!

        Yes, it is possible. You should create third DCI with the solurce set to "Internal" and parameter name set to "Dummy". This will generate zeros on given interval. Then, in transformation script you can access both DCIs you have configured and calculate value for your new DCI. Example transformation script:

        value1 = GetDCIValue($node, FindDCIByDescription($node, "My DCI #1 description"));
        value2 = GetDCIValue($node, FindDCIByDescription($node, "My DCI #2 description"));
        return value1 + value2;
        

        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