Jump to: navigation, search


< Monasca
Revision as of 01:19, 3 February 2015 by Roland Hochmuth (talk | contribs) (Transforms)


Real-time event processing in Monasca will be capable of receiving receiving events from some external data source, transforming them, storing them and processing them. The processing consists of defining filters on events and then grouping them together based on fields in the event. Fire and expire conditions can be defined that result in notifications being invoked, similar to how actions are associated with alarms.

An example use case is to send OpenStack "compute.instance.create.*" events (see https://wiki.openstack.org/wiki/NotificationEventExamples) to the API. A transform on the events could be defined that reduces the number of supplied fields in the source event to a more reasonable number as well as normalizing the data. An event stream can be creating by defining a filter to select all "compute.instance.create.*" events and group them by a set of fields in the event, such as "instance_id". When the "compute.instance.create.end" event occurs a fire criteria can be invoked that sends the event stream to the notification methods that have been registered. If the notification method is a web hook additional processing on the collected event stream can occur, such as calculating the duration between the "compute.instance.create.start" and "compute.instance.create.end" event.

Events API


  • POST /v2.0/events: Publish an event.
  • GET /v2.0/events/{event_id}: Get an event with the specific event ID.
  • GET /v2.0/events: List events.


  • POST /v2.0/transforms - POST a transform
  • GET /v2.0/transforms - List transforms
  • GET /v2.0/transforms/{transform_id} - Get the specified transform
  • DELETE /v2.0/transforms/{transform_id}

Stream Definition

  • POST /v2.0/stream-definitions: Creates a stream definition with the following parameters in the JSON body
    • name (string(255), required) - A unique name of the pipeline. Note, the name must be unique.
    • description (string(255), optional) - A description of the stream definition.
    • match_by - Fields of events to filter/match on. For example all "compute.instance.create.*" events
    • group_by - Fields of events to group on. For all events that match the match_by criteria group them by the specified criteria. For example, group events by "instance_id" or "user_id".
    • expires - Time in milliseconds that a stream expires and the expire actions are invoked.
    • fire_actions ([string(50)], optional) - Array of notification method IDs that are invoked when the pipeline fires.
    • expire_actions ([string(50)], optional) - Array of notification method IDs that are invoked when the pipeline expires.
  • GET /v2.0/stream-definitions
  • GET /v2.0/stream-definitions/{stream-definition-id}
  • DELETE /v2.0/stream-definitions/{stream-definition-id}

Transformation Engine

Consumes events from Kafka, transforms them, and publishes to Kafka.

Event Engine

Consumes transformed events from Kafka, and uses the Winchester pipeline to process them.


No changes required.


  • Add Support for multi-tenancy
  • Dynamically update pipelines.
  • Add and delete pipeline definitions at run-time. Currently, the Winchester pipelines needs to be created at start-up time.
    • Supply pipeline definitions in methods, not yaml files. Winchester currently reads the pipeline configuration information from yaml files at start-up time.
  • Create pipeline handler that publishes notification events such that the Notification Engine can consume them.

Notification Engine

Needs to be able to consume general events from the Threshold Engine or Winchester Pipeline Handler.

Threshold Engine

Update to generate more general alarm state transition events.


  • Initialize Winchester schemas
  • Initialize Monasca transforms and pipeline schemas.


Look into creating a demo of a pipeline handler using Iron.IO.