checking filesystem free space

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

checking filesystem free space

Maurizio Marini
Hello
I would check against free space, not against used one.
EG, consider this scenario;
df -h | grep opt
/dev/mapper/centos-opt   313G  290G  7.9G  98% /opt

for this server monit  is reporting 92% used, but I have only 2% free.
I would receive an alarm when free space is under a certain  treshold.
Under 5% it should send alarm., for example.
How can I get it?
Best regards

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: checking filesystem free space

Szépe Viktor
Idézem/Quoting Maurizio Marini <[hidden email]>:

> Hello
> I would check against free space, not against used one.
> EG, consider this scenario;
> df -h | grep opt
> /dev/mapper/centos-opt   313G  290G  7.9G  98% /opt
>
> for this server monit  is reporting 92% used, but I have only 2% free.
> I would receive an alarm when free space is under a certain  treshold.
> Under 5% it should send alarm., for example.
> How can I get it?
> Best regards

This is how
https://mmonit.com/monit/documentation/monit.html#Filesystem
All the best!


SZÉPE Viktor, honlap üzemeltetés / Running your application
https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md
--
ügyelet/hotline: +36-20-4242498  [hidden email]  skype: szepe.viktor
Budapest, III. kerület






--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: checking filesystem free space

Lutz Mader
In reply to this post by Maurizio Marini
Hello Maurizio Marini,

> Hello
> I would check against free space, not against used one.
> EG, consider this scenario;
> df -h | grep opt
> /dev/mapper/centos-opt   313G  290G  7.9G  98% /opt
>
> for this server monit  is reporting 92% used, but I have only 2% free.
> I would receive an alarm when free space is under a certain  treshold.
> Under 5% it should send alarm., for example.
> How can I get it?
> Best regards

For some hints and tips, see
https://mmonit.com/monit/documentation/monit.html#SPACE-USAGE-TEST

Something like this works well
  if space free < 5% for 5 times within 15 cycles then alert
or
  if space usage > 80% for 5 times within 15 cycles then alert

With regards,
Lutz


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: checking filesystem free space

Maurizio Marini
No, if you check with free space, you end with a disk full and monit sees 10% free

Il mar 2 ott 2018, 14:07 Lutz Mader <[hidden email]> ha scritto:
Hello Maurizio Marini,

> Hello
> I would check against free space, not against used one.
> EG, consider this scenario;
> df -h | grep opt
> /dev/mapper/centos-opt   313G  290G  7.9G  98% /opt
>
> for this server monit  is reporting 92% used, but I have only 2% free.
> I would receive an alarm when free space is under a certain  treshold.
> Under 5% it should send alarm., for example.
> How can I get it?
> Best regards

For some hints and tips, see
https://mmonit.com/monit/documentation/monit.html#SPACE-USAGE-TEST

Something like this works well
  if space free < 5% for 5 times within 15 cycles then alert
or
  if space usage > 80% for 5 times within 15 cycles then alert

With regards,
Lutz


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: checking filesystem free space

Lutz Mader
Hello Maurizio Marini,
nice to know.

> No, if you check with free space, you end with a disk full and monit sees
> 10% free

In general I use "if space usage" and I start monit in a user context
not in the root/system context. But the "if space usage" works well, for me.

With regards,
Lutz


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general