> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squasher.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Vector

> Forward structured logs from Vector to Squasher with a managed connector destination.

Vector is a good fit when you already collect logs from files, containers, or upstream services and want one place to normalize them before they reach Squasher.

## Setup

<Steps>
  <Step title="Create a Vector connector in Squasher">
    Create the connector for your project, then copy the destination URL and headers from the connector details.
  </Step>

  <Step title="Add an HTTP sink in Vector">
    Point the sink at the Squasher destination and send newline-delimited JSON:

    ```toml theme={null}
    [sinks.squasher]
    type = "http"
    inputs = ["app_logs"]
    uri = "https://YOUR_SQUASHER_CONNECTOR_URL"
    method = "post"
    encoding.codec = "ndjson"
    compression = "gzip"

    [sinks.squasher.headers]
    x-squasher-key = "YOUR_CONNECTOR_KEY"
    content-type = "application/x-ndjson"
    ```
  </Step>

  <Step title="Normalize a few core fields">
    Preserve `message`, `level`, `timestamp`, `service`, and `environment` if you already have them. If not, use a Vector transform to map them before delivery.
  </Step>
</Steps>

## Verify

* Run `vector validate` against the config.
* Send a single test event with `level = "error"`.
* Confirm the connector status in Squasher changes to healthy and the event lands in the correct project.

## Migrate

If Vector currently fans out to another log product, add Squasher as a second sink first. Compare field coverage and alert behavior before removing the old destination.

## Hot-swap

* Keep batching enabled to reduce overhead.
* Add a dedicated route or transform for noisy debug logs if you do not want to forward everything.
* Rotate the connector key after cutover if the config was shared across environments.

## Agent handoff

```text theme={null}
Configure Vector to forward logs into Squasher for project <project_id>. Onboard a connector, add an HTTP sink with the returned URL and x-squasher-key header, validate the Vector config, send one error-level event, and ask before rotating the connector key.
```
