RelatedEventsRouter
clear_heartbeats() |
Clear all heartbeat events @rtype: DirectResponse @return: B{Properties}: - success: (boolean) True if heartbeats deleted successfully |
postNote(uuid, note) |
|
reopen(**uid, **excludeIds, **evids, **limit, **timeout, **params, **asof) |
Reopen event(s). @type evids: [string] @param evids: (optional) List of event IDs to reopen (default: None) @type excludeIds: [string] @param excludeIds: (optional) List of event IDs to exclude from reopen (default: None) @type params: dictionary @param params: (optional) Key-value pair of filters for this search. (default: None) @type uid: string @param uid: (optional) Context for the query (default: None) @type asof: float @param asof: (optional) Only reopen if there has been no state change since this time (default: None) @type limit: The maximum number of events to update in this batch. @param limit: (optional) Maximum number of events to update (Default: None). @type timeout: int @param timeout: The time (in seconds) before the underlying saved search times out. @rtype: DirectResponse @return: Success message |
close(**uid, **excludeIds, **evids, **limit, **timeout, **params, **asof) |
Close event(s). @type evids: [string] @param evids: (optional) List of event IDs to close (default: None) @type excludeIds: [string] @param excludeIds: (optional) List of event IDs to exclude from close (default: None) @type params: dictionary @param params: (optional) Key-value pair of filters for this search. (default: None) @type uid: string @param uid: (optional) Context for the query (default: None) @type asof: float @param asof: (optional) Only close if there has been no state change since this time (default: None) @type limit: The maximum number of events to update in this batch. @param limit: (optional) Maximum number of events to update (default: None). @type timeout: int @param timeout: The time (in seconds) before the underlying saved search times out. @rtype: DirectResponse @return: Success message |
query(**sort, **uid, **archive, **start, **limit, **params, **page, **dir) |
Expects params to have an 'evid' parameter specifying the service event(s) for which related events should be queried. @rtype: DirectResponse @return: - Properties: - B{events} ([C{dictionary}]) - A list of dictionaries representing event data - B{totalCount} (C{integer}) - The total number of events - B{asof} (C{float}) - The time for which this response is valid |
unacknowledge() |
Deprecated, Use reopen |
acknowledge(**uid, **excludeIds, **evids, **limit, **timeout, **params, **asof) |
Acknowledge event(s). @type evids: [string] @param evids: (optional) List of event IDs to acknowledge (default: None) @type excludeIds: [string] @param excludeIds: (optional) List of event IDs to exclude from acknowledgment (default: None) @type params: dictionary @param params: (optional) Key-value pair of filters for this search. (default: None) @type uid: string @param uid: (optional) Context for the query (default: None) @type asof: float @param asof: (optional) Only acknowledge if there has been no state change since this time (default: None) @type limit: The maximum number of events to update in this batch. @param limit: (optional) Maximum number of events to update (default: None). @type timeout: int @param timeout: The time (in seconds) before the underlying saved search times out. @rtype: DirectResponse @return: Success message |
detail(evid) |
Get event details. @type evid: string @param evid: Event ID to get details @type history: boolean @param history: Deprecated @rtype: DirectResponse @return: B{Properties}: - event: ([dictionary]) List containing a dictionary representing event details |
updateDetails(evid) |
On success, returns the status. |
write_log(**message, **evid) |
Write a message to an event's log. @type evid: string @param evid: Event ID to log to @type message: string @param message: Message to log @rtype: DirectResponse @return: Success message |
write_event_logs(**message, **evid) |
|
nextEventSummaryUpdate(next_request) |
When performing updates from the event console, updates are performed in batches to allow the user to see the progress of event changes and cancel out of updates while they are in progress. This works by specifying a limit to one of the close, acknowledge, or reopen calls in this router. The response will contain an EventSummaryUpdateResponse, and if there are additional updates to be performed, it will contain a next_request field with all of the parameters used to update the next range of events. @type next_request: dictionary @param next_request: The next_request field from the previous updates. |
classify(evrows, evclass) |
Associate event(s) with an event class. @type evrows: [dictionary] @param evrows: List of event rows to classify @type evclass: string @param evclass: Event class to associate events to @rtype: DirectResponse @return: B{Properties}: - msg: (string) Success/failure message - success: (boolean) True if class update successful |
clear_heartbeat(monitor, daemon) |
Clears a specific heartbeat event. @type monitor: basestring @param monitor: The heartbeat monitor (i.e. 'localhost'). @type daemon: basestring @param daemon: The heartbeat daemon (i.e. 'zenhub'). @rtype: DirectResponse @return: A DirectResponse indicating success or failure. |
queryArchive(**sort, **exclusion_filter, **uid, **detailFormat, **keys, **start, **limit, **params, **page, **dir) |
|
related_services(event_id, **archive) |
Find services that a given event_id impacted. @type event_id: C{string} @param event_id: The event id to use when looking up impacted services @type archive: C{boolean} @param archive: Whether or not to search for the event in the event archive @rtype: DirectResponse @return: - Properties: - services: A sorted C{list} of C{dict} objects with keys: - I{name} (C{string}) - The name of the service - I{uuid} (C{string}) - The uuid of the service |
clear_device_heartbeats(params, **limit) |
@type params: dictionary @param params: Key-value pair of filters for this search. |
column_config(**uid, **archive) |
Get the current event console field column configuration. @type uid: string @param uid: (optional) UID context to use (default: None) @type archive: boolean @param archive: (optional) True to use the event archive instead of active events (default: False) @rtype: [dictionary] @return: A list of objects representing field columns |
setConfigValues(values) |
@type values: Dictionary @param values: Key Value pairs of config values |
updateEventSummaries(update, **event_filter, **limit, **timeout, **exclusion_filter) |
|
queryGenerator(**sort, **uid, **detailFormat, **excludeIds, **evids, **params, **archive, **dir) |
Query for events. @type sort: string @param sort: (optional) Key on which to sort the return results (default: 'lastTime') @type dir: string @param dir: (optional) Sort order; can be either 'ASC' or 'DESC' (default: 'DESC') @type params: dictionary @param params: (optional) Key-value pair of filters for this search. (default: None) @type archive: boolean @param archive: (optional) True to search the event archive instead of active events (default: False) @type uid: string @param uid: (optional) Context for the query (default: None) @rtype: generator @return: Generator returning events. |
manage_events(**uid, **excludeIds, **evids, **limit, **timeout, **params, **asof) |
|
getConfig() |
|
add_event(summary, device, component, severity, evclasskey, **evclass, **monitor) |
Create a new event. @type summary: string @param summary: New event's summary @type device: string @param device: Device id to use for new event @type component: string @param component: Component uid to use for new event @type severity: string @param severity: Severity of new event. Can be one of the following: Critical, Error, Warning, Info, Debug, or Clear @type evclasskey: string @param evclasskey: The Event Class Key to assign to this event @type evclass: string @param evclass: Event class for the new event @rtype: DirectResponse For other parameters please see class Event. |