Rsyslog forward log to remote syslog server
I've setup a central syslog server using LogAnalyzer on CentOS6 server to consolidate all the cpanel logs. I created a config file in /etc/rsyslog.d/ to foward any log contains 'apache-access' to remote server, however, the same access log was also logged in /var/log/messages. Is there a way to only forward the apache log to remote server but not write to the message log file since it's been logged to the Apache access_log file already? Thank you.
===My custom rsyslog config===
$InputFileName /usr/local/apache/logs/access_log
$InputFileTag apache-access
$InputFileStateFile stat-apache-access
$InputFileSeverity warn
$InputFileFacility local5
$InputRunFileMonitor
if $syslogtag contains 'apache-access' then @192.168.1.11
-
[quote="garconcn, post: 1683312"> Is there a way to only forward the apache log to remote server but not write to the message log file since it's been logged to the Apache access_log file already?
To clarify, the Apache access logs are logged to /var/log/messages on this machine? This is not standard behavior. Are you using any other third-party applications? Thank you.0
Please sign in to leave a comment.
Comments
1 comment