Skip to main content

Sinks

Sinks export telemetry to backends. Each sink declares its upstream sources (sources or processors) and only receives signals it supports.


otlp — OTLP Export

Exports all three signals to any OTLP-compatible backend over gRPC or HTTP. This is the recommended sink for sending data to InfraSage.

Signals: Logs, Metrics, Traces

sinks:
infrasage:
type: otlp
endpoint: "https://api.infrasage.dev"
protocol: http # http or grpc (default: grpc)
auth_header: "Bearer ${INFRASAGE_API_KEY}"
sources: [batch_main]

gRPC mode (default):

sinks:
otel_collector:
type: otlp
endpoint: "http://otel-collector:4317"
# protocol defaults to grpc
sources: [batch_main]

With custom headers:

sinks:
custom_backend:
type: otlp
endpoint: "https://ingest.example.com"
protocol: http
headers:
x-team-id: "platform"
x-datacenter: "${DC}"
sources: [batch_main]
OptionDefaultDescription
endpointrequiredBackend URL
protocolgrpcTransport: grpc or http
auth_headerShortcut for Authorization header
headers{}Additional HTTP headers or gRPC metadata

TLS is automatically enabled when the endpoint uses https:// or port 443.


clickhouse — ClickHouse

Writes to ClickHouse using the native TCP protocol with LZ4 compression. Creates tables automatically on first start.

Signals: Logs, Metrics, Traces

sinks:
clickhouse_out:
type: clickhouse
endpoint: "tcp://clickhouse:9000"
database: infrasage
username: default
password: "${CH_PASSWORD}"
compression: lz4
async_insert: true
sources: [batch_main, trace_sample]
OptionDefaultDescription
endpointrequiredClickHouse native TCP URL
databasedefaultDatabase name
usernamedefaultAuth username
passwordAuth password
compressionlz4Compression: lz4, zstd, or none
async_inserttrueUse ClickHouse async insert mode

Tables created automatically:

TableContents
logsLog records with resource attrs, severity, body, trace/span IDs
metrics_gaugeGauge data points
metrics_sumMonotonic and non-monotonic sum data points
tracesSpans with resource attrs, timing, status, attributes

prometheus_rw — Prometheus Remote Write

Exports metrics via the Prometheus Remote Write protocol (snappy-compressed protobuf).

Signals: Metrics

sinks:
prometheus:
type: prometheus_rw
endpoint: "https://prometheus:9090/api/v1/write"
sources: [batch_main]

Compatible with Prometheus, Grafana Cloud, Thanos, Cortex, Mimir, and VictoriaMetrics.

OptionDefaultDescription
endpointrequiredRemote Write endpoint URL

kafka — Kafka Producer

Publishes OTLP-encoded messages to Kafka topics, one topic per signal type.

Signals: Logs, Metrics, Traces

sinks:
kafka_out:
type: kafka
brokers: ["kafka:9092"]
topics:
logs: "otlp-logs"
metrics: "otlp-metrics"
traces: "otlp-traces"
encoding: otlp_proto # or: otlp_json
compression: snappy
sources: [batch_main]
OptionDefaultDescription
brokersrequiredKafka broker addresses
topicsrequiredTopic name per signal type
encodingotlp_protootlp_proto or otlp_json
compressionsnappysnappy, gzip, lz4, or none

s3 — Amazon S3

Writes logs as NDJSON and metrics as Parquet to S3-compatible object storage. Files are partitioned by signal type and date.

Signals: Logs, Metrics

sinks:
s3_archive:
type: s3
bucket: "my-telemetry-archive"
prefix: "infrasagent"
region: "us-east-1"
flush_interval: 300s # write a new object every 5 minutes
sources: [batch_main]
OptionDefaultDescription
bucketrequiredS3 bucket name
prefixinfrasagentObject key prefix
regionfrom envAWS region
endpointCustom endpoint for S3-compatible stores (MinIO, etc.)
flush_interval300sMaximum time before writing a new object

Credentials are read from the standard AWS credential chain (AWS_ACCESS_KEY_ID, ~/.aws/credentials, instance metadata).


loki — Grafana Loki

Pushes log streams to the Loki HTTP push API.

Signals: Logs

sinks:
loki_out:
type: loki
endpoint: "http://loki:3100"
labels:
job: "infrasagent"
env: "${ENV:-production}"
sources: [batch_main]
OptionDefaultDescription
endpointrequiredLoki base URL
labels{}Static labels to attach to every stream
tenant_idX-Scope-OrgID header value for multi-tenant Loki

Resource attributes from each log record are included as stream labels.


elasticsearch — Elasticsearch

Writes log records to Elasticsearch via the Bulk API.

Signals: Logs

sinks:
es_out:
type: elasticsearch
addresses: ["https://elasticsearch:9200"]
index: "infrasage-logs"
username: elastic
password: "${ES_PASSWORD}"
sources: [batch_main]
OptionDefaultDescription
addressesrequiredElasticsearch node URLs
indexinfrasage-logsTarget index name
usernameBasic auth username
passwordBasic auth password

http — Generic HTTP Webhook

Posts telemetry as OTLP JSON to any HTTP endpoint. Useful for custom ingestion pipelines or webhook-based backends.

Signals: Logs, Metrics, Traces

sinks:
webhook:
type: http
endpoint: "https://hooks.example.com/ingest"
method: POST
headers:
Authorization: "Bearer ${WEBHOOK_TOKEN}"
X-Source: "infrasagent"
timeout: 10s
sources: [batch_main]
OptionDefaultDescription
endpointrequiredTarget URL
methodPOSTHTTP method
headers{}Extra request headers
timeout10sPer-request timeout

stdout — Standard Output

Prints telemetry as JSON to stdout. Useful during development and debugging.

Signals: Logs, Metrics, Traces

sinks:
debug:
type: stdout
pretty: true # pretty-print JSON
sources: [otlp_in]
OptionDefaultDescription
prettyfalseIndent JSON output