Views: 1687
After success installing Zabbix as a network monitoring tools few months ago, today I want to monitor servers, routers, firewall and mostly using FreeBSD 10.2 through snmp. I choose net-snmp instead of bsnmp because I’m not familiar with bsnmp (not a technical reason).
As far I know, Net-SNMP Counter64 is not enable by default on FreeBSD and We can enable SNMP Counter64 on FreeBSD through the source package. Using Counter32 has limitation to graph any network resource larger than 400Mbps, the graph will be empty like the picture below:
After read the net-snmp configuration option and do some search on the net, I found that we can recompile and reinstall the net-snmp through source on FreeBSD. Here we go:
$ cd /usr/ports/net-mgmt/net-snmp && make -DWITH_MFD_REWRITES $ sudo make deinstall (if you have the old one installed) $ sudo make install $ sudo /usr/local/etc/rc.d/snmpd restart
After do the installation above we will able to do Counter64 query:
snmpwalk -c mycommunity -v2c 10.0.0.1 ifHCInOctets snmpwalk -c mycommunity -v2c 10.0.0.1 ifHCOutOctets
And here is the results, please keep in mind that it’s may be different with yours.
IF-MIB::ifHCInOctets.1 = Counter64: 6491401411748
IF-MIB::ifHCInOctets.2 = Counter64: 1712228363278
IF-MIB::ifHCInOctets.3 = Counter64: 6200531860
IF-MIB::ifHCInOctets.4 = Counter64: 111370708651954
IF-MIB::ifHCInOctets.5 = Counter64: 0
IF-MIB::ifHCInOctets.6 = Counter64: 4376680
IF-MIB::ifHCInOctets.7 = Counter64: 5268929
IF-MIB::ifHCInOctets.8 = Counter64: 6063992840
IF-MIB::ifHCInOctets.9 = Counter64: 1718597976238
IF-MIB::ifHCInOctets.10 = Counter64: 763894701
IF-MIB::ifHCInOctets.11 = Counter64: 34591861793
IF-MIB::ifHCInOctets.12 = Counter64: 0
IF-MIB::ifHCInOctets.13 = Counter64: 460240465263
IF-MIB::ifHCInOctets.14 = Counter64: 101043662090571
IF-MIB::ifHCInOctets.15 = Counter64: 134292765
IF-MIB::ifHCInOctets.16 = Counter64: 657470711
IF-MIB::ifHCInOctets.17 = Counter64: 8059638215384
IF-MIB::ifHCInOctets.18 = Counter64: 1643512269
IF-MIB::ifHCInOctets.19 = Counter64: 0
IF-MIB::ifHCInOctets.20 = Counter64: 0
IF-MIB::ifHCInOctets.21 = Counter64: 50771981619
IF-MIB::ifHCInOctets.23 = Counter64: 108465254
IF-MIB::ifHCInOctets.24 = Counter64: 1377725912172
IF-MIB::ifHCOutOctets.1 = Counter64: 108153054488683
IF-MIB::ifHCOutOctets.2 = Counter64: 3380150834773
IF-MIB::ifHCOutOctets.3 = Counter64: 6713347406
IF-MIB::ifHCOutOctets.4 = Counter64: 8056286109260
IF-MIB::ifHCOutOctets.5 = Counter64: 0
IF-MIB::ifHCOutOctets.6 = Counter64: 4376680
IF-MIB::ifHCOutOctets.7 = Counter64: 5268929
IF-MIB::ifHCOutOctets.8 = Counter64: 5951226955
IF-MIB::ifHCOutOctets.9 = Counter64: 738940554803
IF-MIB::ifHCOutOctets.10 = Counter64: 833548595
IF-MIB::ifHCOutOctets.11 = Counter64: 79986925858
IF-MIB::ifHCOutOctets.12 = Counter64: 0
IF-MIB::ifHCOutOctets.13 = Counter64: 89544062648
IF-MIB::ifHCOutOctets.14 = Counter64: 2727745719470
IF-MIB::ifHCOutOctets.15 = Counter64: 29072
IF-MIB::ifHCOutOctets.16 = Counter64: 686475498
IF-MIB::ifHCOutOctets.17 = Counter64: 4365434777002
IF-MIB::ifHCOutOctets.18 = Counter64: 2740026273
IF-MIB::ifHCOutOctets.19 = Counter64: 0
IF-MIB::ifHCOutOctets.20 = Counter64: 0
IF-MIB::ifHCOutOctets.21 = Counter64: 50373223076
IF-MIB::ifHCOutOctets.23 = Counter64: 762120451
IF-MIB::ifHCOutOctets.24 = Counter64: 2826686858991
Hope this help, thanks to the net!