Can I make my server automatically suspend if it hits the bandwidth limit?

  • Posted February 16, 2013

I’m concerned about the costs of going over the limit. Is there a way to automatically suspend my server and send me an email if it hits the monthly bandwidth limit?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Here is a script i wrote (you need vnstat and bc installed) which turns off your droplet once u hit 999 GB traffic in the current month: <br> <br>

The solution with vnstat is great (you can install it from epel-repo with yum automatically) and setup cron to send you an email on daily/weekly basis. <br> <br>Another solution is to setup some monitoring for current network bandwidth and get a notification when you hit some peak (even thought I do not suggest this solution). <br> <br>You’d better go with vnstat.

We’re going to be adding alerts in the future after we introduce stats so you’ll be able to configure that.

Install vnstat, monitor its logs and once it hits 900gb on combined transfer make it send you and email.