Using the help of the vnstat program to monitor interfaces this program takes that further and builds upon the output from vnstat which allows you to define an alert program which emails you when you are getting close to your monthly limit.
** Features
** Requirements
** Installation
On a Linux system
Install vnstat : sudo apt-get install vnstat
Clone vnstat-alert : git clone git clone https://github.com/map7/vnstat-alert.git
Copy to daily jobs : cp vnstat-alert/vnstat-alert.rb /etc/cron.daily : chmod +x /etc/cron.daily/vnstat-alert.rb
Look at the sample config file and copy it to /etc : sudo cp vnstat-alert.json.sample /etc/vnstat-alert.json
** Basic Usage
Check your settings in your /etc/vnstat-alert.json file
Test manually : ./vnstat-alert.rb
** Run tests
All the tests are written in rspec simply run rspec from the projects base directory : rspec
** Schedule
Use cron to schedule, I just do it daily and let it annoy me. : cp vnstat-alert.rb /etc/cron.daily/vnstat-alert
(BSD /etc/periodic/daily/600.vnstat-alert)