Skip to content
fluent-bit output plugin for Loki. https://github.com/grafana/loki
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
vendor
.gitignore
.travis.yml
Gopkg.lock
Gopkg.toml
LICENSE
Makefile
README.md
appveyor.yml
loki.go
loki_test.go
out_loki.go
out_loki_test.go
version.go

README.md

fluent-bit loki output plugin

Build Status Build status

Windows binaries are available in release pages.

This plugin works with fluent-bit's go plugin interface. You can use fluent-bit loki to ship logs into grafana datasource with loki.

The configuration typically looks like:

fluent-bit --> loki --> grafana <-- other grafana sources

Usage

$ fluent-bit -e /path/to/built/out_loki.so -c fluent-bit.conf

Prerequisites

  • Go 1.11+
  • gcc (for cgo)

Building

$ make

Configuration Options

Key Description Default
Url Url of loki server API endpoint http://localhost:3100/api/prom/push
BatchWait Waiting time for batch operation (unit: msec) 10 milliseconds
Url Batch size for batch operation (unit: KiB) 10 KiB
Labels labels for API requests job="fluent-bit" (describe below)

Example:

add this section to fluent-bit.conf

[Output]
    Name loki
    Match *
    Url http://localhost:3100/api/prom/push
    BatchWait 10 # (10msec)
    BatchSize 30 # (30KiB)
    # interpreted as {test="fluent-bit-go", lang="Golang"}
    Labels {"labels": [{"key": "test", "label": "fluent-bit-go"},{"key": "lang", "label": "Golang"}]}

Useful links

You can’t perform that action at this time.
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.