You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting 7.0, Elasticsearch will default to hits.total being an object instead of a scalar value. To account for this, two sets of fixes ought to be made to the Cluster Alerts watches:
In the 6.7 branch, these watches should include rest_total_hits_as_int in their search queries. This will allow a Cluster Alert watch created by a 6.7 cluster to function properly either on a 6.7 or 7.0 monitoring cluster.
In the 7.0, 7.x, and master branches, these watches should be updated so any references to hits.total refer to hits.total.value instead.
The text was updated successfully, but these errors were encountered:
For 7.0 we will send rest_total_hits_as_int per #36697, and plan to address removing this during `7.x via #38387.
The change here is essentially taking the change on #36697 back to v6.7.0 to allow 6.7 data clusters to talk to a 7.0 monitoring cluster correctly. (cherry-pick won't work due to differences in base)
Looking at this again today and this isn't an issue due to the way rest_total_hits_as_int is implemented in 7.x. The parameter is always sent irregardless if it is defined inside the search template (defaulted to true). So in 7.x a user can explicitly set it to false it per watch, but if they do nothing it will always be sent with a true value.
This means that both 6.7 and 7.0 monitoring will always use the scalar value irregardless of where the watch originated. #38387 will change this behavior before 8.0.
Also, tested locally and 6.7 data -> 7.0 monitoring cluster with alerts works (lots of deprecation notices...but that is expected)
Monitoring creates watches for its Cluster Alerts feature. The definitions for these watches can be found in this folder: https://github.com/elastic/elasticsearch/tree/master/x-pack/plugin/monitoring/src/main/resources/monitoring/watches.
Some of these watches rely on
hits.total
being a scalar value. For example:elasticsearch/x-pack/plugin/monitoring/src/main/resources/monitoring/watches/elasticsearch_cluster_status.json
Line 132 in 1aa10c4
Starting 7.0, Elasticsearch will default to
hits.total
being an object instead of a scalar value. To account for this, two sets of fixes ought to be made to the Cluster Alerts watches:In the
6.7
branch, these watches should includerest_total_hits_as_int
in theirsearch
queries. This will allow a Cluster Alert watch created by a6.7
cluster to function properly either on a6.7
or7.0
monitoring cluster.In the
7.0
,7.x
, andmaster
branches, these watches should be updated so any references tohits.total
refer tohits.total.value
instead.The text was updated successfully, but these errors were encountered: