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]
| Option | Default | Description |
|---|---|---|
endpoint | required | Backend URL |
protocol | grpc | Transport: grpc or http |
auth_header | — | Shortcut 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]
| Option | Default | Description |
|---|---|---|
endpoint | required | ClickHouse native TCP URL |
database | default | Database name |
username | default | Auth username |
password | — | Auth password |
compression | lz4 | Compression: lz4, zstd, or none |
async_insert | true | Use ClickHouse async insert mode |
Tables created automatically:
| Table | Contents |
|---|---|
logs | Log records with resource attrs, severity, body, trace/span IDs |
metrics_gauge | Gauge data points |
metrics_sum | Monotonic and non-monotonic sum data points |
traces | Spans 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.
| Option | Default | Description |
|---|---|---|
endpoint | required | Remote 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]
| Option | Default | Description |
|---|---|---|
brokers | required | Kafka broker addresses |
topics | required | Topic name per signal type |
encoding | otlp_proto | otlp_proto or otlp_json |
compression | snappy | snappy, 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]
| Option | Default | Description |
|---|---|---|
bucket | required | S3 bucket name |
prefix | infrasagent | Object key prefix |
region | from env | AWS region |
endpoint | — | Custom endpoint for S3-compatible stores (MinIO, etc.) |
flush_interval | 300s | Maximum 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]
| Option | Default | Description |
|---|---|---|
endpoint | required | Loki base URL |
labels | {} | Static labels to attach to every stream |
tenant_id | — | X-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]
| Option | Default | Description |
|---|---|---|
addresses | required | Elasticsearch node URLs |
index | infrasage-logs | Target index name |
username | — | Basic auth username |
password | — | Basic 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]
| Option | Default | Description |
|---|---|---|
endpoint | required | Target URL |
method | POST | HTTP method |
headers | {} | Extra request headers |
timeout | 10s | Per-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]
| Option | Default | Description |
|---|---|---|
pretty | false | Indent JSON output |