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

[Ingest Manager] Log level reloadable from fleet #22690

Merged
merged 5 commits into from
Nov 24, 2020

Conversation

michalpristas
Copy link
Contributor

What does this PR do?

This PR introduces log level reloading initiated by SETTINGS action coming from fleet introduced in this PR: elastic/kibana#83707

This strategy reexecs agent on log level change.

Why is it important?

#20756

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.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@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 Nov 20, 2020
@michalpristas michalpristas changed the title [Ingest Manager[ Log level reloadable from fleet [Ingest Manager] Log level reloadable from fleet Nov 20, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 20, 2020

💚 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

Expand to view the summary

Build stats

  • Build Cause: [Pull request #22690 updated]

  • Start Time: 2020-11-24T08:21:26.416+0000

  • Duration: 58 min 32 sec

Test stats 🧪

Test Results
Failed 0
Passed 16659
Skipped 1367
Total 18026

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 16659
Skipped 1367
Total 18026

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.

This looks great. Just 2 comments.

@@ -26,8 +26,11 @@ const agentInfoKey = "agent"
// defaultAgentActionStoreFile is the file that will contains the action that can be replayed after restart.
const defaultAgentActionStoreFile = "action_store.yml"

const defaultLogLevel = "debug"
Copy link
Contributor

Choose a reason for hiding this comment

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

With this change can we move the default up to info?

Debug level is still causing duplicate events, which still needs to be solved even in debug.

zapLevel = zapcore.ErrorLevel
}

return zapLevel
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't there something that already does this in libbeat? Couldn't we change that to expose it, instead of implementing it here.

@michalpristas michalpristas merged commit 38f436a into elastic:master Nov 24, 2020
michalpristas added a commit to michalpristas/beats that referenced this pull request Nov 24, 2020
[Ingest Manager] Log level reloadable from fleet (elastic#22690)
michalpristas added a commit to michalpristas/beats that referenced this pull request Nov 26, 2020
[Ingest Manager] Log level reloadable from fleet (elastic#22690)
michalpristas added a commit that referenced this pull request Dec 1, 2020
[Ingest Manager] Log level reloadable from fleet (#22690)
blakerouse pushed a commit that referenced this pull request Dec 14, 2020
* [Ingest Manager] Log level reloadable from fleet (#22690)

[Ingest Manager] Log level reloadable from fleet (#22690)

* aa

* create drop

* updated drop

* process contains everything

* drop start time

* undo exposed endpoint

* sanitize dataset name

* ups

* agent expose http

* collect all metrics from beats

* colelct all from beats

* golint

* cleaner docs

* updated structure

* cgroup

* long live file saving issues
blakerouse pushed a commit to blakerouse/beats that referenced this pull request Dec 14, 2020
* [Ingest Manager] Log level reloadable from fleet (elastic#22690)

[Ingest Manager] Log level reloadable from fleet (elastic#22690)

* aa

* create drop

* updated drop

* process contains everything

* drop start time

* undo exposed endpoint

* sanitize dataset name

* ups

* agent expose http

* collect all metrics from beats

* colelct all from beats

* golint

* cleaner docs

* updated structure

* cgroup

* long live file saving issues

(cherry picked from commit 49c8d87)
blakerouse added a commit that referenced this pull request Dec 14, 2020
…23105)

* [Ingest Management] Agent expose metrics (#22793)

* [Ingest Manager] Log level reloadable from fleet (#22690)

[Ingest Manager] Log level reloadable from fleet (#22690)

* aa

* create drop

* updated drop

* process contains everything

* drop start time

* undo exposed endpoint

* sanitize dataset name

* ups

* agent expose http

* collect all metrics from beats

* colelct all from beats

* golint

* cleaner docs

* updated structure

* cgroup

* long live file saving issues

(cherry picked from commit 49c8d87)

* Add changelog.

Co-authored-by: Michal Pristas <michal.pristas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants