lokibuilt-in output plugin allows you to send your log or events to a Loki service. It supports data enrichment with Kubernetes labels, custom label keys and Tenant ID within others.
loki/api/v1/push, but just the base hostname/URL.
key=valuepairs. In addition to fixed parameters, it also allows to add custom record keys (similar to
label_keysproperty). More details in the Labels section.
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.
X-Scope-OrgIDof HTTP header. It is useful to set Tenant ID dynamically.
joband the value of the record key called
labelsconfiguration properties might look as follows:
jobhas the value
fluentbitand the second label is configured to access the nested map called
subtargeting the value of the key
stream. Note that the second label name must starts with a
$, that means that's a Record Accessor pattern so it provide you the ability to retrieve values from nested maps by using the key names.
label_keysallow to specify multiple record keys that needs to be placed as part of the outgoing Stream Labels, yes, this is a similar feature than the one explained above in the
labelsproperty. Consider this as another way to set a record key in the Stream, but with the limitation that you cannot use a custom name for the key value.
auto_kubernetes_labelswhich will auto-populate the streams with the Pod labels for you. Consider the following configuration: