Prerequisites
- Vector installed where your logs are.
- An ingest key and project ID, saved as
SQUASHER_API_KEYandSQUASHER_PROJECT_IDin Vector’s environment. See Create an ingest key.
Add the Squasher sink
1
Shape each event
The event endpoint needs a string Replace
message. Without a level, it stores the event as an error
and opens an issue. Add a remap transform that parses JSON lines and sets both fields.vector.toml
app_logs with the name of your source, and checkout-api with your service name.2
Add the HTTP sink
Send newline-delimited JSON without compression. The event endpoint does not read gzip bodies.
vector.toml
3
Validate and restart Vector
What Squasher keeps from each event
See Event fields for the full list.
Verify
- Write one JSON line with
"level":"error"and"message":"Squasher test error"to a file or stream that Vector reads. - Select Issues in the sidebar in Squasher. The test error is at the top of the list.
- Select Logs in the sidebar to see the info-level lines as logs.
--verbose and look for 4xx responses from the
sink. A 400 response names the event that has no string message.
Limits
- Each project can send 10,000 records per minute by default. Above that, Squasher returns
429, and Vector retries. - If Vector already sends to another log product, add Squasher as a second sink first. Remove the old sink only after you compare the data.
Next steps
HTTP API
See every event field and the drain endpoint.
Docker
Collect container logs with an OpenTelemetry Collector.
Design queryable logs
Choose fields that stay easy to search.
Set up notifications
Send new issues to Slack, PagerDuty, or email.