0

Hello

I have a dedicated system for monitoring connected to the network in all remote offices. Our main/nagios server have connection to all. I want to get the bidirectional Bandwidth measurement between the dedicated system and nagios server. Connection should be made with snmp. But without snmp traps and NPRE.

Which tool is recommend for this job? I dont need a graphical output itself since the collected data of bandwidth should be send to muniin for further processing and graphical output. Thank you in advance!

2 Answers2

0

You can use the nagios plugins which contain the script check_netint. This script will calculate the bandwith of an interface from the datas stored in the MIB of your router with SNMP.

Sorcha
  • 1,345
0

I don't think you can easily get bandwidth usage just between two devices very easily via SNMP. You can however use SNMP get the total bandwidth utilized on the NIC or network port.

I don't think there is an OID for bi-directional bandwidth, at least on cisco devices. But there are OIDs for tx and rx. Write a script that checks snmp for those oids (you can call the existing nagios plugin even) and have the script add the two values together and then output the total. Not sure there's an easier way unless your mini computer has a built-in SNMP client for this. If you can write scripts writing nagios plugins are rather trivial and there is lots of documentation on how to do it. Learning how to create you're own plugins is a powerful skillet to have.

Another option may be to utilize some network tools like tcpdump on the main nagios server. x.x.x.x will be the remote mini-computer.

tcpdmp -ietho0 host x.x.x.x > file

then parse said output which should have a bunch of lines like:

 IP 172.17.17.17.ssh > 172.17.17.18.5878: Flags [P.], seq 952944:953232, ack 3521, win 283, length 288

count the size of each packet (length 288) , return the sum in a plugin. It won't be 100% accurate since it'll include IP/Protocol headers and such. But should serve your purpose.

Useful links:

https://supportforums.cisco.com/discussion/11018931/need-oid-rxload-and-input-rate http://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/8141-calculate-bandwidth-snmp.html

Writting plugins:

https://exchange.nagios.org/directory/Tutorials/Other-Tutorials-And-HOWTOs/How-To-Create-a-Nagios-Plugin-Using-Bash-Script/details

person
  • 397