Ad Widget

Collapse

Total network utilisation regardless of number of interfaces

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Makihiko
    Junior Member
    • Oct 2010
    • 10

    #1

    Total network utilisation regardless of number of interfaces

    We need to monitor the total incoming/outgoing Mb/s on all our servers in our web dashboard that pulls from the Zabbix API.

    However most servers have multiple interfaces, eth0, eth1, em1. Therefor we've created a discovery rule with item prototypes (net.if.total[{#IFNAME},bytes]) which obviously generates an item per interface.

    However we need the total across all interfaces but we can't figure out how to do this other than by manually creating a calculated item and include the individual items for each interface for each server. We're adding dozens of servers per day and don't want to have to manually create items.

    Can anyone help point us in the right direction?
  • eskytthe
    Senior Member
    Zabbix Certified Specialist
    • May 2011
    • 363

    #2
    Aggregated checks?

    BR
    Erik

    Comment

    • Makihiko
      Junior Member
      • Oct 2010
      • 10

      #3
      Thanks Erik. Aggregate checks are for calculated for a host group right? We want an item for each server that represents the total network traffic across all interfaces. I thought originally that I could use a calculated item with sum(net.if.total[,bytes]) or similar and that would include all interfaces but it doesn't work.

      Comment

      • eskytthe
        Senior Member
        Zabbix Certified Specialist
        • May 2011
        • 363

        #4
        Sorry Makihiko, yes aggregated checks is for host groups - I did misunderstand you.

        Maybe you can do some API programming to dynamic creating the calculated items ...
        BR
        Erik

        Comment

        • aib
          Senior Member
          • Jan 2014
          • 1615

          #5
          I found one puzzling way to get total information about traffic on all interfaces.

          1) Correct the configuration of Zabbix agent on client's PC (add localhost to list of authorized servers.
          Code:
          Server=[B]localhost,[/B]{IP_ADDRESS_OF_ZABBIX_SERVER}
          2) Add one more UserParameter:
          UserParameter=net.if.total,ifconfig -a | grep "Link encap" | awk '{system("zabbix_get -s localhost -k net.if.total["$1"]");}' | awk '{SUM += $1} END {print SUM}'

          3) Restart Zabbix_Agent

          4) Add Item on zabbix_server in description of client's PC
          Name: {hostname of client's PC}
          ......
          Key: net.if.total

          After that you can use this Item in triggers, graphs, etc.

          Sorry, this line for UserParameter was checked under CentOS only. For Windows PC it has to be corrected. At least you have an idea how to do it, right?
          Sincerely yours,
          Aleksey

          Comment

          Working...