# ------------------------------------------------------- # File Logging Directives for Logz.io # ------------------------------------------------------- $ModLoad imfile $InputFilePollInterval 10 $PrivDropToGroup adm $WorkDirectory /var/spool/rsyslog # Replace PATH_TO_FILE with your log's filepath. (For example, # /var/log/nginx/access.log) $InputFileName PATH_TO_FILE # Logz.io uses log type to parse your logs. Logs of the same TYPE are parsed # the same way. For more information, see # https://docs.logz.io/user-guide/log-shipping/built-in-log-types.html # # For custom parsing you can: # - Configure Logstash in your system # - Use the Data Parsing wizard (https://app.logz.io/#/dashboard/data-parsing/step1) # - Get help from the Support team (email help@logz.io) $InputFileTag TYPE: LOG_TYPE $InputFileStateFile stat-TYPE $InputFileSeverity info $InputFilePersistStateInterval 20000 $InputRunFileMonitor # Your Logz.io account token. You can find your token at # https://app.logz.io/#/dashboard/settings/manage-accounts $template logzFormatFileTagName,"[{account-token}] <%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [type=TYPE] %msg%\n" # If your Logz.io login URL is app-eu.logz.io, then change the URL below to # listener-eu.logz.io if $programname == 'TYPE' then @@listener.logz.io:5000;logzFormatFileTagName if $programname == 'TYPE' then ~