Monitoring: Ensure all monitoring watches filter by timestamp (elastic/x-pack-elasticsearch#3238)

Only the Logstash and Kibana version mismatch watches contain a time
filter, the others are only sorting by timestamp. In combination with
searching in all `.monitoring-es-*` indices, this is IMO pretty resource
intensive, as we cannot exit early on any search request.

This commit adds time based filters to remaining three watches, using
the same range than the other two.

Original commit: elastic/x-pack-elasticsearch@3eb6bf0de2
This commit is contained in:
Alexander Reelsen 2017-12-15 15:23:57 +01:00 committed by GitHub
parent 78f7c0e27a
commit 758433a0fa
3 changed files with 21 additions and 0 deletions

View File

@ -61,6 +61,13 @@
} }
] ]
} }
},
{
"range": {
"timestamp": {
"gte": "now-2m"
}
}
} }
] ]
} }

View File

@ -54,6 +54,13 @@
} }
] ]
} }
},
{
"range": {
"timestamp": {
"gte": "now-2m"
}
}
} }
] ]
} }

View File

@ -51,6 +51,13 @@
"term": { "term": {
"type": "cluster_stats" "type": "cluster_stats"
} }
},
{
"range": {
"timestamp": {
"gte": "now-2m"
}
}
} }
] ]
} }