Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Rsyslog forward log to remote syslog server

Discussion in 'General Discussion' started by garconcn, Jul 10, 2014.

  1. garconcn

    garconcn Well-Known Member

    Oct 29, 2009
    Likes Received:
    Trophy Points:
    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

    if $syslogtag contains 'apache-access' then @
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    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.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice