Open zioproto opened 12 years ago
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
Please share the script :) Put here the link to your git repository :)
@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.
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?
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>_
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