我在Debian10.4上,我有一个新的日志表安装。除了日志监视(ver ),一切都按预期工作。( 7.5.0)输出除http日志报告以外的所有内容。
我使用--debug med运行日志监视,并在调试输出上看到:
Preprocessing LogFile: http
'/tmp/logwatch.hVSrPWg3/http-archive' '/var/log/apache2/www.anonicloud.ch_access.log.1' '/var/log/apache2/other_vhosts_access.log' '/var/log/apache2/www.anonicloud.ch_access.log' | /usr/bin/perl /usr/share/logwatch/scripts/shared/expandrepeats ''| /usr/bin/perl /usr/share/logwatch/scripts/shared/applyhttpdate ''>/tmp/logwatch.hVSrPWg3/http
Preprocessing LogFile: http-error
'/var/log/apache2/error.log' '/var/log/apache2/www.anonicloud.ch_error.log' | /usr/bin/perl /usr/share/logwatch/scripts/shared/applystddate '\[%a %b %d %H:%M:%S(\.\d*)? %Y\] '| /usr/bin/perl /usr/share/logwatch/scripts/shared/removeheaders '\[\w{3} \w{3} \d{2} \d\d:\d\d:\d\d(\.\d*)? \d{4}\] '>/tmp/logwatch.hVSrPWg3/http-error..。还有..。
Processing Service: http
( cat /tmp/logwatch.hVSrPWg3/http | /usr/bin/perl /usr/share/logwatch/scripts/services/http) 2>&1
export LOGWATCH_LOGFILE_LIST='/var/log/apache2/error.log /var/log/apache2/www.anonicloud.ch_error.log '
export LOGWATCH_ARCHIVE_LIST=''
export LOGWATCH_LOGFILE_LIST='/var/log/messages '
export LOGWATCH_ARCHIVE_LIST='/var/log/messages.1 /var/log/messages.2.gz /var/log/messages.3.gz '所以我认为我的http日志文件被正确地解析了。
但是,当我检查输出时,我找不到任何类似于其他服务的引用:
# Why I can't find the same for http???
--------------------- fail2ban-messages Begin ------------------------
DEBUG: Inside Fail2Ban Filter
---------------------- fail2ban-messages End -------------------------/usr/share/logwatch/default.conf/ignore.conf是空的(所有内容都注释掉了),在我的配置文件中,我没有排除任何东西。
编辑:我支持nginx反向代理;在我的apache服务器上,我启用了mod_remoteip,并在日志文件格式上用%a替换了所有%h。
任何线索都会被强烈接受。
发布于 2020-08-05 08:20:10
尝试使用--detail High (或Med)。看起来http脚本几乎什么也不输出(使用mod_proxy的连接尝试,检测到可能的漏洞,用户成功地登录),当--detail未被设置(默认为0)或< 4时,您可以在SourceForge上看到它。
示例:
my $detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
# ...
if (($detail >4) and $total_hack_count) {
# ...
if (keys %ban_ip and $detail) {
# ...
if (keys %needs_exam and ($detail or $a5xx_resp)) {
# ...
# etc...https://serverfault.com/questions/1021381
复制相似问题