【发布时间】:2014-02-07 20:33:26
【问题描述】:
我使用 Graylog2 服务器作为我的应用程序日志服务器。但无法将 apache 日志连接到 graylog2。有没有将 apache 日志发送到 graylog2 服务器的指南,或者有人可以帮我解决这个问题吗?
【问题讨论】:
标签: apache logging error-log access-log graylog2
我使用 Graylog2 服务器作为我的应用程序日志服务器。但无法将 apache 日志连接到 graylog2。有没有将 apache 日志发送到 graylog2 服务器的指南,或者有人可以帮我解决这个问题吗?
【问题讨论】:
标签: apache logging error-log access-log graylog2
我在 Ubuntu 14.04 上将其放在 /etc/rsyslog.conf 的底部
# Apache access file:
$ModLoad imfile
$InputFileName /var/log/apache2/access.log
$InputFileTag apache-access:
$InputFileStateFile stat-apache-access
$InputFileSeverity info
$InputRunFileMonitor
#Apache Error file:
$InputFileName /var/log/apache2/error.log
$InputFileTag apache-errors:
$InputFileStateFile stat-apache-error
$InputFileSeverity error
$InputRunFileMonitor
$InputFilePollInterval 10
if $programname == 'apache-access' then @10.11.11.33:514
if $programname == 'apache-errors' then @10.11.11.33:514
其中 10.x.x.x 是我的 Graylog2 服务器。
【讨论】:
【讨论】: