use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class RealtimeAlarmsImpl method createScheduleRealtimeDeltaAlarm.
@Override
public void createScheduleRealtimeDeltaAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.ScheduleRealtimeDelta);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.rtDelta", 50d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class RealtimeAlarmsImpl method createRealtimeTripsMatchedAlarm.
@Override
public void createRealtimeTripsMatchedAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.RealtimeTripsMatched);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setComparisonOperator(ComparisonOperator.LessThanOrEqualToThreshold);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.rtTripsMatched", 200d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class RealtimeAlarmsImpl method createRealtimeTripTotalPctAlarm.
@Override
public void createRealtimeTripTotalPctAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.RealtimeTripTotalPct);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Percent);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.rtTripTotalPct", 10d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class RealtimeAlarmsImpl method createRealtimeLocationsTotalAlarm.
@Override
public void createRealtimeLocationsTotalAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.RealtimeLocationsTotal);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setComparisonOperator(ComparisonOperator.LessThanOrEqualToThreshold);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.rtLocationsTotal", 0d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class RealtimeAlarmsImpl method createRealtimeInvalidLatLonPctAlarm.
@Override
public void createRealtimeInvalidLatLonPctAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getMetricAlarmRequest(MetricName.RealtimeInvalidLatLonPct);
putMetricAlarmRequest.setAlarmActions(getNonCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getNonCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Percent);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.rtTnvalidLatLonPct", 10d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
Aggregations