Ad Widget

Collapse

Percent network Utilization Graph of interface

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ssalomon
    Junior Member
    • Jun 2016
    • 4

    #1

    Percent network Utilization Graph of interface

    Good Afternoon,

    I have been searching on the forums as well as google for some sort of direction twords graphing the network percent utilization of an interface via snmp. I did find an old post from 2008 stating that it cannot be done. (https://www.zabbix.com/forum/showthr...nt+utilization) I was wondering if some one had created a template or if I could be pointed in the right direction.


    Thanks in advance.
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #2
    The typical issue is determining what the underlying speed capabilities of the link are.

    For WAN example, most networks today are probably terminated on the router/firewall via ethernet, running at 100mbs or 1gbs or even 10gbs. The underlying WAN link, however, will rarely match this connection speed. Depending on vendor, IOS versions, and network admin, there may be a hint contained (e.g. the bandwidth statement on some IOS) but in many (most?) cases not.

    Complicating it further, that device may implement some form of traffic shaping so that (for example) your 100mbs circuit can be utilized only at 80%, or only at 20% for http traffic, or some other complex criteria which really means "100% busy" is not the same speed as any one given parameter. Finally an effective 100% busy circuit (i.e. all the data you can move) can also come at radically different bandwidths depending on packet size, latency, number of connections, tcp windows or other protocol restrictions, etc., and may come well below the actual circuits rated maximum.

    Ignoring most of these factors the raw bandwidth is pretty easy to calculate, and if you hard coded (or a macro) the maximum bandwidth you can calculate a percentage as a separate calculated item, but it's still of questionable use as a general tool due to the underlying complexity.

    It's highly desirable, just one of those "not every question has a simple answer" type things.

    Comment

    • ssalomon
      Junior Member
      • Jun 2016
      • 4

      #3
      Linwood,

      Thank you for the reply. I do have control of all aspects of the network so I am not going to have to worry about shapers, content filters of the like. I do understand the inaccuracy of the values but to know avail management like the pretty dials. In reading the documentation on creating calculated items I see they have an example. I wanted to test this and see if it would give me some rough estimates. This is a screenshot of the item i created.



      I keep getting an error of cannot evaluate function "last()": Object does not exist

      Any Help would be appreciated.

      Comment

      • edsrj
        Junior Member
        • Aug 2013
        • 4

        #4
        Hi ssalomon,

        After half day of work I resolved this situation with a not so "pretty" solution.

        100*last(IfHCOutOctets[GigabitEthernet1/0/21])/31457280 (my internet link bandwidth is 30Mbps)

        Hope that helps you!

        Best regards
        Attached Files

        Comment

        • Linwood
          Senior Member
          • Dec 2013
          • 398

          #5
          If you plan to go that way, consider putting the bandwidth into a macro (and look at the macros that can vary by context:

          Macros and context

          This way you can put the formula into a template, and then change the value of bandwidth for specific hosts and/or interfaces without needing to hard code the formula in each host.

          I would be curious how this works out for you, especially at determining when you have capacity issues. It's been some years since I played with it, but I always found it to be a pretty blunt tool - changes in traffic characteristics (packet size for example), compression (not much of an issue on ethernet based circuits but on serial links was widely sued at a time, though some people use traffic accelerators), etc. can allow you to saturate well under 100%, or actually show traffic well over. A plain vanilla ethernet type WAN may do better at correlating 100% with "full" though. So please report back how useful you find this, say in comparison to monitoring ping times or packet drops.

          Comment

          • aib
            Senior Member
            • Jan 2014
            • 1615

            #6
            Originally posted by ssalomon

            I keep getting an error of cannot evaluate function "last()": Object does not exist

            Any Help would be appreciated.
            First of all, the examples in Zabbix documentation describe hypothetical situation with some sort of Unix server. Because of that, interface name "eth0" was used.

            In your case, when you want to check bandwidth usage for CISCO router, you have to enter the real name of network interface instead of "eth0"

            Second, the expression which you took from documentation, calculate the proportions between Incoming traffic and total (in+out) traffic, converted to per cents. Do you really need it?

            If you need only bandwidth usage for incoming traffic, you can use some kind of formula like "edsrj" made.
            Code:
            100*last(IfHCOutOctets[GigabitEthernet1/0/21])/31457280
            or generalize it:
            Code:
            100*last([B]key_name_of_incoming_interface[/B])/[B]speed_of_incoming_interface_in_bytes[/B]
            Sincerely yours,
            Aleksey

            Comment

            • ssalomon
              Junior Member
              • Jun 2016
              • 4

              #7
              Originally posted by edsrj
              Hi ssalomon,

              After half day of work I resolved this situation with a not so "pretty" solution.

              100*last(IfHCOutOctets[GigabitEthernet1/0/21])/31457280 (my internet link bandwidth is 30Mbps)

              Hope that helps you!

              Best regards
              I believe that will suffice for what I need. It Definitely does help and I am very appreciative.. Could You post a screen shot of the calculated item you created for that?

              Comment

              • grmnrvs
                Member
                • Jun 2018
                • 35

                #8
                Originally posted by ssalomon

                I believe that will suffice for what I need. It Definitely does help and I am very appreciative.. Could You post a screen shot of the calculated item you created for that?
                Hi all!
                I need to show on my Zabbix Web Map the Bandwitdth Usage (in percent) and reading this post, i can't to show any value.

                My zabbix server is the Zabbix 4.0.0alpha8. © 2001–2018.

                Can any one of you apply this solution to new Zabbix version?
                Considering that this post is a few years ago...

                These are the macros for example to show the incoming / outgoing traffic speed.

                IN: {SW_Cisco01:net.if.in[ifHCInOctets.10121].last()}
                OUT: {SW_Cisco01:net.if.out[ifHCOutOctets.10121].last()}

                Note:
                • SW_Cisco01 is the name of my Switch.
                • 10121 is the number of the port vía SNMP. This is ethernet port number 21.

                Thanks!!!

                Comment

                • kernbug
                  Senior Member
                  • Feb 2013
                  • 330

                  #9
                  Originally posted by grmnrvs

                  IN: {SW_Cisco01:net.if.in[ifHCInOctets.10121].last()}
                  OUT: {SW_Cisco01:net.if.out[ifHCOutOctets.10121].last()}
                  Hi

                  Use calculated item key for the map. edsrj suggested working solution for calculating item:
                  Code:
                   
                   100*last(IfHCOutOctets[GigabitEthernet1/0/21])/31457280

                  Comment

                  • grmnrvs
                    Member
                    • Jun 2018
                    • 35

                    #10
                    Originally posted by kernbug

                    Hi

                    Use calculated item key for the map. edsrj suggested working solution for calculating item:
                    Code:
                    100*last(IfHCOutOctets[GigabitEthernet1/0/21])/31457280

                    Hi kernbug thanks for you response, i done it but this is the error that show me, look...
                    • Cannot evaluate function "last()": item "SW_Cisco01:[ifHCOutOctets.10121]" does not exist.

                    And this is the item key:
                    • 100*last{SW_Cisco01:net.if.out[ifHCOutOctets.10121]}/31457280



                    What do i made wrong?

                    Comment

                    • kernbug
                      Senior Member
                      • Feb 2013
                      • 330

                      #11
                      Originally posted by grmnrvs


                      Hi kernbug thanks for you response, i done it but this is the error that show me, look...
                      • Cannot evaluate function "last()": item "SW_Cisco01:[ifHCOutOctets.10121]" does not exist.

                      And this is the item key:
                      • 100*last{SW_Cisco01:net.if.out[ifHCOutOctets.10121]}/31457280



                      What do i made wrong?
                      Item "SW_Cisco01:[ifHCOutOctets.10121]" does not exist.

                      Please, take a look at Zabbix documentation to get more information https://www.zabbix.com/documentation...l/config/items.

                      You need an item corresponding to the host.

                      Comment

                      • grmnrvs
                        Member
                        • Jun 2018
                        • 35

                        #12
                        Originally posted by kernbug

                        Item "SW_Cisco01:[ifHCOutOctets.10121]" does not exist.

                        Please, take a look at Zabbix documentation to get more information https://www.zabbix.com/documentation...l/config/items.

                        You need an item corresponding to the host.


                        Thanks again kernbug and its works!!! This is the correct key value:
                        • 100*last(net.if.in[ifHCInOctets.10121])/1073741824 ​​​​​​
                        NOTE: Where 1 gigabytes = 1073741824 bytes (I use this Bit Calculator)


                        Now I would like to use this on my map, how can I show the % between the links of the switch?

                        Comment

                        • kernbug
                          Senior Member
                          • Feb 2013
                          • 330

                          #13
                          Originally posted by grmnrvs

                          Now I would like to use this on my map, how can I show the % between the links of the switch?
                          Put calculated item key on the map, detailed information: https://www.zabbix.com/documentation...ation/maps/map

                          Comment

                          • grmnrvs
                            Member
                            • Jun 2018
                            • 35

                            #14
                            Originally posted by kernbug

                            Put calculated item key on the map, detailed information: https://www.zabbix.com/documentation...ation/maps/map
                            Hi again Kernbug and thank you so much for your help, i appreciate!!

                            A question: How i can sum the total of bandwidth of my switch? Considering all diferent interfaces? I like to know the two totals, all incoming bandwidth and all outbound bandwidth.

                            To you understand, for example i would like that Zabbix on the map show:

                            The total bandwidth betwen Host A and Host B is of 12M
                            • The total Incoming used is: X%
                            • The total Outbound used is: X%
                            Where X is the sum of the all interfaces both for the incoming traffic and the outgoing traffic.

                            What is the macro what should I use?

                            Comment

                            • kernbug
                              Senior Member
                              • Feb 2013
                              • 330

                              #15
                              Originally posted by grmnrvs

                              What is the macro what should I use?
                              Hi

                              If the equipment allows to get the current total bandwidth, then it should be requested directly via the SNMP and the data item key must be used as a macro. Otherwise, you must create another calculated data element that takes into account the throughput of all ports.

                              Comment

                              Working...