Loki output
June 22, 2026 ยท View on GitHub
It sends the logs batches to Loki using HTTP API.
Supports dead queue.
Config params
address string required
A full URI address of Loki
Example address
http://127.0.0.1:3100 or https://loki:3100
labels []Label
Array of labels to send logs
Example labels
label=value
message_field string required
Message field from log to be mapped to loki
Example
message
timestamp_field string required
Timestamp field from log to be mapped to loki
Example
timestamp
auth AuthConfig
Auth config.
AuthConfig params:
strategydescribes strategy to use; options:"disabled|tenant|basic|bearer" By default strategy isdisabled.tenant_idshould be provided if strategy istenant.usernameshould be provided if strategy isbasic. Username is used for HTTP Basic Authentication.passwordshould be provided if strategy isbasic. Password is used for HTTP Basic Authentication.bearer_tokenshould be provided if strategy isbearer. Token is used for HTTP Bearer Authentication.
tls_enabled bool default=false
If set true, the plugin will use SSL/TLS connections method.
tls_skip_verify bool default=false
If set, the plugin will skip SSL/TLS verification.
request_timeout cfg.Duration default=1s
Client timeout when sends requests to Loki HTTP API.
connection_timeout cfg.Duration default=5s
It defines how much time to wait for the connection.
keep_alive KeepAliveConfig
Keep-alive config.
KeepAliveConfig params:
max_idle_conn_duration- idle keep-alive connections are closed after this duration. By default idle connections are closed after10s.max_conn_duration- keep-alive connections are closed after this duration. If set to0- connection duration is unlimited. By default connection duration is5m.
workers_count cfg.Expression default=gomaxprocs*4
How much workers will be instantiated to send batches. It also configures the amount of minimum and maximum number of database connections.
batch_size cfg.Expression default=capacity/4
Maximum quantity of events to pack into one batch.
batch_size_bytes cfg.Expression default=0
A minimum size of events in a batch to send. If both batch_size and batch_size_bytes are set, they will work together.
batch_flush_timeout cfg.Duration default=200ms
After this timeout batch will be sent even if batch isn't completed.
retention cfg.Duration default=1s
Retention milliseconds for retry to Loki.
retry int default=10
Retries of insertion. If File.d cannot insert for this number of attempts, File.d will fall with non-zero exit code or skip message (see fatal_on_failed_insert).
fatal_on_failed_insert bool default=false
After an insert error, fall with a non-zero exit code or not. A configured deadqueue disables fatal exits.
retention_exponentially_multiplier int default=2
Multiplier for exponential increase of retention between retries
ban_period cfg.Duration default=10s
Period for which addresses will be banned in case of unavailability. If set to 0, circuit breaker is disabled.
reconnect_interval cfg.Duration default=5s
Interval for checking banned endpoints.
Generated using insane-doc