Install and configure Logwatch in Ubuntu-Server

0 0
0 0

To watch the logs and send alert periodically to admin by configuring logwatch.

Install Logwatch using

# sudo apt-get install logwatch

Edit logwatch.conf file

# /usr/share/logwatch/default.conf/logwatch.conf

Change the following:

# Output = mail
# Format = html
# MailTo = user@https://https://https://https://www.https://https://https://www.https://linuxsysadmins.com/

Save and exit wq!

Edit the file 00logwatch to append the mail were we need to get the Logs

# /etc/cron.daily/00logwatch

Add the following line.

# /usr/sbin/logwatch –mailto blackyboy@github.com
# /usr/sbin/logwatch –mailto logwatcher@live.com

Save and exit.

Test the Logwatch using command

# logwatch

If we need to get log in specific time add in cronjob as below
Create a Cronjob using

crontab -e

Append the Below Content

# m h dom mon dow command
0 10 * * * /usr/sbin/logwatch

That’s it we have done with log watch configuration.

Install and configure Logwatch in Ubuntu-Server 1

About Post Author

Babin Lonston

Overall 14+ Years of experience in the IT field, currently working as a Senior Linux administration with Virtualization & Cloud. Being numismatist for a long time.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published.

Setting up a Ruby gem server to use locally Previous post Setting up a Ruby gem server to use locally
Install PROFTPD with TLS_SSL Next post Install Proftpd with TLS/SSL

Subscribe

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

We promise not to spam you, and we don't usually send more than one email a week.

You have Successfully Subscribed!