Recipes - Vector and Fluent Bit
Shipper configurations for the NDJSON route. Untested against a running gate.
Verified against v1.0.0-rc.1 · sources
On this page
All values are synthetic. See the Ingest overview for the gate contract.
Vector to /v1/logs#
NDJSON is the gate's native shape, so this has the fewest unknowns.
[transforms.shape]
type = "remap"
inputs = ["app_logs"]
source = '''
.ts = to_unix_timestamp!(.timestamp, unit: "milliseconds")
.level = string(.level) ?? "info"
.service = "app1"
.host = get_hostname!()
.msg = string!(.message)
.attrs = {}
del(.timestamp)
del(.message)
'''
[sinks.drillo]
type = "http"
inputs = ["shape"]
uri = "http://gate.internal:4318/v1/logs"
method = "post"
compression = "none"
encoding.codec = "json"
framing.method = "newline_delimited"
auth.strategy = "bearer"
auth.token = "${DRILLO_TOKEN}"
request.headers.X-Drillo-Stream = "vector-app1"
request.retry_attempts = 1000000
buffer.type = "disk"
buffer.max_size = 1073741824
buffer.when_full = "block"- Do not use Vector's
opentelemetrysink orencoding.codec = "otlp". - Unverified: whether the sink sends
Content-Lengthor chunked for this config. If it chunks, confirm the gate accepts it in your setup. - Run
vector validatefirst. VRL signatures differ between versions.
Fluent Bit http output#
[FILTER]
Name modify
Match *
Rename log msg
Add service app1
Add host ${HOSTNAME}
Add level info
[OUTPUT]
Name http
Match *
Host gate.internal
Port 4318
Uri /v1/logs
Format json_lines
Json_date_key ts
Json_date_format epoch_ms
Header Authorization Bearer ${DRILLO_TOKEN}
Header X-Drillo-Stream fluentbit-app1
tls off
Retry_Limit no_limitsJson_date_format epochis seconds. Do not use it.compress gzipis accepted. Never use zstd or snappy here.Renameassumes your record key islog. Adjust it.