Skip to content

Add support for impact_areas to health impacts #85830

Merged
andreidan merged 4 commits intoelastic:masterfrom
andreidan:impact-areas
Apr 13, 2022
Merged

Add support for impact_areas to health impacts #85830
andreidan merged 4 commits intoelastic:masterfrom
andreidan:impact-areas

Conversation

@andreidan
Copy link
Copy Markdown
Contributor

This adds an impact_areas section to the impacts returned by the
health API.

eg. the shards_availability indicator might be returning:

"impacts": [
  {
    "severity": 1,
    "description":"Cannot add data to 1 index [red-index]. Searches might return incomplete results.",
    "impact_areas": [
      "ingest","search"
    ]
  },
  {
    "severity": 2,
    "description": "Searches might return slower than usual. Fewer redundant copies of the data exist on 2 indices [.ds-logslogslogs-2022.04.12-000001, my-index-000001].",
    "impact_areas": [
      "search"
    ]
  }
]

Resolves #85829

This adds an `impact_areas` section to the impacts returned by the
health API.

eg. the `shards_availability` indicator might be returning:
```
"impacts": [
  {
    "severity": 1,
    "description":"Cannot add data to 1 index [red-index]. Searches might return incomplete results.",
    "impact_areas": [
      "ingest","search"
    ]
  },
  {
    "severity": 2,
    "description": "Searches might return slower than usual. Fewer redundant copies of the data exist on 2 indices [.ds-logslogslogs-2022.04.12-000001, my-index-000001].",
    "impact_areas": [
      "search"
    ]
  }
]
```
@andreidan andreidan added >feature :Distributed/Health Issues for the health report API v8.3.0 labels Apr 12, 2022
@andreidan andreidan requested a review from masseyke April 12, 2022 17:06
@elasticmachine elasticmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Apr 12, 2022
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @andreidan, I've created a changelog YAML for you.

indicesWithUnavailableReplicasOnly.size() == 1 ? "index" : "indices",
getTruncatedIndicesString(indicesWithUnavailableReplicasOnly, clusterMetadata)
);
impacts.add(new HealthIndicatorImpact(3, impactDescription));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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.

getTruncatedIndicesString(primaries.indicesWithUnavailableShards, clusterMetadata)
);
impacts.add(new HealthIndicatorImpact(1, impactDescription));
impacts.add(new HealthIndicatorImpact(1, impactDescription, List.of(ImpactArea.INGEST, ImpactArea.SEARCH)));
Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

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)

Copy link
Copy Markdown
Member

@masseyke masseyke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andreidan andreidan merged commit 02fc46a into elastic:master Apr 13, 2022
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Apr 13, 2022
…n/elasticsearch into datastream-reuse-pipeline-source

* 'datastream-reuse-pipeline-source' of github.com:weizijun/elasticsearch: (28 commits)
  Add JDK 19 to Java testing matrix
  [ML] add nlp config update serialization tests (elastic#85867)
  [ML] A text categorization aggregation that works like ML categorization (elastic#80867)
  [ML] Fix serialisation of text embedding updates (elastic#85863)
  TSDB: fix wrong initial value of tsidOrd in TimeSeriesIndexSearcher (elastic#85713)
  Enforce external id uniqueness during DesiredNode construction (elastic#84227)
  Fix Intellij integration (elastic#85866)
  Upgrade Azure SDK to version 12.14.4 (elastic#83884)
  [discovery-gce] Fix initialisation of transport in FIPS mode (elastic#85817)
  Remove unnecessary docs/changelog/85534.yaml
  Prevent ThreadContext header leak when sending response (elastic#68649)
  Add support for impact_areas to health impacts  (elastic#85830)
  Reduce port range re-use in tests (elastic#85777)
  Fix TranslogTests#testStats (elastic#85828)
  Remove hppc from cat allocation api (elastic#85842)
  Fix BuildTests serialization (elastic#85827)
  Use urgent priority for node shutdown cluster state update (elastic#85838)
  Remove Task classes from HLRC (elastic#85835)
  Remove unused migration classes (elastic#85834)
  Remove uses of Charset name parsing (elastic#85795)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Health Issues for the health report API >feature Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add impact_areas field to impacts

4 participants