public interface AlertsService
| Modifier and Type | Method and Description |
|---|---|
void |
ackAlerts(String tenantId,
Collection<String> alertIds,
String ackBy,
String ackNotes)
The alerts must already have been added.
|
void |
addAlerts(Collection<Alert> alerts)
Persist the provided alerts.
|
void |
addAlertTags(String tenantId,
Collection<String> alertIds,
Map<String,String> tags)
Add the provided tags to the specified alerts.
|
void |
addEvents(Collection<Event> events)
Persist the provided events and send to the engine for alerts evaluation.
|
void |
addEventTags(String tenantId,
Collection<String> eventIds,
Map<String,String> tags)
Add the provided tags to the specified events.
|
void |
addNote(String tenantId,
String alertId,
String user,
String text)
Add a note on an existing Alert.
|
int |
deleteAlerts(String tenantId,
AlertsCriteria criteria)
Delete the requested Alerts, as described by the provided criteria.
|
int |
deleteEvents(String tenantId,
EventsCriteria criteria)
Delete the requested Events, as described by the provided criteria.
|
Alert |
getAlert(String tenantId,
String alertId,
boolean thin) |
Page<Alert> |
getAlerts(String tenantId,
AlertsCriteria criteria,
Pager pager) |
Event |
getEvent(String tenantId,
String eventId,
boolean thin) |
Page<Event> |
getEvents(String tenantId,
EventsCriteria criteria,
Pager pager) |
void |
persistEvents(Collection<Event> events)
Only persist the provided events.
|
void |
removeAlertTags(String tenantId,
Collection<String> alertIds,
Collection<String> tags)
Remove the provided tags from the specified alerts.
|
void |
removeEventTags(String tenantId,
Collection<String> eventIds,
Collection<String> tags)
Remove the provided tags from the specified events.
|
void |
resolveAlerts(String tenantId,
Collection<String> alertIds,
String resolvedBy,
String resolvedNotes,
List<Set<ConditionEval>> resolvedEvalSets)
The alerts must already have been added.
|
void |
resolveAlertsForTrigger(String tenantId,
String triggerId,
String resolvedBy,
String resolvedNotes,
List<Set<ConditionEval>> resolvedEvalSets)
Set unresolved alerts for the provided trigger to RESOLVED status.
|
void |
sendData(Collection<Data> data)
Send data into the alerting system for evaluation.
|
void |
sendData(Data data)
Send data into the alerting system for evaluation.
|
void ackAlerts(String tenantId, Collection<String> alertIds, String ackBy, String ackNotes) throws Exception
tenantId - Tenant where alerts are storedalertIds - Alerts to be acknowledged.ackBy - Optional. Typically the user acknowledging the alerts. "unknown" if not specified.ackNotes - Optional notes about the acknowledgement. "none" if not specified.Exception - any problemvoid addAlerts(Collection<Alert> alerts) throws Exception
alerts - Set of unpersisted Alerts.Exception - any problemvoid addAlertTags(String tenantId, Collection<String> alertIds, Map<String,String> tags) throws Exception
tenantId - Tenant where alerts are storedalertIds - Alerts to be taggedtags - the tags to addException - any problemvoid addEvents(Collection<Event> events) throws Exception
events - Set of unpersisted Events.Exception - any problemvoid addEventTags(String tenantId, Collection<String> eventIds, Map<String,String> tags) throws Exception
tenantId - Tenant where alerts are storedeventIds - Events to be tagged.tags - the tags to addException - any problemvoid persistEvents(Collection<Event> events) throws Exception
events - Set of unpersisted Events.Exception - any problemvoid addNote(String tenantId, String alertId, String user, String text) throws Exception
tenantId - Tenant where alerts are storedalertId - Alert to be added a new noteuser - The user adding the notetext - The content of the noteException - any problemint deleteAlerts(String tenantId, AlertsCriteria criteria) throws Exception
tenantId - Tenant where alerts are storedcriteria - specifying the Alerts to be deleted. Not null.Exception - any problemint deleteEvents(String tenantId, EventsCriteria criteria) throws Exception
tenantId - Tenant where events are storedcriteria - specifying the Events to be deleted. Not null.Exception - any problemAlert getAlert(String tenantId, String alertId, boolean thin) throws Exception
tenantId - Tenant where alerts are storedalertId - the Alert to get.thin - If true don't include evalSets and resolveEvalSets in the returned AlertException - any problemPage<Alert> getAlerts(String tenantId, AlertsCriteria criteria, Pager pager) throws Exception
tenantId - Tenant where alerts are storedcriteria - If null returns all alerts (not recommended)pager - Paging requirement for fetching alerts. Optional. Return all if null.Exception - any problemEvent getEvent(String tenantId, String eventId, boolean thin) throws Exception
tenantId - Tenant where events are storedeventId - the Event to get.thin - If true don't include evalSets in the returned EventException - any problemPage<Event> getEvents(String tenantId, EventsCriteria criteria, Pager pager) throws Exception
tenantId - Tenant where events are storedcriteria - If null returns all events (not recommended)pager - Paging requirement for fetching events. Optional. Return all if null.Exception - any problemvoid removeAlertTags(String tenantId, Collection<String> alertIds, Collection<String> tags) throws Exception
tenantId - Tenant where alerts are storedalertIds - Alerts from which to remove the tagstags - the tag names to remove.Exception - any problemvoid removeEventTags(String tenantId, Collection<String> eventIds, Collection<String> tags) throws Exception
tenantId - Tenant where events are storedeventIds - Events from which to remove the tagstags - the tag names to removeException - any problemvoid resolveAlerts(String tenantId, Collection<String> alertIds, String resolvedBy, String resolvedNotes, List<Set<ConditionEval>> resolvedEvalSets) throws Exception
autoEnable=true it will be enabled, as needed.autoResolve=true it will be set to firing mode, as needed.tenantId - Tenant where alerts are storedalertIds - Alerts to be acknowledged.resolvedBy - Optional. Typically the user resolving the alerts. "unknown" if not specified.resolvedNotes - Optional notes about the resolution. "none" if not specified.resolvedEvalSets - Optional. Typically the evalSets leading to an auto-resolved alert.Exception - any problemvoid resolveAlertsForTrigger(String tenantId, String triggerId, String resolvedBy, String resolvedNotes, List<Set<ConditionEval>> resolvedEvalSets) throws Exception
autoEnable=true it will be enabled, as needed.autoResolve=true it will be set to firing mode, as needed.tenantId - Tenant where alerts are storedtriggerId - Tenant where alerts are storedresolvedBy - Optional. Typically the user resolving the alerts. "unknown" if not specified.resolvedNotes - Optional notes about the resolution. "none" if not specified.resolvedEvalSets - Optional. Typically the evalSets leading to an auto-resolved alert.Exception - any problemvoid sendData(Data data) throws Exception
data - Not Null. The data to be evaluated by the alerting engine.Exception - any problem.void sendData(Collection<Data> data) throws Exception
data - Not Null. The data to be evaluated by the alerting engine.Exception - any problem.Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.