21.3. 使用方法

21.3.1. CW プロデューサーによって評価されるメッセージヘッダー

ヘッダータイプ説明

CamelAwsCwMetricName

String

Amazon CW メトリクス名。

CamelAwsCwMetricValue

double

Amazon CW メトリクス値。

CamelAwsCwMetricUnit

String

Amazon CW メトリクスユニット。

CamelAwsCwMetricNamespace

String

Amazon CW メトリクス namespace。

CamelAwsCwMetricTimestamp

日付

Amazon CW メトリクスのタイムスタンプ。

CamelAwsCwMetricDimensionName

String

Camel 2.12: Amazon CW メトリクスディメンション名。

CamelAwsCwMetricDimensionValue

String

Camel 2.12: Amazon CW メトリクスディメンション値。

CamelAwsCwMetricDimensions

Map<String, String>

Camel 2.12: ディメンション名とディメンション値のマップ。

21.3.2. Advanced AmazonCloudWatch configuration

AmazonCloudWatch インスタンス設定をさらに制御する必要がある場合は、独自のインスタンスを作成し、URI から参照できます。

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

#client は、レジストリー内の 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);