Skip to content

Instantly share code, notes, and snippets.

@simonerni
Last active January 13, 2018 18:34
Show Gist options
  • Save simonerni/bdac68a7e3f9517837739cfd538dc693 to your computer and use it in GitHub Desktop.
Save simonerni/bdac68a7e3f9517837739cfd538dc693 to your computer and use it in GitHub Desktop.
Fluentd Icecast configuration - optimized for Google Cloud Stackdriver
<source>
type tail
path /var/log/icecast2/access.log
pos_file /var/lib/google-fluentd/pos/icecast-access.log.pos
tag icecast-access
format /^(?<message>(?<host>[^ ]*) - - \[(?<time>[^\]]*)\] \"(?<request_type>[^ ]*) \/(?<request_uri>[^ ]+) (?<request_protocol>[^ ]*)\" (?<status_code>[^ ]*) (?<bytes>[^ ]*) \"(?<referrer>[^\"]*)\" \"(?<agent>[^\"]*)\" (?<duration>[^ ]*).*)/
time_format %d/%b/%Y:%H:%M:%S %z
</source>
<source>
type tail
path /var/log/icecast2/error.log
pos_file /var/lib/google-fluentd/pos/icecast-error.log.pos
tag icecast-error
format /\[(?<time>[^\]]*)\] (?<severity>[^ ]*) (?<message>.*)/
time_format %Y-%m-%d %H:%M:%S
</source>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment