Skip to content

Instantly share code, notes, and snippets.

@mishan
Created March 30, 2017 19:50
Show Gist options
  • Save mishan/4c41fb2896d17db823f04de638606138 to your computer and use it in GitHub Desktop.
Save mishan/4c41fb2896d17db823f04de638606138 to your computer and use it in GitHub Desktop.
Logging nginx-rtmp to fluentd
<source>
@type tail
format /^(?<ip>([0-9]{1,3}\.?){4}) \[(?<time>[^\]]+)\] (?<message>.*)$/
time_format %d/%B/%Y:%H:%M:%S %z
tag nginx-rtmp.access
path /logs/access.log
</source>
<source>
@type tail
format /^(?<time>[^\[]+)\[error\] (?<message>.*)$/
time_format %Y/%m/%d %H:%M:%S
tag nginx-rtmp.error
path /logs/error.log
</source>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment