"nodes"
contains the detection logic: a list of operators that fetch, clean and analyze data."metadata"
contains metadata used for root cause analysis, search, and data delay management."template"
because it is meant to be reused.
Templates can be defined independently of alerts and reused by multiple alerts. See create templates.
Inside the template, you can use variables in the format ${myVariable}
. Variables are defined in the templateProperties
.
sourcePlanNode
: the name of another nodesourceProperty
: the name of the output we want in the other nodeoutputKey
: the name of the output to get from the node. Used when a Node can return multiple, distinct outputs.outputName
: the name by which other nodes can call this outputAnomalyDetector
of type "PERCENTAGE_CHANGE"
. It compares 2 inputs: a baseline table and a current table. See multiple inputs alerts.
DataFetcher
. Take the time to read the SQL query.
DataFetcher
executes the given query and returns the result in the output named currentOutput
.
Notice the usage of 2 functions:
__timeGroup
transforms a timecolumn in bins of a given granularity, in milliseconds. It makes it easy to group by a timecolumn with a specific granularity. In our example, it transforms the column to bins of 1 day. If we ever want to monitor per hour, we can just change monitoringGranularity
to P1H
.__timeFilter
is a time range filter. Start and end dates are automatically generated depending on the detection runtime. Refer to the macro documentation.TimeIndexFiller
:
TimeIndexFiller
takes care of this kind of problem.
Notice there is no parameter for this node.
This is because macros used by the DataFecher
add metadata to result, (granularity, time column, etc…). TimeIndexFiller
uses this metadata to know how to fill missing points.
If you don’t want to use macros, you can still configure the TimeIndexFiller
manually.
AnomalyDetector
node.
AnomalyDetector
is of type "THRESHOLD"
. There are many other types of detector, such as PERCENTAGE_CHANGE
, HOLT_WINTERS
, and so on. Parameters prefixed by component.*
are specific to the detector execution. component.timestamp
and component.metric
tell the detector the column names of the time and the metric. See the documentation for Anomaly detection algorithms to learn more. Notice that there is no output. Anomaly detectors do output anomalies data, but this data is directly consumed by ThirdEye.
metadata
values are already used in nodes
, so it is good practice putting them as template properties like in this example.
PT1H
). ThirdEye will only run detection on data that is complete. Default value is no delay. This is rarely the case in real life.
dimensions
and rcaExcludedDimensions
arguments cannot be used at the same time.
col1
or a derived metric expression 2*col1 - col2
.
DataFetcher
query, it is most of the time relevant to apply the same filtering for RCA. Notice that this field accepts AND browser=chrome
instead of browser=chrome
. This makes it easy to share custom filter clauses between DataFetcher
queries and this field using a template property.
AnomalyDetector
nodes, in ISO-8601 format. Consider a detection pipeline with a cron that runs every day at 3am. By default, the endTime of the detection pipeline will be 3am. This means the last 0am-3am data will be taken, and put in a day bucket, even though the day is not finished and the data for the day is not complete. This can be avoided by passing a granularity of 1 day (P1D
). ThirdEye will not take the 0am-3am because it is not a complete day. With granularity, ThirdEye only runs detection for periods that are complete. This can be combined with the completenessDelay
parameter.
UTC
.
The timezone is used:
completenessDelay
and granularity
__timeGroup
and __timeFilter
.