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

Additional stats fields for Elasticsearch #41944

Merged
merged 18 commits into from
Dec 12, 2024
Merged

Conversation

3kt
Copy link
Contributor

@3kt 3kt commented Dec 6, 2024

This aims to replace #41652

Proposed commit message

Adds creation_date and tier_preference fields for elasticsearch.index dataset.
This will be necessary for further development through elastic/integrations#11656

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 N/A
  • 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.

Regarding the documentation, the example document is copied from the data.json file, accurately modified in this PR.

Another modification in the integrations repo will be required (for this file)

Disruptive User Impact

This "shouldn't" have an impact on end-users, this doesn't alter existing behavior but only adds 2 new fields that will be exposed in the gathered Elasticsearch monitoring stats.

Author's Checklist

How to test this PR locally

You can run the integration against any cluster (with xpack or otherwise) and check that the generated index stats documents have the two new fields:

  • creation_date
  • tier_preference

Screenshots

image

Performance

Below is a table presenting the impact of the addition of the extra API call, compared to fetching from cluster state (#41652) or the current code

| Case                | Response size bytes           | Delta from baseline | Response time ms       | Delta from baseline |
|---------------------|-------------------------------|---------------------|------------------------|---------------------|
| Baseline            | 14540971                      | 0%                  | 673.9                  | 0%                  |
| From cluster state  | 15679947                      | +7.8%               | 7727.0                 | +1046%              |
| Additional API call | 15018034 + 6120662 = 21138696 | +45.4%              | 673.9 + 892.2 = 1566.1 | +132%               |

Bear in mind the target monitored cluster is in us-east-1 whereas I monitored from EMEA central (Switzerland), the two round trips probably contribute to a lot of the latency. I could run an additional test from a local cloud instance, if we want to refine the measurements.

@3kt 3kt added enhancement Team:Monitoring Stack Monitoring team backport-8.x Automated backport to the 8.x branch with mergify labels Dec 6, 2024
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Dec 6, 2024
@mergify mergify bot assigned 3kt Dec 6, 2024
@3kt 3kt marked this pull request as ready for review December 8, 2024 20:31
@3kt 3kt requested review from a team as code owners December 8, 2024 20:31
@3kt 3kt requested a review from a team as a code owner December 11, 2024 10:21
@3kt 3kt requested review from belimawr and leehinman December 11, 2024 10:21
Copy link
Contributor

@consulthys consulthys left a comment

Choose a reason for hiding this comment

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

Looks great!!

Copy link
Contributor

@rowlandgeoff rowlandgeoff left a comment

Choose a reason for hiding this comment

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

Signing off for Eng Prod to unblock this. Eng Prod shouldn't be codeowner here, fixing that in https://github.com/elastic/beats/pull/41597/files

@3kt 3kt merged commit 16c753c into elastic:main Dec 12, 2024
32 checks passed
@3kt 3kt deleted the get_index_settings branch December 12, 2024 09:13
mergify bot pushed a commit that referenced this pull request Dec 12, 2024
* Perform an additional _settings API call for Elasticsearch module
* Added filter_path for cluster state & index settings fetch
* Added index creation version

(cherry picked from commit 16c753c)
3kt added a commit that referenced this pull request Dec 12, 2024
* Perform an additional _settings API call for Elasticsearch module
* Added filter_path for cluster state & index settings fetch
* Added index creation version

(cherry picked from commit 16c753c)

Co-authored-by: Alexis Charveriat <[email protected]>
@consulthys consulthys added the backport-8.17 Automated backport with mergify label Dec 13, 2024
mergify bot pushed a commit that referenced this pull request Dec 13, 2024
* Perform an additional _settings API call for Elasticsearch module
* Added filter_path for cluster state & index settings fetch
* Added index creation version

(cherry picked from commit 16c753c)
michalpristas pushed a commit to michalpristas/beats that referenced this pull request Dec 13, 2024
* Perform an additional _settings API call for Elasticsearch module
* Added filter_path for cluster state & index settings fetch
* Added index creation version
consulthys pushed a commit that referenced this pull request Dec 13, 2024
* Perform an additional _settings API call for Elasticsearch module
* Added filter_path for cluster state & index settings fetch
* Added index creation version

(cherry picked from commit 16c753c)

Co-authored-by: Alexis Charveriat <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify backport-8.17 Automated backport with mergify enhancement Team:Monitoring Stack Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants