Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ModLoad imfile
- $InputFilePollInterval 10
- $WorkDirectory /var/spool/rsyslog
- # nginx access file:
- #$InputFileName /var/log/nginx/access.log
- $InputFileName /var/www/vhosts/example.tld/logs/access_log
- $InputFileTag nginx-access:
- $InputFileStateFile stat-nginx-access
- $InputFileSeverity info
- $InputFilePersistStateInterval 20000
- $InputRunFileMonitor
- #nginx Error file:
- $InputFileName /var/www/vhosts/example.tld/logs/error_log
- $InputFileTag nginx-error:
- $InputFileStateFile stat-nginx-error
- $InputFileSeverity error
- $InputFilePersistStateInterval 20000
- $InputRunFileMonitor
- #Add a tag for nginx events
- $template LogglyFormatNginx,"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [my-token@41058 tag=\"nginx\" ] %msg%\n"
- if $programname == 'nginx-access' then @@logs-01.loggly.com:514;LogglyFormatNginx
- if $programname == 'nginx-access' then ~
- if $programname == 'nginx-error' then @@logs-01.loggly.com:514;LogglyFormatNginx
- if $programname == 'nginx-error' then ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement