You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pipeline/outputs/cloudwatch.md
+7-12Lines changed: 7 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,24 +8,19 @@ description: Send logs and metrics to Amazon CloudWatch
8
8
9
9
The _Amazon CloudWatch_ output plugin lets you ingest your records into the [CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html) service. Support for CloudWatch Metrics is also provided using [Embedded Metric Format (EMF)](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Specification.html).
10
10
11
-
This is the documentation for the core Fluent Bit CloudWatch plugin written in C. It
Golang Fluent Bit plugin (`cloudwatch`). This CloudWatch plugin is called `cloudwatch_logs` to prevent
15
-
conflicts/confusion. Check the amazon repository for the Golang plugin for details on the
16
-
deprecation/migration plan for the original plugin.
11
+
This is the documentation for the core Fluent Bit CloudWatch plugin written in C. It can replace the [aws/amazon-cloudwatch-logs-for-fluent-bit](https://github.com/aws/amazon-cloudwatch-logs-for-fluent-bit) Golang Fluent Bit plugin (`cloudwatch`). This CloudWatch plugin is called `cloudwatch_logs` to prevent conflicts or confusion. Check the Amazon repository for the Golang plugin for details about the deprecation and migration plan for the original plugin.
17
12
18
-
See [AWS credentials](https://docs.fluentbit.io/manual/administration/aws-credentials) for details how AWS credentials are fetched.
13
+
See [AWS credentials](https://docs.fluentbit.io/manual/administration/aws-credentials) for details about how AWS credentials are fetched.
19
14
20
15
## Configuration parameters
21
16
22
17
| Key | Description |
23
18
|----- |------------------ |
24
19
|`region`| The AWS region. |
25
20
|`log_group_name`| The name of the CloudWatch log group that you want log records sent to. |
26
-
|`log_group_template`| Optional. Template for the log group name using Fluent Bit [`record_accessor`](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/record-accessor) syntax. If configured, this field overrides the `log_group_name`. If the template translation fails, an error is logged and the `log_group_name` is used instead. See the tutorial for an example.|
21
+
|`log_group_template`| Optional. Template for the log group name using Fluent Bit [`record_accessor`](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/record-accessor) syntax. If configured, this field overrides the `log_group_name`. If the template translation fails, an error is logged and the `log_group_name` is used instead. See the tutorial for an example.|
27
22
|`log_stream_name`| The name of the CloudWatch log stream that you want log records sent to. |
28
-
|`log_stream_prefix`| Prefix for the log stream name. The tag is appended to the prefix to construct the full log stream name. Not compatible with the `log_stream_name` option.|
23
+
|`log_stream_prefix`| Prefix for the log stream name. The tag is appended to the prefix to construct the full log stream name. Not compatible with the `log_stream_name` option.|
29
24
|`log_stream_template`| Optional. Template for log stream name using Fluent Bit [`record_accessor`](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/record-accessor) syntax. If configured, it overrides other log stream options. If the template translation fails, an error is logged and `log_stream_name` or `log_stream_prefix` are used instead (one of those fields must be configured). See the tutorial for an example. |
30
25
|`log_key`| By default, the whole log record will be sent to CloudWatch. If you specify a key name with this option, then only the value of that key will be sent to CloudWatch. For example, if you are using the Fluentd Docker log driver, you can specify `log_key log` and only the log message will be sent to CloudWatch. |
31
26
|`log_format`| Optional. A parameter that can be used to tell CloudWatch the format of the data. A value of `json/emf` enables CloudWatch to extract custom metrics embedded in a JSON payload. See the [Embedded Metric Format](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Specification.html) specification. |
@@ -44,7 +39,7 @@ See [AWS credentials](https://docs.fluentbit.io/manual/administration/aws-creden
44
39
45
40
## Get started
46
41
47
-
In order to send records into Amazon CloudWatch, you can run the plugin from the command line or through the configuration file.
42
+
To send records into Amazon CloudWatch, you can run the plugin from the command line or through the configuration file.
48
43
49
44
### Command line
50
45
@@ -153,7 +148,7 @@ The following AWS IAM permissions are required to use this plugin:
153
148
154
149
You might want the log group or stream name to be based on the contents of the log record itself. This plugin supports templating log group and stream names using Fluent Bit [`record_accessor`](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/record-accessor) syntax.
155
150
156
-
The following example outlines a common use case - templating log group and stream names based on Kubernetes metadata.
151
+
The following example outlines a common use case-templating log group and stream names based on Kubernetes metadata.
157
152
158
153
The Kubernetes filter can add metadata which will look like the following:
159
154
@@ -225,7 +220,7 @@ If the Kubernetes structure isn't found in the log record, then the `log_group_n
225
220
226
221
#### Limitations of `record_accessor` syntax
227
222
228
-
In the previous example, the template values are separated by dot (`.`) characters. The Fluent Bit `record_accessor` library has a limitation in the characters that can separate template variables; only dots and commas (`.` and `,`) can come after a template variable. This is because the templating library must parse the template and determine the end of a variable.
223
+
In the previous example, the template values are separated by dot (`.`) characters. The Fluent Bit `record_accessor` library has a limitation in the characters that can separate template variables. Only dots and commas (`.` and `,`) can come after a template variable. This is because the templating library must parse the template and determine the end of a variable.
229
224
230
225
Assume that your log records contain the metadata keys `container_name` and `task`. The following would be invalid templates because the two template variables aren't separated by commas or dots:
0 commit comments