You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pipeline/outputs/loki.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ There is a separate Golang output plugin provided by [Grafana](https://grafana.c
29
29
|`line_format`| Format to use when flattening the record to a log line. Valid values are `json` or `key_value`. If set to `json`, the log line sent to Loki will be the Fluent Bit record dumped as JSON. If set to `key_value`, the log line will be each item in the record concatenated together (separated by a single space) in the format. |`json`|
30
30
|`auto_kubernetes_labels`| If set to `true`, adds all Kubernetes labels to the stream labels. |`false`|
31
31
|`tenant_id_key`| Specify the name of the key from the original record that contains the Tenant ID. The value of the key is set as `X-Scope-OrgID` of HTTP header. Use to set Tenant ID dynamically. |_none_|
32
-
|`tenant_id_key_error_handling`| Set how `tenant_id_key` split request failures affect the whole chunk. Options are `partial_success`, to treat mixed success and failure as success, or `partial_error`, to retry mixed success and failure. |`partial_success`|
32
+
|`tenant_id_key_error_handling`| Set how `tenant_id_key` split request failures affect the whole chunk. Options are `partial_success` (treat mixed success and failure as success; records for failed tenants are dropped), or `partial_error` (retry mixed success and failure; may result in duplicate records for successful tenants). |`partial_success`|
33
33
|`buffer_size`| Maximum HTTP response buffer size. |`512KB`|
34
34
|`compress`| Set payload compression mechanism. The only available option is `gzip`. |_none_|
35
35
|`workers`| The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. |`0`|
Use `tenant_id_key` to route records to Loki tenants dynamically. Fluent Bit reads the tenant ID from the specified record key and sends it as the `X-Scope-OrgID` HTTP header. When a chunk contains records for multiple tenants, Fluent Bit splits the chunk into one request per tenant.
315
315
316
+
If `tenant_id_key` resolves to a missing or empty value for a record, Fluent Bit falls back to the static `tenant_id`, if set, and sends `X-Scope-OrgID` with that value. If both `tenant_id_key` and `tenant_id` are missing or empty, Fluent Bit treats the record as single-tenant and sends no `X-Scope-OrgID` header. This fallback behavior also applies when using `tenant_id_key_error_handling`, so fallback records are included in the corresponding per-tenant request.
317
+
316
318
The `tenant_id_key_error_handling` option controls how Fluent Bit treats mixed results when one tenant request succeeds and another fails:
317
319
318
320
-`partial_success`: treat the chunk as successful when at least one tenant request succeeds. This is the default.
0 commit comments