diff --git a/administration/monitoring.md b/administration/monitoring.md index 00cf40c0f..701a717b9 100644 --- a/administration/monitoring.md +++ b/administration/monitoring.md @@ -71,10 +71,10 @@ Start Fluent bit with the corresponding configuration chosen above: ```shell # For YAML configuration. -$ ./bin/fluent-bit --config fluent-bit.yaml +./bin/fluent-bit --config fluent-bit.yaml # For classic configuration. -$ ./bin/fluent-bit --config fluent-bit.conf +./bin/fluent-bit --config fluent-bit.conf ``` Fluent Bit starts and generates output in your terminal: @@ -282,7 +282,7 @@ The command prints a similar output like this: Query internal metrics in JSON format with the following command: ```shell -$ curl -s http://127.0.0.1:2020/api/v1/metrics | jq +curl -s http://127.0.0.1:2020/api/v1/metrics | jq ``` The command prints a similar output like this: @@ -312,7 +312,7 @@ The command prints a similar output like this: Query internal metrics in Prometheus Text 0.0.4 format: ```shell -$ curl -s http://127.0.0.1:2020/api/v1/metrics/prometheus +curl -s http://127.0.0.1:2020/api/v1/metrics/prometheus ``` This command returns the same metrics in Prometheus format instead of JSON: @@ -506,7 +506,7 @@ pipeline: Use the following command to call the health endpoint: ```shell -$ curl -s http://127.0.0.1:2020/api/v1/health +curl -s http://127.0.0.1:2020/api/v1/health ``` With the example configuration, the health status is determined by the following equation: diff --git a/development/msgpack-format.md b/development/msgpack-format.md index 8c1ab2901..54bfba643 100644 --- a/development/msgpack-format.md +++ b/development/msgpack-format.md @@ -16,7 +16,7 @@ This section provides an overview of the specific types used by Fluent Bit withi Set up Fluent Bit to send in `msgpack` format to a specific port. ```bash -$ docker run --rm -it --network=host fluent/fluent-bit /fluent-bit/bin/fluent-bit -i cpu -o tcp://127.0.0.1:5170 -p format=msgpack -v +docker run --rm -it --network=host fluent/fluent-bit /fluent-bit/bin/fluent-bit -i cpu -o tcp://127.0.0.1:5170 -p format=msgpack -v ``` diff --git a/development/wasm-filter-plugins.md b/development/wasm-filter-plugins.md index 0c1a64266..8cfcbc0b7 100644 --- a/development/wasm-filter-plugins.md +++ b/development/wasm-filter-plugins.md @@ -35,9 +35,9 @@ Currently, Fluent Bit supports the following Wasm tool chains: As described in the general options in the [source installation](../installation/sources/build-and-install.md) guide, Wasm support is enabled by default. Compile Fluent Bit with Wasm support, for example: ```text -$ cd build/ -$ cmake .. [-DFLB_WAMRC=On] -$ make +cd build/ +cmake .. [-DFLB_WAMRC=On] +make ``` To support AOT-compiled Wasm execution as filter plugins, build Fluent Bit with `-DFLB_WAMRC=On`. @@ -65,7 +65,7 @@ The Fluent Bit Wasm filter assumes C ABI, also known as `wasm32-unknown-unknown` TinyGo and WASI SDK support Wasm target by default. When using Rust's `wasm32-unknown-unknown` target, you must install `wasm32-unknown-unknown` by using [rustup](https://rustup.rs/). Then, install the target components as follows: ```text -$ rustup target add wasm32-unknown-unknown +rustup target add wasm32-unknown-unknown ``` ### Requirements of Wasm programs @@ -228,13 +228,13 @@ To optimize Wasm program execution, there is the option of using `flb-wamrc`. Th This tool will be built when the `-DFLB_WAMRC=On` CMake option is specified and LLVM infrastructure is installed on the building box. ```shell -$ flb-wamrc -o /path/to/built_wasm.aot /path/to/built_wasm.wasm +flb-wamrc -o /path/to/built_wasm.aot /path/to/built_wasm.wasm ``` For further optimizations to the specific CPU, such as Cortex-A57 series: ```text -$ flb-wamrc --size-level=3 --target=aarch64v8 --cpu=cortex-a57 -o /path/to/built_wasm.aot /path/to/built_wasm.wasm +flb-wamrc --size-level=3 --target=aarch64v8 --cpu=cortex-a57 -o /path/to/built_wasm.aot /path/to/built_wasm.wasm ``` Then, when AOT (Ahead Of Time) compiling has succeeded: diff --git a/development/wasm-input-plugins.md b/development/wasm-input-plugins.md index 41c95f63d..7abb60709 100644 --- a/development/wasm-input-plugins.md +++ b/development/wasm-input-plugins.md @@ -25,9 +25,9 @@ Fluent Bit supports the following Wasm toolchains: Compile Fluent Bit with Wasm support. For example: ```text -$ cd build/ -$ cmake .. -$ make +cd build/ +cmake .. +make ``` Once compiled, you can see new plugins that handle `wasm`. For example: @@ -53,7 +53,7 @@ Wasm input in Fluent Bit assumes WASI ABI, also known as `wasm32-wasi` on Rust t TinyGo and WASI SDK support Wasm target by default. When using Rust's `wasm32-wasi` target, you must install `wasm32-wasi` by using [rustup](https://rustup.rs/). Then, install the target components as: ```text -$ rustup target add wasm32-wasi +rustup target add wasm32-wasi ``` ### Requirements of Wasm/WASI programs diff --git a/pipeline/filters/aws-metadata.md b/pipeline/filters/aws-metadata.md index 9f36f3f79..717ab7396 100644 --- a/pipeline/filters/aws-metadata.md +++ b/pipeline/filters/aws-metadata.md @@ -29,7 +29,7 @@ If you run Fluent Bit in a container, you might need to use instance metadata v1 Run Fluent Bit from the command line: ```shell -$ ./fluent-bit -c /PATH_TO_CONF_FILE/fluent-bit.conf +./fluent-bit -c /PATH_TO_CONF_FILE/fluent-bit.conf ``` You should see results like this: diff --git a/pipeline/filters/grep.md b/pipeline/filters/grep.md index 395c08705..9942a7ff5 100644 --- a/pipeline/filters/grep.md +++ b/pipeline/filters/grep.md @@ -42,7 +42,7 @@ When using the command line, pay close attention to quote the regular expression The following command loads the [tail](../../pipeline/inputs/tail) plugin and reads the content of `lines.txt`. Then the `grep` filter applies a regular expression rule over the `log` field created by the `tail` plugin and only passes records with a field value starting with `aa`: ```shell -$ ./fluent-bit -i tail -p 'path=lines.txt' -F grep -p 'regex=log aa' -m '*' -o stdout +./fluent-bit -i tail -p 'path=lines.txt' -F grep -p 'regex=log aa' -m '*' -o stdout ``` ### Configuration file diff --git a/pipeline/filters/lua.md b/pipeline/filters/lua.md index 4b9973ea3..eeaee2449 100644 --- a/pipeline/filters/lua.md +++ b/pipeline/filters/lua.md @@ -31,7 +31,7 @@ To test the Lua filter, you can run the plugin from the command line or through From the command line you can use the following options: ```shell -$ ./fluent-bit -i dummy -F lua -p script=test.lua -p call=cb_print -m '*' -o null +./fluent-bit -i dummy -F lua -p script=test.lua -p call=cb_print -m '*' -o null ``` ### Configuration file diff --git a/pipeline/filters/modify.md b/pipeline/filters/modify.md index 8258abe63..115e9bc94 100644 --- a/pipeline/filters/modify.md +++ b/pipeline/filters/modify.md @@ -95,7 +95,7 @@ which outputs data similar to the following: Using the command line mode requires quotes parse the wildcard properly. The use of a configuration file is recommended. ```shell -$ ./fluent-bit -i mem \ +./fluent-bit -i mem \ -p 'tag=mem.local' \ -F modify \ -p 'Add=Service1 SOMEVALUE' \ diff --git a/pipeline/filters/multiline-stacktrace.md b/pipeline/filters/multiline-stacktrace.md index b0629e3b3..1f937f41a 100644 --- a/pipeline/filters/multiline-stacktrace.md +++ b/pipeline/filters/multiline-stacktrace.md @@ -246,7 +246,7 @@ one more line, no multiline Running Fluent Bit with the given configuration file: ```shell -$ ./fluent-bit -c fluent-bit.conf +./fluent-bit -c fluent-bit.conf ``` Should return something like the following: diff --git a/pipeline/filters/nest.md b/pipeline/filters/nest.md index f682712f0..31930dfb4 100644 --- a/pipeline/filters/nest.md +++ b/pipeline/filters/nest.md @@ -91,7 +91,7 @@ wildcard rule to the keys and nests the keys matching `Mem.*` under the new key `NEST`. ```shell -$ ./fluent-bit -i mem -p 'tag=mem.local' -F nest -p 'Operation=nest' -p 'Wildcard=Mem.*' -p 'Nest_under=Memstats' -p 'Remove_prefix=Mem.' -m '*' -o stdout +./fluent-bit -i mem -p 'tag=mem.local' -F nest -p 'Operation=nest' -p 'Wildcard=Mem.*' -p 'Nest_under=Memstats' -p 'Remove_prefix=Mem.' -m '*' -o stdout ``` ### Nest configuration file diff --git a/pipeline/filters/nightfall.md b/pipeline/filters/nightfall.md index c1d975b90..4e9e86710 100644 --- a/pipeline/filters/nightfall.md +++ b/pipeline/filters/nightfall.md @@ -81,10 +81,10 @@ After you configure the filter, you can use it from the command line by running ```shell # For YAML configuration. -$ ./fluent-bit -c /PATH_TO_CONF_FILE/fluent-bit.yaml +./fluent-bit -c /PATH_TO_CONF_FILE/fluent-bit.yaml # For classic configuration. -$ ./fluent-bit -c /PATH_TO_CONF_FILE/fluent-bit.conf +./fluent-bit -c /PATH_TO_CONF_FILE/fluent-bit.conf ``` Replace _`PATH_TO_CONF_FILE`_ with the path for where your filter configuration file diff --git a/pipeline/filters/record-modifier.md b/pipeline/filters/record-modifier.md index 4afe8651f..a8ba1b312 100644 --- a/pipeline/filters/record-modifier.md +++ b/pipeline/filters/record-modifier.md @@ -76,7 +76,7 @@ pipeline: You can run the filter from command line: ```shell -$ ./fluent-bit -i mem -o stdout -F record_modifier -p 'Record=hostname ${HOSTNAME}' -p 'Record=product Awesome_Tool' -m '*' +./fluent-bit -i mem -o stdout -F record_modifier -p 'Record=hostname ${HOSTNAME}' -p 'Record=product Awesome_Tool' -m '*' ``` The output looks something like: @@ -137,7 +137,7 @@ pipeline: You can also run the filter from command line. ```shell -$ ./fluent-bit -i mem -o stdout -F record_modifier -p 'Remove_key=Swap.total' -p 'Remove_key=Swap.free' -p 'Remove_key=Swap.used' -m '*' +./fluent-bit -i mem -o stdout -F record_modifier -p 'Remove_key=Swap.total' -p 'Remove_key=Swap.free' -p 'Remove_key=Swap.used' -m '*' ``` The output looks something like: @@ -198,7 +198,7 @@ pipeline: You can also run the filter from command line: ```shell -$ ./fluent-bit -i mem -o stdout -F record_modifier -p 'Allowlist_key=Mem.total' -p 'Allowlist_key=Mem.free' -p 'Allowlist_key=Mem.used' -m '*' +./fluent-bit -i mem -o stdout -F record_modifier -p 'Allowlist_key=Mem.total' -p 'Allowlist_key=Mem.free' -p 'Allowlist_key=Mem.used' -m '*' ``` The output looks something like: diff --git a/pipeline/filters/rewrite-tag.md b/pipeline/filters/rewrite-tag.md index df3e7fe76..c8de5f466 100644 --- a/pipeline/filters/rewrite-tag.md +++ b/pipeline/filters/rewrite-tag.md @@ -209,7 +209,7 @@ The `rewrite_tag` filter emits new records that go through the beginning of the Using the previously provided configuration, when you query the metrics exposed in the HTTP interface: ```shell -$ ./curl http://127.0.0.1:2020/api/v1/metrics/ | jq +./curl http://127.0.0.1:2020/api/v1/metrics/ | jq ``` You will see metrics output similar to the following: diff --git a/pipeline/filters/tensorflow.md b/pipeline/filters/tensorflow.md index 7cf11f08c..40ba83a1f 100644 --- a/pipeline/filters/tensorflow.md +++ b/pipeline/filters/tensorflow.md @@ -29,7 +29,7 @@ To create a Tensorflow Lite shared library: 1. Run the following command to create the shared library: ```shell - $ ./bazel build -c opt //tensorflow/lite/c:tensorflowlite_c # see https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/c + ./bazel build -c opt //tensorflow/lite/c:tensorflowlite_c # see https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/c ``` The script creates the shared library @@ -41,7 +41,7 @@ To create a Tensorflow Lite shared library: The Tensorflow filter plugin is disabled by default. You must build Fluent Bit with the Tensorflow plugin enabled. In addition, it requires access to Tensorflow Lite header files to compile. Therefore, you must pass the address of the Tensorflow source code on your machine to the [build script](https://github.com/fluent/fluent-bit#build-from-scratch): ```shell -$ ./cmake -DFLB_FILTER_TENSORFLOW=On -DTensorflow_DIR= ... +./cmake -DFLB_FILTER_TENSORFLOW=On -DTensorflow_DIR= ... ``` ### Command line @@ -51,7 +51,7 @@ If the Tensorflow plugin initializes correctly, it reports successful creation o The command: ```shell -$ ./fluent-bit -i mqtt -p 'tag=mqtt.data' -F tensorflow -m '*' -p 'input_field=image' -p 'model_file=/home/user/model.tflite' -p +./fluent-bit -i mqtt -p 'tag=mqtt.data' -F tensorflow -m '*' -p 'input_field=image' -p 'model_file=/home/user/model.tflite' -p ``` produces an output like: diff --git a/pipeline/filters/throttle.md b/pipeline/filters/throttle.md index bd5fe70a4..259bb89cd 100644 --- a/pipeline/filters/throttle.md +++ b/pipeline/filters/throttle.md @@ -112,7 +112,7 @@ It's suggested to use a configuration file. The following command will load the Tail plugin and read the content of the `lines.txt` file. Then, the Throttle filter will apply a rate limit and only pass the records which are read below the `rate`: ```shell -$ ./fluent-bit -i tail -p 'path=lines.txt' -F throttle -p 'rate=1' -m '*' -o stdout +./fluent-bit -i tail -p 'path=lines.txt' -F throttle -p 'rate=1' -m '*' -o stdout ``` ### Configuration File diff --git a/pipeline/filters/type-converter.md b/pipeline/filters/type-converter.md index af0fe2649..09e206b83 100644 --- a/pipeline/filters/type-converter.md +++ b/pipeline/filters/type-converter.md @@ -83,7 +83,7 @@ pipeline: You can also run the filter from command line. ```shell -$ ./fluent-bit -i mem -o stdout -F type_converter -p 'uint_key=Mem.total Mem.total_str string' -p 'uint_key=Mem.used Mem.used_str string' -p 'uint_key=Mem.free Mem.free_str string' -m '*' +./fluent-bit -i mem -o stdout -F type_converter -p 'uint_key=Mem.total Mem.total_str string' -p 'uint_key=Mem.used Mem.used_str string' -p 'uint_key=Mem.free Mem.free_str string' -m '*' ``` The output will be diff --git a/pipeline/inputs/cpu-metrics.md b/pipeline/inputs/cpu-metrics.md index 1aa9d6aff..819f57f1a 100644 --- a/pipeline/inputs/cpu-metrics.md +++ b/pipeline/inputs/cpu-metrics.md @@ -40,7 +40,7 @@ In order to get the statistics of the CPU usage of your system, you can run the You can run this filter from the command line using a command like the following: ```shell -$ build/bin/fluent-bit -i cpu -t my_cpu -o stdout -m '*' +build/bin/fluent-bit -i cpu -t my_cpu -o stdout -m '*' ``` The command returns results similar to the following: diff --git a/pipeline/inputs/disk-io-metrics.md b/pipeline/inputs/disk-io-metrics.md index d2670bdd9..12ed82dbe 100644 --- a/pipeline/inputs/disk-io-metrics.md +++ b/pipeline/inputs/disk-io-metrics.md @@ -24,7 +24,7 @@ In order to get disk usage from your system, you can run the plugin from the com You can run the plugin from the command line: ```shell -$ fluent-bit -i disk -o stdout +fluent-bit -i disk -o stdout ``` Which returns information like the following: diff --git a/pipeline/inputs/docker-events.md b/pipeline/inputs/docker-events.md index 13d9fd89a..8e7f45a80 100644 --- a/pipeline/inputs/docker-events.md +++ b/pipeline/inputs/docker-events.md @@ -21,7 +21,7 @@ This plugin supports the following configuration parameters: You can run this plugin from the command line: ```shell -$ fluent-bit -i docker_events -o stdout +fluent-bit -i docker_events -o stdout ``` ### Configuration file diff --git a/pipeline/inputs/dummy.md b/pipeline/inputs/dummy.md index e8d0d7df8..bbab31dd6 100644 --- a/pipeline/inputs/dummy.md +++ b/pipeline/inputs/dummy.md @@ -29,7 +29,7 @@ You can run the plugin from the command line or through the configuration file: Run the plugin from the command line using the following command: ```shell -$ fluent-bit -i dummy -o stdout +fluent-bit -i dummy -o stdout ``` which returns results like the following: diff --git a/pipeline/inputs/ebpf.md b/pipeline/inputs/ebpf.md index 7bcc6829f..68df61579 100644 --- a/pipeline/inputs/ebpf.md +++ b/pipeline/inputs/ebpf.md @@ -58,10 +58,10 @@ To enable the `in_ebpf` plugin, follow these steps to build Fluent Bit from sour ```bash # For YAML configuration. - $ sudo ./bin/fluent-bit --config fluent-bit.yaml + sudo ./bin/fluent-bit --config fluent-bit.yaml # For classic configuration. - $ sudo ./bin/fluent-bit --config fluent-bit.conf + sudo ./bin/fluent-bit --config fluent-bit.conf ``` ## Configuration example diff --git a/pipeline/inputs/elasticsearch.md b/pipeline/inputs/elasticsearch.md index c7405f254..79e38f960 100644 --- a/pipeline/inputs/elasticsearch.md +++ b/pipeline/inputs/elasticsearch.md @@ -29,7 +29,7 @@ In order to start performing the checks, you can run the plugin from the command From the command line you can configure Fluent Bit to handle Bulk API requests with the following options: ```shell -$ fluent-bit -i elasticsearch -p port=9200 -o stdout +fluent-bit -i elasticsearch -p port=9200 -o stdout ``` ### Configuration file diff --git a/pipeline/inputs/exec.md b/pipeline/inputs/exec.md index 021c0e143..5b3a615fd 100644 --- a/pipeline/inputs/exec.md +++ b/pipeline/inputs/exec.md @@ -39,7 +39,7 @@ You can run the plugin from the command line or through the configuration file: The following example will read events from the output of _ls_. ```shell -$ fluent-bit -i exec -p 'command=ls /var/log' -o stdout +fluent-bit -i exec -p 'command=ls /var/log' -o stdout ``` which should return something like the following: diff --git a/pipeline/inputs/fluentbit-metrics.md b/pipeline/inputs/fluentbit-metrics.md index 9322098d1..b3af62b5b 100644 --- a/pipeline/inputs/fluentbit-metrics.md +++ b/pipeline/inputs/fluentbit-metrics.md @@ -83,5 +83,5 @@ pipeline: You can test the expose of the metrics by using `curl`: ```shell -$ curl http://127.0.0.1:2021/metrics +curl http://127.0.0.1:2021/metrics ``` \ No newline at end of file diff --git a/pipeline/inputs/forward.md b/pipeline/inputs/forward.md index e12a76923..d7b8ae721 100644 --- a/pipeline/inputs/forward.md +++ b/pipeline/inputs/forward.md @@ -32,13 +32,13 @@ To receive Forward messages, you can run the plugin from the command line or thr From the command line you can let Fluent Bit listen for Forward messages with the following options: ```shell -$ fluent-bit -i forward -o stdout +fluent-bit -i forward -o stdout ``` By default, the service listens on all interfaces (`0.0.0.0`) through TCP port `24224`. You can change this by passing parameters to the command: ```shell -$ fluent-bit -i forward -p listen="192.168.3.2" -p port=9090 -o stdout +fluent-bit -i forward -p listen="192.168.3.2" -p port=9090 -o stdout ``` In the example, the Forward messages arrive only through network interface `192.168.3.2` address and TCP Port `9090`. @@ -138,13 +138,13 @@ pipeline: After Fluent Bit is running, you can send some messages using the `fluent-cat` tool, provided by [Fluentd](http://www.fluentd.org): ```shell -$ echo '{"key 1": 123456789, "key 2": "abcdefg"}' | fluent-cat my_tag +echo '{"key 1": 123456789, "key 2": "abcdefg"}' | fluent-cat my_tag ``` When you run the plugin with the following command: ```shell -$ fluent-bit -i forward -o stdout +fluent-bit -i forward -o stdout ``` In [Fluent Bit](http://fluentbit.io) you should see the following output: diff --git a/pipeline/inputs/head.md b/pipeline/inputs/head.md index 5f1d6183c..5e94b0deb 100644 --- a/pipeline/inputs/head.md +++ b/pipeline/inputs/head.md @@ -90,7 +90,7 @@ pipeline: If you run the following command: ```shell -$ fluent-bit -c head.conf +fluent-bit -c head.conf ``` The output is something similar to; @@ -118,7 +118,7 @@ To read the head of a file, you can run the plugin from the command line or thro The following example will read events from the `/proc/uptime` file, tag the records with the `uptime` name and flush them back to the `stdout` plugin: ```shell -$ fluent-bit -i head -t uptime -p File=/proc/uptime -o stdout -m '*' +fluent-bit -i head -t uptime -p File=/proc/uptime -o stdout -m '*' ``` The output will look similar to: diff --git a/pipeline/inputs/health.md b/pipeline/inputs/health.md index 749719198..bf4ed8fb6 100644 --- a/pipeline/inputs/health.md +++ b/pipeline/inputs/health.md @@ -26,7 +26,7 @@ To start performing the checks, you can run the plugin from the command line or From the command line you can let Fluent Bit generate the checks with the following options: ```shell -$ fluent-bit -i health -p host=127.0.0.1 -p port=80 -o stdout +fluent-bit -i health -p host=127.0.0.1 -p port=80 -o stdout ``` ### Configuration file diff --git a/pipeline/inputs/http.md b/pipeline/inputs/http.md index f56995d75..7dc7c1f20 100644 --- a/pipeline/inputs/http.md +++ b/pipeline/inputs/http.md @@ -37,7 +37,7 @@ The tag for the HTTP input plugin is set by adding the tag to the end of the req For example, in the following curl message the tag set is `app.log**. **` because the end path is `/app_log`: ```shell -$ curl -d '{"key1":"value1","key2":"value2"}' -XPOST -H "content-type: application/json" http://localhost:8888/app.log +curl -d '{"key1":"value1","key2":"value2"}' -XPOST -H "content-type: application/json" http://localhost:8888/app.log ``` ### Configuration file @@ -79,7 +79,7 @@ pipeline: If you don't set the tag, `http.0` is automatically used. If you have multiple HTTP inputs then they will follow a pattern of `http.N` where `N` is an integer representing the input. ```shell -$ curl -d '{"key1":"value1","key2":"value2"}' -XPOST -H "content-type: application/json" http://localhost:8888 +curl -d '{"key1":"value1","key2":"value2"}' -XPOST -H "content-type: application/json" http://localhost:8888 ``` {% tabs %} @@ -121,7 +121,7 @@ The `tag_key` configuration option lets you specify the key name that will be us ### Curl request ```shell -$ curl -d '{"key1":"value1","key2":"value2"}' -XPOST -H "content-type: application/json" http://localhost:8888/app.log +curl -d '{"key1":"value1","key2":"value2"}' -XPOST -H "content-type: application/json" http://localhost:8888/app.log ``` ### Configuration file `tag_key` example @@ -192,7 +192,7 @@ pipeline: #### Example curl message ```shell -$ curl -d @app.log -XPOST -H "content-type: application/json" http://localhost:8888/app.log +curl -d @app.log -XPOST -H "content-type: application/json" http://localhost:8888/app.log ``` ### Configuration file example 3 @@ -232,5 +232,5 @@ pipeline: ### Command line ```shell - $ fluent-bit -i http -p port=8888 -o stdout + fluent-bit -i http -p port=8888 -o stdout ``` \ No newline at end of file diff --git a/pipeline/inputs/kafka.md b/pipeline/inputs/kafka.md index 27ed258f5..0645f00ad 100644 --- a/pipeline/inputs/kafka.md +++ b/pipeline/inputs/kafka.md @@ -29,7 +29,7 @@ To subscribe to or collect messages from Apache Kafka, run the plugin from the c The Kafka plugin can read parameters through the `-p` argument (property): ```shell -$ fluent-bit -i kafka -o stdout -p brokers=192.168.1.3:9092 -p topics=some-topic +fluent-bit -i kafka -o stdout -p brokers=192.168.1.3:9092 -p topics=some-topic ``` ### Configuration file (recommended) diff --git a/pipeline/inputs/kernel-logs.md b/pipeline/inputs/kernel-logs.md index eda346e1a..d9feeec89 100644 --- a/pipeline/inputs/kernel-logs.md +++ b/pipeline/inputs/kernel-logs.md @@ -16,7 +16,7 @@ To start getting the Linux Kernel messages, you can run the plugin from the comm ### Command line ```shell -$ fluent-bit -i kmsg -t kernel -o stdout -m '*' +fluent-bit -i kmsg -t kernel -o stdout -m '*' ``` Which returns output similar to: diff --git a/pipeline/inputs/memory-metrics.md b/pipeline/inputs/memory-metrics.md index b52c024b8..1ece3cbfd 100644 --- a/pipeline/inputs/memory-metrics.md +++ b/pipeline/inputs/memory-metrics.md @@ -11,7 +11,7 @@ To get memory and swap usage from your system, you can run the plugin from the c Run the following command from the command line, noting this is for a Linux machine: ```shell -$ fluent-bit -i mem -t memory -o stdout -m '*' +fluent-bit -i mem -t memory -o stdout -m '*' ``` Which outputs information similar to: diff --git a/pipeline/inputs/mqtt.md b/pipeline/inputs/mqtt.md index 8b0fbc203..8ec7acf9f 100644 --- a/pipeline/inputs/mqtt.md +++ b/pipeline/inputs/mqtt.md @@ -24,7 +24,7 @@ The MQTT input plugin lets Fluent Bit behave as a server. Dispatch some messages Running the following command: ```shell -$ fluent-bit -i mqtt -t data -o stdout -m '*' +fluent-bit -i mqtt -t data -o stdout -m '*' ``` Returns a response like the following: @@ -59,7 +59,7 @@ ______ _ _ ______ _ _ ___ _____ The following command line will send a message to the MQTT input plugin: ```shell -$ mosquitto_pub -m '{"key1": 123, "key2": 456}' -t some/topic +mosquitto_pub -m '{"key1": 123, "key2": 456}' -t some/topic ``` ### Configuration file diff --git a/pipeline/inputs/network-io-metrics.md b/pipeline/inputs/network-io-metrics.md index 3adb662ce..1ccf19ecd 100644 --- a/pipeline/inputs/network-io-metrics.md +++ b/pipeline/inputs/network-io-metrics.md @@ -26,7 +26,7 @@ To monitor network traffic from your system, you can run the plugin from the com Run Fluent Bit using a command similar to the following: ```shell -$ fluent-bit -i netif -p interface=eth0 -o stdout +fluent-bit -i netif -p interface=eth0 -o stdout ``` Which returns something the following: diff --git a/pipeline/inputs/nginx.md b/pipeline/inputs/nginx.md index 1621782d3..1de72081a 100644 --- a/pipeline/inputs/nginx.md +++ b/pipeline/inputs/nginx.md @@ -62,14 +62,14 @@ server { From the command line you can let Fluent Bit generate the checks with the following options: ```shell -$ fluent-bit -i nginx_metrics -p host=127.0.0.1 -p port=80 -p status_url=/status -p nginx_plus=off -o stdout +fluent-bit -i nginx_metrics -p host=127.0.0.1 -p port=80 -p status_url=/status -p nginx_plus=off -o stdout ``` To gather metrics from the command line with the NGINX Plus REST API you need to turn on the `nginx_plus` property: ```shell -$ fluent-bit -i nginx_metrics -p host=127.0.0.1 -p port=80 -p nginx_plus=on -p status_url=/api -o stdout +fluent-bit -i nginx_metrics -p host=127.0.0.1 -p port=80 -p nginx_plus=on -p status_url=/api -o stdout ``` ### Configuration File @@ -156,7 +156,7 @@ pipeline: You can test against the NGINX server running on localhost by invoking it directly from the command line: ```shell -$ fluent-bit -i nginx_metrics -p host=127.0.0.1 -p nginx_plus=off -o stdout -p match=* -f 1 +fluent-bit -i nginx_metrics -p host=127.0.0.1 -p nginx_plus=off -o stdout -p match=* -f 1 ``` Which should return something like the following: diff --git a/pipeline/inputs/node-exporter-metrics.md b/pipeline/inputs/node-exporter-metrics.md index b17e40e91..1c9fb56f5 100644 --- a/pipeline/inputs/node-exporter-metrics.md +++ b/pipeline/inputs/node-exporter-metrics.md @@ -161,7 +161,7 @@ pipeline: You can test the expose of the metrics by using `curl`: ```shell -$ curl http://127.0.0.1:2021/metrics +curl http://127.0.0.1:2021/metrics ``` ### Container to collect host metrics @@ -169,7 +169,7 @@ $ curl http://127.0.0.1:2021/metrics When deploying Fluent Bit in a container you will need to specify additional settings to ensure that Fluent Bit has access to the host operating system. The following Docker command deploys Fluent Bit with specific mount paths and settings enabled to ensure that Fluent Bit can collect from the host. These are then exposed over port `2021`. ```shell -$ docker run -ti -v /proc:/host/proc \ +docker run -ti -v /proc:/host/proc \ -v /sys:/host/sys \ -p 2021:2021 \ fluent/fluent-bit:1.8.0 \ @@ -189,15 +189,15 @@ If you use dashboards for monitoring, Grafana is one option. The Fluent Bit sour 1. Download the Fluent Bit source code: ```shell - $ git clone https://github.com/fluent/fluent-bit + git clone https://github.com/fluent/fluent-bit - $ cd fluent-bit/docker_compose/node-exporter-dashboard/ + cd fluent-bit/docker_compose/node-exporter-dashboard/ ``` 2. Start the service and view your dashboard: ```shell - $ docker-compose up --force-recreate -d --build + docker-compose up --force-recreate -d --build ``` 3. Open your browser and use the address `http://127.0.0.1:3000`. @@ -212,7 +212,7 @@ By default, Grafana dashboard plots the data from the last 24 hours. Change it t #### Stop the Service ```shell -$ docker-compose down +docker-compose down ``` ## Enhancement requests diff --git a/pipeline/inputs/opentelemetry.md b/pipeline/inputs/opentelemetry.md index fb4a0f986..a126d6c00 100644 --- a/pipeline/inputs/opentelemetry.md +++ b/pipeline/inputs/opentelemetry.md @@ -99,5 +99,5 @@ With this configuration, Fluent Bit listens on port `4318` for data. You can now A sample curl request to POST JSON encoded log data would be: ```shell -$ curl --header "Content-Type: application/json" --request POST --data '{"resourceLogs":[{"resource":{},"scopeLogs":[{"scope":{},"logRecords":[{"timeUnixNano":"1660296023390371588","body":{"stringValue":"{\"message\":\"dummy\"}"},"traceId":"","spanId":""}]}]}]}' http://0.0.0.0:4318/v1/logs +curl --header "Content-Type: application/json" --request POST --data '{"resourceLogs":[{"resource":{},"scopeLogs":[{"scope":{},"logRecords":[{"timeUnixNano":"1660296023390371588","body":{"stringValue":"{\"message\":\"dummy\"}"},"traceId":"","spanId":""}]}]}]}' http://0.0.0.0:4318/v1/logs ``` \ No newline at end of file diff --git a/pipeline/inputs/podman-metrics.md b/pipeline/inputs/podman-metrics.md index 64ef2ef28..a9706705c 100644 --- a/pipeline/inputs/podman-metrics.md +++ b/pipeline/inputs/podman-metrics.md @@ -26,7 +26,7 @@ This plugin supports and automatically detects both `cgroups v1` and `v2`. You can run the following `curl` command: ```shell -$ curl 0.0.0.0:2021/metrics +curl 0.0.0.0:2021/metrics ``` Which returns information like: @@ -118,7 +118,7 @@ pipeline: ### Command line ```shell -$ fluent-bit -i podman_metrics -o prometheus_exporter +fluent-bit -i podman_metrics -o prometheus_exporter ``` ### Exposed metrics diff --git a/pipeline/inputs/process-exporter-metrics.md b/pipeline/inputs/process-exporter-metrics.md index 20de821a4..28b562ffa 100644 --- a/pipeline/inputs/process-exporter-metrics.md +++ b/pipeline/inputs/process-exporter-metrics.md @@ -118,7 +118,7 @@ pipeline: You can see the metrics by using `curl`: ```shell -$ curl http://127.0.0.1:2021/metrics +curl http://127.0.0.1:2021/metrics ``` ### Container to collect host metrics @@ -130,7 +130,7 @@ The following `docker` command deploys Fluent Bit with a specific mount path for These are then exposed over port 2021. ```shell -$ docker run -ti -v /proc:/host/proc:ro \ +docker run -ti -v /proc:/host/proc:ro \ -p 2021:2021 \ fluent/fluent-bit:2.2 \ /fluent-bit/bin/fluent-bit \ diff --git a/pipeline/inputs/process.md b/pipeline/inputs/process.md index 6de8dbaad..1db1170a5 100644 --- a/pipeline/inputs/process.md +++ b/pipeline/inputs/process.md @@ -26,7 +26,7 @@ To start performing the checks, you can run the plugin from the command line or The following example checks the health of `crond` process. ```shell -$ fluent-bit -i proc -p proc_name=crond -o stdout +fluent-bit -i proc -p proc_name=crond -o stdout ``` ### Configuration file diff --git a/pipeline/inputs/random.md b/pipeline/inputs/random.md index 697bef5e4..df9ae3318 100644 --- a/pipeline/inputs/random.md +++ b/pipeline/inputs/random.md @@ -22,7 +22,7 @@ To start generating random samples, you can either run the plugin from the comma Use the following command line options to generate samples. ```shell -$ fluent-bit -i random -o stdout +fluent-bit -i random -o stdout ``` ### Configuration file diff --git a/pipeline/inputs/serial-interface.md b/pipeline/inputs/serial-interface.md index 63492fdb3..22c2df78d 100644 --- a/pipeline/inputs/serial-interface.md +++ b/pipeline/inputs/serial-interface.md @@ -24,19 +24,19 @@ To retrieve messages by using the Serial interface, you can run the plugin from The following example loads the input serial plugin where it set a `Bitrate` of `9600`, listens from the `/dev/tnt0` interface, and uses the custom tag `data` to route the message. ```shell -$ fluent-bit -i serial -t data -p File=/dev/tnt0 -p BitRate=9600 -o stdout -m '*' +fluent-bit -i serial -t data -p File=/dev/tnt0 -p BitRate=9600 -o stdout -m '*' ``` The interface (`/dev/tnt0`) is an emulation of the serial interface. Further examples will write some message to the other end of the interface. For example, `/dev/tnt1`. ```shell -$ echo 'this is some message' > /dev/tnt1 +echo 'this is some message' > /dev/tnt1 ``` In Fluent Bit you can run the command: ```shell -$ fluent-bit -i serial -t data -p File=/dev/tnt0 -p BitRate=9600 -o stdout -m '*' +fluent-bit -i serial -t data -p File=/dev/tnt0 -p BitRate=9600 -o stdout -m '*' ``` Which should produce output like: @@ -73,13 +73,13 @@ Using the `Separator` configuration, you can send multiple messages at once. Run this command after starting Fluent Bit: ```shell -$ echo 'aaXbbXccXddXee' > /dev/tnt1 +echo 'aaXbbXccXddXee' > /dev/tnt1 ``` Then, run Fluent Bit: ```shell -$ fluent-bit -i serial -t data -p File=/dev/tnt0 -p BitRate=9600 -p Separator=X -o stdout -m '*' +fluent-bit -i serial -t data -p File=/dev/tnt0 -p BitRate=9600 -p Separator=X -o stdout -m '*' ``` This should produce results similar to the following: @@ -163,29 +163,29 @@ You can emulate a serial interface on your Linux system and test the serial inpu 1. Download the sources: ```shell - $ git clone https://github.com/freemed/tty0tty + git clone https://github.com/freemed/tty0tty ``` 2. Unpack and compile: ```shell - $ cd tty0tty/module + cd tty0tty/module - $ make + make ``` 3. Copy the new kernel module into the kernel modules directory: ```shell - $ sudo cp tty0tty.ko /lib/modules/$(uname -r)/kernel/drivers/misc/ + sudo cp tty0tty.ko /lib/modules/$(uname -r)/kernel/drivers/misc/ ``` 4. Load the module: ```shell - $ sudo depmod + sudo depmod - $ sudo modprobe tty0tty + sudo modprobe tty0tty ``` You should see new serial ports in `dev` (`ls /dev/tnt\*\`). @@ -193,7 +193,7 @@ You can emulate a serial interface on your Linux system and test the serial inpu 5. Give appropriate permissions to the new serial ports: ```shell - $ sudo chmod 666 /dev/tnt* + sudo chmod 666 /dev/tnt* ``` When the module is loaded, it will interconnect the following virtual interfaces: diff --git a/pipeline/inputs/splunk.md b/pipeline/inputs/splunk.md index 60fe042e3..8bd8ec540 100644 --- a/pipeline/inputs/splunk.md +++ b/pipeline/inputs/splunk.md @@ -42,7 +42,7 @@ To use the other tags for multiple instantiating input Splunk plugins, you must From the command line you can configure Fluent Bit to handle HTTP HEC requests with the following options: ```shell -$ fluent-bit -i splunk -p port=8088 -o stdout +fluent-bit -i splunk -p port=8088 -o stdout ``` ### Configuration file diff --git a/pipeline/inputs/standard-input.md b/pipeline/inputs/standard-input.md index bd960cc0f..8592ed048 100644 --- a/pipeline/inputs/standard-input.md +++ b/pipeline/inputs/standard-input.md @@ -4,7 +4,7 @@ The _Standard input_ plugin supports retrieving a message stream from the standa To use it, specify the plugin name as the input. For example: ```shell -$ fluent-bit -i stdin -o stdout +fluent-bit -i stdin -o stdout ``` If the `stdin` stream is closed (`end-of-file`), the plugin instructs Fluent Bit to exit with success (`0`) after flushing any pending output. @@ -63,7 +63,7 @@ To demonstrate how the plugin works, you can use a `bash` script that generates 2. Start the script and [Fluent Bit](http://fluentbit.io): ```shell - $ bash test.sh | fluent-bit -q -i stdin -o stdout + bash test.sh | fluent-bit -q -i stdin -o stdout ``` 3. The command should return output like the following: @@ -100,7 +100,7 @@ To demonstrate how the plugin works, you can use a `bash` script that generates 2. Re-run the sample command. Timestamps output by Fluent Bit are now one day old because Fluent Bit used the input message timestamp. ```shell - $ bash test.sh | fluent-bit -q -i stdin -o stdout + bash test.sh | fluent-bit -q -i stdin -o stdout ``` 3. Which returns the following: @@ -139,7 +139,7 @@ To demonstrate how the plugin works, you can use a `bash` script that generates 2. Run test using the command: ```shell - $ bash ./test.sh | fluent-bit -q -i stdin -o stdout + bash ./test.sh | fluent-bit -q -i stdin -o stdout ``` 3. Which returns results like the following: @@ -234,10 +234,10 @@ Fluent Bit will now read each line and emit a single message for each input line ```shell # For YAML configuration. -$ seq 1 5 | ./fluent-bit --config fluent-bit.yaml +seq 1 5 | ./fluent-bit --config fluent-bit.yaml # For classic configuration. -$ seq 1 5 | ./fluent-bit --config fluent-bit.conf +seq 1 5 | ./fluent-bit --config fluent-bit.conf ``` Which returns output similar to: diff --git a/pipeline/inputs/statsd.md b/pipeline/inputs/statsd.md index 9252f48cd..99012e270 100644 --- a/pipeline/inputs/statsd.md +++ b/pipeline/inputs/statsd.md @@ -61,9 +61,9 @@ pipeline: Now you can input metrics through the UDP port as follows: ```shell -$ echo "click:10|c|@0.1" | nc -q0 -u 127.0.0.1 8125 +echo "click:10|c|@0.1" | nc -q0 -u 127.0.0.1 8125 -$ echo "active:99|g" | nc -q0 -u 127.0.0.1 8125 +echo "active:99|g" | nc -q0 -u 127.0.0.1 8125 ``` Fluent Bit will produce the following records: @@ -114,11 +114,11 @@ pipeline: Now you can input metrics as metrics type of events through the UDP port as follows: ```shell -$ echo "click:+10|c|@0.01|#hello:tag" | nc -q0 -u 127.0.0.1 8125 +echo "click:+10|c|@0.01|#hello:tag" | nc -q0 -u 127.0.0.1 8125 -$ echo "active:+99|g|@0.01" | nc -q0 -u 127.0.0.1 8125 +echo "active:+99|g|@0.01" | nc -q0 -u 127.0.0.1 8125 -$ echo "inactive:29|g|@0.0125|#hi:from_fluent-bit" | nc -q0 -u 127.0.0.1 8125 +echo "inactive:29|g|@0.0125|#hi:from_fluent-bit" | nc -q0 -u 127.0.0.1 8125 ``` Fluent Bit will produce the following metrics events: diff --git a/pipeline/inputs/syslog.md b/pipeline/inputs/syslog.md index ef721c070..5e3977e2e 100644 --- a/pipeline/inputs/syslog.md +++ b/pipeline/inputs/syslog.md @@ -35,10 +35,10 @@ From the command line you can let Fluent Bit listen for `Forward` messages with ```shell # For YAML configuration -$ ./fluent-bit -R /path/to/parsers.yaml -i syslog -p path=/tmp/in_syslog -o stdout +./fluent-bit -R /path/to/parsers.yaml -i syslog -p path=/tmp/in_syslog -o stdout # For classic configuration. -$ ./fluent-bit -R /path/to/parsers.conf -i syslog -p path=/tmp/in_syslog -o stdout +./fluent-bit -R /path/to/parsers.conf -i syslog -p path=/tmp/in_syslog -o stdout ``` By default the service will create and listen for Syslog messages on the Unix socket `/tmp/in_syslog`. @@ -98,17 +98,17 @@ pipeline: When Fluent Bit is running, you can send some messages using the logger tool: ```shell -$ logger -u /tmp/in_syslog my_ident my_message +logger -u /tmp/in_syslog my_ident my_message ``` Then run Fluent bit using the following command: ```shell # For YAML ocnfiguration. -$ ./fluent-bit -R ../conf/parsers.yaml -i syslog -p path=/tmp/in_syslog -o stdout +./fluent-bit -R ../conf/parsers.yaml -i syslog -p path=/tmp/in_syslog -o stdout # For classic configuration. -$ ./fluent-bit -R ../conf/parsers.conf -i syslog -p path=/tmp/in_syslog -o stdout +./fluent-bit -R ../conf/parsers.conf -i syslog -p path=/tmp/in_syslog -o stdout ``` You should see the following output: @@ -207,7 +207,7 @@ action(type="omfwd" Target="127.0.0.1" Port="5140" Protocol="tcp") Then, restart your `rsyslog` daemon: ```shell -$ sudo service rsyslog restart +sudo service rsyslog restart ``` ### `rsyslog` to Fluent Bit: Unix socket mode over UDP diff --git a/pipeline/inputs/systemd.md b/pipeline/inputs/systemd.md index 64ff4178a..27964437b 100644 --- a/pipeline/inputs/systemd.md +++ b/pipeline/inputs/systemd.md @@ -30,7 +30,7 @@ To receive Systemd messages, you can run the plugin from the command line or thr From the command line you can let Fluent Bit listen for Systemd messages with the following options: ```shell -$ fluent-bit -i systemd \ +fluent-bit -i systemd \ -p systemd_filter=_SYSTEMD_UNIT=docker.service \ -p tag='host.*' -o stdout ``` diff --git a/pipeline/outputs/azure.md b/pipeline/outputs/azure.md index 3e4bf7b04..c86d47012 100644 --- a/pipeline/outputs/azure.md +++ b/pipeline/outputs/azure.md @@ -31,7 +31,7 @@ In order to insert records into an Azure Log Analytics instance, you can run the The **azure** plugin, can read the parameters from the command line in two ways, through the **-p** argument \(property\), e.g: ```text -$ fluent-bit -i cpu -o azure -p customer_id=abc -p shared_key=def -m '*' -f 1 +fluent-bit -i cpu -o azure -p customer_id=abc -p shared_key=def -m '*' -f 1 ``` ### Configuration File diff --git a/pipeline/outputs/azure_blob.md b/pipeline/outputs/azure_blob.md index cc15d0dc2..6e7170ed1 100644 --- a/pipeline/outputs/azure_blob.md +++ b/pipeline/outputs/azure_blob.md @@ -88,7 +88,7 @@ After you run the configuration file above, you will be able to query the data u The quickest way to get started is to install Azurite using npm: ```bash -$ npm install -g azurite +npm install -g azurite ``` then run the service: diff --git a/pipeline/outputs/cloudwatch.md b/pipeline/outputs/cloudwatch.md index b2b6c6a03..50cc7d296 100644 --- a/pipeline/outputs/cloudwatch.md +++ b/pipeline/outputs/cloudwatch.md @@ -46,7 +46,7 @@ In order to send records into Amazon Cloudwatch, you can run the plugin from the The **cloudwatch** plugin, can read the parameters from the command line through the **-p** argument (property), e.g: ``` -$ fluent-bit -i cpu -o cloudwatch_logs -p log_group_name=group -p log_stream_name=stream -p region=us-west-2 -m '*' -f 1 +fluent-bit -i cpu -o cloudwatch_logs -p log_group_name=group -p log_stream_name=stream -p region=us-west-2 -m '*' -f 1 ``` ### Configuration File diff --git a/pipeline/outputs/counter.md b/pipeline/outputs/counter.md index 197b74ef9..43d651e37 100644 --- a/pipeline/outputs/counter.md +++ b/pipeline/outputs/counter.md @@ -15,7 +15,7 @@ You can run the plugin from the command line or through the configuration file: From the command line you can let Fluent Bit count up a data with the following options: ```bash -$ fluent-bit -i cpu -o counter +fluent-bit -i cpu -o counter ``` ### Configuration File diff --git a/pipeline/outputs/file.md b/pipeline/outputs/file.md index b7bd9d511..2bc722893 100644 --- a/pipeline/outputs/file.md +++ b/pipeline/outputs/file.md @@ -95,7 +95,7 @@ You can run the plugin from the command line or through the configuration file: From the command line you can let Fluent Bit count up a data with the following options: ```bash -$ fluent-bit -i cpu -o file -p path=output.txt +fluent-bit -i cpu -o file -p path=output.txt ``` ### Configuration File diff --git a/pipeline/outputs/firehose.md b/pipeline/outputs/firehose.md index d4a8d831a..9a97ae307 100644 --- a/pipeline/outputs/firehose.md +++ b/pipeline/outputs/firehose.md @@ -39,7 +39,7 @@ In order to send records into Amazon Kinesis Data Firehose, you can run the plug The **firehose** plugin, can read the parameters from the command line through the **-p** argument \(property\), e.g: ```text -$ fluent-bit -i cpu -o kinesis_firehose -p delivery_stream=my-stream -p region=us-west-2 -m '*' -f 1 +fluent-bit -i cpu -o kinesis_firehose -p delivery_stream=my-stream -p region=us-west-2 -m '*' -f 1 ``` ### Configuration File diff --git a/pipeline/outputs/flowcounter.md b/pipeline/outputs/flowcounter.md index a6b12e462..3331c1523 100644 --- a/pipeline/outputs/flowcounter.md +++ b/pipeline/outputs/flowcounter.md @@ -20,7 +20,7 @@ You can run the plugin from the command line or through the configuration file: From the command line you can let Fluent Bit count up a data with the following options: ```bash -$ fluent-bit -i cpu -o flowcounter +fluent-bit -i cpu -o flowcounter ``` ### Configuration File diff --git a/pipeline/outputs/forward.md b/pipeline/outputs/forward.md index df861c52a..afa229be0 100644 --- a/pipeline/outputs/forward.md +++ b/pipeline/outputs/forward.md @@ -114,7 +114,7 @@ Keep in mind that **TAG** is important for routing rules inside [Fluentd](http:/ Using the [CPU](../inputs/cpu-metrics.md) input plugin as an example we will flush CPU metrics to [Fluentd](http://fluentd.org) with tag _fluent_bit_: ```bash -$ bin/fluent-bit -i cpu -t fluent_bit -o forward://127.0.0.1:24224 +bin/fluent-bit -i cpu -t fluent_bit -o forward://127.0.0.1:24224 ``` Now on the [Fluentd](http://fluentd.org) side, you will see the CPU metrics gathered in the last seconds: @@ -202,13 +202,13 @@ If you're using Fluentd v1, set up it as below: Start Fluentd: ``` -$ fluentd -c fld.conf +fluentd -c fld.conf ``` Start Fluent Bit: ``` -$ fluent-bit -c flb.conf +fluent-bit -c flb.conf ``` After five seconds, Fluent Bit will write records to Fluentd. diff --git a/pipeline/outputs/http.md b/pipeline/outputs/http.md index 02611730c..f91406caf 100644 --- a/pipeline/outputs/http.md +++ b/pipeline/outputs/http.md @@ -55,7 +55,7 @@ http://host:port/something Using the format specified, you could start Fluent Bit through: ``` -$ fluent-bit -i cpu -t cpu -o http://192.168.2.3:80/something -m '*' +fluent-bit -i cpu -t cpu -o http://192.168.2.3:80/something -m '*' ``` ### Configuration File diff --git a/pipeline/outputs/influxdb.md b/pipeline/outputs/influxdb.md index 19c7da4b2..5db1e1e49 100644 --- a/pipeline/outputs/influxdb.md +++ b/pipeline/outputs/influxdb.md @@ -42,7 +42,7 @@ influxdb://host:port Using the format specified, you could start Fluent Bit through: ```text -$ fluent-bit -i cpu -t cpu -o influxdb://127.0.0.1:8086 -m '*' +fluent-bit -i cpu -t cpu -o influxdb://127.0.0.1:8086 -m '*' ``` ### Configuration File @@ -152,7 +152,7 @@ fluentbit The following command will gather CPU metrics from the system and send the data to InfluxDB database every five seconds: ```text -$ bin/fluent-bit -i cpu -t cpu -o influxdb -m '*' +bin/fluent-bit -i cpu -t cpu -o influxdb -m '*' ``` Note that all records coming from the _cpu_ input plugin, have a tag _cpu_, this tag is used to generate the measurement in InfluxDB diff --git a/pipeline/outputs/kafka-rest-proxy.md b/pipeline/outputs/kafka-rest-proxy.md index 6d63cee19..d1caffc46 100644 --- a/pipeline/outputs/kafka-rest-proxy.md +++ b/pipeline/outputs/kafka-rest-proxy.md @@ -31,7 +31,7 @@ In order to insert records into a Kafka REST Proxy service, you can run the plug The **kafka-rest** plugin, can read the parameters from the command line in two ways, through the **-p** argument \(property\), e.g: ```text -$ fluent-bit -i cpu -t cpu -o kafka-rest -p host=127.0.0.1 -p port=8082 -m '*' +fluent-bit -i cpu -t cpu -o kafka-rest -p host=127.0.0.1 -p port=8082 -m '*' ``` ### Configuration File diff --git a/pipeline/outputs/kafka.md b/pipeline/outputs/kafka.md index 9e5399f31..42f743d2b 100644 --- a/pipeline/outputs/kafka.md +++ b/pipeline/outputs/kafka.md @@ -33,7 +33,7 @@ In order to insert records into Apache Kafka, you can run the plugin from the co The **kafka** plugin can read parameters through the **-p** argument \(property\), e.g: ```text -$ fluent-bit -i cpu -o kafka -p brokers=192.168.1.3:9092 -p topics=test +fluent-bit -i cpu -o kafka -p brokers=192.168.1.3:9092 -p topics=test ``` ### Configuration File diff --git a/pipeline/outputs/kinesis.md b/pipeline/outputs/kinesis.md index e6c64183c..6a4a48cab 100644 --- a/pipeline/outputs/kinesis.md +++ b/pipeline/outputs/kinesis.md @@ -41,7 +41,7 @@ In order to send records into Amazon Kinesis Data Streams, you can run the plugi The **kinesis\_streams** plugin, can read the parameters from the command line through the **-p** argument \(property\), e.g: ```text -$ fluent-bit -i cpu -o kinesis_streams -p stream=my-stream -p region=us-west-2 -m '*' -f 1 +fluent-bit -i cpu -o kinesis_streams -p stream=my-stream -p region=us-west-2 -m '*' -f 1 ``` ### Configuration File diff --git a/pipeline/outputs/logdna.md b/pipeline/outputs/logdna.md index e7432c2f3..0d28c3a21 100644 --- a/pipeline/outputs/logdna.md +++ b/pipeline/outputs/logdna.md @@ -131,7 +131,7 @@ The following configuration example, will emit a dummy example record and ingest run Fluent Bit with the new configuration file: ```text -$ fluent-bit -c logdna.conf +fluent-bit -c logdna.conf ``` Fluent Bit output: diff --git a/pipeline/outputs/new-relic.md b/pipeline/outputs/new-relic.md index 074acce00..f384dc717 100644 --- a/pipeline/outputs/new-relic.md +++ b/pipeline/outputs/new-relic.md @@ -97,7 +97,7 @@ The following configuration example, will emit a dummy example record and ingest run Fluent Bit with the new configuration file: ```text -$ fluent-bit -c newrelic.conf +fluent-bit -c newrelic.conf ``` Fluent Bit output: diff --git a/pipeline/outputs/null.md b/pipeline/outputs/null.md index b6f4f26cf..1b47b816a 100644 --- a/pipeline/outputs/null.md +++ b/pipeline/outputs/null.md @@ -15,7 +15,7 @@ You can run the plugin from the command line or through the configuration file: From the command line you can let Fluent Bit throws away events with the following options: ```bash -$ fluent-bit -i cpu -o null +fluent-bit -i cpu -o null ``` ### Configuration File diff --git a/pipeline/outputs/oci-logging-analytics.md b/pipeline/outputs/oci-logging-analytics.md index 253b86f12..6f22c9746 100644 --- a/pipeline/outputs/oci-logging-analytics.md +++ b/pipeline/outputs/oci-logging-analytics.md @@ -56,7 +56,7 @@ In order to insert records into the OCI Logging Analytics service, you can run t The OCI Logging Analytics plugin can read the parameters from the command line in two ways, through the -p argument (property), e.g: ```text -$ fluent-bit -i dummy -t dummy -o oci_logan -p config_file_location= -p namespace= \ +fluent-bit -i dummy -t dummy -o oci_logan -p config_file_location= -p namespace= \ -p oci_la_log_group_id= -p oci_la_log_source_name= -p tls=on -p tls.verify=off -m '*' ``` diff --git a/pipeline/outputs/opensearch.md b/pipeline/outputs/opensearch.md index 445504dd0..09a30ad3d 100644 --- a/pipeline/outputs/opensearch.md +++ b/pipeline/outputs/opensearch.md @@ -83,14 +83,14 @@ es://host:port/index/type Using the format specified, you could start Fluent Bit through: ```text -$ fluent-bit -i cpu -t cpu -o es://192.168.2.3:9200/my_index/my_type \ +fluent-bit -i cpu -t cpu -o es://192.168.2.3:9200/my_index/my_type \ -o stdout -m '*' ``` which is similar to do: ```text -$ fluent-bit -i cpu -t cpu -o opensearch -p Host=192.168.2.3 -p Port=9200 \ +fluent-bit -i cpu -t cpu -o opensearch -p Host=192.168.2.3 -p Port=9200 \ -p Index=my_index -p Type=my_type -o stdout -m '*' ``` diff --git a/pipeline/outputs/splunk.md b/pipeline/outputs/splunk.md index 5c752409a..af83d4a17 100644 --- a/pipeline/outputs/splunk.md +++ b/pipeline/outputs/splunk.md @@ -53,7 +53,7 @@ In order to insert records into a Splunk service, you can run the plugin from th The **splunk** plugin, can read the parameters from the command line in two ways, through the **-p** argument \(property\), e.g: ```text -$ fluent-bit -i cpu -t cpu -o splunk -p host=127.0.0.1 -p port=8088 \ +fluent-bit -i cpu -t cpu -o splunk -p host=127.0.0.1 -p port=8088 \ -p tls=on -p tls.verify=off -m '*' ``` diff --git a/pipeline/outputs/standard-output.md b/pipeline/outputs/standard-output.md index 69e3e44f2..665a34c35 100644 --- a/pipeline/outputs/standard-output.md +++ b/pipeline/outputs/standard-output.md @@ -14,7 +14,7 @@ The **stdout** output plugin allows to print to the standard output the data rec ### Command Line ```bash -$ bin/fluent-bit -i cpu -o stdout -v +bin/fluent-bit -i cpu -o stdout -v ``` We have specified to gather [CPU](https://github.com/fluent/fluent-bit-docs/tree/ddc1cf3d996966b9db39f8784596c8b7132b4d5b/pipeline/input/cpu.md) usage metrics and print them out to the standard output in a human readable way: diff --git a/pipeline/outputs/tcp-and-tls.md b/pipeline/outputs/tcp-and-tls.md index 55de1b07c..efcd8d016 100644 --- a/pipeline/outputs/tcp-and-tls.md +++ b/pipeline/outputs/tcp-and-tls.md @@ -32,7 +32,7 @@ The following parameters are available to configure a secure channel connection #### JSON format ```bash -$ bin/fluent-bit -i cpu -o tcp://127.0.0.1:5170 -p format=json_lines -v +bin/fluent-bit -i cpu -o tcp://127.0.0.1:5170 -p format=json_lines -v ``` We have specified to gather [CPU](https://github.com/fluent/fluent-bit-docs/tree/16f30161dc4c79d407cd9c586a0c6839d0969d97/pipeline/input/cpu.md) usage metrics and send them in JSON lines mode to a remote end-point using netcat service. @@ -50,7 +50,7 @@ $ nc -l 5170 Repeat the JSON approach but using the `msgpack` output format. ```bash -$ bin/fluent-bit -i cpu -o tcp://127.0.0.1:5170 -p format=msgpack -v +bin/fluent-bit -i cpu -o tcp://127.0.0.1:5170 -p format=msgpack -v ``` diff --git a/pipeline/outputs/treasure-data.md b/pipeline/outputs/treasure-data.md index 22991f239..5db12a997 100644 --- a/pipeline/outputs/treasure-data.md +++ b/pipeline/outputs/treasure-data.md @@ -21,7 +21,7 @@ In order to start inserting records into [Treasure Data](https://www.treasuredat ### Command Line: ```bash -$ fluent-bit -i cpu -o td -p API="abc" -p Database="fluentbit" -p Table="cpu_samples" +fluent-bit -i cpu -o td -p API="abc" -p Database="fluentbit" -p Table="cpu_samples" ``` Ideally you don't want to expose your API key from the command line, using a configuration file is highly desired. diff --git a/pipeline/outputs/websocket.md b/pipeline/outputs/websocket.md index a5a049df1..64610000b 100644 --- a/pipeline/outputs/websocket.md +++ b/pipeline/outputs/websocket.md @@ -30,7 +30,7 @@ http://host:port/something Using the format specified, you could start Fluent Bit through: ```text -$ fluent-bit -i cpu -t cpu -o websocket://192.168.2.3:80/something -m '*' +fluent-bit -i cpu -t cpu -o websocket://192.168.2.3:80/something -m '*' ``` ### Configuration File @@ -80,7 +80,7 @@ Websocket plugin is working with tcp keepalive mode, please refer to [networking Once Fluent Bit is running, you can send some messages using the _netcat_: ```bash -$ echo '{"key 1": 123456789, "key 2": "abcdefg"}' | nc 127.0.0.1 5170; sleep 35; echo '{"key 1": 123456789, "key 2": "abcdefg"}' | nc 127.0.0.1 5170 +echo '{"key 1": 123456789, "key 2": "abcdefg"}' | nc 127.0.0.1 5170; sleep 35; echo '{"key 1": 123456789, "key 2": "abcdefg"}' | nc 127.0.0.1 5170 ``` In [Fluent Bit](http://fluentbit.io) we should see the following output: diff --git a/stream-processing/getting-started/hands-on.md b/stream-processing/getting-started/hands-on.md index b4f58faed..f92c3ef39 100644 --- a/stream-processing/getting-started/hands-on.md +++ b/stream-processing/getting-started/hands-on.md @@ -19,7 +19,7 @@ These steps use the official Fluent Bit Docker image. Run the following command to confirm that Fluent Bit is installed and up-to-date: ```bash -$ docker run -ti fluent/fluent-bit:1.4 /fluent-bit/bin/fluent-bit --version +docker run -ti fluent/fluent-bit:1.4 /fluent-bit/bin/fluent-bit --version Fluent Bit v1.8.2 ``` @@ -28,7 +28,7 @@ Fluent Bit v1.8.2 The sample file contains JSON records. Run the following command to append the `parsers.conf` file and instruct the Tail input plugin to parse content as JSON: ```bash -$ docker run -ti -v `pwd`/sp-samples-1k.log:/sp-samples-1k.log \ +docker run -ti -v `pwd`/sp-samples-1k.log:/sp-samples-1k.log \ fluent/fluent-bit:1.8.2 \ /fluent-bit/bin/fluent-bit -R /fluent-bit/etc/parsers.conf \ -i tail -p path=/sp-samples-1k.log \ @@ -64,7 +64,7 @@ Fluent Bit v1.8.2 Run the following command to create a stream processor query using the `-T` flag and change the output to the Null plugin. This obtains the stream processing results in the standard output interface and avoids confusion in the terminal. ```bash -$ docker run -ti -v `pwd`/sp-samples-1k.log:/sp-samples-1k.log \ +docker run -ti -v `pwd`/sp-samples-1k.log:/sp-samples-1k.log \ fluent/fluent-bit:1.2 \ /fluent-bit/bin/fluent-bit \ -R /fluent-bit/etc/parsers.conf \ @@ -91,7 +91,7 @@ The previous query aims to retrieve all records for which the `country` key cont Run the following command to use the `AVG` aggregation function to get the average value of ingested records: ```bash -$ docker run -ti -v `pwd`/sp-samples-1k.log:/sp-samples-1k.log \ +docker run -ti -v `pwd`/sp-samples-1k.log:/sp-samples-1k.log \ fluent/fluent-bit:1.8.2 \ /fluent-bit/bin/fluent-bit \ -R /fluent-bit/etc/parsers.conf \ @@ -122,7 +122,7 @@ The resulting output contains multiple records because Fluent Bit processes data Grouping results within a time window simplifies data processing. Run the following command to group results by `country` and calculate the average of `num` with a one-second processing window: ```bash -$ docker run -ti -v `pwd`/sp-samples-1k.log:/sp-samples-1k.log \ +docker run -ti -v `pwd`/sp-samples-1k.log:/sp-samples-1k.log \ fluent/fluent-bit:1.8.2 \ /fluent-bit/bin/fluent-bit \ -R /fluent-bit/etc/parsers.conf \ @@ -150,7 +150,7 @@ Next, instruct the stream processor to ingest results as part of the Fluent Bit Run the following command, which uses a `CREATE STREAM` statement to tag results with the `sp-results` tag, then outputs records with that tag to standard output: ```bash -$ docker run -ti -v `pwd`/sp-samples-1k.log:/sp-samples-1k.log \ +docker run -ti -v `pwd`/sp-samples-1k.log:/sp-samples-1k.log \ fluent/fluent-bit:1.8.2 \ /fluent-bit/bin/fluent-bit \ -R /fluent-bit/etc/parsers.conf \