### Start Fluent Bit with HTTP Output (Command Line) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/http.md Example of starting Fluent Bit with the HTTP output plugin configured via the command line. ```shell fluent-bit -i cpu -t cpu -o http://192.168.2.3:80/something -m '*' ``` -------------------------------- ### Download and Install Visual Studio Build Tools Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/windows.md Download and start the Visual Studio installer to set up the necessary C++ build tools and CMake tools for Windows. ```shell wget -o vs.exe https://aka.ms/vs/16/release/vs_buildtools.exe start vs.exe ``` -------------------------------- ### Install and Start Fluent Bit Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/linux/alma-rocky.md Commands to install the package via YUM and start the service using systemctl. ```shell sudo yum install fluent-bit ``` ```shell sudo systemctl start fluent-bit ``` -------------------------------- ### Enable Chunk Tracing on Startup Source: https://github.com/fluent/fluent-bit-docs/blob/master/administration/troubleshooting.md Activate Fluent Bit Tap from the start using command-line options for input and output tracing. This example uses the dummy input and stdout output plugins. ```shell $ fluent-bit -Z -i dummy -o stdout -f 1 --trace-input=dummy.0 --trace-output=stdout ``` -------------------------------- ### Installer Generation Output Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/macos.md Example output showing the process of generating the macOS installer package. ```text CPack: Create package using productbuild CPack: Install projects CPack: - Run preinstall target for: fluent-bit CPack: - Install project: fluent-bit [] CPack: - Install component: binary CPack: - Install component: library CPack: - Install component: headers CPack: - Install component: headers-extra CPack: Create package CPack: - Building component package: /Users/fluent-bit-builder/GitHub/fluent-bit/build/_CPack_Packages/Darwin/productbuild//Users/fluent-bit-builder/GitHub/fluent-bit/build/fluent-bit-1.9.2-apple/Contents/Packages/fluent-bit-1.9.2-apple-binary.pkg CPack: - Building component package: /Users/fluent-bit-builder/GitHub/fluent-bit/build/_CPack_Packages/Darwin/productbuild//Users/fluent-bit-builder/GitHub/fluent-bit/build/fluent-bit-1.9.2-apple/Contents/Packages/fluent-bit-1.9.2-apple-headers.pkg CPack: - Building component package: /Users/fluent-bit-builder/GitHub/fluent-bit/build/_CPack_Packages/Darwin/productbuild//Users/fluent-bit-builder/GitHub/fluent-bit/build/fluent-bit-1.9.2-apple/Contents/Packages/fluent-bit-1.9.2-apple-headers-extra.pkg CPack: - Building component package: /Users/fluent-bit-builder/GitHub/fluent-bit/build/_CPack_Packages/Darwin/productbuild//Users/fluent-bit-builder/GitHub/fluent-bit/build/fluent-bit-1.9.2-apple/Contents/Packages/fluent-bit-1.9.2-apple-library.pkg CPack: - package: /Users/fluent-bit-builder/GitHub/fluent-bit/build/fluent-bit-1.9.2-apple.pkg generated. ``` -------------------------------- ### Start Fluent Bit with InfluxDB Output (Command Line) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/influxdb.md Example of starting Fluent Bit from the command line, specifying input and InfluxDB output plugins with connection details. ```shell fluent-bit -i cpu -t cpu -o influxdb://127.0.0.1:8086 -m '*' ``` -------------------------------- ### Run Azurite Emulator Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/azure_blob.md Start the Azurite service after installation. It will listen on default ports for Blob and Queue services. ```text azurite ``` -------------------------------- ### Configuration examples tab structure Source: https://github.com/fluent/fluent-bit-docs/blob/master/CONTRIBUTING.md Use this tabbed structure to present both YAML and classic configuration examples. ```markdown {% tabs %} {% tab title="fluent-bit.yaml" %} ... {% endtab %} {% tab title="fluent-bit.conf" %} ... {% endtab %} {% endtabs %} ``` -------------------------------- ### Install Fluent Bit Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/source/build-and-install.md Install the compiled Fluent Bit binary and associated files onto the system using the 'make install' command. Prefix with 'sudo' if permission errors occur. ```shell make install ``` -------------------------------- ### Install dependencies and execute test Source: https://github.com/fluent/fluent-bit-docs/blob/master/development/msgpack-format.md Commands to install the required Python library and execute the listener script. ```shell $ pip install msgpack $ python3 test.py ``` -------------------------------- ### Install Fluent Bit via Yum Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/linux/amazon-linux.md Execute the installation command after the repository configuration is complete. ```shell sudo yum install fluent-bit ``` -------------------------------- ### Configuration file example (fluent-bit.conf) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/tail.md Example of configuring the tail plugin in a fluent-bit.conf file. ```text [INPUT] Name tail Path /var/log/syslog [OUTPUT] Name stdout Match * ``` -------------------------------- ### Configuration file tag_key example (fluent-bit.conf) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/http.md Example configuration demonstrating the use of 'Tag_Key' in fluent-bit.conf. ```text [INPUT] Name http Listen 0.0.0.0 Port 8888 Tag_Key key1 [OUTPUT] Name stdout Match value1 ``` -------------------------------- ### Log Processing Examples Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/gelf.md Examples showing raw Docker logs, decoded logs, and the final GELF payload format. ```text ... {"log":"{\"data\": \"This is an example.\"}","stream":"stderr","time":"2019-07-21T12:45:11.273315023Z"} ... ``` ```text ... [0] kube.log: [1565770310.000198491, {"log"=>{"data"=>"This is an example."}, "stream"=>"stderr", "time"=>"2019-07-21T12:45:11.273315023Z"}] ... ``` ```text ... {"version":"1.1", "short_message":"This is an example.", "host": "", "_stream":"stderr", "timestamp":1565770310.000199} ... ``` -------------------------------- ### Configuration file example (fluent-bit.yaml) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/tail.md Example of configuring the tail plugin in a fluent-bit.yaml file. ```yaml pipeline: inputs: - name: tail path: /var/log/syslog outputs: - stdout: match: * ``` -------------------------------- ### Start Fluent Bit service Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/linux/ubuntu.md Starts the Fluent Bit service using systemd. ```shell sudo systemctl start fluent-bit ``` -------------------------------- ### Example Output Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/macos.md Example output when testing Fluent Bit with the Dummy input plugin. ```text [0] dummy.0: [1644362033.676766000, {"message"=>"dummy"}] [0] dummy.0: [1644362034.676914000, {"message"=>"dummy"}] ``` -------------------------------- ### Start Fluent Bit (Classic Config) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/forward.md Command to start Fluent Bit using a classic configuration file. ```shell fluent-bit --config flb.conf ``` -------------------------------- ### Dummy Plugin Output Example Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/dummy.md Example output format from the Dummy input plugin when used with stdout. ```text ...[0] dummy.0: [[1686451466.659962491, {}], {"message"=>"dummy"}] [0] dummy.0: [[1686451467.659679509, {}], {"message"=>"dummy"}] ... ``` -------------------------------- ### Configuration file tag_key example (fluent-bit.yaml) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/http.md Example configuration demonstrating the use of 'tag_key' in fluent-bit.yaml. ```yaml pipeline: inputs: - name: http listen: 0.0.0.0 port: 8888 tag_key: key1 outputs: - name: stdout match: value1 ``` -------------------------------- ### Full Loki Ingestion Pipeline Example Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/loki.md A complete configuration example using a dummy input to test Loki ingestion. ```yaml service: flush: 1 log_level: info pipeline: inputs: - name: dummy dummy: '{"key": 1, "sub": {"stream": "stdout", "id": "some id"}, "kubernetes": {"labels": {"team": "Santiago Wanderers"}}}' samples: 1 outputs: - name: loki match: '*' host: 127.0.0.1 port: 3100 labels: job=fluentbit label_keys: $sub['stream'] auto_kubernetes_labels: on ``` ```text [SERVICE] Flush 1 Log_Level info [INPUT] Name dummy Dummy {"key": 1, "sub": {"stream": "stdout", "id": "some id"}, "kubernetes": {"labels": {"team": "Santiago Wanderers"}}} Samples 1 [OUTPUT] Name loki Match * Host 127.0.0.1 Port 3100 Labels job=fluentbit Label_Keys $sub['stream'] Auto_Kubernetes_Labels on ``` -------------------------------- ### Sample Log File Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/filters/multiline-stacktrace.md Example log file containing single lines, Java stack traces, and Go stack traces. ```text single line... Dec 14 06:41:08 Exception in thread "main" java.lang.RuntimeException: Something has gone wrong, aborting! at com.myproject.module.MyProject.badMethod(MyProject.java:22) at com.myproject.module.MyProject.oneMoreMethod(MyProject.java:18) at com.myproject.module.MyProject.anotherMethod(MyProject.java:14) at com.myproject.module.MyProject.someMethod(MyProject.java:10) at com.myproject.module.MyProject.main(MyProject.java:6) another line... panic: my panic goroutine 4 [running]: panic(0x45cb40, 0x47ad70) /usr/local/go/src/runtime/panic.go:542 +0x46c fp=0xc42003f7b8 sp=0xc42003f710 pc=0x422f7c main.main.func1(0xc420024120) foo.go:6 +0x39 fp=0xc42003f7d8 sp=0xc42003f7b8 pc=0x451339 runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc42003f7e0 sp=0xc42003f7d8 pc=0x44b4d1 created by main.main foo.go:5 +0x58 goroutine 1 [chan receive]: runtime.gopark(0x4739b8, 0xc420024178, 0x46fcd7, 0xc, 0xc420028e17, 0x3) /usr/local/go/src/runtime/proc.go:280 +0x12c fp=0xc420053e30 sp=0xc420053e00 pc=0x42503c runtime.goparkunlock(0xc420024178, 0x46fcd7, 0xc, 0x1000f010040c217, 0x3) /usr/local/go/src/runtime/proc.go:286 +0x5e fp=0xc420053e70 sp=0xc420053e30 pc=0x42512e runtime.chanrecv(0xc420024120, 0x0, 0xc420053f01, 0x4512d8) /usr/local/go/src/runtime/chan.go:506 +0x304 fp=0xc420053f20 sp=0xc420053e70 pc=0x4046b4 ``` -------------------------------- ### Example Input Configuration Source: https://github.com/fluent/fluent-bit-docs/blob/master/administration/configuring-fluent-bit/yaml/pipeline-section.md This snippet shows a basic configuration for the `inputs` section, defining a `cpu` input plugin with a specific tag. ```yaml pipeline: inputs: - name: cpu tag: my_cpu ``` -------------------------------- ### Basic Configuration Example Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/kubernetes-events.md Example of a basic Fluent Bit configuration file using the Kubernetes Events input plugin and the standard output plugin. ```APIDOC ## Basic Configuration Example This example demonstrates a basic Fluent Bit configuration that collects Kubernetes events and outputs them to the console. ### fluent-bit.yaml ```yaml service: flush: 1 log_level: info pipeline: inputs: - name: kubernetes_events tag: k8s_events kube_url: https://kubernetes.default.svc outputs: - name: stdout match: '*' ``` ### fluent-bit.conf ```text [SERVICE] flush 1 log_level info [INPUT] name kubernetes_events tag k8s_events kube_url https://kubernetes.default.svc [OUTPUT] name stdout match * ``` ``` -------------------------------- ### Collecting CPU Metrics Example Source: https://github.com/fluent/fluent-bit-docs/blob/master/administration/configuring-fluent-bit/classic-mode/configuration-file.md A configuration file example demonstrating how to collect CPU metrics and flush the results every five seconds to the standard output. ```text [SERVICE] Flush 5 Daemon off Log_Level debug [INPUT] Name cpu Tag my_cpu [OUTPUT] Name stdout Match my*cpu ``` -------------------------------- ### Rewrite Tag Filter Configuration Example Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/filters/rewrite-tag.md Example of configuring the rewrite_tag filter with a rule. This rule matches records where the 'name' key starts with 'abc-' followed by numbers, and re-emits them with a new tag 'processed.tag'. The original record is kept. ```fluent-bit-config [FILTER] Name rewrite_tag Match * Rule $name ^(abc-)-([0-9]+) processed.$1 keep ``` -------------------------------- ### Filter Records Starting with 'aa' using Grep Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/filters/grep.md This command-line example demonstrates how to use the grep filter to keep only records where the 'log' field starts with 'aa'. It uses the tail input plugin to read from 'lines.txt' and outputs to stdout. ```shell fluent-bit -i tail -p 'path=lines.txt' -F grep -p 'regex=log aa' -m '*' -o stdout ``` -------------------------------- ### Blob Plugin Initialization Log Output Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/blob.md Example output showing the initialization of the blob input plugin. ```text ... [2025/11/05 17:39:32.818356000] [ info] [input:blob:blob.0] initializing [2025/11/05 17:39:32.818362000] [ info] [input:blob:blob.0] storage_strategy='memory' (memory only) ... ``` -------------------------------- ### Select Specific Key with Alias from Tagged Records Source: https://github.com/fluent/fluent-bit-docs/blob/master/stream-processing/fluent-bit-sql.md This example selects the 'code' key, aliasing it as 'http_status', from records whose tags start with 'apache'. ```sql SELECT code AS http_status FROM TAG:'apache.*'; ``` -------------------------------- ### Fluent Bit Elasticsearch Output Command Line Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/elasticsearch.md Example of starting Fluent Bit with the Elasticsearch output plugin via the command line using the URI format. ```shell fluent-bit -i cpu -t cpu -o es://192.168.2.3:9200/my_index/my_type \ -o stdout -m '*' ``` -------------------------------- ### Implement manual data ingestion in C Source: https://github.com/fluent/fluent-bit-docs/blob/master/development/ingest-records-manually.md This example demonstrates initializing the Fluent Bit library context, configuring the lib input and stdout output, and pushing records using flb_lib_push. ```c #include #define JSON_1 "[1449505010, {\"key1\": \"some value\"}]" #define JSON_2 "[1449505620, {\"key1\": \"some new value\"}]" int main() { int ret; int in_ffd; int out_ffd; flb_ctx_t *ctx; /* Create library context */ ctx = flb_create(); if (!ctx) { return -1; } /* Enable the input plugin for manual data ingestion */ in_ffd = flb_input(ctx, "lib", NULL); if (in_ffd == -1) { flb_destroy(ctx); return -1; } /* Enable output plugin 'stdout' (print records to the standard output) */ out_ffd = flb_output(ctx, "stdout", NULL); if (out_ffd == -1) { flb_destroy(ctx); return -1; } /* Start the engine */ ret = flb_start(ctx); if (ret == -1) { flb_destroy(ctx); return -1; } /* Ingest data manually */ flb_lib_push(ctx, in_ffd, JSON_1, sizeof(JSON_1) - 1); flb_lib_push(ctx, in_ffd, JSON_2, sizeof(JSON_2) - 1); /* Stop the engine (5 seconds to flush remaining data) */ flb_stop(ctx); /* Destroy library context, release all resources */ flb_destroy(ctx); return 0; } ``` -------------------------------- ### Fluent Bit Elasticsearch Output Command Line with Properties Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/elasticsearch.md Example of starting Fluent Bit with the Elasticsearch output plugin via the command line, specifying properties individually. ```shell fluent-bit -i cpu -t cpu -o es -p Host=192.168.2.3 -p Port=9200 \ -p Index=my_index -p Type=my_type -o stdout -m '*' ``` -------------------------------- ### Tailing files keeping state Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/tail.md Example command to start Fluent Bit with the tail input plugin and enable state saving using a database file. ```shell fluent-bit -i tail -p path=/var/log/syslog -p db=/path/to/logs.db -o stdout ``` -------------------------------- ### Command line example Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/kafka.md Example of how to run the Kafka plugin from the command line, specifying brokers and topics. ```shell fluent-bit -i cpu -o kafka -p brokers=192.168.1.3:9092 -p topics=test ``` -------------------------------- ### Configure winlog input via configuration files Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/windows-event-log.md Minimum configuration examples for the winlog plugin using both YAML and traditional configuration file formats. ```yaml pipeline: inputs: - name: winlog channels: setup,Windows Powershell interval_sec: 1 db: winlog.sqlite outputs: - name: stdout match: '*' ``` ```text [INPUT] Name winlog Channels Setup,Windows PowerShell Interval_Sec 1 DB winlog.sqlite [OUTPUT] Name stdout Match * ``` -------------------------------- ### Configure Splunk Plugin in fluent-bit.yaml Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/splunk.md Integrate the Splunk output plugin into your Fluent Bit configuration using the 'fluent-bit.yaml' format. This example shows basic input and output setup with TLS disabled. ```yaml pipeline: inputs: - name: cpu tag: cpu outputs: - name: splunk match: '*' host: 127.0.0.1 port: 8088 tls: on tls.verify: off ``` -------------------------------- ### Command line example Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/tail.md Example of how to run the tail plugin from the command line to parse text files. ```shell fluent-bit -i tail -p path=/var/log/syslog -o stdout ``` -------------------------------- ### Configure Fluent Bit with Explicit Mapping Type Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/elasticsearch.md When Elasticsearch mapping type names cannot start with underscores, explicitly set the `type` to `doc` or `flb_type` in your Fluent Bit configuration. This example uses `doc`. ```yaml pipeline: outputs: - name: es match: '*' host: vpc-test-domain-ke7thhzoo7jawsrhmm6mb7ite7y.us-west-2.es.amazonaws.com port: 443 index: my_index aws_auth: on aws_region: us-west-2 tls: on type: doc ``` -------------------------------- ### Configure per-input buffering modes Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/buffering.md Demonstrates setting up filesystem, memory, and memrb buffering for specific input plugins. ```yaml service: flush: 1 log_level: info storage.path: /var/log/flb-storage/ storage.sync: normal storage.checksum: off storage.max_chunks_up: 128 storage.backlog.mem_limit: 5M pipeline: inputs: - name: cpu storage.type: filesystem - name: mem storage.type: memory - name: dummy storage.type: memrb mem_buf_limit: 10M ``` ```text [SERVICE] Flush 1 Log_Level info Storage.Path /var/log/flb-storage/ Storage.Sync normal Storage.Checksum off Storage.Max_Chunks_Up 128 Storage.Backlog.Mem_Limit 5M [INPUT] Name cpu Storage.Type filesystem [INPUT] Name mem Storage.Type memory [INPUT] Name dummy Storage.Type memrb Mem_Buf_Limit 10M ``` -------------------------------- ### Start Fluent Bit with Web Server for Tracing Source: https://github.com/fluent/fluent-bit-docs/blob/master/administration/troubleshooting.md Run Fluent Bit in a Docker container with the web server enabled (-H) and specify an input plugin with an alias. This setup allows for dynamic trace activation. ```shell $ docker run --rm -ti -p 2020:2020 fluent/fluent-bit:latest -Z -H -i dummy -p alias=input_dummy -o stdout -f 1 ``` -------------------------------- ### Configuration file example (fluent-bit.conf) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/http.md Basic HTTP input plugin configuration in fluent-bit.conf. ```text [INPUT] Name http Listen 0.0.0.0 Port 8888 [OUTPUT] Name stdout Match app.log ``` -------------------------------- ### Launch Fluentd with Configuration Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/forward.md Start the Fluentd service using a specified configuration file. ```shell fluentd -c test.conf ``` -------------------------------- ### Silent Installation with Custom Directory Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/windows.md Perform a silent installation of Fluent Bit using the NSIS installer options, specifying a custom installation directory. ```shell /S /D=C:\fluent-bit ``` -------------------------------- ### Start Fluent Bit Service Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/linux/debian.md Instruct systemd to start the Fluent Bit service. This command enables and starts the service. ```shell sudo systemctl start fluent-bit ``` -------------------------------- ### Define inputs.conf configuration Source: https://github.com/fluent/fluent-bit-docs/blob/master/administration/configuring-fluent-bit/classic-mode/commands.md Example of an inputs configuration file defining CPU and tail inputs. ```text [INPUT] Name cpu Tag mycpu [INPUT] Name tail Path /var/log/*.log Tag varlog.* ``` -------------------------------- ### Plugins Configuration File (INIFL) Source: https://github.com/fluent/fluent-bit-docs/blob/master/development/golang-output-plugins.md Example of a plugins configuration file in INI-like format, specifying the path to the external Go shared library. ```text [PLUGINS] Path /path/to/out_gstdout.so ``` -------------------------------- ### Run Fluent Bit from Executable Installer Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/windows.md Execute Fluent Bit installed via the EXE installer, specifying dummy input and stdout output. ```powershell & "C:\Program Files\fluent-bit\bin\fluent-bit.exe" -i dummy -o stdout ``` -------------------------------- ### Install Fluent Bit Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/linux/ubuntu.md Installs the latest Fluent Bit package. ```shell sudo apt-get install fluent-bit ``` -------------------------------- ### Install Homebrew Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/macos.md Command to install Homebrew if it is not already present on the system. ```shell /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -------------------------------- ### Example Unstructured Log Entry Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/parsers.md This is an example of an unstructured log entry that can be parsed. ```text 192.168.2.20 - - [28/Jul/2006:10:27:10 -0300] "GET /cgi-bin/try/ HTTP/1.0" 200 3395 ``` -------------------------------- ### Start Fluentd Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/forward.md Command to start the Fluentd service using the specified configuration file. ```shell fluentd -c fld.conf ``` -------------------------------- ### Start Fluent Bit Service Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/linux/raspbian-raspberry-pi.md Starts the Fluent Bit service using systemd. ```shell sudo service fluent-bit start ``` -------------------------------- ### Configuration file http.0 example (fluent-bit.conf) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/http.md Example configuration for http.0 input in fluent-bit.conf when no tag is explicitly set. ```text [INPUT] Name http Listen 0.0.0.0 Port 8888 [OUTPUT] Name stdout Match http.0 ``` -------------------------------- ### Platform Metadata Field Example Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/filters/kubernetes.md Example of the aws_entity_platform field added to Kubernetes metadata. ```text "kubernetes" => { ... "aws_entity_platform" => "eks" } ``` -------------------------------- ### Configure Docker Metrics Collection (Conf) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/docker-metrics.md This configuration file example demonstrates how to set up the Fluent Bit 'docker' input plugin to gather metrics from specific containers. The 'Include' parameter filters which containers to monitor. ```text [INPUT] Name docker Include 6bab19c3a0f9 14159be4ca2c [OUTPUT] Name stdout Match * ``` -------------------------------- ### Example Python Traceback Input Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/parsers/multiline-parsing.md An example of a Python traceback that the 'python' parser is designed to handle. ```text Traceback (most recent call last): File "/app/main.py", line 10, in result = process_data(None) File "/app/utils.py", line 25, in process_data return data.strip() AttributeError: 'NoneType' object has no attribute 'strip' ``` -------------------------------- ### Compare interval and window configurations Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/filters/throttle.md Examples demonstrating how different interval and window settings affect rate smoothing. ```text Rate 60 Window 5 Interval 1m ``` ```text Rate 1 Window 300 Interval 1s ``` ```text XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ``` ```text X X X X X X XXXX XXXX XXXX XXXX XXXX XXXX +-+-+-+-+-+--+-+-+-+-+-+-+-+-+-+ ``` -------------------------------- ### Example Input Record Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/logdna.md An example of an input record with promoted keys. ```json {"log": "starting service", "severity": "INFO", "app": "my-service", "host": "web-01"} ``` -------------------------------- ### Example curl message Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/http.md Example curl command for sending a message. ```shell curl -d @app.log -XPOST -H "content-type: application/json" http://localhost:8888/app.log ``` -------------------------------- ### Configuration file example (fluent-bit.yaml) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/http.md Basic HTTP input plugin configuration in fluent-bit.yaml. ```yaml pipeline: inputs: - name: http listen: 0.0.0.0 port: 8888 outputs: - name: stdout match: app.log ``` -------------------------------- ### Main Configuration File (INIFL) Source: https://github.com/fluent/fluent-bit-docs/blob/master/development/golang-output-plugins.md Example of a main Fluent Bit configuration file in INI-like format, referencing a separate plugins configuration file and defining pipeline inputs and outputs. ```text [SERVICE] plugins_file /path/to/plugins.conf [INPUT] Name dummy [OUTPUT] Name gstdout ``` -------------------------------- ### Configure winstat in configuration files Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/inputs/windows-system-statistics.md Configuration examples for setting up the winstat input plugin using YAML or the standard configuration format. ```yaml pipeline: inputs: - name: winstat tag: winstat interval_sec: 1 interval_nsec: 0 outputs: - name: stdout match: '*' ``` ```text [INPUT] Name winstat Tag winstat Interval_Sec 1 Interval_Nsec 0 [OUTPUT] Name stdout Match * ``` -------------------------------- ### Unstructured Message Example Source: https://github.com/fluent/fluent-bit-docs/blob/master/concepts/key-concepts.md This is an example of an unstructured message. It is a simple string without key-value pairs. ```javascript "Project Fluent Bit created on 1398289291" ``` -------------------------------- ### Syslog Event Example Source: https://github.com/fluent/fluent-bit-docs/blob/master/concepts/key-concepts.md Example content of a Syslog file containing four independent events. ```text Jan 18 12:52:16 flb systemd[2222]: Starting GNOME Terminal Server Jan 18 12:52:16 flb dbus-daemon[2243]: [session uid=1000 pid=2243] Successfully activated service 'org.gnome.Terminal' Jan 18 12:52:16 flb systemd[2222]: Started GNOME Terminal Server. Jan 18 12:52:16 flb gsd-media-keys[2640]: # watch_fast: "/org/gnome/terminal/legacy/" (establishing: 0, active: 0) ``` -------------------------------- ### Install Fluent Bit with a Single Line Script Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/linux.md Use this command to download and execute the installation script for the most recent Fluent Bit version. Always validate scripts from the internet before execution. ```bash curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh ``` -------------------------------- ### Install Fluent Bit from Homebrew Source: https://github.com/fluent/fluent-bit-docs/blob/master/installation/downloads/macos.md Command to install the Fluent Bit package using Homebrew. ```shell brew install fluent-bit ``` -------------------------------- ### File Output Plugin: Configuration file setup (Conf) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/file.md Configures the File output plugin using a .conf file, specifying the input and output sections, including the output path. ```text [INPUT] Name cpu Tag cpu [OUTPUT] Name file Match * Path output_dir ``` -------------------------------- ### Run Fluent Bit with a Configuration File Source: https://github.com/fluent/fluent-bit-docs/blob/master/development/golang-output-plugins.md Load the main configuration file using the -c option. No separate plugins configuration file is needed from the command line. ```shell fluent-bit -c fluent-bit.conf ``` -------------------------------- ### Start Fluent Bit (YAML) Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/forward.md Command to start Fluent Bit using a YAML configuration file. ```shell fluent-bit --config flb.yaml ``` -------------------------------- ### Example Ruby Stack Trace Input Source: https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/parsers/multiline-parsing.md An example of a Ruby exception backtrace that the 'ruby' parser can process. ```text app/models/user.rb:42:in `validate_email' from app/models/user.rb:30:in `save' from app/controllers/users_controller.rb:15:in `create' from config/routes.rb:5:in `block in
' ```