Response:
"result": {
"execution_time" : "2019-06-18T12:23:13.872Z",
"execution_duration" : 14,
"input" : {
"type" : "search",
"status" : "success",
"payload" : {
"_shards" : {
"total" : 9,
"failed" : 0,
"successful" : 9,
"skipped" : 0
},
"hits" : {
"hits": {…}
"total" : 1167,
"max_score" : 0.0
},
"took" : 8,
"timed_out" : false,
"aggregations" : {
"monitors" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [
{
"doc_count" : 545,
"interval" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [
{
"doc_count" : 530,
"key" : "8m"
}
]
},
"time" : {
"value_as_string" : "2019-06-16T08:08:05.215Z",
"value" : 1.560672485215E12
},
"key" : "host1.memory-90.0%-8m-8"
},
{
"doc_count" : 341,
"interval" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [
{
"doc_count" : 334,
"key" : "15m"
}
]
},
"time" : {
"value_as_string" : "2019-06-16T20:45:05.215Z",
"value" : 1.560717905215E12
},
"key" : "host1.filesystem-90.0%-15m-1"
},
{
"doc_count" : 53,
"interval" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [
{
"doc_count" : 53,
"key" : "8m"
}
]
},
"time" : {
"value_as_string" : "2019-06-18T12:17:31.012Z",
"value" : 1.560860251012E12
},
"key" : "host2.memory-90.0%-8m-8"
},
{
"doc_count" : 25,
"interval" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [
{
"doc_count" : 25,
"key" : "8m"
}
]
},
"time" : {
"value_as_string" : "2019-06-18T00:53:06.196Z",
"value" : 1.560819186196E12
},
"key" : "host3.cpu-90.0%-8m-5"
}
]
}
}
},
"search" : {
"request" : {
"search_type" : "query_then_fetch",
"indices" : [
"shob-alerts*"
],
"rest_total_hits_as_int" : true,
"body" : {
"query" : {
"bool" : {
"filter" : {
"range" : {
"time" : {
"gte" : "now-1w"
}
}
}
}
},
"aggs" : {
"monitors" : {
"terms" : {
"field" : "monitor.keyword",
"size" : 100
},
"aggs" : {
"time" : {
"max" : {
"field" : "time"
}
},
"interval" : {
"terms" : {
"field" : "interval.keyword",
"size" : 1
}
}
}
}
}
}
}
}
},
"condition" : {
"type" : "script",
"status" : "success",
"met" : true
},
"transform" : {
"type" : "script",
"status" : "success",
"payload" : {
"body" : [
[
"devlnxsystem01.memory-90.0%-8m-8"
],
[
"devlnxsystem01.filesystem-90.0%-15m-1"
],
[
"DC1HOUNIMSUMP01.cpu-90.0%-8m-5"
]
],
"m" : {
"query" : {
"bool" : {
"filter" : [
{
"terms" : {
"monitor.keyword" : [
"devlnxsystem01.memory-90.0%-8m-8"
]
}
},
{
"range" : {
"time" : {
"gte" : "now-10h"
}
}
}
]
}
},
"script" : {
"source" : "ctx._source.severity = 'clearVeryMuch'",
"lang" : "painless"
}
}
}
},
"actions" : [
{
"id" : "my-logging-action",
"type" : "logging",
"status" : "success",
"logging" : {
"logged_text" : """{"query":{"bool":{"filter":[{"terms":{"monitor.keyword":["host1.memory-90.0%-8m-8"]}},{"range":{"time":{"gte":"now-10h"}}}]}},"script":{"source":"ctx._source.severity = 'clearVeryMuch'","lang":"painless"}}"""
}
},
{
"id" : "clear_alerts",
"type" : "webhook",
"status" : "failure",
"error" : {
"root_cause" : [
{
"type" : "no_http_response_exception",
"reason" : "host:9200 failed to respond"
}
],
"type" : "no_http_response_exception",
"reason" : "host:9200 failed to respond"
}
}
]
},
"messages" : [ ]
}
}