Search in sources :

Example 6 with MetricAlert

use of com.sequenceiq.periscope.domain.MetricAlert in project cloudbreak by hortonworks.

the class AlertService method updateMetricAlert.

public MetricAlert updateMetricAlert(Long clusterId, Long alertId, MetricAlert metricAlert) {
    MetricAlert alert = findMetricAlertByCluster(clusterId, alertId);
    alert.setName(metricAlert.getName());
    alert.setDefinitionName(metricAlert.getDefinitionName());
    alert.setPeriod(metricAlert.getPeriod());
    alert.setDescription(metricAlert.getDescription());
    alert.setAlertState(metricAlert.getAlertState());
    return metricAlertRepository.save(alert);
}
Also used : MetricAlert(com.sequenceiq.periscope.domain.MetricAlert)

Aggregations

MetricAlert (com.sequenceiq.periscope.domain.MetricAlert)6 Cluster (com.sequenceiq.periscope.domain.Cluster)3 AmbariClient (com.sequenceiq.ambari.client.AmbariClient)1 AutoscaleClusterRequest (com.sequenceiq.periscope.api.model.AutoscaleClusterRequest)1 MetricAlertRequest (com.sequenceiq.periscope.api.model.MetricAlertRequest)1 PrometheusAlertRequest (com.sequenceiq.periscope.api.model.PrometheusAlertRequest)1 ScalingConfigurationRequest (com.sequenceiq.periscope.api.model.ScalingConfigurationRequest)1 TimeAlertRequest (com.sequenceiq.periscope.api.model.TimeAlertRequest)1 PrometheusAlert (com.sequenceiq.periscope.domain.PrometheusAlert)1 TimeAlert (com.sequenceiq.periscope.domain.TimeAlert)1 ScalingEvent (com.sequenceiq.periscope.monitor.event.ScalingEvent)1 UpdateFailedEvent (com.sequenceiq.periscope.monitor.event.UpdateFailedEvent)1 List (java.util.List)1 Map (java.util.Map)1 Set (java.util.Set)1 Collectors (java.util.stream.Collectors)1 Inject (javax.inject.Inject)1 Component (org.springframework.stereotype.Component)1