搜索

22.4. 使用方法

download PDF

22.4.1. 由 CW producer 评估的消息标头

标头类型描述

CamelAwsCwMetricName

字符串

Amazon CW 指标名称。

CamelAwsCwMetricValue

�

Amazon CW 指标值。

CamelAwsCwMetricUnit

字符串

Amazon CW 指标单元。

CamelAwsCwMetricNamespace

字符串

Amazon CW 指标命名空间。

CamelAwsCwMetricTimestamp

Date

Amazon CW 指标时间戳。

CamelAwsCwMetricDimensionName

字符串

Camel 2.12 : Amazon CW 指标维度名称。

CamelAwsCwMetricDimensionValue

字符串

Camel 2.12 : Amazon CW 指标维度值。

CamelAwsCwMetricDimensions

Map<String, String>

Camel 2.12 : 维度名称和维度值的映射。

22.4.2. 高级 AmazonCloudWatch 配置

如果您需要对 AmazonCloudWatch 实例配置进行更多控制,您可以创建自己的实例并从 URI 引用它:

from("direct:start")
.to("aws-cw://namepsace?amazonCwClient=#client");

#client 指的是 Registry 中的 AmazonCloudWatch

例如,如果您的 Camel 应用程序在防火墙后面运行:

AWSCredentials awsCredentials = new BasicAWSCredentials("myAccessKey", "mySecretKey");
ClientConfiguration clientConfiguration = new ClientConfiguration();
clientConfiguration.setProxyHost("http://myProxyHost");
clientConfiguration.setProxyPort(8080);

AmazonCloudWatch client = new AmazonCloudWatchClient(awsCredentials, clientConfiguration);

registry.bind("client", client);
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.