Description
Component(s)
receiver/awscloudwatchmetricsreceiver
What happened?
What happened?
Am trying to receive metrics from AWS CloudWatch as per below link by using awscloudwatchmetrics in config.yaml
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awscloudwatchmetricsreceiver
Steps to reproduce
I have installed latest Otel collector with below commands on my EC2 instance and required role is configured to get metrics from cloudwatch.
sudo yum update sudo yum -y install wget systemctl wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.127.0/otelcol_0.127.0_linux_amd64.rpm sudo rpm -ivh otelcol_0.127.0_linux_amd64.rpm
My config file looks something like below
awscloudwatchmetrics: region: us-east-1 poll_interval: 1m metrics: named: - namespace: "AWS/EC2" metric_name: "CPUUtilization" period: "5m" aws_aggregation: "Sum" dimensions: - Name: "InstanceId" Value: "i-1234567890abcdef0" - namespace: "AWS/S3" metric_name: "BucketSizeBytes" period: "5m" aws_aggregation: "p99" dimensions: - Name: "BucketName" Value: "OpenTelemetry" - Name: "StorageType" Value: "StandardStorage"
What did you expect to see?
Collector should receive metrics from CloudWatch
What did you see instead?
I get below error. Which indicates that awscloudwatchmetrics is not supported. What should be the fix here ?
Error: failed to get config: cannot unmarshal the configuration: decoding failed due to the following error(s): Jun 02 07:15:48 ip-131231237.cn-northwest-1.compute.internal otelcol-contrib[218202]: error decoding 'receivers': unknown type: "awscloudwatchmetrics" for id: "awscloudwatchmetrics" (valid values: [googlecloudpubsub hostmetrics otlpjsonfile awsxray cloudflare kubeletstats mysql otelarrow splunkenterprise udplog vcenter active_directory_ds httpcheck k8s_cluster loki wavefront oracledb postgresql tlscheck faro cloudfoundry redis solace aerospike awsecscontainermetrics awss3 azureeventhub ntp prometheus zookeeper chrony jaeger journald k8s_events nsxt tcpcheck windowseventlog apache kafkametrics libhoney purefa syslog awsfirehose azuremonitor opencensus purefb riak prometheus_simple tcplog awscontainerinsightreceiver collectd googlecloudspanner influxdb sapm sqlquery nop memcached mongodbatlas mongodb nginx rabbitmq splunk_hec sqlserver otlp awscloudwatch bigip datadog googlecloudmonitoring namedpipe saphana sshcheck expvar couchdb filestats jmx pulsar signalfx snowflake statsd carbon github k8sobjects receiver_creator webhookevent zipkin netflow skywalking snmp windowsperfcounters apachespark filelog flinkmetrics haproxy iis kafka podman_stats stef azureblob docker_stats elasticsearch envoyals fluentforward]) Jun 02 07:15:48 ip-13123123.cn-northwest-1.compute.internal otelcol-contrib[218202]: 2025/06/02 07:15:48 collector server run finished with error: failed to get config: cannot unmarshal the configuration: decoding failed due to the following error(s): Jun 02 07:15:48 ip-10-dds-14ds.cn-northwest-1.compute.internal otelcol-contrib[218202]: error decoding 'receivers': unknown type: "awscloudwatchmetrics" for id: "awscloudwatchmetrics" (valid values: [googlecloudpubsub hostmetrics otlpjsonfile awsxray cloudflare kubeletstats mysql otelarrow splunkenterprise udplog vcenter active_directory_ds httpcheck k8s_cluster loki wavefront oracledb postgresql tlscheck faro cloudfoundry redis solace aerospike awsecscontainermetrics awss3 azureeventhub ntp prometheus zookeeper chrony jaeger journald k8s_events nsxt tcpcheck windowseventlog apache kafkametrics libhoney purefa syslog awsfirehose azuremonitor opencensus purefb riak prometheus_simple tcplog awscontainerinsightreceiver collectd googlecloudspanner influxdb sapm sqlquery nop memcached mongodbatlas mongodb nginx rabbitmq splunk_hec sqlserver otlp awscloudwatch bigip datadog googlecloudmonitoring namedpipe saphana sshcheck expvar couchdb filestats jmx pulsar signalfx snowflake statsd carbon github k8sobjects receiver_creator webhookevent zipkin netflow skywalking snmp windowsperfcounters apachespark filelog flinkmetrics haproxy iis kafka podman_stats stef azureblob docker_stats elasticsearch envoyals fluentforward])
Collector version
0.127.0
Environment information
Environment
NAME="Amazon Linux"
VERSION="2023"
OpenTelemetry Collector configuration
# To limit exposure to denial of service attacks, change the host in endpoints below from 0.0.0.0 to a specific network interface.
# See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks
# To limit exposure to denial of service attacks, change the host in endpoints below from 0.0.0.0 to a specific network interface.
# See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks
extensions:
health_check:
pprof:
endpoint: 0.0.0.0:1777
zpages:
endpoint: 0.0.0.0:55679
receivers:
awscloudwatch:
region: cn-northwest-1
logs:
poll_interval: 30s
max_events_per_request: 1000
awscloudwatchmetrics:
region: cn-northwest-1
poll_interval: 1m
metrics:
named:
- namespace: "AWS/EC2"
metric_name: "CPUUtilization"
period: "5m"
aws_aggregation: "Sum"
dimensions:
- Name: "InstanceId"
Value: "i-879798797"
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
opencensus:
endpoint: 0.0.0.0:55678
# Collect own metrics
prometheus:
config:
scrape_configs:
- job_name: 'otel-collector'
scrape_interval: 10s
static_configs:
- targets: ['0.0.0.0:8888']
jaeger:
protocols:
grpc:
endpoint: 0.0.0.0:14250
thrift_binary:
endpoint: 0.0.0.0:6832
thrift_compact:
endpoint: 0.0.0.0:6831
thrift_http:
endpoint: 0.0.0.0:14268
zipkin:
endpoint: 0.0.0.0:9411
processors:
batch:
exporters:
debug:
verbosity: detailed
service:
pipelines:
traces:
receivers: [otlp, opencensus, jaeger, zipkin]
Log output
Error: failed to get config: cannot unmarshal the configuration: decoding failed due to the following error(s):
Jun 02 07:15:48 ip-131231237.cn-northwest-1.compute.internal otelcol-contrib[218202]: error decoding 'receivers': unknown type: "awscloudwatchmetrics" for id: "awscloudwatchmetrics" (valid values: [googlecloudpubsub hostmetrics otlpjsonfile awsxray cloudflare kubeletstats mysql otelarrow splunkenterprise udplog vcenter active_directory_ds httpcheck k8s_cluster loki wavefront oracledb postgresql tlscheck faro cloudfoundry redis solace aerospike awsecscontainermetrics awss3 azureeventhub ntp prometheus zookeeper chrony jaeger journald k8s_events nsxt tcpcheck windowseventlog apache kafkametrics libhoney purefa syslog awsfirehose azuremonitor opencensus purefb riak prometheus_simple tcplog awscontainerinsightreceiver collectd googlecloudspanner influxdb sapm sqlquery nop memcached mongodbatlas mongodb nginx rabbitmq splunk_hec sqlserver otlp awscloudwatch bigip datadog googlecloudmonitoring namedpipe saphana sshcheck expvar couchdb filestats jmx pulsar signalfx snowflake statsd carbon github k8sobjects receiver_creator webhookevent zipkin netflow skywalking snmp windowsperfcounters apachespark filelog flinkmetrics haproxy iis kafka podman_stats stef azureblob docker_stats elasticsearch envoyals fluentforward])
Jun 02 07:15:48 ip-13123123.cn-northwest-1.compute.internal otelcol-contrib[218202]: 2025/06/02 07:15:48 collector server run finished with error: failed to get config: cannot unmarshal the configuration: decoding failed due to the following error(s):
Jun 02 07:15:48 ip-10-dds-14ds.cn-northwest-1.compute.internal otelcol-contrib[218202]: error decoding 'receivers': unknown type: "awscloudwatchmetrics" for id: "awscloudwatchmetrics" (valid values: [googlecloudpubsub hostmetrics otlpjsonfile awsxray cloudflare kubeletstats mysql otelarrow splunkenterprise udplog vcenter active_directory_ds httpcheck k8s_cluster loki wavefront oracledb postgresql tlscheck faro cloudfoundry redis solace aerospike awsecscontainermetrics awss3 azureeventhub ntp prometheus zookeeper chrony jaeger journald k8s_events nsxt tcpcheck windowseventlog apache kafkametrics libhoney purefa syslog awsfirehose azuremonitor opencensus purefb riak prometheus_simple tcplog awscontainerinsightreceiver collectd googlecloudspanner influxdb sapm sqlquery nop memcached mongodbatlas mongodb nginx rabbitmq splunk_hec sqlserver otlp awscloudwatch bigip datadog googlecloudmonitoring namedpipe saphana sshcheck expvar couchdb filestats jmx pulsar signalfx snowflake statsd carbon github k8sobjects receiver_creator webhookevent zipkin netflow skywalking snmp windowsperfcounters apachespark filelog flinkmetrics haproxy iis kafka podman_stats stef azureblob docker_stats elasticsearch envoyals fluentforward])
Additional context
No response