Everything about Web and Network Monitoring

Home > Network Monitoring > Bandwidth monitoring with ntop & Monitis

Bandwidth monitoring with ntop & Monitis

ntop bandwidth monitor


ntop is a very simple yet powerful bandwidth monitor which outputs various statistics counters in RRD.
RRD – Round Robin Database – is a very handy framework for saving server performance counters in a ring buffer.
We can say that if we would like to graph network performance, ntop does most of the hard work for us and all we have left to do is to graph the counters.
Among the counters ntop exposes there are:

  • Total bytes per interface
  • Total HTTP, DHCP, DNS, NetBIOS bytes per interface
  • Interface throughput
  • IGMP, ARP statistics

And speaking of graphing, we have Monitis, which can graph any counter we can think of. I have an idea – lets graph ntop data with Monitis!

Yet another foreword about M3

M3 easily parses output from anywhere around your system and uploads it to Monitis. Monitis is a very vast and comprehensive hosted monitoring platform and so is the API.
M3 offers you an easy way to integrate with the powerful Monitis, enabling you to easily compose tests which can be graphed in Monitis.
The READMEs of M3 have just been updated recently.
We’ll use M3 in order to load ntop’s data into Monitis.
Please check out Monitis-Linux-Scripts (which contains M3) at /usr/share/monitisexchange/Monitis-Linux-Scripts/M3:

 # mkdir -p /usr/share/monitisexchange && cd /usr/share/monitisexchange # git clone git://github.com/monitisexchange/Monitis-Linux-Scripts.git # cd Monitis-Linux-Scripts/M3 

Integrating with Monitis

Integration of ntop and Monitis is yet again too simple. Why? – because we can make use of M3.
For your inconvenience we’ve created a sample configuration file for the integration of ntop and Monitis.
In order to run ntop it is recommended to be root:

 # ntop -i wlan0 

Or:

 # ntop -i eth0 

The sample configuration would operate on wlan0, but you could easily change it to eth0 if need be.
What we are going to simply do is extract the last measurement counter from ntop’s RRD files, the time stamp of the check – and upload it to Monitis.
It’s all too easy with M3 and the configuration file is self explanatory.
If it isn’t, however, please let me know!
Invocation of M3 should be as follows:

 # cd /usr/share/monitisexchange && cd /usr/share/monitisexchange/Monitis-Linux-Scripts/M3 # ./AddMonitors.pl ntop/ntop.xml # ./TimerRun.pl ntop/ntop.xml 

Bandwidth monitoring in Monitis

The end result is pretty neat.
One of the monitors will show you how much HTTP out of your whole traffic is actually being used. Same can be easily done for DNS, DHCP, NetBIOS and more.
You could easily add some other counters which interest you. ntop is very powerful and as you’ve seen the integration is all too simple just as well.
I like the end result:

With M3 and Monitis anything can be monitored. Follow us on github and twitter.

About Dan Fruehauf