-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CCR Monitoring] Only collect stats for specified indices #33646
[CCR Monitoring] Only collect stats for specified indices #33646
Conversation
Pinging @elastic/es-core-infra |
@@ -72,7 +72,7 @@ protected boolean shouldCollect(final boolean isElectedMaster) { | |||
final ClusterState clusterState) throws Exception { | |||
try (ThreadContext.StoredContext ignore = stashWithOrigin(threadContext, MONITORING_ORIGIN)) { | |||
final CcrStatsAction.StatsRequest request = new CcrStatsAction.StatsRequest(); | |||
request.setIndices(Strings.EMPTY_ARRAY); | |||
request.setIndices(getCollectionIndices()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, would it make sense to also set the following?
request.setIndicesOptions(IndicesOptions.lenientExpandOpen());
The IndexRecoveryCollector
and IndexStatsCollector
do this too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that makes sense. Otherwise we may throw an index not found exception if the index patterns the user is interested in does not yet exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw the build fails because of the removal of String.EMPTY_ARRAY its import is now unused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Pinging @elastic/es-distributed |
) Follow up to elastic#33617. Relates to elastic#30086. As with all other per-index Monitoring collectors, the `CcrStatsCollector` should only collect stats for the indices the user wants to monitor. This list is controlled by the `xpack.monitoring.collection.indices` setting and defaults to all indices.
Backport of #33646 to 6.x. Original message: Follow up to #33617. Relates to #30086. As with all other per-index Monitoring collectors, the `CcrStatsCollector` should only collect stats for the indices the user wants to monitor. This list is controlled by the `xpack.monitoring.collection.indices` setting and defaults to all indices.
Follow up to #33617. Relates to #30086.
As with all other per-index Monitoring collectors, the
CcrStatsCollector
should only collect stats for the indices the user wants to monitor. This list is controlled by thexpack.monitoring.collection.indices
setting and defaults to all indices.