RockyLinux8.8 ; Tripwire , Logwatch , disk usage check script

Tripwire

1.Install

2.Passphrase setting

Set site passphrase and local passphrase

3.Tripwire Configuration

Configuration File Edit

Create a Tripwire configuration file (cryptographically signed version)

Delete Tripwire configuration file (text version)

Policy File Settings

Contents of twpolmake.pl

Policy File Optimizations

⑥Create policy file (cryptographically signed version) based on optimized policy file

Create database and check operation

Create test files

Check Tripwire operation

Delete test files

⑧Tripwire Scheduled Scripts

Contents of tripwire.sh

Tripwire Autorun Script Execution Settings

Reference: Script for reporting results by e-mail

Execute the following command to confirm that the mail has been received

Logwatch

①Install

Edit configuration file

③Output Logwatch reports

It will appear as follows

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

Introduce disk usage check script

①  Script Creation

Contents of disk_capacity_check.sh

➁ Execution Confirmation
Check current usage rates

It appears as follows

Create a dummy file to achieve at least 80% utilization

check again

➂Run check scripts

You will receive an email to the email address you have set up, stating something like "Disk usage alert: 92 %".

④delete "dummyfile"

⑤Periodic Execution Setting

Copied title and URL