Merge agent to master#16494
Merged
ph merged 116 commits intoelastic:masterfrom Mar 6, 2020
ph:merge-agent-in-master
Merged
Conversation
Co-authored-by: Pier-Hugues Pellerin <phpellerin@gmail.com> Co-authored-by: Michal Pristas <michal.pristas@gmail.com>
* updated rules
Co-authored-by: Pier-Hugues Pellerin <phpellerin@gmail.com> Co-authored-by: Michal Pristas <michal.pristas@gmail.com>
* updated rules
* Refactor: Rename pipeline into stream To align the code base with the multiple output strategy we will rename the pipeline concept into the streams. See #14445
This PR updates the enroll command to use an Elasticsearch token instead of custom token for enrollment. See elastic/kibana#49639 for details
* Change the Authentication mechanism for fleet.
Fleet changed how we should authenticate with them instead of using an
api key and a special header fields we now use the normal "Authorization" key and with this format:
```
Authorization: ApiKey {accessApiKey}
```
See #49639 for details
Add support for multiples outputs and link it to the streams.
* Implements the require "Checkin" calls This PR implements the required structs and calls to retrieve the configuration from Fleet. This is step one before refactoring the Reporter to split the pushing event and fetching of configuration.
* Feature: Allow to persist AccessToken and other connection data on disk
This PR add a few things
- It takes the keystore encryption implementation and create an
io.Reader and io.Writer for it, we currently work with variable lenght
blocks and we are not compatible for now with the one in libbeat.
- It implements a few storage mechanism and wrapper:
- DiskStore: Save a io.reader directly to disk, the content is saved
in a temporary file and the target is replace in an atomic
operation.
- EncryptedDiskStore: Same as Keystore but use the encrypted io.Reader
and io.Writer.
- A fleet configuration is created in _meta/agent.fleet.yml, the content
of this file is packed in the binary. When a user enroll the agent,
we do a backup of the current agent.yml and the content is replaced
with the agent.fleet.yml
- The enrollment information is saved into a "fleet.yml"
- The managed mode now read the content of the fleet.yml and creates a
Kibana API client.
- A Separates Fleet Config struct is created.
- Enroll will now ask for confirmation before replacing the user
configuration.
* allow to use the obfuscated store.
* fix build
This PR add the fix from urso/ecslog#17 Which fix the infinite loop when using parsing flags, the bug was making the library consume all the available memory until the OS killed the process.
This PR add support for these types to make sure the convertion is correctly done. The problem was the generated map had NIL values instead of having the unsigned int values. Fix: #15182
* fixed yml files * configuration embed
Include metricbeat and Filebeat inside the agent.
* Feature: Allow to persist AccessToken and other connection data on disk
This PR add a few things
- It takes the keystore encryption implementation and create an
io.Reader and io.Writer for it, we currently work with variable lenght
blocks and we are not compatible for now with the one in libbeat.
- It implements a few storage mechanism and wrapper:
- DiskStore: Save a io.reader directly to disk, the content is saved
in a temporary file and the target is replace in an atomic
operation.
- EncryptedDiskStore: Same as Keystore but use the encrypted io.Reader
and io.Writer.
- A fleet configuration is created in _meta/agent.fleet.yml, the content
of this file is packed in the binary. When a user enroll the agent,
we do a backup of the current agent.yml and the content is replaced
with the agent.fleet.yml
- The enrollment information is saved into a "fleet.yml"
- The managed mode now read the content of the fleet.yml and creates a
Kibana API client.
- A Separates Fleet Config struct is created.
- Enroll will now ask for confirmation before replacing the user
configuration.
* allow to use the obfuscated store.
* Allow the Agent to retrieve configuration from the Fleet API.
implement the required gateway and the action handling to allow to
start, restart or stops processes based on the received configuration.
Ref: #14951
* uuid for agent id * fixed hound dog * pass agent info * pass agent info * agent infor comments * notice update
ph
commented
Mar 3, 2020
| github.com/stretchr/testify v1.4.0 | ||
| github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b | ||
| github.com/tsg/gopacket v0.0.0-20190320122513-dd3d0e41124a | ||
| github.com/urso/magetools v0.0.0-20200106130147-61080ed7b22b // indirect |
Contributor
Author
There was a problem hiding this comment.
@kvch I will need your help on theses two dependencies (objx, magetools), I can't explain why they get removed.
I've tested with the master brancher and I do not have this issue.
Contributor
Author
There was a problem hiding this comment.
as recommended by @urso I've ran mage vendor
urso
reviewed
Mar 4, 2020
| github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b | ||
| github.com/tsg/gopacket v0.0.0-20190320122513-dd3d0e41124a | ||
| github.com/urso/magetools v0.0.0-20200106130147-61080ed7b22b // indirect | ||
| github.com/urso/ecslog v0.0.0-20200210125449-b79160ce24a2 |
There was a problem hiding this comment.
This one looks wrong (dependencies are missing). I created a v0.0.1 tag on ecslog. Please use it to get the correct version and dependencies.
Contributor
Author
There was a problem hiding this comment.
@urso I've fixed the version of ecslog on v0.0.1
Contributor
Author
Contributor
Author
|
fixed again because of transport move. |
Contributor
Author
urso
approved these changes
Mar 5, 2020
Contributor
Author
|
related created issue #16860 |
Contributor
Author
|
Merging into master 🤗 |
5 tasks
Contributor
|
Hooray, well done team! 👏 |
ph
added a commit
that referenced
this pull request
Apr 7, 2020
This PR move the development of the Elastic Agent inside the master branch, the Agent can be configured locally or using the ingest manager in Kibana. The Agent will take care of starting or stopping the processes depending on the configuration needs. Co-authored-by: Pier-Hugues Pellerin <phpellerin@gmail.com> Co-authored-by: Michal Pristas <michal.pristas@gmail.com> (cherry picked from commit a9a2779)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR move the development of the Elastic Agent inside the master branch, the Agent can be configured locally or using the ingest manager in Kibana. The Agent will take care of starting or stopping the processes depending on the configuration needs.
Why is it important?
Checklist
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs