ClearOS Documentation

×

Warning

301 error for file:https://clearos.com/dokuwiki2/lib/exe/css.php?t=dokuwiki&tseed=82873f9c9a1f5784b951644363f20ef8

User Tools

Site Tools


Monitor disk space and get alerts

This guide describes how to monitor disk space and get alerted when a disk reaches a threshold. Step 1: login to your server, edit file /opt/mistio-collectd/collectd.conf and add this at the end of the file:


MountPoint "/"
ValuesPercentage true

Save and exit. This will measure the root filesystem “/” , if you need to monitor another filesystem make sure you specify it there. Example

MountPoint "/opt"

To monitor /opt. You can also specify a Device, example /dev/xvdb1

Device "/dev/xvdb1"

Step 2: restart ClearGLASS collectd root@server:~# /opt/mistio-collectd/collectd.sh restart Step 3: Enter the page for the machine on ClearGLASS, select 'add graph', then 'df' –> 'root' –> then 'percent_bytes'. Choose 'free' and wait a few seconds until the graphs appear. Step 4: You can now set a rule to get alerted. Example if “df percent root free” < 10 then alert

[image]

As soon as the disk gets filled with 90% we receive an alert email

[image]

Instead of receiving an alert we could also add a command to run (eg rm some log files we know that get the disk filled)

content/en_us/cg_monitor-disk-space-and-get-alerts.txt · Last modified: 2018/03/14 06:20 by cjones

https://clearos.com/dokuwiki2/lib/exe/indexer.php?id=content%3Aen_us%3Acg_monitor-disk-space-and-get-alerts&1544459901