forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Elastic Agent] Add the ability to run the Fleet Server (elastic#23736)
* Add the ability to run the Fleet Server. * Add test and changelog. * Fix changelog.
- Loading branch information
1 parent
5cb370e
commit d59f780
Showing
10 changed files
with
152 additions
and
60 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
x-pack/elastic-agent/pkg/agent/program/testdata/single_config-fleet-server.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
fleet: | ||
agent: | ||
id: fleet-agent-id | ||
|
||
output: | ||
elasticsearch: | ||
hosts: [ 127.0.0.1:9200, 127.0.0.1:9300 ] | ||
username: fleet | ||
password: fleetpassword | ||
|
||
inputs: | ||
- id: fleet-server-id | ||
type: fleet-server |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,8 @@ rules: | |
key: access_api_key | ||
- remove_key: | ||
key: kibana | ||
- remove_key: | ||
key: server | ||
|
||
- filter: | ||
selectors: | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Fleet Server | ||
cmd: fleet-server | ||
args: ["--agent-mode"] | ||
artifact: fleet-server | ||
rules: | ||
- fix_stream: {} | ||
|
||
- filter_values: | ||
selector: inputs | ||
key: type | ||
values: | ||
- fleet-server | ||
|
||
- filter_values: | ||
selector: inputs | ||
key: enabled | ||
values: | ||
- true | ||
|
||
- remove_key: | ||
key: output | ||
|
||
- select_into: | ||
selectors: [ fleet.server.output.elasticsearch ] | ||
path: output | ||
|
||
- map: | ||
path: fleet | ||
rules: | ||
- remove_key: | ||
key: enabled | ||
- remove_key: | ||
key: access_api_key | ||
- remove_key: | ||
key: kibana | ||
- remove_key: | ||
key: reporting | ||
- remove_key: | ||
key: server | ||
|
||
- map: | ||
path: inputs | ||
rules: | ||
- remove_key: | ||
key: use_output | ||
- remove_key: | ||
key: data_stream | ||
- remove_key: | ||
key: data_stream.namespace | ||
- remove_key: | ||
key: data_stream.dataset | ||
- remove_key: | ||
key: streams | ||
|
||
- filter: | ||
selectors: | ||
- fleet | ||
- inputs | ||
- output | ||
|
||
when: length(${fleet}) > 0 and length(${inputs}) > 0 and hasKey(${output}, 'elasticsearch') |