Ad Widget

Collapse

Arithmetic operators

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • askretov
    Junior Member
    • Jul 2014
    • 1

    #1

    Arithmetic operators

    Hello!
    Can somebody help with a small question, please.
    I have Discovery rule and item prototypes with SNMP type. I need to write an OID with subtraction operation (-) for macro {SNMP.INDEX} :
    Code:
    stat.statIfwanTable.statIfwanEntry.statIfwanOctetsTx.{#SNMPINDEX}-2
    In that way I receive a resulted OID as
    Code:
    stat.statIfwanTable.statIfwanEntry.statIfwanOctetsTx.[B][U]3-2[/U][/B]
    But I need .1 instead of that.
    How can I use any arithmetic operations in item fields ???
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    Create an item prototype with SNMPstat.statIfwanTable.statIfwanEntry.statIfwanOc tetsTx.{#SNMPINDEX}

    Create a secont Item prototype - calculated - with formula:
    last("stat.statIfwanTable.statIfwanEntry.statIfwan OctetsTx.{#SNMPINDEX}")-2
    Sincerely yours,
    Aleksey

    Comment

    Working...