Hi all,
The log files help us to get information about the activities taking place on a server. The Logwatch is a management tool for analyzing and reporting on a server’s log files. It can be used to send information to the system administrator about the log activity as mentioned earlier.
What are log files? Logs are application-generated files useful for tracking down and understanding what has happened in the past.
Step 1: Install Logwatch
As a matter of best practice we’ll update our packages:yum -y update
Then let’s install Logwatch and any required packages:yum -y install logwatch
Step 2: Configuration File Locations
Local Configuration Options can be found in:/etc/logwatch/conf/logwatch.conf
Default Configuration Options can be found in:/usr/share/logwatch/default.conf/logwatch.conf
It is best practice to leave the Default Configuration as is, and edit the Local Configuration option, which is under /etc as listed above.
Step 3: Configuring Logwatch
- The e-mail address to which daily digest (reports) should be sent:
MailTo = root
Replace root with your email address required.
Example: MailTo = admin@nixlinux.com - The e-mail address from which reports originate:
MailFrom = Logwatch
You might wish to replace Logwatch with your own again.
Example: MailFrom = admin@nixlinux.com - Setting the range for the reports:
Range = yesterday
You have options of receiving reports for All (all available since the beginning), Today (just today) or Yesterday (just yesterday).
Example: Range = Today - Setting the reports’ detail:
Detail = Low
You can modify the reports’ detail here. Options are: Low, Medium and High.
Example: Detail = Medium - Setting services (applications) to be analysed:
By default, Logwatch covers a really wide range of services. If you would like to see a full list, you can query the contents of the file scripts/services located at /usr/share/logwatch/.
Example: ls -l /usr/share/logwatch/scripts/servicesService = All
You can choose to receive reports for all services or some specific ones.
For all services, keep the line as: Service = All
If you wish to receive reports for specific ones, modify it similar to the following example, listing each service on a new line (e.g. Service = [name]).
Example:Service = sendmail Service = http Service = identd Service = sshd2 Service = sudo ..
- Disabling daily reports:
#DailyReport = No
If you do not wish to have daily repots generated, you should uncomment this line.
Example: DailyReport = No instead of # DailyReport = No
That’s all, now you will be able to receive daily reports based on log files from your server automatically.
Good day! I could have sworn I’ve visited this web site before but after going through many of the posts I realized it’s new to me. Regardless, I’m certainly pleased I discovered it and I’ll be bookmarking it and checking back regularly.
Hello! Do you know if they make any plugins to assist with Search Engine Optimization?
I’m trying to get my site to rank for some targeted keywords but I’m not
seeing very good gains. If you know of any please share.
Cheers! I saw similar article here: Warm blankets
Hello there! This is kind of off topic but I need some guidance
from an established blog. Is it difficult to set up your own blog?
I’m not very techincal but I can figure things
out pretty fast. I’m thinking about making my own but
I’m not sure where to begin. Do you have any ideas or suggestions?
With thanks!