Zabbix powerful, have to mention. The planned use of its own calculate function to summarize the Host_group network card traffic, as follows:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/11/wKiom1cR0qKTli4AAAA7i_AjmqQ309.png "title=" Qq20160416134950.png "alt=" Wkiom1cr0qktli4aaaa7i_ajmqq309.png "/>
But the results of data acquisition and the actual difference is very large (not generally large, very outrageous), so only through the script to obtain, the script is as follows:
#/bin/bash#descript:calculate group trafficqzqm_list= "192.168.1.101 192.168.1.102" jsqm_list= " 172.16.100.101 172.16.100.102 172.16.100.103 "Function get_data () { traffic=0 trac_dire=$1 for host in $host _list do# echo $host case $trac _dire in inband) command= "/sbin/zabbix_get -s $host -k net.if.in[\" ${host}\ "]" ;; outband) command= "/sbin/zabbix_get -s $host -k net.if.out[\ "${host}\" " ;; *) echo "Destination errot" exit 5 esac# echo $command trac=$ (eval $command) # echo $trac traffic=$[traffic+trac] done echo $traffic}group=$1direct=$2case $group in fujian) host_list= $qzqm _list get_data $direct ;;     JIANGSU) host_list= $jsqm _list get_data $direct ;; *) echo "please check Host group and directory " exit 4esac
or through the Zabbix_get tool to obtain the host traffic, and then perform the calculation, the results are as follows:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7F/11/wKiom1cR1R6wHWsPAAAnIsAVPLQ427.png "title=" Picture 3.png "alt=" Wkiom1cr1r6whwspaaanisavplq427.png "/>
And the traffic that each host gets to calculate again is still relatively close.
If a friend knows, how to use the Calculate method to accurately summarize the traffic, but also hope message guidance.
This article from the "11414123" blog, reproduced please contact the author!
Zabbix Traffic Summary Script