Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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