use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class DatabaseAlarmsImpl method createRdsHighCPUAlarm.
@Override
public void createRdsHighCPUAlarm(String dbInstance) {
PutMetricAlarmRequest putMetricAlarmRequest = getRDSMetricAlarmRequest(MetricName.CPUUtilization, "RdsHighCPU", dbInstance);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.dbCPUUtilization", 75d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class DatabaseAlarmsImpl method createRdsWriteLatencyAlarm.
@Override
public void createRdsWriteLatencyAlarm(String dbInstance) {
PutMetricAlarmRequest putMetricAlarmRequest = getRDSMetricAlarmRequest(MetricName.WriteLatency, "RdsWriteLatency", dbInstance);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.dbWriteLatency", 0.3d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class DatabaseAlarmsImpl method createRdsHighConnectionsAlarm.
@Override
public void createRdsHighConnectionsAlarm(String dbInstance) {
PutMetricAlarmRequest putMetricAlarmRequest = getRDSMetricAlarmRequest(MetricName.DatabaseConnections, "RdsHighConnections", dbInstance);
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setUnit(StandardUnit.Count);
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.dbHighConnections", 400d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class GtfsRtAlarmsImpl method createMessagesSizeAlarm.
@Override
public void createMessagesSizeAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getSQSMetricAlarmRequest(MetricName.SentMessageSize, getSqsQueue());
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getCriticalAction());
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.sqsSentMessageSize", 1d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
use of com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest in project onebusaway-application-modules by camsys.
the class GtfsRtAlarmsImpl method createMessagesDeletedAlarm.
@Override
public void createMessagesDeletedAlarm() {
PutMetricAlarmRequest putMetricAlarmRequest = getSQSMetricAlarmRequest(MetricName.NumberOfMessagesDeleted, getSqsQueue());
putMetricAlarmRequest.setAlarmActions(getCriticalAction());
putMetricAlarmRequest.setInsufficientDataActions(getCriticalAction());
putMetricAlarmRequest.setThreshold(_configService.getConfigurationValueAsDouble("alarm.sqsNumMessagesDeleted", 1d));
_cloudWatchService.publishAlarm(putMetricAlarmRequest);
}
Aggregations