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

Add configuration required for cloudbeat logs, metrics #3378

Merged

Conversation

yashtewari
Copy link
Contributor

What does this PR do?

Required configuration changes to avoid permission errors when Agent-managed filebeat tries to create the logs-elastic_agent.cloudbeat-* index on ES.

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.

Author's Checklist

  • Configuration files look appropriate.

How to test this PR locally

Build the elastic_agent and cloud_security_posture packages, bring the stack up along with the associated changes on Kibana. Running an Agent with the CIS integration added should show the option for cloudbeat logs on the logs page, as shown in the screenshot.

Screenshots

Screenshot 2022-05-18 at 7 38 08 PM

@yashtewari yashtewari added the enhancement New feature or request label May 18, 2022
@yashtewari yashtewari requested a review from a team as a code owner May 18, 2022 16:54
@yashtewari yashtewari force-pushed the fix-elastic-agent-cloudbeat-logs branch from 135478c to 5b11968 Compare May 18, 2022 16:55
@elasticmachine
Copy link

elasticmachine commented May 18, 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-05-19T12:06:49.521+0000

  • Duration: 14 min 36 sec

Test stats 🧪

Test Results
Failed 0
Passed 32
Skipped 0
Total 32

🤖 GitHub comments

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

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented May 18, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (0/0) 💚
Files 100.0% (0/0) 💚 4.021
Classes 100.0% (0/0) 💚 4.021
Methods 33.333% (22/66) 👎 -55.306
Lines 100.0% (0/0) 💚 9.305
Conditionals 100.0% (0/0) 💚

@@ -0,0 +1,14 @@
- external: ecs
name: ecs.version
- name: log
Copy link
Member

Choose a reason for hiding this comment

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

log.level is an ECS field and can be specified more concisely as

- external: ecs
  name: log.level

Copy link
Member

Choose a reason for hiding this comment

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

So is message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated, but not too sure if it's correct.

ignore_above: 1024
description: Elastic Agent id.
- name: process
level: extended
Copy link
Member

Choose a reason for hiding this comment

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

level and example are not attributes that are honored by package-spec 1. Currently they are allowed by our validation, but they serve no purpose and should not be included.

Footnotes

  1. https://github.com/elastic/package-spec/blob/eac675ab2c97f6bd8bdf80cd4c81b370fa4ba421/versions/1/integration/data_stream/fields/fields.spec.yml

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 removed those attributes from all the files.

@yashtewari yashtewari force-pushed the fix-elastic-agent-cloudbeat-logs branch 2 times, most recently from 94ab549 to 5bbf554 Compare May 19, 2022 11:58
@yashtewari yashtewari force-pushed the fix-elastic-agent-cloudbeat-logs branch from 5bbf554 to bd6822f Compare May 19, 2022 12:06
Copy link
Contributor

@ph ph left a comment

Choose a reason for hiding this comment

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

This looks good to me, @elastic/elastic-agent-control-plane Please have another eye on this.

Copy link
Member

@aleksmaus aleksmaus left a comment

Choose a reason for hiding this comment

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

👍

@yashtewari yashtewari merged commit 7fc362c into elastic:main May 19, 2022
@yashtewari yashtewari deleted the fix-elastic-agent-cloudbeat-logs branch May 19, 2022 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants