Ad Widget

Collapse

Summing up traffic

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alexwaller
    Junior Member
    • Dec 2006
    • 11

    #1

    Summing up traffic

    Does anyone know how to sum up traffic?
    It is nice to see the graph. But I want to have a list of data collected.
    I´m monitoring switches via snmp and I´d like to know how much traffic a single port produces per day.
    Anyone an idea?
  • sbadger
    Member
    • Dec 2005
    • 81

    #2
    I used a script out side of zabbix to sum them and then added it as a UserPrameter for Zabbix to call. On the pure SNMP host, I created a misc-scripts host that runs on the server to run the script and then just created a custom graph with the values. Here is my script to add them together:

    Code:
    sbadger@zabbix:/zabbix/scripts> cat csk-mpls-8.sh
    snmpwalk -v 1 -c #### mpls IF-MIB::ifInOctets.9 |cut -d: -f4 > /zabbix/scripts/file-9.txt
    snmpwalk -v 1 -c #### mpls IF-MIB::ifOutOctets.9 |cut -d: -f4 >> /zabbix/scripts/file-9.txt
    awk '{x=x+$1} {print x |"tail -n1"}' /zabbix/scripts/file-9.txt

    Comment

    Working...