Debian12.5 ; Logwatch , Chkrootkit , Disk Usage Check Script

Logwatch

①Install

Copy the default configuration file

Change email address, etc.

Creating Directories

⑤Confirmation of Operation
When logwatch is installed, cron is registered by default, so report mail is delivered every day.
Test if the report is delivered to the address you set.

Chkrootkit

Install chkrootkit

Check chkrootkit

Create chkrootkit periodic execution script and change permissions

Automatically creates /etc/cron.daily/chkrtootkit based on /usr/sbin/chkrootkit-daily and runs it automatically every day, so no script creation is required

Disk Usage Check Script

1. Scripting

Contents of disk_capacity_check.sh

2. Execution check

Check current usage

It appears as follows

②Create a dummy file (in the example, it is called "dummyfile" and is about 15G) 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 e-mail to the e-mail address you have set up with the body of the message as "Disk usage alert : 94%".

Delete the "dummyfile" you created.

Periodic Execution Setting

Copied title and URL