Report this

What is the reason for this report?

Email notifications for server resources

Posted on October 20, 2013
p

By p

I’ve got a centOS/nginx droplet running many WordPress sites. I can use command line tools to see my resources like RAM, CPU, disk space but I am wondering if there’s a way or a tool that’d alert me via email or text if they hit an upper limit, like 80% or 90%?

Thanks all.



This textbox defaults to using Markdown to format your 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.

Apologies for jumping in here. <br> <br>@yoavz.z - what exactly is ‘load’ and presumably there is a command to view the current load in Linux? <br> <br>Thanks.

Hi, <br> <br>I suggest you monitor load rather than cpu usage, it gives you the overall state of the machine… <br>You can create your own script to notify you in cases that high loads occur: <br> <br>#!/bin/bash <br> <br>mail=“mail@example.com” <br>maxload=“10” <br>hn=hostname <br>load=w | head -n1 | awk '{print$10}' | cut -d"," -f1 <br> <br>if [ $load -gt $maxload ]; then <br> echo “Oh no, system load higher than $maxload detected…” <br> echo “Alerting $mail” <br> echo “$hn High Load Found.” | mail -s “$hn High Load Found.” – $mail <br>else <br> echo “OK” <br>fi <br>

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.