Ad Widget

Collapse

Calculated item in item prototype invalid value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • daniel.pogac
    Junior Member
    • Jul 2018
    • 1

    #1

    Calculated item in item prototype invalid value

    Hello there.

    I'm trying to use calculates item in discovery (or item prototype). Unfortunately I'm getting invalid calculated item values.
    I'm extending included Template Module Interfaces SNMPv2 for sum of In Octets and Out Octets. All items have set Units to bps and Type of information is Unsigned integer.

    Example:

    Calculated item formula in item prototype is:
    last("net.if.out[ifHCOutOctets.{#SNMPINDEX}]")+last("net.if.in[ifHCInOctets.{#SNMPINDEX}]")
    which is loaded to key: net.if.inout[ifHCInOutOctets.{#SNMPINDEX}]

    Generated items for host looks good and {#SNMPINDEX} is replaced with real values, for exmaple:
    last("net.if.out[ifHCOutOctets.615]")+last("net.if.in[ifHCInOctets.615]")
    loaded to key: net.if.inout[ifHCInOutOctets.615]

    But there is problem with calculated value in Latest Values:
    Value for key net.if.in[ifHCInOctets.615] is 427359328 or 427.36 Mbps
    Value for key net.if.out[ifHCOutOctets.615] is 51592080 or 51.59 Mbps
    Calculated value for key net.if.inout[ifHCInOutOctets.615] is 1981632 or 1.98 Mbps

    As you can see, calculated value not corresponding to defined formula, but getting values, which i can't understand.
    But when i manually create item, from discovered items for host, there is no problem. Item net.if.inout[ifHCInOutOctets.615] is calculated correctly: 478951408 - 478.95 Mbps

    Have anybody clue what am I doing wrong or it is bug?

    My version of Zabbix is 3.4.8 from Zabbix repository for RHEL 7. OS is CentOS 7.4

    Thanks for reply.

    Daniel.
Working...