use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class RealtimeAlarmsImpl method createRealtimeTripsUnmatchedAlarm.
@Override
public void createRealtimeTripsUnmatchedAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.RealtimeTripsUnmatched);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.rtTripsUnmatched", 0d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class WebappAlarmsImpl method createVehicleMonitoringAlarm.
@Override
public void createVehicleMonitoringAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.VehicleMonitoringErrorResponse);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.webVehicleMonitoringError", 1d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class WebappAlarmsImpl method createNextBusApiAlarm.
@Override
public void createNextBusApiAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.NextBusApiErrorResponse);
putMetricAlarmRequest.setThreshold(1d);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.webNextBusApiError", 1d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class AdminServiceAlarmsImpl method createFirstValidBundleFilesCountAlarm.
@Override
public void createFirstValidBundleFilesCountAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.FirstValidBundleFilesCount);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setComparisonOperator(ComparisonOperator.LessThanThreshold);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.bundleFilesCount", 1d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class AdminServiceAlarmsImpl method createCurrentBundleCountAlarm.
@Override
public void createCurrentBundleCountAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.CurrentBundleCount);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setComparisonOperator(ComparisonOperator.LessThanThreshold);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.bundleCount", 1d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
Aggregations