Skip to content

Trigger specification

william-p edited this page Feb 13, 2013 · 4 revisions

Draft

Format

{
 actions: [ ],
 conditions: {
   time_conditions: [ ],
   event_conditions: [ ],
   metro_conditions: [ ]
 }
}

actions

Type: override

This action override value of an event Ex:

{
  type: "override",
  field: <FIELD_NAME>,
  value: <VALUE_TO_OVERRIDE>
}

time_conditions

Type: time_interval

Ex:

{
  type: "time_interval",
  startTs: <TIMESTAMP>,
  stopTs: <TIMESTAMP>
}

True if timestamp >= startTs and timestamp < stopTs else False

event_conditions

metro_conditions

Type: value

Ex:

{
  type: "value",
  metric: <METRIC_NAME>
  op: <OPERATOR>,
  value: <VALUE>,
  state: <STATE>,
  else_state: <STATE>
}

state if metric.value op value else else_state