Skip to content

Instantly share code, notes, and snippets.

@mjcreativeventures
Created February 15, 2016 05:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjcreativeventures/db263a2fb111ef2cdfb8 to your computer and use it in GitHub Desktop.
Save mjcreativeventures/db263a2fb111ef2cdfb8 to your computer and use it in GitHub Desktop.
nginx configuration for rsyslog
#!/etc/rsyslog.d/40-nginx.conf
$ModLoad imfile
$InputFileName /var/log/nginx/error.log
$InputFileTag nginx:
$InputFileStateFile stat-nginx-error
$InputFileSeverity warning
$InputFileFacility local7
$InputRunFileMonitor
$InputFileName /var/log/nginx/access.log
$InputFileTag nginx:
$InputFileStateFile stat-nginx-access
$InputFileSeverity info
$InputFileFacility local7
$InputRunFileMonitor
$InputFilePollInterval 10
:syslogtag,isequal,"nginx:" /var/syslog/nginx.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment