Skip to content

Instantly share code, notes, and snippets.

@skwp
Created March 22, 2017 17:53
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 skwp/c7856b748d04ac32afb95cfcbe2622fe to your computer and use it in GitHub Desktop.
Save skwp/c7856b748d04ac32afb95cfcbe2622fe to your computer and use it in GitHub Desktop.
Fastly syslog listener for fluentd
<source>
@type tcp
tag fastly
format /token="secret_goes_here" service="(?<data_fastly_service>.+)" remote_address="(?<data_remote_address>.+)" timestamp="\[(?<time>.+)\]" request="(?<data_request>.+)" status="(?<data_status>.+)" size="(?<data_size>.+)"/
time_format %d/%b/%Y:%H:%M:%S %z
port 5140
bind 0.0.0.0
</source>
@skwp
Copy link
Author

skwp commented Mar 22, 2017

Use this in combination with a fastly syslog config that looks like this:

token="secret_goes_here" service="yourdomain.com" remote_address="%h" timestamp="%t" request="%r" status="%>s" size="%b"

The fastly Log line format config (under Advanced) should be set to Blank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment