Hi Anton,

Thanks for investigating this new feature (and new project).   In fact, Lucas's examples are so new I haven't had a chance yet to go through them in detail, hopefully today.  Let me just try and answer this now and possibly revise the examples when I get a chance to review.

With 0.6.0 a client can insert Events via a REST endpoint.  All of the send-events*.sh examples are doing this.  They will be persisted and can optionally specify a 'DataId' (more on that in a moment).   Also, Triggers can now generate an Alert or an Event, so Events can be generated when a Trigger's conditions are satisfied.  A Trigger specifies one or more Conditions, of which there are several types: Threshold numeric conditions, Range numeric conditions, String comparison conditions, etc.   Conditions are evaluated against Data being sent into the alerting engine (via REST).  A Condition specifies a DataId and then evaluates against all the datums with that same DataId.

Now, starting in 0.6.0 there is a new condition type, EventCondition.  The datums for this kind of condition are Events (as opposed to numeric for ThresholdCondition, and strings for StringCondition, for example).  So, if an Event comes via REST API, or is generated by a Trigger, and it specifies a DataId, it will then be used for evaluation of any EventCondition with that DataId. For example:

Trigger DeploymentFailed
  EventCondition {dataId: "deployer", expression: "text contains 'failed'"}
  Create Alert

The Condition itself is connected to the Trigger via the triggerId.  Because conditions are owned by a Trigger the triggerId is actually a path-variable on the post REST endpoint.  Perhaps that is what you were looking for?  The same approach is true when specifying Dampening for a Trigger.


On 11/13/2015 9:04 AM, Anton Hughes wrote:
Hi all

I have been studying https://github.com/lucasponce/hawkular-examples/tree/master/events - and I have a question.

In the example documentation, I cannot see how an trigger and conditions are related. I would expect there to be some reference between these objects.


Anton Hughes

hawkular-dev mailing list