Datafeed Resources

A datafeed resource has the following properties:

(object) If set, the datafeed performs aggregation searches. Support for aggregations is limited and should only be used with low cardinality data. For more information, see Aggregating Data for Faster Performance.
(object) Specifies how data searches are split into time chunks. See Chunking Configuration Objects. For example: {"mode": "manual", "time_span": "3h"}
(string) A numerical character string that uniquely identifies the datafeed.
(time units) The interval at which scheduled queries are made while the datafeed runs in real time. The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket span. For example: 150s.
(array) An array of index names. For example: ["it_ops_metrics"]
(string) The unique identifier for the job to which the datafeed sends data.
(object) The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch. By default, this property has the following value: {"match_all": {"boost": 1}}.
(time units) The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default value is 60s.
(object) Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. The detector configuration objects in a job can contain functions that use these script fields. For more information, see Transforming Data With Script Fields.
(unsigned integer) The size parameter that is used in Elasticsearch searches. The default value is 1000.
(array) A list of types to search for within the specified indices. For example: ["network","sql","kpi"].

Chunking Configuration Objects

Datafeeds might be required to search over long time periods, for several months or years. This search is split into time chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of these time chunks are calculated and is an advanced configuration option.

A chunking configuration object has the following properties:


There are three available modes:

The chunk size will be dynamically calculated. This is the default and recommended value.
Chunking will be applied according to the specified time_span.
No chunking will be applied.
(time units) The time span that each search will be querying. This setting is only applicable when the mode is set to manual. For example: 3h.

Datafeed Counts

The get datafeed statistics API provides information about the operational progress of a datafeed. For example:

(string) For started datafeeds only, contains messages relating to the selection of a node.
(string) A numerical character string that uniquely identifies the datafeed.

(object) The node upon which the datafeed is started. The datafeed and job will be on the same node.

The unique identifier of the node. For example, "0-o0tOoRTwKFZifatTWKNw".
The node name. For example, 0-o0tOo.
The node ephemeral ID.
The host and port where transport HTTP connections are accepted. For example,
For example, {"max_running_jobs": "10"}.

(string) The status of the datafeed, which can be one of the following values:

The datafeed is actively receiving data.
The datafeed is stopped and will not receive data until it is re-started.