Skip to content

Sinks

Sinks define where collected data is written. You can write to the local filesystem, S3-compatible object storage, or stdout.

Write output files to a directory on the local filesystem.

FilesystemSinkSpec configures filesystem output.

  • path - Optional (string)

    Path is the directory to write files to (default: current directory).

  • prefix - Optional Template (string)

    Prefix is prepended to filenames.

The prefix field supports these variables:

VariableDescriptionExample
$JOB_NAMEThe job’s metadata.namemy-job
$JOB_DATE_ISO8601UTC time in ISO8601 basic format20240115T143052Z
$JOB_DATE_RFC3339UTC time in RFC3339 format2024-01-15T14:30:52Z
output:
sink:
filesystem:
path: ./output
prefix: $JOB_NAME/$JOB_DATE_RFC3339/

This writes files to ./output/my-job/2024-01-15T14:30:52Z/<step-id>.json.


Write output to S3-compatible object storage. Supports AWS S3, Cloudflare R2, MinIO, and other S3-compatible services.

S3SinkSpec configures S3-compatible object storage output. Supports AWS S3, Cloudflare R2, MinIO, and other S3-compatible services.

  • bucket - Required Template (string)

    Bucket is the S3 bucket name.

  • region - Optional Template (string)

    Region is the AWS region (optional, uses SDK defaults if not specified).

  • endpoint - Optional Template (string)

    Endpoint is a custom endpoint URL for S3-compatible services (e.g., R2, MinIO).

  • prefix - Optional Template (string)

    Prefix is prepended to object keys. Note: ${JOB_DATE_ISO8601} is recommended for S3 keys as RFC3339 contains colons which require URL encoding.

  • credentials - Optional A S3Credentials block as defined below.

    Credentials provides explicit credentials (optional, uses SDK credential chain if not specified).

  • force_path_style - Optional (bool)

    ForcePathStyle forces path-style addressing (required for MinIO and some S3-compatible services).

S3Credentials

S3Credentials provides explicit S3 credentials.

  • access_key_id - Required Template (string)

    AccessKeyID is the AWS access key ID.

  • secret_access_key - Required Template (string)

    SecretAccessKey is the AWS secret access key.

The prefix field supports the same variables as the filesystem sink. For S3 keys, $JOB_DATE_ISO8601 is recommended since RFC3339 contains colons that require URL encoding.

output:
sink:
s3:
bucket: my-bucket
region: us-east-1
prefix: infracollect/$JOB_NAME/$JOB_DATE_ISO8601/

Uses the default AWS SDK credential chain (environment variables, shared credentials file, IAM role, etc.).

output:
sink:
s3:
bucket: my-bucket
endpoint: http://localhost:9000
force_path_style: true
credentials:
access_key_id: minioadmin
secret_access_key: minioadmin
prefix: $JOB_NAME/
output:
sink:
s3:
bucket: my-bucket
endpoint: https://<account-id>.r2.cloudflarestorage.com
credentials:
access_key_id: <r2-access-key>
secret_access_key: <r2-secret-key>
prefix: $JOB_NAME/

Write output to standard output. Useful for piping to other tools or debugging.

output:
sink:
stdout: {}