This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Disk space alerts [Linux]
#1
Disk space alerts [Linux]
For another project I recently had to implement a warning system to alert when a server was close to reaching a defined threshold of disk space. The script I wrote is for Linux servers and can be found at https://github.com/KevinFairbanks/diskMonkey

To implement on your server upload diskMonkey to a spot on your server, for me I have a directory in my root user home directory called scripts. 

Add execute permissions to the file:
Code:
chmod +x diskMonkey

Add the script to your crontab:
Code:
crontab -e
I set mine to run every 5 minutes
Code:
*/5 * * * * /root/scripts/diskMonkey

Options:
At the top of the diskMonkey file you will find 3 options to control the script

ADMIN - where the notifications go can be local user ie root or remote email address ie you@yourdomain.tld

ALERT - the level at which you want alerts to appear, anything over this level will be notified

EXCLUDE_LIST - any partitions you wish to ignore
Reply
Thanks given by: TGates , datatab , Diablo925 , bbspike , Me.B


Possibly Related Threads…
Thread Author Replies Views Last Post
access your linux disks with windows using SSH as shares Me.B 4 12 ,621 12-23-2015, 04:41 AM
Last Post: liamgreen
{Ask} How to setting maxclients apache in linux centos 7 mbahngawean 4 16 ,148 05-29-2015, 04:47 AM
Last Post: mbahngawean

Forum Jump:


Users browsing this thread: 1 Guest(s)