Announcement

Collapse
No announcement yet.

Calculate 1 hour bandwith on interface

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Calculate 1 hour bandwith on interface

    Hi

    I want to calculate item that mesute total amount of Gb transferred through interface

    I created an item last("net.if.in[{$IF1},bytes]",3600) whitch should store value from 1 hour of traffic on interface and also make another item which subtract this value from current total value, but it seams don't working.

    Could You help me? Because I dont't have any ideas how to do it.


    Best Regards
    Matthew

    #2
    You don't need to calculate this.
    Every full our each numeric metric has calculated trends point stored in trends (float) or trends_uint (integer) tables and each of those point consist fron three values: min, max and avg all values in last hour.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment


      #3
      If you're looking for the total bandwidth over one hour you have two basic codes.
      1) take the average bps over a one hour period and multiply it by 3600 (1 hour) or
      2) create a new item for the interface in question and have it collect once per hour and set it to perform a simple delta

      The first will not be accurate but an under approximation. The second will overall be the most accurate, but might suffer from time jitter making your data period more than one hour, though often only a few seconds.
      RHCE, author of zbxapi
      Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
      Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

      Comment


        #4
        Thanks for respond I find out where I made a mistake when I was creating an item

        In manual on zabbix website there is information last (sec|#num,<time_shift>) an it says that parameter sec is ignored but it's not, You need to write there something so I added another comma to my calculation an now it's look like this "last("net.if.in[{$IF1},bytes]")-last("net.if.in[{$IF1},bytes]",,1h)" and work perfect.


        I someone will have similar problem try to add another comma


        Best regards
        Matthew

        Comment


          #5
          You are awesome ..!!

          Hi cosmo222,

          I need the same solution to get monthly bandwidth utilization to bill our client, could you please share step by step process to get the total bandwidth month-wise ??

          Comment

          Working...
          X