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

[elastic_agent] - Cleanup fields.yml issues #8079

Merged

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Oct 3, 2023

Proposed commit message

This fixes most of the issues necessary to upgrade this package to format_version: 3.0.0 and does some general housekeeping.

For fields that exist in ECS use 'external: ecs' in the field definition.

Remove attributes from field definitions that have no purpose (like footnote, level, title, etc).

Fix typo for description attribute in some field definitions.

Remove duplicate definitions of fields within the same data stream.

Fix dotted YAML key in manifest.yml.

[git-generate]
cd packages/elastic_agent
go run github.com/andrewkroh/fydler@90f7b627e -fix -a useecs,invalidattribute,unknownattribute **/fields/*.yml
perl -p -i -e 's/descripion:/description:/g' **/fields/*.yml
elastic-package format
elastic-package changelog add --link https://github.com/elastic/integrations/pull/8079 --type enhancement --next minor --description "Modified the field definitions to reference ECS where possible and remove invalid field attributes."

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

andrewkroh added a commit to andrewkroh/integrations that referenced this pull request Oct 3, 2023
[git-generate]
cd packages/elastic_agent
elastic-package changelog add --link elastic#8079 --type enhancement --next minor --description "Modify field mappings to reference ECS fields where possible and remove duplicate field declarations."
@andrewkroh andrewkroh added enhancement New feature or request Integration:Elastic-Agent Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Oct 3, 2023
andrewkroh added a commit to andrewkroh/integrations that referenced this pull request Oct 3, 2023
[git-generate]
cd packages/elastic_agent
elastic-package changelog add --link elastic#8079 --type enhancement --next minor --description "Modified the field definitions to reference ECS where possible and remove invalid field attributes."
@andrewkroh andrewkroh force-pushed the elastic_agent/feature/field-cleanup branch from 485c9e1 to 3e22b5c Compare October 3, 2023 21:52
@elasticmachine
Copy link

elasticmachine commented Oct 3, 2023

💚 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: 2023-10-04T19:26:38.897+0000

  • Duration: 14 min 39 sec

Test stats 🧪

Test Results
Failed 0
Passed 37
Skipped 0
Total 37

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Oct 3, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (0/0) 💚
Files 100.0% (0/0) 💚
Classes 100.0% (0/0) 💚
Methods 33.333% (25/75) 👎 -53.704
Lines 100.0% (0/0) 💚 13.477
Conditionals 100.0% (0/0) 💚

@andrewkroh andrewkroh marked this pull request as ready for review October 3, 2023 23:02
@andrewkroh andrewkroh requested a review from a team as a code owner October 3, 2023 23:02
@elasticmachine
Copy link

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

andrewkroh added a commit to andrewkroh/integrations that referenced this pull request Oct 4, 2023
[git-generate]
cd packages/elastic_agent
elastic-package changelog add --link elastic#8079 --type enhancement --next minor --description "Modified the field definitions to reference ECS where possible and remove invalid field attributes."
@andrewkroh andrewkroh force-pushed the elastic_agent/feature/field-cleanup branch from 3e22b5c to c0f8924 Compare October 4, 2023 19:25
[git-generate]
cd packages/elastic_agent
go run github.com/andrewkroh/fydler@90f7b627e -fix -a useecs **/fields/*.yml
elastic-package format
[git-generate]
cd packages/elastic_agent
go run github.com/andrewkroh/fydler@90f7b627e -fix -a invalidattribute  **/fields/*.yml
elastic-package format
[git-generate]
cd packages/elastic_agent
go run github.com/andrewkroh/fydler@90f7b627e -fix -a unknownattribute  **/fields/*.yml
elastic-package format
[git-generate]
perl -p -i -e 's/descripion:/description:/g' packages/elastic_agent/**/fields/*.yml
Fixes multiple duplicated field declarations.

message is declared 2 times
message is declared 2 times
beat.stats.libbeat.output.events.duplicates is declared 2 times
beat.stats.libbeat.output.events.toomany is declared 2 times
beat.stats.libbeat.output.write.bytes is declared 2 times
beat.stats.libbeat.output.events.dropped is declared 2 times
beat.stats.libbeat.output.write.errors is declared 2 times
beat.stats.libbeat.output.events.active is declared 2 times
beat.stats.libbeat.output.events.batches is declared 2 times
beat.stats.libbeat.output.events.total is declared 2 times
beat.stats.libbeat.output.events.acked is declared 2 times
beat.stats.libbeat.output.events.failed is declared 2 times
agent.id is declared 2 times
[git-generate]
cd packages/elastic_agent
elastic-package changelog add --link elastic#8079 --type enhancement --next minor --description "Modified the field definitions to reference ECS where possible and remove invalid field attributes."
@andrewkroh andrewkroh force-pushed the elastic_agent/feature/field-cleanup branch from c0f8924 to 4fb7ba6 Compare October 4, 2023 19:26
@andrewkroh andrewkroh merged commit 6719d69 into elastic:main Oct 4, 2023
4 checks passed
@elasticmachine
Copy link

Package elastic_agent - 1.14.0 containing this change is available at https://epr.elastic.co/search?package=elastic_agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:Elastic-Agent Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants