boolean allStopped = true;
boolean hasStartedAlert = false;
List<String> notStartedServiceNames = new ArrayList<>();
for (ApiServiceAlert service : serviceList.getApiServiceAlerts()) {
ApiServiceInfo info = service.getApiServiceInfo();
ApiAlert alert = service.getApiAlert();
if (ApiServiceStatus.STARTED.name().equalsIgnoreCase(
info.getState())) {
allStopped = false;
if (alert != null && alert.getSummary() != null
&& alert.getSummary().getCritical() > 0) {
hasStartedAlert = true;
}
} else {
notStartedServiceNames.add(service.getApiServiceInfo().getServiceName());
}