Skip to content

Instantly share code, notes, and snippets.

@wardbekker
Created April 14, 2020 08:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wardbekker/ff87b7bb389d5f4384e5143e766423fc to your computer and use it in GitHub Desktop.
Save wardbekker/ff87b7bb389d5f4384e5143e766423fc to your computer and use it in GitHub Desktop.
Fluent-Bit example configuration for Loki
[INPUT]
Name tail
Path /var/log/*.log
Path_Key filename
[Output]
Name loki
Match *
Url http://localhost:3100/loki/api/v1/push
BatchWait 1
BatchSize 3104304
Labels {job="varlogs",host="ward_workstation",agent="fluent-bit"}
LabelKeys filename
@BLUECALF
Copy link

my config on name loki doesn't know url so am not allowed to put url in the config file

@paulrobu
Copy link

my config on name loki doesn't know url so am not allowed to put url in the config file

Indeed, probably things changed meanwhile. In 2023, "loki" output refers to fluent-bit version from https://docs.fluentbit.io/manual/pipeline/outputs/loki which uses Host and Port.
To make it work with Url, should use instead "grafana-loki" as Name for the output type, which corresponds to fluent-bit-plugin-loki flavour from Grafana. See https://github.com/grafana/loki/blob/main/clients/cmd/fluent-bit/fluent-bit.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment