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] Do not watch monitors #27192

Merged
merged 1 commit into from
Aug 3, 2021

Conversation

michalpristas
Copy link
Contributor

What does this PR do?

WHen monitors were enabled monitoring of simple filebeat and metricbeat was configured and should not.
This resulted in socket not found because metricbeat was told to keep an eye on metricbeat.sock but it was not available as simple metricbeat was not running.

This PR does not configure monitoring beat to watch for simple beat if simple beat is not actually running

Why is it important?

Fixes: #27127

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.

@michalpristas michalpristas added bug Team:Elastic-Agent Label for the Agent team backport-v7.14.0 Automated backport with mergify labels Aug 2, 2021
@michalpristas michalpristas self-assigned this Aug 2, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@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 Aug 2, 2021
@ruflin
Copy link
Contributor

ruflin commented Aug 2, 2021

What you mean by "simple" *beat above? Is this the metricbeat that monitors the other processes?

What happens in 7.14 without this fix? Do errors only show up in logs or are there further side effects?

@michalpristas
Copy link
Contributor Author

just errors in logs.
and this is only if you run fleet server only with monitoring enabled, without any system or any other integration which would start filebeat and make error disappear.
without this fix probably nothing happens as on cloud we run fleet server without monitoring
and locally you usually dont run fleet server alone.

by simple i mean the one which is configured to collect configured metrics via configuration/integrations. not the one which monitors agent and its processes. naming is hard but i could not think about other way how to differentiate.

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

Expand to view the summary

Build stats

  • Start Time: 2021-08-02T13:47:11.598+0000

  • Duration: 82 min 36 sec

  • Commit: e8bf87a

Test stats 🧪

Test Results
Failed 0
Passed 7012
Skipped 16
Total 7028

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 7012
Skipped 16
Total 7028

@blakerouse
Copy link
Contributor

I believe this is the same issue @michel-laterman was looking at. I thought it was fleet-server bootstrap doing the wrong thing, this might actually fix his issue as well.

Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

Looks good.

I think this should go to 7.14, if still possible.

@michalpristas michalpristas merged commit 335e99f into elastic:master Aug 3, 2021
mergify bot pushed a commit that referenced this pull request Aug 3, 2021
(cherry picked from commit 335e99f)
michalpristas added a commit to michalpristas/beats that referenced this pull request Aug 3, 2021
michalpristas added a commit that referenced this pull request Aug 3, 2021
(cherry picked from commit 335e99f)

Co-authored-by: Michal Pristas <[email protected]>
michalpristas added a commit that referenced this pull request Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.14.0 Automated backport with mergify bug Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure to appy schema and metricbeat.sock not found errors in Fleet Server metricbeat logs
4 participants