Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/clients/cmd/fluent-bit
Etran-H 5447541e2e
Fix open "/tmp/*" the system cannot find the path specified on windows (#8170)
3 years ago
..
Dockerfile Update golang to 1.19.5 (#8278) 3 years ago
README.md fluent-bit: Update the Fluent Bit plugin README with correct golang minimum version (#7302) 3 years ago
buffer.go Remove the stream lag metric. (#6324) 3 years ago
client.go promtail: Add `max-line-size-truncate` (#8233) 3 years ago
config.go Replace deprecated `io/ioutil` with `io` and `os` packages (#7212) 3 years ago
config_test.go Replace deprecated `io/ioutil` with `io` and `os` packages (#7212) 3 years ago
dque.go Fix open "/tmp/*" the system cannot find the path specified on windows (#8170) 3 years ago
fluent-bit.conf Loki/Promtail: Client Refactor (#3623) 5 years ago
loki.go Remove the stream lag metric. (#6324) 3 years ago
loki_test.go fluent-bit: Attempt to unmarshal nested json. (#5223) 4 years ago
out_grafana_loki.go Remove the stream lag metric. (#6324) 3 years ago

README.md

Fluent Bit output plugin

Fluent Bit is a Fast and Lightweight Data Forwarder, it can be configured with the Loki output plugin to ship logs to Loki. You can define which log files you want to collect using the Tail or Stdin input plugin. Additionally Fluent Bit supports multiple Filter and Parser plugins (Kubernetes, JSON, etc..) to structure and alter log lines.

This plugin is implemented with Fluent Bit's Go plugin interface. It pushes logs to Loki using a GRPC connection.

Warning syslog and systemd input plugins have not been tested yet. Feedback appreciated, file an issue if you encounter any misbehaviors.

Building

Prerequisites

  • Go 1.17+
  • gcc (for cgo)

To build the output plugin library file out_grafana_loki.so, in the root directory of Loki source code, you can use:

$ make fluent-bit-plugin

You can also build the Docker image with the plugin pre-installed using:

$ make fluent-bit-image

Running

$ fluent-bit -e out_grafana_loki.so -c /etc/fluent-bit.conf

Testing

Issue the following command to send /var/log logs to your http://localhost:3100/loki/api/ Loki instance for testing:

$ make fluent-bit-test

You can easily override the address by setting the $LOKI_URL environment variable.