Ad Widget

Collapse

Sum or subtraction of items on the graph

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dimka779
    Junior Member
    • Mar 2014
    • 22

    #1

    Sum or subtraction of items on the graph

    Hi. Could somebody help me with my problem.
    I've got Mikrotik and I got SNMP values on ether1 port such as ifInOctets1 or ifOutOctets1 (speed per second)
    I made a graph with this values.

    Now I've got VLAN interface on physical ether1 (ifInOctets1) interface.VLAN SNMP values is called ifInOctets30 and ifOutOctets30.

    So now I need to separate VLAN and ether1 traffic speed values.

    For example:
    ether1 IN speed (without VLAN traffic) = ifInOctets1 - ifInOctets30
    ether1 OUT speed (without VLAN traffic) = ifOutOctets1 - ifOutOctets30
    VLANspeed (without ether1 traffic) = ifInOctets30

    So I created calculated item in zabbix with
    last("ifInOctets.1")-last("ifInOctets.30") expression.

    And then I've got error - "Cannot evaluate function [last()]: item [mymikrotik:ifInOctets.1] not found"

    Thanks!
    Last edited by dimka779; 26-03-2014, 10:46.
  • pmariswamy
    Junior Member
    • Mar 2014
    • 4

    #2
    Hi,
    The function definition - last("ifInOctets.1")-last("ifInOctets.30") seems to be wrong.
    I think this should be changed to,
    last("ifInOctets1")-last("ifInOctets30")

    PS: I am newbie so my above answer maybe wrong and the answer is just a guess based on examples at : https://www.zabbix.com/documentation...pes/calculated

    - Prashanth

    Comment

    • aib
      Senior Member
      • Jan 2014
      • 1615

      #3
      Please, explain me why you use two different keys in description:
      - first you are talking about key ifInOctets1
      - then, in formula, you use the different key ifInOctets.1

      Use in formula the same key which you have in your Item description.
      Code:
      ifInOctets[ether1] OR ifInOctets[1] OR ifInOctets.1
      but the same key every time.
      Sincerely yours,
      Aleksey

      Comment

      • dimka779
        Junior Member
        • Mar 2014
        • 22

        #4
        Thank you all!
        Now I got item values, but seems it's not correct. Because I got IN and OUT speed in petabytes/s and exabytes/s. Seems it's about conversion.

        When I use just ifInOctets.1 or ifInOctets.30 in my graph I add it with this parameters:

        Type of information: Numeric (float)
        Units : bps
        Use multiplier : Custom multiplier
        Custom multiplier : 8
        Store value : Delta (speed per second)

        And I get correct values (kbytes,mbytes)

        So now I use calculated item:
        last("ifInOctets1")-last("ifInOctets30")
        with same parameters:

        Type of information: Numeric (float)
        Units : bps
        Use multiplier : Custom multiplier
        Custom multiplier : 8
        Store value : Delta (speed per second)

        And I get not correct values in petabytes/s and exabytes/s

        Now I just read SNMP values of ifInOctets1 and ifInOctets30
        ifInOctets.2 = 97590243
        ifInOctets30 = 554438260

        But how does it possible?
        ifInOctets30 it's VLAN "inside" ether2 (ifInOctets.2) and I thought that it should be less than value on ifInOctets.2 .

        Thanks!
        Last edited by dimka779; 28-03-2014, 12:40.

        Comment

        Working...