Skip to content

Instantly share code, notes, and snippets.

@eatnumber1
Created December 6, 2015 20:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eatnumber1/56466743998c992dfd08 to your computer and use it in GitHub Desktop.
Save eatnumber1/56466743998c992dfd08 to your computer and use it in GitHub Desktop.
fluentd config for plex
<source>
type tail
path /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/*.log
pos_file /var/lib/google-fluentd/pos/plex.pos
read_from_head true
tag plex
format multiline
format_firstline /^[^ ]+ \d{1,2}, \d{4} \d{2}:\d{2}:\d{2}/
format1 /^(?<time>^[^ ]+ \d{1,2}, \d{4} \d{2}:\d{2}:\d{2}) [^ ]+ (?<severity>[^ ]+) - (?<message>(?:(?:Request|Completed): \[(?<remotehost>[^:]+):[^\]]+\] (?<method>[^ ]+) (?<path>[^? ]+)(?:\?(?<querystring>[^ ]+))? \([^\)]+\)(?: (?:TLS|GZIP))*(?: [0-9]+ms (?<bytes>[0-9]+) bytes (?<status>[0-9]+))?.*|.+))$/
</source>
<source>
type tail
path /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/PMS Plugin Logs/*.log
pos_file /var/lib/google-fluentd/pos/plex-plugins.pos
read_from_head true
tag plex
format multiline
format_firstline /^\d{4}-\d{1,2}-\d{1,2}/
format1 /^(?<time>\d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2},\d{1,3}) [^ ]+ : (?<severity>[^ ]+) (?<message>\((?<file>[^:]+):(?<line>[0-9]+)\) - .+)$/
</source>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment