Ad Widget

Collapse

SNMP Calculated item and discovery rule

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Thibault
    Junior Member
    • Jul 2012
    • 1

    #1

    SNMP Calculated item and discovery rule

    Hello !

    I try to create a calculated item prototype based on two SNMP items prototype:
    • ifOutOctets[{#SNMPVALUE}] => OID:IF-MIB::ifOutOctets.{#SNMPINDEX}
    • ifInOctets[{#SNMPVALUE}] => OID:IF-MIB::ifInOctets.{#SNMPINDEX}


    My calctulated item is :
    • Key => ifTotalOctets_calc[{#SNMPVALUE}]
    • Formula => last("ifOutOctets[{#SNMPVALUE}]")+last("ifOutOctets[{#SNMPVALUE}]")


    When i save it, Zabbix say "Item Created" but the problem is that their is no new items created on host!

    I also try the same calculated item prototype with Zabbix agent keys and it works.

    Can anyone tell me why it doesn't works and if there is a way to fix it ?

    Thanks !
  • eterjack
    Member
    Zabbix Certified Specialist
    • Mar 2012
    • 60

    #2
    I have the same problem.

    could someone help me?

    Comment

    • killout
      Junior Member
      • Dec 2013
      • 10

      #3
      Works for me:
      Code:
      last("hrStorageSize[\"{#SNMPVALUE}\"]")-last("hrStorageUsed[\"{#SNMPVALUE}\"]")

      Comment

      • aib
        Senior Member
        • Jan 2014
        • 1615

        #4
        Originally posted by Thibault
        [*]Formula => last("ifOutOctets[{#SNMPVALUE}]")+last("ifOutOctets[{#SNMPVALUE}]")[/LIST]
        First of all - Are you mistyped in Formula OR you use ifOUTOctets twice for specific reason?

        Then, to calculate the Total traffic, you have to create three(3) Items
        1) ifInOctets.[{#SNMPINDEX}] -> OID:IF-MIB::ifInOctets.{#SNMPINDEX}
        2) ifOutOctets.[{#SNMPINDEX}] -> OID:IF-MIB::ifInOctets.{#SNMPINDEX}
        3) ifTotalOctets.[{#SNMPINDEX}] -> last("ifInOctets[{#SNMPVALUE}]")+last("ifOutOctets[{#SNMPVALUE}]")

        Also you can create three prototypes in LLD rule (in, out, total) and then all total Items will be created automatically after LLD will done.

        I attached my own prototype for Total traffic on interface.
        Attached Files
        Sincerely yours,
        Aleksey

        Comment

        Working...