On 24/08/2023 04:46, Ian Hobson via BitFolk Users wrote:
Hi All,
My VPS normally has 45% to 50% disk space free. (7GB)
This morning I find that it ran out of disk space on 22nd, and this
stopped email alerts getting to me, stopped all the websites from
working. All my clients were emailing to ask what was wrong, and those
emails were not getting through either. :(
I do have fail2ban set up, and uptime robot is checking the websites are
up.
How can I set up something to alert me of this problem before it becomes
critical? Say disk space used over 75%.
The Bitfolk monitoring system (Icinga) should be able to inform you
before it's too late:
https://tools.bitfolk.com/wiki/Monitoring
It's compatible with Nagios plugins so you could configure disk space
checks using either the Linux NRPE agent or using Icinga itself as the
local agent. You configure a disk space check with warning and critical
thresholds on your side and have Bitfolk make the NRPE request from
their end. They just need to know the name of the command to call.
On your end, the NRPE config line might look like:
command[check_disks]=/usr/lib/nagios/plugins/check_disk -w 25% -c 10% -W
25% -K 10% -A -L -i udev -i tmpfs -i none
This would set warning thresholds at 15% remaining and critical at 10%
remaining for both disk space and inodes, checking space and inodes on
all local filesystems, ensuring remote filesystems are at least
accessible and ignoring filesystems of the type udev, tmpfs and none.
There are probably other filesystem types you might need to ignore these
days too.
At the Bitfolk end, they just need to know the command name to call over
NRPE (check_disks in the example above).
Looking at the Bitfolk docs, default notifications are by email, but you
can pay for a third party email to SMS service, or use some push
notification service. I see someone has Pushover and I've used
Pushbullet myself.
Regards,
Adam Sweet