LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   logwatch isn't report on apache (https://www.linuxquestions.org/questions/linux-software-2/logwatch-isnt-report-on-apache-4175601261/)

abefroman 03-07-2017 02:59 PM

logwatch isn't report on apache
 
logwatch isn't report on apache:
Code:

[root@server etc]# logwatch --service http --output stdout
[root@server etc]#

However other services are fine:
Code:

[root@server etc]# logwatch --service postfix --output stdout  |wc -l
80

and I have apache in /etc/httpd

If I specify the directory there are still no results:
Code:

[root@server httpd]# logwatch --service http --output stdout  --logdir /etc/httpd/logs/
[root@server httpd]#

It seems like it may not be finding log files, when I run it with --debug high:
Code:

Logfile Name: clamav
  Logfile = /var/log/clamav
  Archive = clamav.conf
  Archive = /var/log/clamav/clamd.log-20170101
  Archive = /var/log/clamav/clamd.log-20170108
  Archive = /var/log/clamav/clamd.log-20170115

...

Logfile Name: http
  001-*applyhttpdate =
  000-*expandrepeats =

Logfile Name: qmail-smtpd-current
  000-*applytaidate =

But they are definitely there:
Code:

[root@server logfiles]# ls -al /etc/httpd/logs/ |grep access
-rw-------  1 root  root    5727986 Mar  7 14:43 access_log
-rw-------  1 root  root    3213797 Feb 24  2016 access_log-20160224
-rw-------  1 root  root      895761 Mar 29  2016 access_log-20160329
[root@server logfiles]# ls -al /etc/httpd/logs/ |grep error
-rw-------  1 root  root    20993575 Mar  7 14:48 error_log
-rw-------  1 root  root    49616061 Mar  7 10:00 error_log.1

any ideas?

dijetlo 03-11-2017 05:45 PM

Hi Abe,

From the ArchWiki/Logwatch
Within the logfiles/ directory of any of the conf locations are config files detailing specific log files. By default, most of the common log files found in a Linux system are already accounted for. If you have some esoteric application that does not have a log file conf already, copy an existing one from the default.conf/logfiles/ directory and customize it for your application.

Do you have a logfile conf in you /etc/httpd/log directory ?
Just a suggestion but if you moved your log files to a more standard location.. /var/log/httpd for example, it might automatically pick them up.
Hope that helps


All times are GMT -5. The time now is 06:35 PM.