Jump to content

Monitor


Recommended Posts

Hi guys !

I developed another module for the MK4 to monitor interfaces usage, especially for 3G. It is based on vnstat to capture data and vnstati to display graphs.

Module is available through module system.

Screenshot

68498dd28a0b68ddc48a998e3444f06157ecfa49b414d024c0e56428c9bba42b4g.jpg

Edited by Whistle Master
Link to comment
Share on other sites

Looks great man! Can't wait to try it out. To me, taking this a step further would be to integrate email alerts for set thresholds - what are you thoughts on that WM?

telot

Edited by telot
Link to comment
Share on other sites

Looks great man! Can't wait to try it out. To me, taking this a step further would be to integrate email alerts for set thresholds - what are you thoughts on that WM?

telot

I was thinking If we are wanting an alerting system, whether it's through e-mail/tailing a log/some other, It might be a good idea to have one of the devs or us to build that into the logger program in the pineapple

could even make a switch that states the urgency and importance of what is getting logged? good idea or no

I just was thinking have logger do all the work of sending the logs however the person set it to say through the UI.

Link to comment
Share on other sites

Looks great man! Can't wait to try it out. To me, taking this a step further would be to integrate email alerts for set thresholds - what are you thoughts on that WM?

telot

With vnstat, all data can be easily extracted and therefore it should be possible to set some limits warnings, etc.

I keep the idea and will see how to integrate it ;)

First version has just been sent to Seb ! Please report all bugs here.

Link to comment
Share on other sites

New version is out: v1.2 !

Add the option to persist db on USB. Without persistence, the statistics are cleared at each reboot.

Schweeeeeeeet!

Thanks as always WM!

telot

Link to comment
Share on other sites

...if you're this good with making these mods, I'd just love to hear you whistle, man.

thanx for sharing your work, WM. Hopefully one day I can contribute something other than my patronage @ the hakShop.

Link to comment
Share on other sites

...if you're this good with making these mods, I'd just love to hear you whistle, man.

thanx for sharing your work, WM. Hopefully one day I can contribute something other than my patronage @ the hakShop.

I will soon write up a very detailed guide on how to create modules.

What they can do and what they can't etc.

Best,

Sebkinne

Link to comment
Share on other sites

New version is out: v1.2 !

Add the option to persist db on USB. Without persistence, the statistics are cleared at each reboot.

WM I found a bug where I had added this to the cron tab "1 * * * * php /www/pineapple/dnsspoof/startdnsspoof.php" and I did not add a return so when I pressed the add to cron it looked like

"1 * * * * php /www/pineapple/dnsspoof/startdnsspoof.php*/5 * * * * vnstat -u"

also I don't see any data other than 0's. where is my bandwidth?

Edited by petertfm
Link to comment
Share on other sites

Thanks for the report ! I'll correct this bug. Fixed in v1.2.1

Regarding the data, can you juste copy paste the output given by the vnstat command on your pineapple ?

ok so from a fresh install of 1.1.1mk4 and ICS in windows 7 working as well as using the internet on my phone before and while monitoring.

all the data for all the interfaces is 0 Kib, sorry pasting the output is not working for me.

Link to comment
Share on other sites

Does the vnstat command work ? Do you see any output ?

Can you post the result of the following commands:

which vnstat && which vnstati
ls -la /var/lib/
ls -la /var/lib/vnstat/

Let run the pineapple for a few minutes (at least 5min) and have a look in the Log to see if you have some lines like:

Jan  1 00:50:01 Pineapple cron.info crond[4645]: crond: USER root pid 4698 cmd vnstat -u

Then, ssh into the pineapple and issue the following command to start a download:

wget ftp://ftp.halifax.rwth-aachen.de/opensuse/distribution/11.3/iso/openSUSE-11.3-DVD-i586.iso -O /dev/null

Let it run to download a few MBs and return to see if you have some data.

The module doesn't give you any information right after the installation. Cron has to run and update the database to display some stuff.

Link to comment
Share on other sites

ok using my newly flashed second mk4"different one" with 1.1.1 and ics in windows 7, no usb plugged in too

WM I get this

root@Pineapple:~# which vnstat && which vnstati
/usr/bin/vnstat
/usr/bin/vnstati
root@Pineapple:~# ls -la /var/lib/
ls: /var/lib/: No such file or directory
root@Pineapple:~# ls -la /var/lib/vnstat/
ls: /var/lib/vnstat/: No such file or directory
root@Pineapple:~#
root@Pineapple:~#

at this point I connected to pineapple with my phone and browsing.

ok so did the wget command and looked at the stats on the module again and all 0s?

now at 1% I stopped the wget and looked at the stats again and there is data. weird? it shows 30MB in eth0 and I stopped the wget at 45MB

everything is showing data except lo and eth1

this must of started about 10 minutes uptime

Edited by petertfm
Link to comment
Share on other sites

Sorry I should have say to run the commands after having been a first time on the module page. Can you run again the commands and post the results? Thanks!

I will try if I get the time, I did set it to persistent and rebooted? also I did check it after some downloading but for at least 5 minutes there was no data

I also did a few refreshes. still did not display until about 10 minutes uptime.

Link to comment
Share on other sites

  • 1 year later...

*Looks at screenshot of script*

...

...

...

Yes yes, excellent script.

In all honesty I'm not sure what this monitors, but maybe someone who can use it will appreciate it.
Thanks for the contribution :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...