Skip to content

Comments

[Beats Management] APIs: Get beat configuration#19195

Closed
ycombinator wants to merge 16 commits intoelastic:feature/x-pack/management/beatsfrom
ycombinator:x-pack/management/beats/apis/get-beat-configuration
Closed

[Beats Management] APIs: Get beat configuration#19195
ycombinator wants to merge 16 commits intoelastic:feature/x-pack/management/beatsfrom
ycombinator:x-pack/management/beats/apis/get-beat-configuration

Conversation

@ycombinator
Copy link
Contributor

@ycombinator ycombinator commented May 18, 2018

This is one in a series of several PRs that will go towards resolving #18858.

This PR implements an HTTP API to retrieve a Beat's centrally-managed configuration. Beats agents are expected to call this API periodically.

Usage

curl  \
  -H 'kbn-beats-access-token: ACCESS_TOKEN' \
  http://localhost:5601/api/beats/agent/BEAT_UUID/configuration

Testing this PR

  1. Build and run Elasticsearch with [X-Pack] Beats centralized management: security role + licensing elasticsearch#30520.
  2. Since there are index template changes in this PR, make sure to DELETE _template/beats-template and DELETE .management-beats.
  3. For now (while this PR is a WIP), this API will return a hardcoded response as long as the BEAT_UUID in the request URL is not foo (that's a special ID being used by the integration tests). Eventually, once the APIs to create tags and associate them with beats are implemented, the hardcoded response can be removed and the PR can be put into proper review.

Copy link
Contributor

@exekias exekias left a comment

Choose a reason for hiding this comment

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

LGTM

@ycombinator ycombinator force-pushed the x-pack/management/beats/apis/get-beat-configuration branch from acb1aaf to 15b78f1 Compare May 18, 2018 12:59
@ycombinator ycombinator force-pushed the x-pack/management/beats/apis/get-beat-configuration branch 2 times, most recently from 353d590 to cdbff83 Compare May 21, 2018 20:01
@ycombinator ycombinator force-pushed the feature/x-pack/management/beats branch from 01d9044 to 2c86794 Compare May 23, 2018 05:03
@ycombinator ycombinator force-pushed the x-pack/management/beats/apis/get-beat-configuration branch from cdbff83 to f8c1278 Compare May 25, 2018 14:46
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ycombinator ycombinator force-pushed the x-pack/management/beats/apis/get-beat-configuration branch from 5536241 to 6ad5aef Compare May 31, 2018 23:16
@ycombinator ycombinator force-pushed the feature/x-pack/management/beats branch from f4ab093 to 8d1a76c Compare June 22, 2018 22:37
* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test
@ycombinator ycombinator force-pushed the x-pack/management/beats/apis/get-beat-configuration branch from 6ad5aef to 8227550 Compare June 25, 2018 19:07
@ycombinator
Copy link
Contributor Author

@mattapperson This is a WIP PR that builds on top of what's already in the feature/x-pack/management/beats feature branch. This PR basically stubs out an API to retrieve the central config for a given beat (in order to unblock @exekias).

Once #20039 is merged this PR will also need to be ported over to TS + infra arch for consistency. Longer-term, the stub implemented in this PR will need to be replaced with actual functional code to build/retrieve the central config for the beat.

@mattapperson
Copy link
Contributor

replaced with #20603

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:Beats WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants