S
S
Stanislav Valsinats2020-01-22 09:06:36
linux
Stanislav Valsinats, 2020-01-22 09:06:36

How to set up a notification about the lack of free space by mail on linux?

Good afternoon. Tell me:
I created a VM, ubuntu, LVM with a hope for expansion, while I was driving in the test, I ran out of space, the web muzzle disappeared, LVM refused to expand, there was 0 space.
In the current realities, it was easier to create a VM from 0 and continue testing. Tell me - is there any tool besides zabbix and SNMP (implementing it is more expensive for now), which can simply monitor the free space, and upon reaching, let's say 80% on the section, write a letter or signal in another way? to react in time?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Ruslan Fedoseev, 2020-01-22
@jesterOK

monit e.g.
Anyway you are talking about monitoring task

V
Vitaly Karasik, 2020-01-22
@vitaly_il1

by zabbix and SNMP

two options -
1) zabbix and the like. There are those that are easier.
2) a script in a crontab, as written above
Or - look at the disk space now and in an hour (day), understand what the space is eating, and 1) estimate what will happen in a week, 2) activate log rotation, and other cleaning crons / archiving

P
pfg21, 2020-01-22
@pfg21

write a script using df to put in cron.

V
Valdemar Smorman, 2020-01-22
@smorman

If you know the places on the FS of your VM where something accumulates, then you can simply make a script that, according to the schedule (a job in cron), will clean this place. Like once an hour...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question