Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement bandwidth usage monitoring #94

Open
zioproto opened this issue Aug 5, 2012 · 6 comments
Open

Implement bandwidth usage monitoring #94

zioproto opened this issue Aug 5, 2012 · 6 comments

Comments

@zioproto
Copy link
Member

zioproto commented Aug 5, 2012

Hello,

instead of having an external tool like Cacti to monitor the network, it would be nice to integrate this feature in NodeShot, to have less monkey work to do when adding a new node, and have the graphs available more easily.

Here I have a proposal for how to implement this feature.
Please comment what follows, because something might be wrong.

Part 1) Collecting the data:

Bandwidth usage data in stored in RRD files.

1 RRD file is the data to describe the graph of bandwidth usage of 1 interface.

So 1 of the key point is what filename to give to RRD files, so that we can relate 1 RRD file to 1 interface in the nodeshot database.
Please note that I would avoid using the IP address as a logical connector from the Interface to the RRD file, because the address could change, or there could be no IPv4 address.
So, I need a suggestion here from who is very familiar with the nodeshot database model.

Nodeshot already have cronjobs. For example we use cronjobs to draw the current network topology.

We need a CronJob every 5 minutes where we run something similiar to this script:

https://github.com/zioproto/ninuxstats/blob/testing/main.sh

Now, for each /32 route entry in the table, starting from the IP address we should identify the interfaces in the database of nodeshot, and probe data to update the RRD file.

Part 2) Rendering the data:

When we click on 1 link now we have a small baloon that display ETX and dBM. The baloon should be bigger or have a second tab, and we shuold display here 2 graphs. Because the link is from interface A to interface B we should display always two graphs.
The two graphs will be identical but with IN/OUT inverted in case of point to point link.
Where we have a AP with several STA the two graphs will be more interesting, because on the STA side we see just the graph of the link, and on the AP side we see the aggregate interfering graph of the AP interface.

Once we have a RRD file with a name that identifies a single interface in the DB it would not be hard to render the graph.

Please look at this:
https://github.com/zioproto/ninuxstats/blob/testing/genera.php
https://github.com/zioproto/ninuxstats/blob/testing/genera.sh

@G10h4ck
Copy link
Member

G10h4ck commented Aug 5, 2012

It seems a good idea, but i think we should to use just one connection to the node to gather all data
we have already a script to take dbm on openwrt nodes via ssh, adding bandwidth stuff should be easy

@zioproto
Copy link
Member Author

zioproto commented Aug 5, 2012

Please share the script :) Put here the link to your git repository :)

@G10h4ck
Copy link
Member

G10h4ck commented Aug 5, 2012

@nemesifier
Copy link
Member

@OrazioPirataDelloSpazio last year did something with RDD, but I commented out all the view because I couldn't make it with the time I had, then I forgot about it. Now that you brought it up again It came into my mind.

Checkout this file: https://github.com/ninuxorg/nodeshot/blob/master/nodeshot/views.py
Look for "generate_rrd".

Maybe @OrazioPirataDelloSpazio might be able to tell us what he was trying to do.

@lorenzobracciale
Copy link
Member

Boyz,
the rrd script are pretty easy and almost already done. (Nino is
collecting stats since one year and already got scripts to create png
from RRD).

One year ago I tried this js library:

http://javascriptrrd.sourceforge.net/

but maybe the classical png could be the the easier and most robust
solution.

Not too much to code imho. Where do you suggest to put the graphs?

@ninnux
Copy link
Member

ninnux commented Apr 3, 2013

I wrote a new version of ninuxstats (branch solole10) https://github.com/ninnux/ninuxstats that collect statistics for all node interfaces.
You can try new and old implementation here: 176.62.53.7/genera.php?ip=<172.x.x.x> or 176.62.53.7/genera2.php?ip=<10.x.x.x>_. Two example uri are: http://176.62.53.7/genera.php?ip=172.16.200.67 or http://176.62.53.7/genera2.php?ip=10.162.0.225_ath0.
We have to make an extra effort on nodshot information system integration or olsr integration for better statistic full automation fetching process:
AirOS does'nt support v2c snmp version, so mib are very poor. It's impossible to indentify different ip addresses of the same node using snmp information only.
The are two dfferent ways to have this information:

  • get it from one of olsr info plugins
  • get it from nodeshot db
    There are some known issues... like reboot spike problem
    I think that adding a simple link on every interface on current production version of nodeshot that points on ninuxstats script is feasible.
    Bella
    Nino

@nemesifier nemesifier added this to the Next point release milestone May 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants