{"id":1559,"date":"2026-01-01T21:26:51","date_gmt":"2026-01-01T21:26:51","guid":{"rendered":"https:\/\/b2bhostingclub.com\/blog\/?p=1559"},"modified":"2026-02-04T14:14:37","modified_gmt":"2026-02-04T14:14:37","slug":"how-to-monitor-linux-system-logs-with-logwatch","status":"publish","type":"post","link":"https:\/\/b2bhostingclub.com\/blog\/how-to-monitor-linux-system-logs-with-logwatch\/","title":{"rendered":"How To Monitor Linux System Logs with Logwatch"},"content":{"rendered":"<div class=\"d-title pt-10 pb-0\">\n<div class=\"container\">\n<div class=\"row row-cols-1  justify-content-left d-text-left d-title-inner\">\n<h2 id=\"introduction\" class=\"col col-md-10 d-h2 d-color-black  core-title\">Introduction<\/h2>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"d-paragraph-card pt-0 pb-0\">\n<div class=\"container\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters pt-4 pb-1\">\n<div class=\"col\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\">System logs contain valuable information about the activities and events occurring on your Linux server. However, manually reviewing these logs can be time-consuming and overwhelming. That&#8217;s where Logwatch comes in. Logwatch is a powerful log analysis and monitoring tool that automates the process of parsing and summarizing system logs, making it easier for system administrators to identify potential issues, security threats, and system performance trends. In this blog, we will explore the benefits of using Logwatch, its installation process, and how to customize its configuration to suit your monitoring needs. By the end, you&#8217;ll have a solid understanding of how Logwatch can help you gain insights into your system&#8217;s log data and keep your Linux server running smoothly.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"d-title pt-10 pb-0\">\n<div class=\"container\">\n<div class=\"row row-cols-1  justify-content-left d-text-left d-title-inner\">\n<h2 id=\"benefits-of-using-logwatch\" class=\"col col-md-10 d-h2 d-color-black  core-title\">Benefits of Using Logwatch<\/h2>\n<div class=\"col col-md-10 d-color-black  d-fs-normal d-fw-500\">Using Logwatch offers several benefits for monitoring system logs.<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"d-paragraph-card\">\n<div class=\"container\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters pt-4 pb-1\">\n<div class=\"col\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Time Efficiency:<\/b>\u00a0Manually reviewing system logs can be a time-consuming task, especially when dealing with large log files or multiple servers. Logwatch automates this process by parsing and summarizing log data, providing concise and organized reports that highlight important events and trends. This saves administrators valuable time and allows them to focus on critical issues.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Centralized Log Analysis:<\/b>\u00a0Logwatch consolidates log data from various sources, such as system logs, application logs, and security logs, into a unified report. This centralized approach simplifies log analysis, making it easier to identify patterns, anomalies, and potential security threats across the system.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Quick Issue Identification:<\/b>\u00a0Logwatch provides a clear and concise summary of log events, highlighting any warnings, errors, or critical issues that require attention. By regularly reviewing Logwatch reports, administrators can promptly identify and address system problems, ensuring optimal performance and minimizing downtime.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Security Monitoring:<\/b>\u00a0System logs contain valuable information for detecting security incidents and unauthorized access attempts. Logwatch helps in monitoring and analyzing security logs, providing insights into potential security breaches, failed login attempts, suspicious activities, and other security-related events. This enables administrators to take proactive measures to enhance system security.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Customization and Flexibility:<\/b>\u00a0Logwatch offers a range of customization options to tailor the log monitoring process to specific requirements. Administrators can configure which log files to analyze, set alert thresholds, define report formats, and apply filters to focus on relevant log entries. This flexibility allows for fine-tuning the monitoring process and adapting it to the unique needs of the system.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Historical Analysis and Trend Identification:<\/b>\u00a0By maintaining a history of log reports, Logwatch enables administrators to analyze system performance trends over time. This helps in identifying recurring issues, monitoring resource usage patterns, and making informed decisions regarding system optimization and capacity planning.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"d-title pt-10 pb-0\">\n<div class=\"container\">\n<div class=\"row row-cols-1  justify-content-left d-text-left d-title-inner\">\n<h2 id=\"monitor-linux-system-logs-with-logwatch\" class=\"col col-md-10 d-h2 d-color-black  core-title\">Monitor Linux System Logs with Logwatch<\/h2>\n<div class=\"col col-md-10 d-color-black  d-fs-normal d-fw-500\">In this tutorial, we will use Ubuntu system for demonstration.<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"d-paragraph-card\">\n<div class=\"container\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters pt-4 pb-1\">\n<h3 class=\"col col-md-12 d-h3 d-color-black d-fs-20 d-fw-600 d-lineheight-24 core-title\">1. Install Logwatch and Sendmail<\/h3>\n<div class=\"col\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\">Before the installation, log into the server as the root user, input the password as prompted, and then update your system.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<pre class=\"d-fs-normal d-lineheight-26 mb-0\">sudo -i\r\napt update &amp;&amp; apt upgrade<\/pre>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\">Then, install Logwatch and Sendmail.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<pre class=\"d-fs-normal d-lineheight-26 mb-0\">apt install logwatch sendmail<\/pre>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Sendmail<\/b>\u00a0is a server application that gives businesses a way to send email using the Simple Mail Transfer Protocol (SMTP). It\u2019s typically installed on an email server on a dedicated machine that accepts outgoing email messages and then sends these messages to the defined recipient. This application will help send reports or digests to your email if it&#8217;s well configured.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"d-paragraph-card\">\n<div class=\"container\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters pt-4 pb-1\">\n<h3 class=\"col col-md-12 d-h3 d-color-black d-fs-20 d-fw-600 d-lineheight-24 core-title\">2. Configure Logwatch<\/h3>\n<div class=\"col\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\">The default configuration file for Logwatch is located at &#8220;\/usr\/share\/logwatch\/default.conf\/logwatch.conf&#8221;. Use any text editor to modify the content. Here, we will use the nano text editor.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<pre class=\"d-fs-normal d-lineheight-26 mb-0\">nano \/usr\/share\/logwatch\/default.conf\/logwatch.conf<\/pre>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>2.1 Log Directories<\/b><\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>LogDir<\/b>\u00a0defines directories containing log files that you want Logwatch to analyze. By default, Logwatch goes through all the logs located within the \/var\/log directory and generates reports on your system&#8217;s log activity. However, if you have logs in other directories, such as custom application logs or website logs that need to be reported, you can add them to Logwatch by including additional &#8220;LogDir&#8221; lines as below.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>TmpDir<\/b>\u00a0specifies the directory where Logwatch stores temporary files and working files during its execution. Although this can be any directory you want, we will keep the default value \/var\/cache\/logwatch. You\u2019ll have to manually create this directory when we finish editing this file.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/2bcec6d910904ccba401bb386d4fa552\/log-directory.png\" alt=\"Open the sshd configure file\" width=\"1300\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>2.2 Output and Format Configuration<\/b><\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Output<\/b>\u00a0and\u00a0<b>Format<\/b>\u00a0determines the destination or method for delivering Logwatch reports. There are several options available for the &#8220;Output&#8221; setting:<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>-stdout:<\/b>\u00a0Logwatch reports are displayed on the standard output (console) when Logwatch is executed. This is the default option, and it&#8217;s useful for immediate viewing of reports on demand or for capturing the output for further processing or redirection.<br \/>\n<b>-mail:<\/b>\u00a0Logwatch reports are sent via email to the address specified in the Logwatch configuration. This option allows you to receive Logwatch reports directly in your email inbox. To use this feature, make sure that your system has a working mail transfer agent (MTA) configured, such as Sendmail or Postfix, to handle outgoing emails.<br \/>\n<b>-file:<\/b>\u00a0Logwatch reports are saved to a file. You can specify the file path and name using the File option in the Logwatch configuration. This option is useful if you want to store the reports for later reference or for automated processing.<br \/>\n<b>-text:<\/b>\u00a0Logwatch generates reports in a simple, text-based format that is easy to read and parse. This format is suitable for viewing reports in a console or terminal window, storing them as plain text files, or integrating them with other text-based tools or systems.<br \/>\n<b>-html:<\/b>\u00a0Logwatch reports are generated in HTML format. This is suitable for viewing reports in a web browser or embedding them in web pages.<br \/>\n<b>-html-noencode:<\/b>\u00a0Similar to the html option, but it doesn&#8217;t encode special characters in the HTML output. This option might be necessary for compatibility with certain systems or applications.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12  d-color-black d-fs-normal d-fw-500 core-title\">2.2.1 If you need to immediately view reports in a console or terminal window, choose the stdout and text options.<\/div>\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/6070dfd5185940689e4999bbeabdbaa7\/stdout.png\" alt=\"Choose stdout as output option\" width=\"700\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12  d-color-black d-fs-normal d-fw-500 core-title\">2.2.2 If you would like Logwatch to send the report to a specific email, configure the following fields.<\/div>\n<div class=\"col\"><\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Output = mail<\/b><br \/>\n<b>Format = html<\/b>\u00a0#Choose the format (html or text) you prefer. In this case, we choose html.<br \/>\n<b>MailTo = your email address<\/b>\u00a0#Can be a valid email address or local account user. If using a local account use, you can specify the MailTo = root<br \/>\n<b>MailFrom = Logwatch<\/b>\u00a0#Change the MailFrom value to a valid email address, or to a local user, such as the hostname(You can get the hostname by issuing &#8220;hostname&#8221; in the terminal.). This can also be left as Logwatch.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/0aa2f15e3aba4d08979950fd744b7326\/send-email.png\" alt=\"Choose mail as output option\" width=\"700\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12  d-color-black d-fs-normal d-fw-500 core-title\">2.2.3 If you would like to save the Logwatch reports to a file. You can specify the file path and name using the File option in the Logwatch configuration.<\/div>\n<div class=\"col\"><\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Output = file<\/b><br \/>\n<b>Format = text<\/b>\u00a0#Choose the format (html or text) you prefer. In this case, we choose text.<br \/>\n<b>Filename = \/tmp\/logwatch\u00a0<\/b>Find and uncomment (remove the hashmark [#]) the Filename value. Set the path and filename in which you wish to save your Logwatch digests. In this case, we keep the default value.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/76ce751b32dc438dabd89a6896b376cd\/save-file.png\" alt=\"Choose file as output option\" width=\"700\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>2.3 Service Configuration<\/b><\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Service<\/b>\u00a0and\u00a0<b>Format<\/b>\u00a0are used to specify the system services or log files that Logwatch should analyze and include in its reports.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12  d-color-black d-fs-normal d-fw-500 core-title\">2.3.1 You can include all services by setting Service = All. If you need to exclude one or some of the services, please add additional &#8220;Service&#8221; lines as the format Service = &#8220;-servicename&#8221;<\/div>\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/3528687dcfe3468386cab1b1cc20cfe5\/Service-all.png\" alt=\"Choose all services\" width=\"700\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12  d-color-black d-fs-normal d-fw-500 core-title\">2.3.2 If you only need to include some of the services, you can add a service line for each service as below.<\/div>\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/f9272e7f1e89423c8dd8066c73b34aff\/multiple-services.png\" alt=\"Choose multiple services\" width=\"700\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12 d-color-black  d-fs-normal d-fw-500\">To see a full list of services, you can run the following command.<\/div>\n<div class=\"col\">\n<pre class=\"d-fs-normal d-lineheight-26 mb-0\">ls -l \/usr\/share\/logwatch\/scripts\/services<\/pre>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/07005f22294442ab892a710824d94293\/list-services.png\" alt=\"List services\" width=\"700\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>2.4 Range and Detail Configurations<\/b><\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Range<\/b>\u00a0determines the time range for which Logwatch generates reports.<br \/>\n<b>Detail<\/b>\u00a0determines the level of detail in the generated Logwatch reports. It allows you to specify the amount of information and verbosity in the reports. The available options for the &#8220;Detail&#8221; setting include:<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>-Low:<\/b>\u00a0Generates concise reports with minimal details.<br \/>\n<b>-Medium:<\/b>\u00a0Provides a balanced level of detail in the reports.<br \/>\n<b>-High:<\/b>\u00a0Generates comprehensive reports with maximum details and verbosity.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12  d-color-black d-fs-normal d-fw-500 core-title\">Set the range and detail you need.<\/div>\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/ddf5931c0cae4cee90907ce476daebbe\/range-detail.png\" alt=\"Specify Range and detail\" width=\"700\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\">When you finish the configuration, press &#8220;Ctrl&#8221; and &#8220;x&#8221;, then enter &#8220;y&#8221;, followed by hitting the &#8220;Enter&#8221; key to save the changes.<\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12  d-color-black d-fs-normal d-fw-500 core-title\">After we save the file, there is one more step that needs to be done. That is to create that Temp directory for Logwatch since it won\u2019t do that itself. Run the following command.<\/div>\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/921d868a97384d74a451c812f81bf63c\/create-file-directory.png\" alt=\"Specify Range and detail\" width=\"700\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<pre class=\"d-fs-normal d-lineheight-26 mb-0\">mkdir \/var\/cache\/logwatch<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"d-paragraph-card\">\n<div class=\"container\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters pt-4 pb-1\">\n<h3 class=\"col col-md-12 d-h3 d-color-black d-fs-20 d-fw-600 d-lineheight-24 core-title\">3. Run Logwatch<\/h3>\n<div class=\"col col-md-12 d-color-black  d-fs-normal d-fw-500 d-fs-normal\">You can choose to either manually run this program or automatically run it with a cron job.<\/div>\n<div class=\"col\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Run Logwatch Manually<\/b><\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12 d-color-black  d-fs-normal d-fw-500\">As you already configure the Logwatch file, you can simply run this command to run Logwatch with the configurations you set in the previous step.<\/div>\n<div class=\"col\">\n<pre class=\"d-fs-normal d-lineheight-26 mb-0\">logwatch\r\nsudo \/usr\/sbin\/logwatch #Run this if you have not su into root account.<\/pre>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\"><\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12 d-color-black  d-fs-normal d-fw-500\">If you would like to test different parameters, you can specify those on the command line to override your default settings. Here are the available options from the configuration file.<\/div>\n<div class=\"col\">\n<pre class=\"d-fs-normal d-lineheight-26 mb-0\">logwatch  [--detail  level  ] [--logfile log-file-group ] [--service service-name ] [--print]  [--mailto address ] [--archives] [--range range  ]  [--debug  level  ]  [--save  file-name  ]  [--logdir  directory ] [--hostname hostname ] [--splithosts] [--multiemail] [--output output-type ] [--numeric] [--no-oldfiles-log] [--version] [--help|--usage]<\/pre>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12 d-color-black  d-fs-normal d-fw-500\">For example, if you would like to get the http service with low details during yesterday by email, run the following command. Feel free to replace any of the parameters with the ones you&#8217;d like to test.<\/div>\n<div class=\"col\">\n<pre class=\"d-fs-normal d-lineheight-26 mb-0\">logwatch --detail Low --mailto email@address --service http --range today<\/pre>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Run Logwatch Automatically<\/b><\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12 d-color-black  d-fs-normal d-fw-500\">You can also set up a cron job to run the service automatically at a regular frequency. For example, we configured to run it at 6:35 a.m. each day. First, we use the nano text editor to open the file.<\/div>\n<div class=\"col\">\n<pre class=\"d-fs-normal d-lineheight-26 mb-0\">nano \/etc\/crontab<\/pre>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12 d-color-black  d-fs-normal d-fw-500\">Then enter the settings into the configuration file. After that, press &#8220;Ctrl&#8221; and &#8220;x&#8221;, then enter &#8220;y&#8221;, followed by hitting the &#8220;Enter&#8221; key to save the changes.<\/div>\n<div class=\"col\">\n<pre class=\"d-fs-normal d-lineheight-26 mb-0\">35 6 * * *  root   \/usr\/spin\/logwatch<\/pre>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/4b76e173c3ea4e808c5442e49f047abe\/logwatch-cron.png\" alt=\"Set up Logwatch cron job\" width=\"700\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"d-paragraph-card\">\n<div class=\"container\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters pt-4 pb-1\">\n<h3 class=\"col col-md-12 d-h3 d-color-black d-fs-20 d-fw-600 d-lineheight-24 core-title\">4. View Reports<\/h3>\n<div class=\"col col-md-12 d-color-black  d-fs-normal d-fw-500 d-fs-normal\">When you run Logwatch, you should be able to receive or view reports.<\/div>\n<div class=\"col\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Output = mail<\/b><\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12  d-color-black d-fs-normal d-fw-500 core-title\">If you choose mail as output, the configured email address should receive the report at the time Logwatch runs. It happens that the email could go directly to the Junk Email folder. If you don&#8217;t see the email in your inbox, make sure to check the Junk Email folder.<\/div>\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/bc1d7329eb5e4c78a8eb665102b97048\/logwatch-report-email.png\" alt=\"Logwatch report\" width=\"400\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Output = stdout<\/b><\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12 d-color-black  d-fs-normal d-fw-500\">With this stdout output option, you should see the report immediately as you run Logwatch manually.<\/div>\n<div class=\"col\">\n<pre class=\"d-fs-normal d-lineheight-26 mb-0\">logwatch<\/pre>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/dabe044baf84417e88a1520dacfbb396\/digest.png\" alt=\"Logwatch report\" width=\"400\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\"><b>Output = file<\/b><\/p>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col col-md-12 d-color-black  d-fs-normal d-fw-500\">If the value of Output is set to file, then you can open the filename as set in the configuration file using any text editor. Here, we use the default filename.<\/div>\n<div class=\"col\">\n<pre class=\"d-fs-normal d-lineheight-26 mb-0\">logwatch\r\nnano \/tmp\/logwatch<\/pre>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/07d3778974114314af06860d40f726aa\/nano-tmp-logwatch.png\" alt=\"\u8fd0\u884clogwatch, \u7528\u7f16\u8f91\u5668\u6253\u5f00\u6587\u4ef6\" width=\"700\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<div class=\"d-text-start\"><img decoding=\"async\" class=\"d-img d-lazy-img\" src=\"https:\/\/images.cloudclusters.io\/40af2e2913224ac6a23bb2aec1a08544\/file-logwatch.png\" alt=\"\u67e5\u770b\u62a5\u544a\" width=\"700\" \/><\/div>\n<\/div>\n<\/div>\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\">That&#8217;s it! You should now be able to set up log monitoring with Logwatch and Sendmail.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"d-title pt-10 pb-0\">\n<div class=\"container\">\n<div class=\"row row-cols-1  justify-content-left d-text-left d-title-inner\">\n<h2 id=\"conclusion\" class=\"col col-md-10 d-h2 d-color-black  core-title\">Conclusion<\/h2>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"d-paragraph-card pt-0 pb-0\">\n<div class=\"container\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters pt-4 pb-1\">\n<div class=\"col\">\n<div class=\"row row-cols-1  justify-content-start d-text-start d-title-inner no-gutters\">\n<div class=\"col\">\n<p class=\"mb-0\">Logwatch provides a reliable and efficient solution for monitoring system logs, enabling system administrators to stay informed about the health, security, and performance of their Linux systems. By automating the log analysis process and generating comprehensive reports, Logwatch simplifies the task of identifying and troubleshooting of potential issues, allowing for proactive and timely responses. Whether you are a small business owner or a seasoned system administrator, integrating Logwatch into your monitoring toolkit can greatly enhance your ability to maintain a stable and secure system environment. So, take the time to set up Logwatch, explore its customizable options, and gain valuable insights into your system logs, ensuring the optimal functioning of your Linux infrastructure.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction System logs contain valuable information about the activities and events occurring on your Linux server. However, manually reviewing these logs can be time-consuming and overwhelming. That&#8217;s where Logwatch comes in. Logwatch is a powerful log analysis and monitoring tool that automates the process of parsing and summarizing system logs, making it easier for system [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":1561,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1559","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-hosting"],"_links":{"self":[{"href":"https:\/\/b2bhostingclub.com\/blog\/wp-json\/wp\/v2\/posts\/1559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/b2bhostingclub.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/b2bhostingclub.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/b2bhostingclub.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/b2bhostingclub.com\/blog\/wp-json\/wp\/v2\/comments?post=1559"}],"version-history":[{"count":1,"href":"https:\/\/b2bhostingclub.com\/blog\/wp-json\/wp\/v2\/posts\/1559\/revisions"}],"predecessor-version":[{"id":1562,"href":"https:\/\/b2bhostingclub.com\/blog\/wp-json\/wp\/v2\/posts\/1559\/revisions\/1562"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/b2bhostingclub.com\/blog\/wp-json\/wp\/v2\/media\/1561"}],"wp:attachment":[{"href":"https:\/\/b2bhostingclub.com\/blog\/wp-json\/wp\/v2\/media?parent=1559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/b2bhostingclub.com\/blog\/wp-json\/wp\/v2\/categories?post=1559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/b2bhostingclub.com\/blog\/wp-json\/wp\/v2\/tags?post=1559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}