Skip to content

Instantly share code, notes, and snippets.

@rokcarl

rokcarl/stat_rollups Secret

Created Oct 28, 2020
Embed
What would you like to do?
PUT _rollup/job/stat_rollups
{
"index_pattern": "stats-*",
"rollup_index": "stat_rollups",
"cron": "0 */5 * * * ?",
"page_size": 1000,
"groups": {
"date_histogram": {
"field": "timestamp",
"fixed_interval": "60m",
"delay": "10m"
},
"terms": {
"fields": [
"app",
"route.profile",
"matrix.profile",
"customer"
]
}
},
"metrics": [
{
"field": "credits",
"metrics": ["sum", "avg"]
},
{
"field": "async_waiting",
"metrics": ["max", "avg"]
},
{
"field": "async_took",
"metrics": ["max", "avg"]
},
{
"field": "took",
"metrics": ["max", "avg"]
},
{
"field": "route.points_count",
"metrics": ["max", "sum", "avg"]
}
]
}
POST _rollup/job/stat_rollups/_start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment