public static final class AlertNoticeDispatchService.AlertSummaryInfo extends Object
AlertNoticeDispatchService.AlertSummaryInfo class encapsulates all of the alert
information for the Notification. This includes customized
structures to better organize information about each of the services,
hosts, and alert states.| Modifier | Constructor and Description |
|---|---|
protected |
AlertSummaryInfo(List<AlertHistoryEntity> histories)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
List<AlertHistoryEntity> |
getAlerts()
Gets all of the alerts in the
Notification. |
List<AlertHistoryEntity> |
getAlerts(String serviceName)
Gets all of the alerts in the
Notification by service name. |
List<AlertHistoryEntity> |
getAlerts(String serviceName,
String alertState)
Gets all of the alerts for a given service and alert state level.
|
int |
getCriticalCount()
Gets the total number of CRITICAL alerts in the
Notification. |
int |
getOkCount()
Gets the total number of OK alerts in the
Notification. |
Set<String> |
getServices()
Gets all of the services that have alerts being reporting in this
notification dispatch.
|
Set<String> |
getServicesByAlertState(String alertState)
Gets a list of services that have an alert being reporting for the given
state.
|
int |
getTotalCount()
Gets the total count of all alerts in the
Notification |
int |
getUnknownCount()
Gets the total number of UNKNOWN alerts in the
Notification. |
int |
getWarningCount()
Gets the total number of WARNING alerts in the
Notification. |
protected AlertSummaryInfo(List<AlertHistoryEntity> histories)
histories - public int getOkCount()
Notification.public int getWarningCount()
Notification.public int getCriticalCount()
Notification.public int getUnknownCount()
Notification.public int getTotalCount()
Notificationpublic Set<String> getServices()
public List<AlertHistoryEntity> getAlerts()
Notification.public List<AlertHistoryEntity> getAlerts(String serviceName)
Notification by service name.serviceName - the service name.null none.public List<AlertHistoryEntity> getAlerts(String serviceName, String alertState)
serviceName - the name of the service.alertState - the alert state level.null for none.Copyright © 2022 Apache Software Foundation. All rights reserved.