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

[elasticsearch] Align mappings with metricbeat #3928

Merged
merged 9 commits into from Aug 4, 2022

Conversation

klacabane
Copy link
Contributor

@klacabane klacabane commented Aug 1, 2022

Summary

Closes #3914

Align the elasticsearch data streams' mappings with the metricbeat ones. Methodology described in this issue

Testing

  • build the package elastic-package build
  • start a 8.5.0 stack elastic-package stack up -v --version 8.5.0-SNAPSHOT
  • include the package to the existing policy pulled by the running Agent

Screenshot 2022-08-01 at 22 38 47

Known issues

  • Cgroup CPU Utilization data does not show up by default and we need to update the es service in the elastic-package/docker-compose.yml with cpu limits. Add the following:
deploy:
    resources:
        limits:
            cpus: 1.0
  • I/O Operations Rate is not populated - this is because we're missing the io_stats values from the node_stats API. some infos in this slack thread

Screenshot 2022-08-01 at 22 43 41

@klacabane klacabane added v8.5.0 Team:Infra Monitoring UI - DEPRECATED Label for the Infrastructure Monitoring UI team. - DEPRECATED - Use Team:obs-ux-infra_services labels Aug 1, 2022
@klacabane klacabane requested a review from a team as a code owner August 1, 2022 20:56
@klacabane klacabane self-assigned this Aug 1, 2022
Comment on lines +4 to +7
elasticsearch:
index_template:
mappings:
dynamic: false
Copy link
Contributor Author

@klacabane klacabane Aug 1, 2022

Choose a reason for hiding this comment

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

cluster_stats is the offending metricset that caused the initial issue in #3918 so I'd be inclined to close it at the same time, unless we want to review all metricsets and apply dynamic: false where necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ended up disabling dynamic mappings on every data streams

@elasticmachine
Copy link

elasticmachine commented Aug 1, 2022

💚 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 preview

Expand to view the summary

Build stats

  • Start Time: 2022-08-03T13:35:31.340+0000

  • Duration: 15 min 3 sec

Test stats 🧪

Test Results
Failed 0
Passed 31
Skipped 0
Total 31

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Aug 1, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (0/0) 💚
Files 100.0% (0/0) 💚 2.868
Classes 100.0% (0/0) 💚 2.868
Methods 49.057% (26/53) 👎 -40.192
Lines 100.0% (0/0) 💚 9.393
Conditionals 100.0% (0/0) 💚

@miltonhultgren miltonhultgren self-requested a review August 4, 2022 12:03
Copy link
Contributor

@miltonhultgren miltonhultgren left a comment

Choose a reason for hiding this comment

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

Tested locally and didn't run into any errors, LGTM 👍🏼

@@ -1,6 +1,10 @@
type: metrics
title: Elasticsearch ccr metrics
release: experimental
elasticsearch:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it elasticsearch here? What does that represent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's the section allowing more granular control over the assets installed, more options in the package-spec

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see, thanks!

@@ -261,10 +261,10 @@
- name: control_group
type: keyword
- name: limit.bytes
type: long
type: keyword
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add some ignore_above here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this didn't surface as a diff surprisingly but I'll add that where needed

Copy link
Contributor

Choose a reason for hiding this comment

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

It might not be in the original mappings at all but maybe it's needed, I see it in some places and some places not so I never know

Copy link
Contributor

@crespocarlos crespocarlos left a comment

Choose a reason for hiding this comment

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

I was thinking about creating tests for these data streams, but given the fact that we'll deprecate this package, I'm not sure of it's worth the effort. Definitely something to take into consideration for the new integration packages

@@ -13,7 +13,7 @@ format_version: 1.0.0
license: basic
categories: ["elastic_stack", "datastore"]
conditions:
kibana.version: ^7.15.0
kibana.version: ^8.5.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we increment the package semver too? if so, I would also add an entry to the changelog file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

let's keep that for #3917 so that we can pack all the changes in a single changelog entry

@klacabane
Copy link
Contributor Author

klacabane commented Aug 4, 2022

What kind of tests ? Since we have the SM ui as an official consumer of these streams I thought integration tests in Kibana would cover everything we need. PO will be a different story though

@crespocarlos
Copy link
Contributor

crespocarlos commented Aug 4, 2022

When I wrote the comment I had pipeline test in mind, but here we only have data streams, so it's not the case. But digging into integration packages doc it seems that it's possible to create tests for data streams too https://github.com/elastic/elastic-package/blob/main/docs/howto/system_testing.md. I've never tried it, so I don't know what the possibilities are.

@klacabane
Copy link
Contributor Author

I'll merge this now as the ignore_above task may take a while, followup here #3959

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Infra Monitoring UI - DEPRECATED Label for the Infrastructure Monitoring UI team. - DEPRECATED - Use Team:obs-ux-infra_services v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Stack Monitoring] Align elasticsearch's package mappings
4 participants