Java Code Examples for com.amazonaws.services.cloudwatch.model.PutMetricDataRequest#setMetricData()
The following examples show how to use
com.amazonaws.services.cloudwatch.model.PutMetricDataRequest#setMetricData() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CloudWatchAlertDispatcher.java From s3mper with Apache License 2.0 | 5 votes |
private void sendCloudWatchConsistencyAlert() { MetricDatum datum = new MetricDatum(); datum.setMetricName(cloudWatchConsistencyMetric); datum.setUnit(StandardUnit.Count); datum.setValue(1.0); PutMetricDataRequest request = new PutMetricDataRequest(); request.setNamespace(namespace); request.setMetricData(Collections.singleton(datum)); cloudWatch.putMetricData(request); }
Example 2
Source File: CloudWatchAlertDispatcher.java From s3mper with Apache License 2.0 | 5 votes |
private void sendCloudWatchTimeoutAlert() { MetricDatum datum = new MetricDatum(); datum.setMetricName(cloudWatchTimeoutMetric); datum.setUnit(StandardUnit.Count); datum.setValue(1.0); PutMetricDataRequest request = new PutMetricDataRequest(); request.setNamespace(namespace); request.setMetricData(Collections.singleton(datum)); cloudWatch.putMetricData(request); }
Example 3
Source File: CloudWatchRecorder.java From swage with Apache License 2.0 | 4 votes |
private void sendData( Collection<MetricDatum> metricData ) { PutMetricDataRequest request = new PutMetricDataRequest(); request.setNamespace( namespace ); request.setMetricData( metricData ); metricsClient.putMetricData( request ); }