Skip to content

EventsRouter

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, **exclusion_filter, **uid, **detailFormat, **keys, **archive, **start, **limit, **params, **page, **dir) Query for events.

@type limit: integer
@param limit: (optional) Max index of events to retrieve (default: 0)
@type start: integer
@param start: (optional) Min index of events to retrieve (default: 0)
@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 history: boolean
@param history: (optional) True to search the event history table instead
of active events (default: False)
@type uid: string
@param uid: (optional) Context for the query (default: None)
@rtype: dictionary
@return: B{Properties}:
- events: ([dictionary]) List of objects representing events
- totalCount: (integer) Total count of events returned
- asof: (float) Current time
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)
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.