use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class PredictionAlarmsImpl method createDeserializeQueueSizeAlarm.
@Override
public void createDeserializeQueueSizeAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.PredictionDeserializeQueueSize);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setComparisonOperator(ComparisonOperator.LessThanOrEqualToThreshold);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.predictionDeserializeQueueSize", 1000d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class PredictionAlarmsImpl method createPredictionTotalLatencyAlarm.
@Override
public void createPredictionTotalLatencyAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.PredictionTotalLatency);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setComparisonOperator(ComparisonOperator.LessThanOrEqualToThreshold);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.predictionTotalLatency", 30000d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class RealtimeAlarmsImpl method createRealtimeStopsMatchedPctAlarm.
@Override
public void createRealtimeStopsMatchedPctAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.RealtimeStopsMatchedPct);
putMetricAlarmRequest.setAlarmActions(getNonCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Percent);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.rtStopsMatchedPct", 10d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class RealtimeAlarmsImpl method createRealtimeTripsMatchedAvgAlarm.
@Override
public void createRealtimeTripsMatchedAvgAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.RealtimeTripsMatchedAvg);
putMetricAlarmRequest.setAlarmActions(getNonCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.rtTripsMatchedAvg", 50d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class RealtimeAlarmsImpl method createRealtimeStopsUnmatchedAlarm.
@Override
public void createRealtimeStopsUnmatchedAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.RealtimeStopsUnmatched);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.rtStopsUnmatched", // about 4-5%
300d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
Aggregations