CLI: Drains
Log drains forward agent logs to external endpoints via HTTP POST. Logs are delivered as OTLP JSON. Each drain targets a single endpoint URL and can include custom headers for authentication.
List drains
valet drains [-a <agent>]Lists all log drains for an agent. The agent is determined by the -a/--agent flag or the linked agent in the current directory. Output columns: endpoint and status.
Create a drain
valet drains create <endpoint> [-a <agent>] [--header KEY=VALUE]Creates a new log drain that forwards logs to the specified endpoint URL. Use --header to include authentication or routing headers. Repeat --header for multiple headers.
$ valet drains create https://logs.example.com/v1/logs \
--header Authorization=Bearer\ tok123
Creating drain... done
endpoint: https://logs.example.com/v1/logs
status: active
headers: AuthorizationDrain info
valet drains info <endpoint> [-a <agent>]Shows detailed information about a drain including its endpoint, status, header names, and creation timestamp. The drain is identified by its endpoint URL.
Destroy a drain
valet drains destroy <endpoint> [-a <agent>]Permanently removes the drain. Cannot be undone.