Skip to content

Instantly share code, notes, and snippets.

@dcvtruong
Created December 18, 2019 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcvtruong/b356957d6b4e3313c51a4217c2e26568 to your computer and use it in GitHub Desktop.
Save dcvtruong/b356957d6b4e3313c51a4217c2e26568 to your computer and use it in GitHub Desktop.
{
"condition": {
"array_compare": {
"ctx.payload.aggregations.minutes.buckets" : {
"path": "nodes.buckets.stream()",
"gte": {
"value": 5
}
}
}
}
}
***************************************************************************
{
"took" : 7,
"timed_out" : false,
"_shards" : {
"total" : 7,
"successful" : 7,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 5140,
"relation" : "eq"
},
"max_score" : null,
"hits" : [ ]
},
"aggregations" : {
"minutes" : {
"buckets" : [
{
"key_as_string" : "2019-12-16T18:00:00.000Z",
"key" : 1576519200000,
"doc_count" : 5140,
"nodes" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [
{
"key" : "elasticsearch-master-1",
"doc_count" : 4894,
"memory_over_25" : {
"buckets" : {
"high" : {
"doc_count" : 90
}
}
}
},
{
"key" : "elasticsearch-master-0",
"doc_count" : 123,
"memory_over_25" : {
"buckets" : {
"high" : {
"doc_count" : 90
}
}
}
},
{
"key" : "elasticsearch-master-2",
"doc_count" : 123,
"memory_over_25" : {
"buckets" : {
"high" : {
"doc_count" : 90
}
}
}
}
]
}
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment