diff --git a/docs/sources/send-data/fluentbit/community-plugin.md b/docs/sources/send-data/fluentbit/community-plugin.md index 4a82f5885ffbf..71f82803d61b7 100644 --- a/docs/sources/send-data/fluentbit/community-plugin.md +++ b/docs/sources/send-data/fluentbit/community-plugin.md @@ -129,7 +129,7 @@ For more information about this see our [AWS documentation](https://grafana.com/ First, you need to follow the [instructions](https://github.com/grafana/loki/blob/main/clients/cmd/fluent-bit/README.md) in order to build the plugin dynamic library. -The assuming you have Fluent Bit installed in your `$PATH` you can run the plugin using: +Assuming you have Fluent Bit installed in your `$PATH` you can run the plugin using: ```bash fluent-bit -e /path/to/built/out_grafana_loki.so -c fluent-bit.conf @@ -154,35 +154,35 @@ You can also adapt your plugins.conf, removing the need to change the command li | MinBackoff | Initial backoff time between retries. | 500ms | | MaxBackoff | Maximum backoff time between retries. | 5m | | MaxRetries | Maximum number of retries when sending batches. Setting it to `0` will retry indefinitely. | 10 | -| Labels | labels for API requests. | {job="fluent-bit"} | -| LogLevel | LogLevel for plugin logger. | "info" | +| Labels | Labels for API requests. | {job="fluent-bit"} | +| LogLevel | LogLevel for plugin logger. | `info` | | RemoveKeys | Specify removing keys. | none | -| AutoKubernetesLabels | If set to true, it will add all Kubernetes labels to Loki labels | false | +| AutoKubernetesLabels | If set to `true`, it will add all Kubernetes labels to Loki labels. | false | | LabelKeys | Comma separated list of keys to use as stream labels. All other keys will be placed into the log line. LabelKeys is deactivated when using `LabelMapPath` label mapping configuration. | none | -| LineFormat | Format to use when flattening the record to a log line. Valid values are "json" or "key_value". If set to "json" the log line sent to Loki will be the fluentd record (excluding any keys extracted out as labels) dumped as json. If set to "key_value", the log line will be each item in the record concatenated together (separated by a single space) in the format =. | json | +| LineFormat | Format to use when flattening the record to a log line. Valid values are `json` or `key_value`. If set to `json` the log line sent to Loki will be the fluentd record (excluding any keys extracted out as labels) dumped as json. If set to `key_value`, the log line will be each item in the record concatenated together (separated by a single space) in the format <key>=<value>. | json | | DropSingleKey | If set to true and after extracting label_keys a record only has a single key remaining, the log line sent to Loki will just be the value of the record key. | true | | LabelMapPath | Path to a json file defining how to transform nested records. | none | -| Buffer | Enable buffering mechanism | false | -| BufferType | Specify the buffering mechanism to use (currently only dque is implemented). | dque | -| DqueDir | Path to the directory for queued logs | /tmp/flb-storage/loki | -| DqueSegmentSize | Segment size in terms of number of records per segment | 500 | -| DqueSync | Whether to fsync each queue change. Specify no fsync with "normal", and fsync with "full". | "normal" | -| DqueName | Queue name, must be uniq per output | dque | +| Buffer | Enable buffering mechanism. | false | +| BufferType | Specify the buffering mechanism to use (currently only `dque` is implemented). | dque | +| DqueDir | Path to the directory for queued logs. | /tmp/flb-storage/loki | +| DqueSegmentSize | Segment size in terms of number of records per segment. | 500 | +| DqueSync | Whether to fsync each queue change. Specify no fsync with `normal`, and fsync with `full`. | `normal` | +| DqueName | Queue name, must be unique per output. | dque | ### Labels -Labels are used to [query logs]({{< relref "../../query" >}}) `{container_name="nginx", cluster="us-west1"}`, they are usually metadata about the workload producing the log stream (`instance`, `container_name`, `region`, `cluster`, `level`). In Loki labels are indexed consequently you should be cautious when choosing them (high cardinality label values can have performance drastic impact). +Labels are used to [query logs](https://grafana.com/docs/loki//query/) `{container_name="nginx", cluster="us-west1"}`, they are usually metadata about the workload producing the log stream (`instance`, `container_name`, `region`, `cluster`, `level`). In Loki labels are indexed, so you should be cautious when choosing them. High cardinality label values can have drastic impact on performance. You can use `Labels`, `RemoveKeys` , `LabelKeys` and `LabelMapPath` to how the output plugin will perform labels extraction. ### AutoKubernetesLabels -If set to true, it will add all Kubernetes labels to Loki labels automatically and ignore parameters `LabelKeys`, LabelMapPath. +If set to `true`, `AutoKubernetesLabels` will add all Kubernetes labels to Loki labels automatically and ignore parameters `LabelKeys`, `LabelMapPath`. ### LabelMapPath -When using the `Parser` and `Filter` plugins Fluent Bit can extract and add data to the current record/log data. While Loki labels are key value pair, record data can be nested structures. -You can pass a JSON file that defines how to extract labels from each record. Each json key from the file will be matched with the log record to find label values. Values from the configuration are used as label names. +When using the `Parser` and `Filter` plugins Fluent Bit can extract and add data to the current record/log data. While Loki labels are key value pairs, record data can be nested structures. +You can pass a JSON file that defines how to extract labels from each record. Each JSON key from the file will be matched with the log record to find label values. Values from the configuration are used as label names. Considering the record below : @@ -219,7 +219,7 @@ and a LabelMap file as follow : The labels extracted will be `{team="x-men", container="promtail", pod="promtail-xxx", namespace="prod"}`. -If you don't want the `kubernetes` and `HOSTNAME` fields to appear in the log line you can use the `RemoveKeys` configuration field. (e.g. `RemoveKeys kubernetes,HOSTNAME`). +If you don't want the `kubernetes` and `HOSTNAME` fields to appear in the log line you can use the `RemoveKeys` configuration field. (for example, `RemoveKeys kubernetes,HOSTNAME`). ### Buffering diff --git a/docs/sources/send-data/fluentbit/fluent-bit-loki-tutorial.md b/docs/sources/send-data/fluentbit/fluent-bit-loki-tutorial.md index b76ab4a67a25a..c5564ca3f8817 100644 --- a/docs/sources/send-data/fluentbit/fluent-bit-loki-tutorial.md +++ b/docs/sources/send-data/fluentbit/fluent-bit-loki-tutorial.md @@ -46,7 +46,7 @@ Provide feedback, report bugs, and raise issues in the [Grafana Killercoda repos ## Scenario -In this scenario, we have a microservices application called the Carnivourse Greenhouse. This application consists of the following services: +In this scenario, we have a microservices application called the Carnivorous Greenhouse. This application consists of the following services: - **User Service:** Manages user data and authentication for the application. Such as creating users and logging in. - **Plant Service:** Manages the creation of new plants and updates other services when a new plant is created. @@ -56,7 +56,7 @@ In this scenario, we have a microservices application called the Carnivourse Gre - **Main App:** The main application that ties all the services together. - **Database:** A database that stores user and plant data. -Each service has been instrumented with the fluent bit logging framework to generate logs. If you would like to learn more about how the Carnivorous Greenhouse application was instrumented with Fluent Bit, refer to the [Carnivorous Greenhouse repository](https://github.com/grafana/loki-fundamentals/blob/fluentbit-official/greenhouse/loggingfw.py). +Each service has been instrumented with the Fluent Bit logging framework to generate logs. If you would like to learn more about how the Carnivorous Greenhouse application was instrumented with Fluent Bit, refer to the [Carnivorous Greenhouse repository](https://github.com/grafana/loki-fundamentals/blob/fluentbit-official/greenhouse/loggingfw.py). @@ -135,7 +135,7 @@ For more information on the `forward` input plugin, see the [Fluent Bit Forward ### Export logs to Loki using the official Loki output plugin -Lastly, we will configure Fluent Bit to export logs to Loki using the official Loki output plugin. The Loki output plugin allows you to send logs or events to a Loki service. It supports data enrichment with Kubernetes labels, custom label keys and structured metadata. +Lastly, we will configure Fluent Bit to export logs to Loki using the official Loki output plugin. The Loki output plugin allows you to send logs or events to a Loki service. It supports data enrichment with Kubernetes labels, custom label keys, and structured metadata. Add the following configuration to the `fluent-bit.conf` file: ```conf