AWS CloudWatch
Send metric data to Amazon CloudWatch, list metrics and describe alarms.
What’s inside
-
AWS CloudWatch component, URI syntax:
aws2-cw:namespace
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-aws2-cw-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 26 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.aws2-cw.access-key | The access key ID of the AWS credentials, used together with the secretKey option. The endpoint requires it, unless amazonCwClient is set or useDefaultCredentialsProvider or useProfileCredentialsProvider is true. It is also required when useSessionCredentials is true. | String | |
camel.component.aws2-cw.amazon-cw-client | To use a custom software.amazon.awssdk.services.cloudwatch.CloudWatchClient, which is autowired when the registry has a single one. When this option is set, the credentials, region, proxy, endpoint override and trustAllCertificates options are not used. The endpoint does not close a client that is set or autowired. The option is a software.amazon.awssdk.services.cloudwatch.CloudWatchClient type. | CloudWatchClient | |
camel.component.aws2-cw.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.aws2-cw.configuration | The configuration that the endpoints of this component start from. Each endpoint gets a copy of it, and the options of the endpoint replace its values. The option is a org.apache.camel.component.aws2.cw.Cw2Configuration type. | Cw2Configuration | |
camel.component.aws2-cw.enabled | Whether to enable auto configuration of the aws2-cw component. This is enabled by default. | Boolean | |
camel.component.aws2-cw.health-check-consumer-enabled | Used for enabling or disabling all consumer based health checks from this component | true | Boolean |
camel.component.aws2-cw.health-check-producer-enabled | Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true. | true | Boolean |
camel.component.aws2-cw.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.aws2-cw.name | The metric name. putMetricData uses it for the metric that it builds when the body is not a MetricDatum, listMetrics lists only the metrics with this name, and describeAlarmsForMetric, which requires a metric name, describes the alarms of this metric. The CamelAwsCwMetricName header replaces it. | String | |
camel.component.aws2-cw.operation | The operation that the producer performs: putMetricData puts metric data, listMetrics lists metrics, describeAlarms describes alarms, and describeAlarmsForMetric describes the alarms of one metric. The CamelAwsCwOperation header replaces this option. | putmetricdata | Cw2Operations |
camel.component.aws2-cw.override-endpoint | Whether the CloudWatch client sends the requests to the URI of the uriEndpointOverride option instead of the CloudWatch endpoint of the region. It has no effect when uriEndpointOverride is not set. | false | Boolean |
camel.component.aws2-cw.profile-credentials-name | The name of the profile in the AWS shared credentials and config files, used when useProfileCredentialsProvider is true. If not set, the AWS SDK uses its default profile, which the AWS_PROFILE environment variable can change. | String | |
camel.component.aws2-cw.proxy-host | The host name of the proxy that the CloudWatch client uses. The client uses a proxy only when the proxyPort option is set too. | String | |
camel.component.aws2-cw.proxy-port | The port of the proxy that the CloudWatch client uses. The client uses a proxy only when the proxyHost option is set too. | Integer | |
camel.component.aws2-cw.proxy-protocol | The protocol of the proxy that the CloudWatch client uses. It is used only when the proxyHost and proxyPort options are both set. | https | Protocol |
camel.component.aws2-cw.region | The ID of the AWS region of CloudWatch, in lower case, for example eu-west-1 (the value of Region.EU_WEST_1.id()). If not set, the AWS SDK resolves the region itself, for example from the AWS_REGION environment variable. | String | |
camel.component.aws2-cw.secret-key | The secret access key of the AWS credentials, used together with the accessKey option. The endpoint requires it, unless amazonCwClient is set or useDefaultCredentialsProvider or useProfileCredentialsProvider is true. It is also required when useSessionCredentials is true. | String | |
camel.component.aws2-cw.session-token | The session token of temporary AWS credentials, for example of an assumed IAM role. It is used only when useSessionCredentials is true, together with the accessKey and secretKey options. All three are then required: if one of the three is missing, creating the client fails. | String | |
camel.component.aws2-cw.timestamp | The timestamp of the metric that putMetricData builds when the body is not a MetricDatum, as an ISO-8601 instant such as 2026-11-18T22:00:00Z. The CamelAwsCwMetricTimestamp header replaces it. If neither is set, CloudWatch uses the time it receives the data. CloudWatch accepts timestamps from up to two weeks in the past to up to two hours in the future. | Instant | |
camel.component.aws2-cw.trust-all-certificates | Whether the CloudWatch client accepts any TLS certificate of the server without checking it. It applies whether or not the endpoint is overridden. Use it only for tests, for example with a local emulator. | false | Boolean |
camel.component.aws2-cw.unit | The unit of the metric that putMetricData builds when the body is not a MetricDatum: the name of a StandardUnit of CloudWatch, such as Count, Bytes, Percent or Kilobytes/Second, or its constant name, such as KILOBYTES_SECOND, in any case. An unknown unit fails the exchange. The CamelAwsCwMetricUnit header replaces it, and the unit is Count when neither is set. | String | |
camel.component.aws2-cw.uri-endpoint-override | The URI that the CloudWatch client sends the requests to, for example http://localhost:4566 for a local emulator. It is used only when overrideEndpoint is true. | String | |
camel.component.aws2-cw.use-default-credentials-provider | Whether to load the credentials with the default credentials provider chain of the AWS SDK, which looks in system properties, environment variables, the shared credentials and config files, and the container or instance role. It takes precedence over the other credentials options. | false | Boolean |
camel.component.aws2-cw.use-profile-credentials-provider | Whether to load the credentials from a profile of the AWS shared credentials and config files, the one of the profileCredentialsName option. It is not used when useDefaultCredentialsProvider is true, and it takes precedence over the session and static credentials. | false | Boolean |
camel.component.aws2-cw.use-session-credentials | Whether to use temporary credentials made of the accessKey, secretKey and sessionToken options, for example those of an assumed IAM role. It is not used when useDefaultCredentialsProvider or useProfileCredentialsProvider is true. | false | Boolean |
camel.component.aws2-cw.value | The value of the metric that putMetricData builds when the body is not a MetricDatum. The CamelAwsCwMetricValue header replaces it, and the value is 1 when neither is set. CloudWatch rejects NaN, infinity, and values outside the range -2360 to 2360. | Double |