Install
Fluent Bit’s official documentation provides up-to-date installation guides for different operating systems. Open this link and select your OS. Simply follow the steps in the relevant installation manual.Configure
The Fluent Bit configuration file consists of two sections:INPUT
and OUTPUT
. INPUT
determines the source of the logs you need to collect, and OUTPUT
indicates the destination where they will be sent. Here’s how to set up the configuration file correctly:
- Open the
fluent-bit.conf
file and add the following data:
- tail: Data source
- /var/log/syslog: File path
- laas-example.gcore.com:443: Kafka Endpoint on the Logging page
- yourlogin.yourtopic: Your username on the Logging page and your topic name separated with a dot (.)
- yourlogin: Your username on the Logging page
- yourpassword: Your password
INPUT
for different log sources, go to the “Input” section of the Fluent Bit documentation and click the log source you need.
For example, if you want to gather logs from a specific file, open the guide for Tail. Tail is a utility on UNIX-like systems used to display the tail end of a file. It helps Fluent Bit to read changes in the log file. You need to fill in the INPUT
so that it corresponds with Tail.
Descriptions of the OUTPUT parameters
Descriptions of the OUTPUT parameters
- [OUTPUT] : Type of process (export).
- name : Servers where logs will be delivered (Kafka servers).
- brokers : Server(s) where logs will be exported to.
- topics : Topic(s) where logs will be exported to.
- rdkafka.security.protocol : Security protocol that encrypts data to protect it from theft.
- rdkafka.sasl.mechanism : Authentication mechanism that helps to verify a login and a password entered to sign into your logs storage.
- rdkafka.sasl.username : The username that helps to verify the sender.
- rdkafka.sasl.password : The password that helps to verify the sender.
-
Save the changes in the
fluent-bit.conf
file. - Restart Fluent Bit, and it will begin sending logs to the Gcore Managed Logging.
No timestamps
Some services (for example, nginx) transmit timestamps of logs in a non-standard format. In this case, OpenSearch Dashboards will show logs without their date and time. If this happens, copy the string below to theOUTPUT
section. This will ensure that Fluent Bit forwards date and time in a different format that is suitable for services like nginx.