Stream Fastly CDN access logs to Better Stack using Fastly's real-time log streaming.
Create a new Fastly source in Better Stack.
Open your service in Fastly β Edit configuration β Clone version to create a new draft version.
Click Logging β HTTPS β Create endpoint and use the following settings:
Better Stack0application/x-ndjsonAuthorizationPOSTThe JSON matches Fastly's suggested log format, with four extra fields at the end (duration_us, pop, tls_version, service_id) that power the latency and traffic dashboards. Add any other Fastly logging variables as needed.
Fastly verifies the endpoint automatically when you create it.
Click Activate to deploy the draft version of your Fastly service.
Requests to your Fastly service now stream to Better Stack within seconds.
You should see your logs in Better Stack β Live tail with fields like response_status, response_state, andpop` parsed and ready for filtering and dashboards.
Fastly can also stream logs over TLS syslog. Create a Syslog logging endpoint instead of the HTTPS one:
Better Stack6514
Over syslog, the [logtail@11993 source_token="$SOURCE_TOKEN"] block at the very start of the Log format, followed by a single space, authenticates your logs.
Set Log line format to Classic and leave Fastly's Token field empty. With the Blank line format, or with the token in the Token field, Fastly delivers logs in a format that can't be authenticated, and they won't appear in Better Stack.
Please let us know at hello@betterstack.com. We're happy to help! π
We use cookies to authenticate users, improve the product user experience, and for personalized ads. Learn more.