-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Add support for impact_areas to health impacts #85830
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 85830 | ||
summary: Add support for `impact_areas` to health impacts | ||
area: Health | ||
type: feature | ||
issues: | ||
- 85829 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
import org.elasticsearch.health.HealthIndicatorResult; | ||
import org.elasticsearch.health.HealthIndicatorService; | ||
import org.elasticsearch.health.HealthStatus; | ||
import org.elasticsearch.health.ImpactArea; | ||
import org.elasticsearch.health.SimpleHealthIndicatorDetails; | ||
|
||
import java.util.ArrayList; | ||
|
@@ -241,7 +242,7 @@ public List<HealthIndicatorImpact> getImpacts() { | |
primaries.indicesWithUnavailableShards.size() == 1 ? "index" : "indices", | ||
getTruncatedIndicesString(primaries.indicesWithUnavailableShards, clusterMetadata) | ||
); | ||
impacts.add(new HealthIndicatorImpact(1, impactDescription)); | ||
impacts.add(new HealthIndicatorImpact(1, impactDescription, List.of(ImpactArea.INGEST, ImpactArea.SEARCH))); | ||
} | ||
/* | ||
* It is possible that we're working with an intermediate cluster state, and that for an index we have no primary but a replica | ||
|
@@ -258,7 +259,7 @@ public List<HealthIndicatorImpact> getImpacts() { | |
indicesWithUnavailableReplicasOnly.size() == 1 ? "index" : "indices", | ||
getTruncatedIndicesString(indicesWithUnavailableReplicasOnly, clusterMetadata) | ||
); | ||
impacts.add(new HealthIndicatorImpact(3, impactDescription)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was the priority an intentional change? The description of #84773 has unassigned replicas as a 3. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. The description was not updated to reflect that we ended up having only 2 impacts. |
||
impacts.add(new HealthIndicatorImpact(2, impactDescription, List.of(ImpactArea.SEARCH))); | ||
} | ||
return impacts; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
package org.elasticsearch.health; | ||
|
||
public enum ImpactArea { | ||
SEARCH("search"), | ||
INGEST("ingest"); | ||
|
||
private final String displayValue; | ||
|
||
ImpactArea(String displayValue) { | ||
this.displayValue = displayValue; | ||
} | ||
|
||
public String displayValue() { | ||
return displayValue; | ||
} | ||
} |
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'm not sure what the use case for the impact areas is, but do "ingest" and "search" capture the impact areas of a missing primary? Should there be one like "cluster instability" or "data loss"? Calling missing data a search problem might not alert users enough.
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.
We'll iterate on this as we go along (and keep track with the UI development). For now I think this would suffice (and we need to keep the language high level as it's impacts related)