Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".(Japanese Version)

CentOS7.9 ; Logwatch , Disk usage check script

1. Logwatch


②Edit configuration file

③Output Logwatch reports

You will get the following message

④Test to see if the report arrives at the address you set.
Check if you receive a log report email like the one above.

2.Introduce disk usage check script

2.1 Script Creation

Contents of

2.2 Execution Confirmation

①Check current utilization

It appears as follows

②Create a dummy file (in the example, it is named "dummyfile" and is about 10G) so that the utilization is 80% or more.

③check again

Run it and make sure it is above 80%.

④Run disk space check script

You will receive an email to the email address you set up with the body of the message as "Disk usage alert : 87%".

⑤Delete the "dummyfile" you created.

⑥Periodic Execution Setting

Copied title and URL