Hello, I’m setting up alerts, I’ve created monitor and trigger, even very simple one, just to test.
{
"_id" : "KbbP920BwY-0PRalu0yh",
"_version" : 2,
"monitor" : {
"type" : "monitor",
"name" : "test",
"enabled" : true,
"enabled_time" : 1571820649372,
"schedule" : {
"period" : {
"interval" : 15,
"unit" : "MINUTES"
}
},
"inputs" : [
{
"search" : {
"indices" : [
"app-general-*"
],
"query" : {
"size" : 0,
"query" : {
"bool" : {
"filter" : [
{
"range" : {
"@timestamp" : {
"from" : "{{period_end}}||-1h",
"to" : "{{period_end}}",
"include_lower" : true,
"include_upper" : true,
"format" : "epoch_millis",
"boost" : 1.0
}
}
}
],
"adjust_pure_negative" : true,
"boost" : 1.0
}
},
"aggregations" : { }
}
}
}
],
"triggers" : [
{
"id" : "3LfR920BwY-0PRalKyps",
"name" : "test-alert",
"severity" : "1",
"condition" : {
"script" : {
"source" : "ctx.results[0].hits.total > 10",
"lang" : "painless"
}
},
"actions" : [
{
"name" : "test trigger",
"destination_id" : "7OCvlGsBwY-0PRal181J",
"subject_template" : {
"source" : "",
"lang" : "mustache"
},
"message_template" : {
"source" : "{\"text\": \"AHTUNG! test \n- Period start: {{ctx.periodStart}}\n- Period end: {{ctx.periodEnd}}\n\", \"chat_id\":\"-1001464722935\"}",
"lang" : "mustache"
}
}
]
}
],
"last_update_time" : 1571820743532
}
}
So there more then 10k documents add every minute to main index, but no alert triggered
Please advise me, where is the problem