use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class GtfsRtAlarmsImpl method createMessagesReceivedAlarm.
@Override
public void createMessagesReceivedAlarm() {
String sqsQueue = _configService.getConfigurationValueAsString("alarm.sqsQueue", getEnv());
PutMetricAlarmRequest putMetricAlarmRequest = getSQSMetricAlarmRequest(MetricName.NumberOfMessagesReceived, getSqsQueue());
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getCriticalAction());
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.sqsNumMessagesReceived", 1d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class GtfsRtAlarmsImpl method createMessagesSentAlarm.
@Override
public void createMessagesSentAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getSQSMetricAlarmRequest(MetricName.NumberOfMessagesSent, getSqsQueue());
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getCriticalAction());
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.sqsNumMessagesSent", 1d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class PredictionAlarmsImpl method createPredictablePercentageAlarm.
@Override
public void createPredictablePercentageAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.PredictionPredictablePercentage);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setComparisonOperator(ComparisonOperator.LessThanOrEqualToThreshold);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.predictionProcessingTime", 0.30d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class PredictionAlarmsImpl method createProcessingTimeAlarm.
@Override
public void createProcessingTimeAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.PredictionProcessingTime);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setComparisonOperator(ComparisonOperator.LessThanOrEqualToThreshold);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.predictionProcessingTime", 100d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class PredictionAlarmsImpl method createPredictionTotalQueueLatencyAlarm.
@Override
public void createPredictionTotalQueueLatencyAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.PredictionTotalQueueLatency);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setComparisonOperator(ComparisonOperator.LessThanOrEqualToThreshold);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.predictionTotalQueueLatency", 30000d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
Aggregations