Click here for "Error Codes for Commercial Air Conditioners".

OracleLinux8.6 : Logwatch , DNS update ・disk usage check script

1. Logwatch


②Editing Configuration Files

③Output Logwatch reports

④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.Automatic DNS update script

Whenever the global IP changes, which happens when the network is disconnected or the router is disconnected and rebooted, we need to access Dynamic DNS to inform the user that the global IP has changed. We will install a script that will do this automatically.
This time, we assume that you will use Value Domain as your DNS service.

①Shell script for updating

Set DOMAINNAME= , PASSWORD= , HOSTNAME= to update a specific host such as, HOSTNAME=login.

Content ""

②Automatic Renewal Settings
Add the script to the crontab so that it is updated periodically

3.Disk Usage Check Script

3.1 script

Contents of

3.2 Execution check

①Check current utilization

It appears as follows

②Create a dummy file to have at least 80% utilization (in the example, it is named "dummyfile" and is about 9G).

Confirmation that it is above 80%.

④Run 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 : 91%".

⑤Delete the "dummyfile" you created.

⑥Periodic Execution Setting