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. Get interface speed in Threshold Script ?

Get interface speed in Threshold Script ?

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

    I monitor traffic in Data Collection Configuration

    Description: {instance-name} - Traffic Out (bits/s)
    Parameter : .1.3.6.1.2.1.31.1.1.1.10.{instance}
    Origin: SNMP - Unsigned Integer 64bit
    Transformation :  Average delta per second
    Transformation script: $1 * 8
    Instance Discovery : SNMP Walk - OIDs
    Base SNMP OID: .1.3.6.1.2.1.31.1.1.1.1

    It's work ok.
    I need add event when percent bandwidth reach.
    I create Threshold script below but the "{instance}" seem to fail.

    $ifo = GetInterfaceObject($node, {instance});
    $speed = $ifo->speed;
    if ($1/$speed*100 > $2)
      return true;
    else
      return false;
    

    How can i get {instance} value? or get interface speed from variables $dci, $node, $object?

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

      In NXSL script you can use $dci->instance (or $dci->instanceData depending on your configuration) to get instance value.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • N
        N
        ntnam
        wrote on last edited by
        #3

        Thanks you.
        I replace {instance} by $dci->instanceData is ok.

        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