Ad Widget

Collapse

Working With Calculated Items - Novice User

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jimbrewski
    Junior Member
    • Sep 2010
    • 16

    #1

    Working With Calculated Items - Novice User

    I also posted this as a visitor message. I am using a Cisco router template that is retrieving inbound and outbound octets on a serial interface as separate items. I have worked for two days trying to create a calculated item that is a combination of those two items so I can create a "baseband" graph of that circuit that shows total usage. I am getting some kind of number from Zabbix based on what I have in the Key and Formula fields but it certainly isn't the combination of the inbound and outbound octets. Any suggestions would be greatly appreciated. I surmise that my main issue is not completely understanding the syntax that needs to be in the Key and Formula fields. Thank You.
  • MrKen
    Senior Member
    • Oct 2008
    • 652

    #2
    Example #3 in the online documetation looks pretty clear how to do this http://www.zabbix.com/documentation/1.8/manual/config/items#calculated_items

    The key can be anything you want, e.g ifInOutTotal

    Something like this for the formula:
    last("ifOutOctets1")+last("ifInOctets1")

    MrKen
    Disclaimer: All of the above is pure speculation.

    Comment

    • jimbrewski
      Junior Member
      • Sep 2010
      • 16

      #3
      MrKen,
      Many thanks for your reply. Tried exactly that previous to my post but the result I was seeing in latest data was nowhere near the combination of the inbound and outbound octets. For example, inbound octets might be 142k and outbound octets might be 98k. ifInOutTotal was 192bps -- not even 1k. I'll keep trying to see if I can figure it out. Again, thanks for replying.

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        you could post full item config screenshot. wild guess - what is "store value" set to for the calculated item ? it should be "as is".
        Zabbix 3.0 Network Monitoring book

        Comment

        • zabbixei
          Junior Member
          • Dec 2014
          • 24

          #5
          calculated Items for Catalyst switches

          Hello Everyone,

          i am new to Zabbix and i am using version 2.4. after so many searches and struggles found out the right templates for my switches to monitor each port of switches but now i want to make a map with calculated items or host to know the flow of single port in a map.

          can someone please explain me how to do it because i had look to zabbix documentation but i did not get anything useful so i can make calculated values.

          thanks in advance.

          John

          Comment

          • zabbixei
            Junior Member
            • Dec 2014
            • 24

            #6
            Originally posted by MrKen
            Example #3 in the online documetation looks pretty clear how to do this http://www.zabbix.com/documentation/1.8/manual/config/items#calculated_items

            The key can be anything you want, e.g ifInOutTotal

            Something like this for the formula:
            last("ifOutOctets1")+last("ifInOctets1")

            MrKen
            i want something similar but i have tried this above formula and it does not work.

            i have tried all these:

            last("ifOutOctets1")+last("ifInOctets1")
            last("ifOutOctets10101")+last("ifInOctets10101")
            last("Cisco L3S2:ifOutOctets10101")+last("Cisco L3S2:ifInOctets10101")
            {last("Cisco L3S2:ifOutOctets10101")+last("Cisco L3S2:ifInOctets10101")}

            Cisco Lxxx is my switch name
            10101 is port number

            but none of them worked, if use this: {Cisco L3S2:ifInOctets.10101.last(0)} I only get the inbound for the this port but it does not working with summation.

            can you please advise how i can figure it our.

            thanks in advance.

            P.S. I am using Zabbix 2.4


            John

            Comment

            • aib
              Senior Member
              • Jan 2014
              • 1615

              #7
              Sorry about that, but you CANNOT use any formula in Labels.
              So, you cannot calculate the summarized value and show it on map.
              You have to create an Item, which will summarize all data which you need, and then you can show that Item on map.
              Sincerely yours,
              Aleksey

              Comment

              • grmnrvs
                Member
                • Jun 2018
                • 35

                #8
                Originally posted by aib
                Sorry about that, but you CANNOT use any formula in Labels.
                So, you cannot calculate the summarized value and show it on map.
                You have to create an Item, which will summarize all data which you need, and then you can show that Item on map.
                Hi aib can i made that?

                I've two snmp agent items (look the picture)
                Click image for larger version

Name:	Captura.PNG
Views:	1202
Size:	54.0 KB
ID:	361492

                And I need to create a Calculated Item to sum the totals of both SNMP Agent Items, and I'm confused about how to create or write the correct formula.

                I need this because I want to calculate how much percentage of bandwidth I have used over the available bandwidth of a link.

                Comment

                • aib
                  Senior Member
                  • Jan 2014
                  • 1615

                  #9
                  Create a "calculated" Item prototype and use formula:
                  last("net.if.in(ifHCInOctets.{#SNMPINDEX})")+last( "net.if.in(ifHCOutOctets.{#SNMPINDEX})")
                  I'm using a similar formula to calculate total traffic going through Internet port.
                  Sincerely yours,
                  Aleksey

                  Comment

                  Working...