This functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
This API enables you to create a rollup job. The job will be created in a STOPPED state, and must be
started with the Start Job API.
index_pattern (required)
logstash-*).
rollup_index (required)
cron (required)
page_size (required)
groups (required)
metrics
For more details about the job configuration, see Rollup job configuration.
You must have manage or manage_rollup cluster privileges to use this API.
For more information, see
Security Privileges.
The following example creates a rollup job named "sensor", targeting the "sensor-*" index pattern:
PUT _rollup/job/sensor
{
"index_pattern": "sensor-*",
"rollup_index": "sensor_rollup",
"cron": "*/30 * * * * ?",
"page_size" :1000,
"groups" : {
"date_histogram": {
"field": "timestamp",
"interval": "1h",
"delay": "7d"
},
"terms": {
"fields": ["node"]
}
},
"metrics": [
{
"field": "temperature",
"metrics": ["min", "max", "sum"]
},
{
"field": "voltage",
"metrics": ["avg"]
}
]
}When the job is created, you receive the following results:
{
"acknowledged": true
}