Skip to content

Commit 94b80f9

Browse files
esmerelcnorris-cs
andauthored
Apply suggestions from code review
Co-authored-by: Craig Norris <[email protected]> Signed-off-by: Lynette Miles <[email protected]>
1 parent 0808b62 commit 94b80f9

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

pipeline/outputs/cloudwatch.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,19 @@ description: Send logs and metrics to Amazon CloudWatch
88

99
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).
1010

11-
This is the documentation for the core Fluent Bit CloudWatch plugin written in C. It
12-
can replace the
13-
[aws/amazon-cloudwatch-logs-for-fluent-bit](https://github.com/aws/amazon-cloudwatch-logs-for-fluent-bit)
14-
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.
1712

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.
1914

2015
## Configuration parameters
2116

2217
| Key | Description |
2318
|----- |------------------ |
2419
| `region` | The AWS region. |
2520
| `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. |
2722
| `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. |
2924
| `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. |
3025
| `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. |
3126
| `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
4439

4540
## Get started
4641

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.
4843

4944
### Command line
5045

@@ -153,7 +148,7 @@ The following AWS IAM permissions are required to use this plugin:
153148

154149
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.
155150

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.
157152

158153
The Kubernetes filter can add metadata which will look like the following:
159154

@@ -225,7 +220,7 @@ If the Kubernetes structure isn't found in the log record, then the `log_group_n
225220

226221
#### Limitations of `record_accessor` syntax
227222

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.
229224

230225
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:
231226

0 commit comments

Comments
 (0)