Logwatch is a powerful and versatile log parser and analyzer

Step1. Install the package

yum -y install logwatch

Step2. Configuring the Logwatch

vi /usr/share/logwatch/default.conf/logwatch.conf

MailTo = root
 Example: MailTo = admin@mydomain.com
     The e-mail address from which these reports originate:
 MailFrom = Logwatch
     Example: MailFrom = admin@mydomain.com
 Setting the range for the reports:
 Range = yesterday
     Example: Range = Today
 Setting the reports’ detail:
 Detail = Low
 Options are: Low, Medium and High.
     Example: Detail = Medium
 Setting services (applications) to be analysed:
 Service = All
      (e.g. Service = [name])

Step3. Test the logwatch

logwatch

Step4. Run the logwatch manually

logwatch --detail Low --mailto  email@address --service http --range today
logwatch

LEAVE A REPLY

Please enter your comment!
Please enter your name here