This is documentation for the next version of Alloy. For the latest stable release, go to the latest version.
otelcol.receiver.awscloudwatch
EXPERIMENTAL: This is an experimental component. Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement. The
stability.level
flag must be set toexperimental
to use the component.
otelcol.receiver.awscloudwatch
receives logs from AWS CloudWatch and forwards them to other otelcol.*
components.
Note
otelcol.receiver.awscloudwatch
is a wrapper over the upstream OpenTelemetry Collectorawscloudwatch
receiver. Bug reports or feature requests will be redirected to the upstream repository, if necessary.
You can specify multiple otelcol.receiver.awscloudwatch
components by giving them different labels.
Usage
otelcol.receiver.awscloudwatch "<LABEL>" {
region = "us-west-2"
output {
logs = [...]
}
}
Arguments
You can use the following arguments with otelcol.receiver.awscloudwatch
:
If imds_endpoint
is not specified, and the environment variable AWS_EC2_METADATA_SERVICE_ENDPOINT
has a value, it will be used as the IMDS endpoint.
Blocks
You can use the following blocks with otelcol.receiver.awscloudwatch
:
logs
The logs
block configures how logs are collected from CloudWatch.
The following arguments are supported:
The logs
block supports the following blocks:
logs > groups
The groups
block supports the following blocks:
The blocks autodiscover
or named
are mutually exclusive.
logs > groups > autodiscover
The autodiscover
block configures automatic discovery of log groups.
The following arguments are supported:
The autodiscover
block supports the following blocks:
logs > groups > autodiscover > streams
The streams
block configures filtering of log streams for the autodiscovered log groups.
The following arguments are supported:
logs > groups > named
The named
block explicitly configures specific log groups to collect from. Multiple named
blocks can be specified.
The following arguments are supported:
debug_metrics
The debug_metrics
block configures the metrics that this component generates to monitor its state.
The following arguments are supported:
disable_high_cardinality_metrics
is the Grafana Alloy equivalent to the telemetry.disableHighCardinalityMetrics
feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.
Note
If configured,
disable_high_cardinality_metrics
only applies tootelcol.exporter.*
andotelcol.receiver.*
components.
level
is the Alloy equivalent to the telemetry.metrics.level
feature gate in the OpenTelemetry Collector.
Possible values are "none"
, "basic"
, "normal"
and "detailed"
.
output
Required
The output
block configures a set of components to forward resulting telemetry data to.
The following arguments are supported:
You must specify the output
block, but all its arguments are optional.
By default, telemetry data is dropped.
Configure the metrics
, logs
, and traces
arguments accordingly to send telemetry data to other components.
Exported fields
otelcol.receiver.awscloudwatch
doesn’t export any fields.
Component health
otelcol.receiver.awscloudwatch
is only reported as unhealthy if given an invalid configuration.
Debug information
otelcol.receiver.awscloudwatch
doesn’t expose any component-specific debug information.
Example
The following example collects logs from specific EKS cluster log groups and forwards them through a batch processor:
Compatible components
otelcol.receiver.awscloudwatch
can accept arguments from the following components:
- Components that export OpenTelemetry
otelcol.Consumer
Note
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly. Refer to the linked documentation for more details.