I want to get the data analysis range time in kibana alert and use it for message setting.
kibana version: 7.7.1
The monitor settings are as follows
{
"size": 0,
"query": {
"bool": {
"filter": [
{
"range": {
"status": {
"from": 500,
"to": 599,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"@timestamp": {
"from": "{{period_end}}||-5m",
"to": "{{period_end}}",
"include_lower": true,
"include_upper": false,
"format": "epoch_millis",
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
"aggregations": {
"aggs_status": {
"terms": {
"field": "status",
"size": 999,
"min_doc_count": 300,
"shard_min_doc_count": 0,
"show_term_doc_count_error": false,
"order": [
{
"_count": "desc"
},
{
"_key": "asc"
}
]
}
}
}
}
Monitor schedule is every minute. Therefore, "periodStart" and "periodEnd," which can be used in messages, are set to 1 minute.
{
"periodStart": "2024-02-28T07:41:27Z",
"periodEnd": "2024-02-28T07:42:27Z",
"results": [
{
My desired value is a 5 minute interval. Can I get the time of this interval?