Skip to content
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

Cherry-pick #25113 to 7.x: [Metricbeat] Remove elasticsearc.index.created from the SM code #25172

Merged
merged 1 commit into from
Apr 20, 2021

Conversation

sayden
Copy link
Contributor

@sayden sayden commented Apr 20, 2021

Cherry-pick of PR #25113 to 7.x branch. Original message:

What does this PR do?

SM index metricset does an API HTTP call to elasticsearch to retrieve index metadata information. This information is required to populate field elasticsearch.index.created or (index_stats.created if xpack.enabled: true when configuring the module).

The code removes the API call to /_cluster/state/metadata.

Why is it important?

The HTTP call to /_cluster/state/metadata can be VERY expensive. The reason for this is that it returns the entire mapping of all indices on a cluster. If a user has many indices and / or each index has many fields, this could lead to very heavy responses from elasticsearchr (20 Mb in big clusters measured with curl).

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • This is a breaking change, because users could be using field elasticsearch.index.created or index_stats.created and they will be removed.
  • Stack Monitoring UI seems to keep working without any issues. I don't see this field populated anywhere.

@sayden sayden added [zube]: In Review backport Team:Services (Deprecated) Label for the former Integrations-Services team labels Apr 20, 2021
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 20, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 20, 2021
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #25172 opened

  • Start Time: 2021-04-20T11:50:51.160+0000

  • Duration: 78 min 13 sec

  • Commit: 5aee3b5

Test stats 🧪

Test Results
Failed 0
Passed 8357
Skipped 2270
Total 10627

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 8357
Skipped 2270
Total 10627

@sayden
Copy link
Contributor Author

sayden commented Apr 20, 2021

Changelog has been included and the files touched are the expected ones. Merging

@sayden sayden merged commit 22853a1 into elastic:7.x Apr 20, 2021
@zube zube bot removed the [zube]: Done label Jul 20, 2021
@sayden sayden deleted the backport_25113_7.x branch August 25, 2022 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Services (Deprecated) Label for the former Integrations-Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants