Skip to content

Commit 2451e96

Browse files
authored
Merge branch 'master' into lynettemiles/sc-143126/check-for-links-to-commits-and-404s
Signed-off-by: Lynette Miles <[email protected]>
2 parents a46b445 + e4dd99d commit 2451e96

File tree

88 files changed

+621
-1288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+621
-1288
lines changed

SUMMARY.md

Lines changed: 95 additions & 96 deletions
Large diffs are not rendered by default.

administration/aws-credentials.md

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
1-
# AWS Credentials
1+
# AWS credentials
22

3-
Plugins that interact with AWS services fetch credentials from the following providers
4-
in order. Only the first provider that provides credentials is used.
3+
Plugins that interact with AWS services fetch credentials from the following providers in order. Only the first provider that provides credentials is used.
54

65
- [Environment variables](#environment-variables)
76
- [Shared configuration and credentials files](#shared-configuration-and-credentials-files)
87
- [EKS Web Identity Token (OIDC)](#eks-web-identity-token-oidc)
98
- [ECS HTTP credentials endpoint](#ecs-http-credentials-endpoint)
109
- [EC2 Instance Profile Credentials (IMDS)](#ec2-instance-profile-credentials-imds)
1110

12-
All AWS plugins additionally support a `role_arn` (or `AWS_ROLE_ARN`, for
13-
[Elasticsearch](../pipeline/outputs/elasticsearch.md)) configuration parameter. If
14-
specified, the fetched credentials are used to assume the given role.
11+
All AWS plugins additionally support a `role_arn` (or `AWS_ROLE_ARN`, for [Elasticsearch](../pipeline/outputs/elasticsearch.md)) configuration parameter. If specified, the fetched credentials are used to assume the given role.
1512

1613
## Environment variables
1714

18-
Plugins use the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` (and optionally
19-
`AWS_SESSION_TOKEN`) environment variables if set.
15+
Plugins use the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` (and optionally `AWS_SESSION_TOKEN`) environment variables if set.
2016

2117
## Shared configuration and credentials files
2218

23-
Plugins read the shared `config` file at `$AWS_CONFIG_FILE` (or `$HOME/.aws/config`),
24-
and the shared credentials file at `$AWS_SHARED_CREDENTIALS_FILE` (or
25-
`$HOME/.aws/credentials`) to fetch the credentials for the profile named
26-
`$AWS_PROFILE` or `$AWS_DEFAULT_PROFILE` (or "default"). See
27-
[Configuration and credential file settings in the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html).
19+
Plugins read the shared `config` file at `$AWS_CONFIG_FILE` (or `$HOME/.aws/config`), and the shared credentials file at `$AWS_SHARED_CREDENTIALS_FILE` (or `$HOME/.aws/credentials`) to fetch the credentials for the profile named `$AWS_PROFILE` or `$AWS_DEFAULT_PROFILE` (or "default"). See [Configuration and credential file settings in the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html).
2820

2921
The shared settings evaluate in the following order:
3022

@@ -37,22 +29,16 @@ No other settings are supported.
3729

3830
## EKS Web Identity Token (OIDC)
3931

40-
Credentials are fetched using a signed web identity token for a Kubernetes service account.
41-
See [IAM roles for service accounts](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html).
32+
Credentials are fetched using a signed web identity token for a Kubernetes service account. See [IAM roles for service accounts](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html).
4233

4334
## ECS HTTP credentials endpoint
4435

45-
Credentials are fetched for the ECS task's role. See
46-
[Amazon ECS task IAM role](https://docs.aws.amazon.com/AmazonECS/latest/userguide/task-iam-roles.html).
36+
Credentials are fetched for the ECS task's role. See [Amazon ECS task IAM role](https://docs.aws.amazon.com/AmazonECS/latest/userguide/task-iam-roles.html).
4737

4838
## EKS Pod Identity credentials
4939

50-
Credentials are fetched using a pod identity endpoint. See
51-
[Learn how EKS Pod Identity grants pods access to AWS services](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html).
40+
Credentials are fetched using a pod identity endpoint. See [Learn how EKS Pod Identity grants pods access to AWS services](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html).
5241

5342
## EC2 instance profile credentials (IMDS)
5443

55-
Fetches credentials for the EC2 instance profile's role. See
56-
[IAM roles for Amazon EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html).
57-
As of Fluent Bit version 1.8.8, IMDSv2 is used by default and IMDSv1 might be disabled.
58-
Prior versions of Fluent Bit require enabling IMDSv1 on EC2.
44+
Fetches credentials for the EC2 instance profile's role. See [IAM roles for Amazon EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html). As of Fluent Bit version 1.8.8, IMDSv2 is used by default and IMDSv1 might be disabled. Prior versions of Fluent Bit require enabling IMDSv1 on EC2.

administration/backpressure.md

Lines changed: 22 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,21 @@
22

33
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=63e37cfe-9ce3-4a18-933a-76b9198958c1" />
44

5-
It's possible for logs or data to be ingested or created faster than the ability to
6-
flush it to some destinations. A common scenario is when reading from big log files,
7-
especially with a large backlog, and dispatching the logs to a backend over the
8-
network, which takes time to respond. This generates _backpressure_, leading to high
9-
memory consumption in the service.
10-
11-
To avoid backpressure, Fluent Bit implements a mechanism in the engine that restricts
12-
the amount of data an input plugin can ingest. Restriction is done through the
13-
configuration parameters `Mem_Buf_Limit` and `storage.Max_Chunks_Up`.
14-
15-
As described in the [Buffering](../concepts/buffering.md) concepts section, Fluent
16-
Bit offers two modes for data handling: in-memory only (default) and in-memory and
17-
filesystem (optional).
18-
19-
The default `storage.type memory` buffer can be restricted with `Mem_Buf_Limit`. If
20-
memory reaches this limit and you reach a backpressure scenario, you won't be able
21-
to ingest more data until the data chunks that are in memory can be flushed. The
22-
input pauses and Fluent Bit
23-
[emits](https://github.com/fluent/fluent-bit/blob/v2.0.0/src/flb_input_chunk.c#L1334)
24-
a `[warn] [input] {input name or alias} paused (mem buf overlimit)` log message.
25-
26-
Depending on the input plugin in use, this might cause incoming data to be discarded
27-
(for example, TCP input plugin). The tail plugin can handle pauses without data
28-
ingloss, storing its current file offset and resuming reading later. When buffer
29-
memory is available, the input resumes accepting logs. Fluent Bit
30-
[emits](https://github.com/fluent/fluent-bit/blob/v2.0.0/src/flb_input_chunk.c#L1277)
31-
a `[info] [input] {input name or alias} resume (mem buf overlimit)` message.
32-
33-
Mitigate the risk of data loss by configuring secondary storage on the filesystem
34-
using the `storage.type` of `filesystem` (as described in [Buffering &
35-
Storage](buffering-and-storage.md)). Initially, logs will be buffered to both memory
36-
and the filesystem. When the `storage.max_chunks_up` limit is reached, all new data
37-
will be stored in the filesystem. Fluent Bit stops queueing new data in memory and
38-
buffers only to the filesystem. When `storage.type filesystem` is set, the
39-
`Mem_Buf_Limit` setting no longer has any effect. Instead, the `[SERVICE]` level
40-
`storage.max_chunks_up` setting controls the size of the memory buffer.
5+
It's possible for logs or data to be ingested or created faster than the ability toflush it to some destinations. A common scenario is when reading from big log files, especially with a large backlog, and dispatching the logs to a backend over the network, which takes time to respond. This generates _backpressure_, leading to high memory consumption in the service.
6+
7+
To avoid backpressure, Fluent Bit implements a mechanism in the engine that restricts the amount of data an input plugin can ingest. Restriction is done through the configuration parameters `Mem_Buf_Limit` and `storage.Max_Chunks_Up`.
8+
9+
As described in the [Buffering](../concepts/buffering.md) concepts section, Fluent Bit offers two modes for data handling: in-memory only (default) and in-memory and filesystem (optional).
10+
11+
The default `storage.type memory` buffer can be restricted with `Mem_Buf_Limit`. If memory reaches this limit and you reach a backpressure scenario, you won't be able to ingest more data until the data chunks that are in memory can be flushed. The input pauses and Fluent Bit [emits](https://github.com/fluent/fluent-bit/blob/v2.0.0/src/flb_input_chunk.c#L1334) a `[warn] [input] {input name or alias} paused (mem buf overlimit)` log message.
12+
13+
Depending on the input plugin in use, this might cause incoming data to be discarded (for example, TCP input plugin). The tail plugin can handle pauses without data ingloss, storing its current file offset and resuming reading later. When buffer memory is available, the input resumes accepting logs. Fluent Bit [emits](https://github.com/fluent/fluent-bit/blob/v2.0.0/src/flb_input_chunk.c#L1277) a `[info] [input] {input name or alias} resume (mem buf overlimit)` message.
14+
15+
Mitigate the risk of data loss by configuring secondary storage on the filesystem using the `storage.type` of `filesystem` (as described in [Buffering & Storage](buffering-and-storage.md)). Initially, logs will be buffered to both memory and the filesystem. When the `storage.max_chunks_up` limit is reached, all new data will be stored in the filesystem. Fluent Bit stops queueing new data in memory and buffers only to the filesystem. When `storage.type filesystem` is set, the `Mem_Buf_Limit` setting no longer has any effect. Instead, the `[SERVICE]` level `storage.max_chunks_up` setting controls the size of the memory buffer.
4116

4217
## `Mem_Buf_Limit`
4318

44-
`Mem_Buf_Limit` applies only with the default `storage.type memory`. This option is
45-
disabled by default and can be applied to all input plugins.
19+
`Mem_Buf_Limit` applies only with the default `storage.type memory`. This option is disabled by default and can be applied to all input plugins.
4620

4721
As an example situation:
4822

@@ -53,21 +27,14 @@ As an example situation:
5327
- Engine scheduler retries the flush after 10 seconds.
5428
- The input plugin tries to append 500&nbsp;KB.
5529

56-
In this situation, the engine allows appending those 500&nbsp;KB of data into the memory,
57-
with a total of 1.2&nbsp;MB of data buffered. The limit is permissive and will
58-
allow a single write past the limit. When the limit is exceeded, the following
59-
actions are taken:
30+
In this situation, the engine allows appending those 500&nbsp;KB of data into the memory, with a total of 1.2&nbsp;MB of data buffered. The limit is permissive and will allow a single write past the limit. When the limit is exceeded, the following actions are taken:
6031

6132
- Block local buffers for the input plugin (can't append more data).
6233
- Notify the input plugin, invoking a `pause` callback.
6334

64-
The engine protects itself and won't append more data coming from the input plugin in
65-
question. It's the responsibility of the plugin to keep state and decide what to do
66-
in a `paused` state.
35+
The engine protects itself and won't append more data coming from the input plugin in question. It's the responsibility of the plugin to keep state and decide what to do in a `paused` state.
6736

68-
In a few seconds, if the scheduler was able to flush the initial 700&nbsp;KB of data or it
69-
has given up after retrying, that amount of memory is released and the following
70-
actions occur:
37+
In a few seconds, if the scheduler was able to flush the initial 700&nbsp;KB of data or it has given up after retrying, that amount of memory is released and the following actions occur:
7138

7239
- Upon data buffer release (700&nbsp;KB), the internal counters get updated.
7340
- Counters now are set at 500&nbsp;KB.
@@ -77,42 +44,28 @@ actions occur:
7744

7845
## `storage.max_chunks_up`
7946

80-
The `[SERVICE]` level `storage.max_chunks_up` setting controls the size of the memory
81-
buffer. When `storage.type filesystem` is set, the `Mem_Buf_Limit` setting no longer
82-
has an effect.
47+
The `[SERVICE]` level `storage.max_chunks_up` setting controls the size of the memory buffer. When `storage.type filesystem` is set, the `Mem_Buf_Limit` setting no longer has an effect.
8348

84-
The setting behaves similar to the `Mem_Buf_Limit` scenario when the non-default
85-
`storage.pause_on_chunks_overlimit` is enabled.
49+
The setting behaves similar to the `Mem_Buf_Limit` scenario when the non-default `storage.pause_on_chunks_overlimit` is enabled.
8650

87-
When (default) `storage.pause_on_chunks_overlimit` is disabled, the input won't pause
88-
when the memory limit is reached. Instead, it switches to buffering logs only in
89-
the filesystem. Limit the disk spaced used for filesystem buffering with
90-
`storage.total_limit_size`.
51+
When (default) `storage.pause_on_chunks_overlimit` is disabled, the input won't pause when the memory limit is reached. Instead, it switches to buffering logs only in the filesystem. Limit the disk spaced used for filesystem buffering with `storage.total_limit_size`.
9152

9253
See [Buffering & Storage](buffering-and-storage.md) docs for more information.
9354

9455
## About pause and resume callbacks
9556

96-
Each plugin is independent and not all of them implement `pause` and `resume`
97-
callbacks. These callbacks are a notification mechanism for the plugin.
57+
Each plugin is independent and not all of them implement `pause` and `resume` callbacks. These callbacks are a notification mechanism for the plugin.
9858

99-
One example of a plugin that implements these callbacks and keeps state correctly is
100-
the [Tail Input](../pipeline/inputs/tail.md) plugin. When the `pause` callback
101-
triggers, it pauses its collectors and stops appending data. Upon `resume`, it
102-
resumes the collectors and continues ingesting data. Tail tracks the current file
103-
offset when it pauses, and resumes at the same position. If the file hasn't been
104-
deleted or moved, it can still be read.
59+
One example of a plugin that implements these callbacks and keeps state correctly is the [Tail Input](../pipeline/inputs/tail.md) plugin. When the `pause` callback triggers, it pauses its collectors and stops appending data. Upon `resume`, it resumes the collectors and continues ingesting data. Tail tracks the current file offset when it pauses, and resumes at the same position. If the file hasn't been deleted or moved, it can still be read.
10560

106-
With the default `storage.type memory` and `Mem_Buf_Limit`, the following log
107-
messages emit for `pause` and `resume`:
61+
With the default `storage.type memory` and `Mem_Buf_Limit`, the following log messages emit for `pause` and `resume`:
10862

10963
```text
11064
[warn] [input] {input name or alias} paused (mem buf overlimit)
11165
[info] [input] {input name or alias} resume (mem buf overlimit)
11266
```
11367

114-
With `storage.type filesystem` and `storage.max_chunks_up`, the following log
115-
messages emit for `pause` and `resume`:
68+
With `storage.type filesystem` and `storage.max_chunks_up`, the following log messages emit for `pause` and `resume`:
11669

11770
```text
11871
[input] {input name or alias} paused (storage buf overlimit)

0 commit comments

Comments
 (0)