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] Add Fleet & EPM features #59376

Merged
merged 431 commits into from
Mar 12, 2020
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
431 commits
Select commit Hold shift + click to select a range
e4284b4
[EPM] Documentation of HTTP routes & TS types for Ingest (#48798)
Nov 13, 2019
e8ca16b
[EPM] Add directory structure for server/lib. (#50469)
skh Nov 14, 2019
ee2ecf4
[EPM] Add basic documentation directory (#50478)
ruflin Nov 14, 2019
dc9f781
[EPM] Add basic index template (#50471)
ruflin Nov 14, 2019
19a5746
40752 rewrite ingest pipeline (#50627)
skh Nov 14, 2019
c522886
Replace AssetType enum with union type (#50696)
Nov 14, 2019
1f6b520
Remove unnecessary await if we can return the promise (#50329)
Nov 14, 2019
4cbd647
Fix whitespace per figma comments. Closes #47348 (#47350)
Nov 14, 2019
505ef0d
Merge branch 'master' of github.com:elastic/kibana into feature-integ…
Nov 15, 2019
fc5daa3
Add fix & comment for TS 3.7.2 regression
Nov 15, 2019
14c7655
Merge branch 'master' of github.com:elastic/kibana into feature-integ…
Nov 15, 2019
435b6b9
[EPM] cleanup assets, filter assets for those currently supported (#5…
neptunian Nov 15, 2019
f4fe3ec
Merge branch 'feature-integrations-manager' of github.com:elastic/kib…
Nov 15, 2019
7b8e7f5
hardcode image width for ie11 (#49796)
neptunian Nov 15, 2019
d470bb9
[EPM] useKibana hook & render in plugin.start (#50110)
Nov 15, 2019
1d8b931
Fix broken app due to bad hooks usage
Nov 15, 2019
e7a7f74
[EPM] Install package from detail view on button click (#50735)
Nov 15, 2019
232347f
[EPM] Use NP feature_catalogue.register (#50108)
Nov 15, 2019
570c1c7
Merge branch 'feature-make-it-ingest' of github.com:elastic/kibana in…
mattapperson Nov 16, 2019
c7aa2ed
Merge branch 'feature-integrations-manager' of github.com:elastic/kib…
mattapperson Nov 16, 2019
536d9f1
fix linting
mattapperson Nov 17, 2019
0831ef0
fix types
mattapperson Nov 17, 2019
9447054
fix headers in Fleet
mattapperson Nov 17, 2019
d05f20d
skipping test due to ES param change
mattapperson Nov 18, 2019
9fc2f1c
Revert "skipping test due to ES param change"
mattapperson Nov 18, 2019
0571584
remove type field
mattapperson Nov 18, 2019
8aa89d7
remove unused import
mattapperson Nov 18, 2019
be9ca17
[EPM] Final(?) update from integrations_manager -> EPM (#50976)
Nov 19, 2019
ece3570
[EPM] update compatibility section (#50975)
neptunian Nov 19, 2019
646b340
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
Nov 19, 2019
590ccbe
Restore RequirementVersionRange type
Nov 19, 2019
f1020e4
Disable test for elasticsearch username.
Nov 19, 2019
ef97a13
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
Nov 19, 2019
4720fd9
Revert "Disable test for elasticsearch username."
Nov 19, 2019
37dad5c
Disable test for elasticsearch username.
Nov 19, 2019
098c220
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
nchaulet Nov 20, 2019
9c158e5
Fix EPM typing issues in register feature
nchaulet Nov 20, 2019
229745f
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
nchaulet Nov 20, 2019
9f68a23
Fix typings after master merge
nchaulet Nov 20, 2019
c1512f8
[EPM] CI fixes (#51284)
skh Nov 21, 2019
e373cba
[EPM] add confirmation modal (#51172)
neptunian Nov 21, 2019
0493795
Restore prior response vaulues for install & delete package (#51252)
Nov 21, 2019
a081bf4
[EPM] /package API only lists installable assets. Restore enums. (#51…
Nov 22, 2019
d47ab5d
[Fleet] Enrollment api key UI (#51495)
nchaulet Nov 25, 2019
ef39895
Make button pretty in dark mode as well. (#51610)
skh Nov 26, 2019
14bbe8e
[EPM] Add docs entry about registryUrl config (#51697)
ruflin Nov 26, 2019
399bbd3
[EPM] Remove encoding of Kibana objects as not needed anymore
ruflin Nov 26, 2019
a860bbd
[Fleet] Move agent status server side and API to get aggregated statu…
nchaulet Nov 26, 2019
99ead3d
[EPM] Add basic docs around install/delete API endpoint (#51728)
ruflin Nov 26, 2019
1a05deb
Ingest/policy (#51741)
nchaulet Nov 26, 2019
2e3fc27
Merge branch 'master' into feature-ingest
ruflin Nov 27, 2019
d8a1b22
run es-lint to fix fleet
ruflin Nov 27, 2019
d726419
Merge branch 'master' of github.com:elastic/kibana into merge-master
nchaulet Nov 27, 2019
171749e
Fix typescript issues
nchaulet Nov 27, 2019
ce760f0
[EPM] Track package install state and add toast notification (#51734)
neptunian Nov 27, 2019
ef9bc47
[Ingest] Adds support for a working default output (#51841)
Nov 27, 2019
74d984d
[EPM] Add basics for creating the ILM setup (#50474)
ruflin Nov 28, 2019
38e2e14
[EPM] Add datasource (ingest pipeline) from package (#51851)
Nov 28, 2019
756f4cc
[EPM] Add basic processing of fields.yml file (#51148)
ruflin Nov 28, 2019
729488f
[EPM] Create basic implementation to merge input template and dataset…
ruflin Nov 28, 2019
7771ec2
[EPM] Refactoring of lib structure (#51885)
ruflin Dec 2, 2019
9a4e9d8
[EPM] Allow to read files from fields directory (#51958)
ruflin Dec 2, 2019
dd7473a
[EPM] Install Elasticsearch Index Template for data source (#51878)
ruflin Dec 2, 2019
979d2b6
[Fleet] Policy list, details, create, edit UIs (#51950)
jen-huang Dec 3, 2019
0eca4db
[EPM] Add datasource saved object type (#51871)
skh Dec 3, 2019
677f9ce
[Fleet] Expose policy during agent checkin (#51968)
nchaulet Dec 3, 2019
006aeaf
[EPM] Add /epr prefix to the tar.gz download path (#51881)
ruflin Dec 4, 2019
0c162bc
[EPM] Move template installation to lib and add asset helper (#52049)
ruflin Dec 4, 2019
00d55fb
[EPM] Reduce data source to one type (#52061)
ruflin Dec 4, 2019
dc088b1
Run VSCode's organize imports on EPM files (#52234)
Dec 5, 2019
fde70ff
[EPM] More realistic datasource SO. Error if package not installed. (…
Dec 5, 2019
2e230bf
[EPM] Move golden files generation over to jest snapshot (#52203)
ruflin Dec 5, 2019
4c5b038
[EPM] Create metrics-* and logs-* Kibana index pattern (#52277)
ruflin Dec 5, 2019
329fff2
[EPM] Create helper for elasticsearch asset names (#52265)
ruflin Dec 6, 2019
af4d6a0
[EPM] Update Registry types. Prevent errors installing certain dataso…
Dec 7, 2019
40c4df8
[EPM] Add setup of default ILM policies (#52272)
ruflin Dec 9, 2019
6f91887
[EPM] 52075 add data source first page (#52320)
neptunian Dec 9, 2019
f6239e7
Update TS type names for EPR search results (#52512)
Dec 9, 2019
71ab5a0
Restore import sort order from #52234 (#52548)
Dec 9, 2019
d2c126f
[EPM] Replace wildcard export (#52554)
Dec 10, 2019
5b1f7f6
[EPM] Reduce usage of epm-package SavedObject (#52576)
Dec 10, 2019
328474a
[EPM] Fix missing export link (#52628)
ruflin Dec 10, 2019
786e4db
[EPM] Cleanup ILM loading (#52632)
ruflin Dec 11, 2019
00b36c4
[EPM] Switch to staging URL for registry (#52626)
ruflin Dec 11, 2019
189d375
[EPM] Use Dataset interface to generate template (#52255)
ruflin Dec 11, 2019
654bc21
[Fleet] Use agent events to compute agent health (#52513)
nchaulet Dec 11, 2019
fce4f82
[EPM] Data source integration tests (#52542)
skh Dec 11, 2019
b26ba26
Use EPR staging URL with CDN. (#52776)
Dec 11, 2019
7bb19c5
[EPM] Add Data Source page updates (#52705)
neptunian Dec 11, 2019
ecedffb
Merge master
brianseeders Jan 2, 2020
12a2534
[EPM] redirect after package install (#52771)
neptunian Dec 12, 2019
f8e0cc1
Merge commit 'ba2e2588a31c06f6b36b1a7671be4d121b719258' into feature-…
brianseeders Jan 2, 2020
e4211a7
Use ingest datasource api (#52964)
Dec 13, 2019
0710ed8
[Ingest] Data source APIs (#52448)
jen-huang Dec 11, 2019
5b2aca7
modify epm createDatasource endpoint to use user data (#52971)
neptunian Dec 14, 2019
39878ff
[EPM] Don't share CreateFakeDatasource type (#53068)
Dec 16, 2019
96ff0ed
[EPM] Index template generation fixes (#53104)
skh Dec 16, 2019
a78aaa4
[Fleet] Assign/Unassign data source from policy UI (#53058)
jen-huang Dec 17, 2019
9ad1e54
[EPM] Implement getConfig for dataset (#53261)
ruflin Dec 18, 2019
be9f0c0
[EPM] Fix template installation (#53272)
ruflin Dec 18, 2019
dd8846d
[EM] Refactor ingest pipeline installation (#53309)
skh Dec 18, 2019
20af911
change POST create datasources path (#53165)
neptunian Dec 18, 2019
8474491
Fix creation of a data source with a custom ID (#53537)
jen-huang Dec 19, 2019
fedfaa9
[Ingest] Return associated policy IDs in data source info (#53350)
jen-huang Dec 20, 2019
1a55633
[EPM]: Assign data source to policy in UI (#53597)
Dec 23, 2019
6bbf5ac
Add commands to run API tests to README (#53847)
Dec 30, 2019
054c311
Limit functions to 3 params max. Update those which used more (#53848)
Dec 30, 2019
0f0d7ca
[EPM] Code in 'common' directories shouldn't import server code (#53854)
Dec 31, 2019
1a35843
[Fleet] Code in 'common' directories shouldn't import server code (#5…
nchaulet Jan 3, 2020
cda20be
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
nchaulet Jan 3, 2020
b852594
Fix eslint issues
nchaulet Jan 3, 2020
ed44d98
Fix typescript issues after merge
nchaulet Jan 3, 2020
b7da72c
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
nchaulet Jan 6, 2020
becd154
Fix merge master missing line
nchaulet Jan 6, 2020
bb42f9c
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
nchaulet Jan 6, 2020
17c8e99
Fix merge conflict
nchaulet Jan 6, 2020
19fb164
[Fleet] Fix registration of Ingest management section (#54065)
jen-huang Jan 7, 2020
c154afc
[Fleet] Remove server code from common folder in ingest (#53969)
nchaulet Jan 7, 2020
50fde69
[Fleet] Connect fleet to policy change update (#53201)
nchaulet Jan 7, 2020
cb3ce1c
[Fleet] Rename output.url => output.hosts (#54258)
nchaulet Jan 9, 2020
38ca8c1
[Ingest] Remove policies UI (#54308)
jen-huang Jan 9, 2020
54fa272
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
Jan 9, 2020
11bbd8c
Commit updated kbn-pm artifact.
Jan 9, 2020
c8f3fa8
Update kbn/pm package
Jan 9, 2020
1ecace7
Merge branch 'feature-ingest' into feature-ingest
elasticmachine Jan 9, 2020
5791fbc
[EPM] create logs metrics index patterns (#54037)
neptunian Jan 9, 2020
a50b11a
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
Jan 10, 2020
eccf88e
Merge branch 'feature-ingest' of github.com:elastic/kibana into featu…
Jan 10, 2020
0393fea
Use dataset.package from registry
Jan 10, 2020
08d1df5
Form validation on add datasource page. (#53920)
Jan 10, 2020
43d9cca
[Ingest] Add support for policy `label` field (#54413)
jen-huang Jan 10, 2020
c69724d
[Fleet] Fix api key creation (#54498)
nchaulet Jan 13, 2020
1bbbfec
[Fleet] Move agent acks to his own endpoint (#54401)
nchaulet Jan 14, 2020
8452df6
[Ingest] Fix MaxListenersExceededWarning during kibana boot (#54745)
nchaulet Jan 14, 2020
8fc063f
[Fleet] Create a default api key for the default output (#54658)
nchaulet Jan 14, 2020
3f87c31
[EPM] update index pattern fields (#54862)
neptunian Jan 16, 2020
71c3f46
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
Jan 16, 2020
f93e4f8
Fix typing issues
nchaulet Jan 17, 2020
7018ac9
[Fleet] Support agent event subtype STOPPING (#55231)
nchaulet Jan 20, 2020
60cc144
[EPM] Prevent double submit when creating data sources
Jan 21, 2020
7d24bfd
[EPM] handle alias fields when creating kibana index pattern (#55254)
neptunian Jan 22, 2020
439b740
[EPM] handle multi fields when creating index patterns (#55554)
neptunian Jan 22, 2020
bc98087
[Fleet] Fleet/spec docs (#55619)
nchaulet Jan 22, 2020
8acca30
[EPM] Start to document definitions (#55361)
ruflin Jan 23, 2020
3f0bd56
[EPM] Indexing strategy docs (#55301)
ruflin Jan 23, 2020
7599709
skip fields that are disabled (#55735)
neptunian Jan 24, 2020
0e4b13d
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
nchaulet Jan 24, 2020
c0d496a
[Fleet] Fix fleet typing issues after merging master
nchaulet Jan 24, 2020
1f78f61
[EPM] Create fieldFormatMap in kibana index pattern (#55892)
neptunian Jan 27, 2020
c0e3f31
[Fleet] Use user from saved object to create apiKeys (#55458)
nchaulet Jan 28, 2020
5f4baeb
[EPM] Document package upgrade behaviour (#56138)
ruflin Jan 28, 2020
b589070
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
Jan 30, 2020
b318bea
Remove some explicit typing to pass type checks.
Jan 30, 2020
8e11bad
remove readFromDocValues (#56227)
neptunian Jan 30, 2020
441d9ed
Add symlink to yarn.lock to fix(?) CI
Jan 30, 2020
9200ac2
Like 441d9ed, but correct
Jan 30, 2020
9925179
Merge branch 'feature-ingest' of github.com:elastic/kibana into featu…
Jan 31, 2020
c66e5ee
[Ingest] Convert `ingest` plugin to new platform `ingest_manager` plu…
jen-huang Jan 31, 2020
a75cc23
[Fleet] Detailed docs of fleet <-> agents interactions (#56212)
nchaulet Feb 3, 2020
ef8ddc5
[EPM] update index patterns on install/uninstall of package (#56591)
neptunian Feb 4, 2020
fba1137
[Fleet] Generate an ES api key per agent per output (#56637)
nchaulet Feb 4, 2020
0ba7763
[Fleet] Remove unused enrollement rules (#56753)
nchaulet Feb 4, 2020
34bceed
remove files related to creating data source (#56745)
neptunian Feb 5, 2020
a5c95fe
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
nchaulet Feb 6, 2020
7566b15
Fix typing issues after mergin master
nchaulet Feb 6, 2020
c126dd4
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
nchaulet Feb 6, 2020
d72a57f
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
nchaulet Feb 6, 2020
b359206
Fix api key authentication after master merge
nchaulet Feb 7, 2020
0c7e288
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
nchaulet Feb 7, 2020
76f4da0
[EPM] NP Migration: Move server files and route handlers to ingest_ma…
neptunian Feb 10, 2020
a8c221b
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
neptunian Feb 11, 2020
83bc198
fix imports
neptunian Feb 11, 2020
6eecfa4
[Ingest Management] Change indexing from {type}-{namespace}-{dataset}…
ruflin Feb 12, 2020
adff25f
[EPM] Remove epm plugin and directory (#57309)
neptunian Feb 12, 2020
491ee28
[Fleet] Move fleet to the new platform and to ingest_manager plugin (…
nchaulet Feb 13, 2020
6e00b53
[Fleet] NP migration public part (#57567)
nchaulet Feb 17, 2020
ac05485
[EPM] EPM to new plugin, UI part (#56882)
skh Feb 18, 2020
5adbdc7
[Fleet] AgentEvent change agent_id and remove data (#57818)
nchaulet Feb 19, 2020
948cd6f
Merge branch 'master' into feature-ingest
Feb 19, 2020
a2e5e3d
Remove legacy `ingest` plugin completely (#58056)
jen-huang Feb 20, 2020
119c5d1
WIP. 1 type error (but >1 bugs) remaining.
Feb 20, 2020
9e91031
Add `callCluster` accessors for using ES vs appContext.getClusterClie…
Feb 20, 2020
61caadc
Merge branch 'feature-ingest' of github.com:elastic/kibana into featu…
Feb 20, 2020
49e073d
Undo (?) changes to kbn-pm/dist/index.js
Feb 20, 2020
0c3f0d8
Run scripts/build_renovate_config for @types/tar
Feb 20, 2020
1dff32e
Replace data w/ agent_id in server schema
Feb 21, 2020
a12d827
Different way to declare a saved object type
Feb 21, 2020
d7daa8b
Use a more specific path to the agent script
Feb 21, 2020
9871743
Replace data with agent_id for agent checkin
Feb 21, 2020
fbc4821
Restore internalSavedObjectsClient in app context
Feb 21, 2020
2b66026
Use project & HTTP TS types in scripts/dev_agent
Feb 21, 2020
b964c14
Remove ingestManager from FTR features
Feb 21, 2020
f83875a
Move more variables to common/{constants,types}
Feb 21, 2020
aa10fee
Remove ingestManager from default expected features
Feb 21, 2020
1f27d34
Enable conditional routes. Adjust integration tests
Feb 21, 2020
26a4690
Replace React.FC with React.FunctionComponent following new repo pattern
Feb 21, 2020
f41b6ce
Enable Fleet & Ingest FTR tests
Feb 22, 2020
79411a9
Remove duplicate *Response entries from server/types
Feb 23, 2020
c2da4b2
Update README instructions for CLI flags. Rearrange sections (#58363)
Feb 24, 2020
33fcc05
Merge branch 'master' into feature-ingest
Feb 25, 2020
5101a9c
Restore search to EPM list page
Feb 25, 2020
7280694
[Fleet] Allow to configure CA sha for kibana and elasticsearch (#58186)
nchaulet Feb 26, 2020
a479cdd
[Ingest] Adjust saved object mappings and rename policy -> config (#5…
jen-huang Feb 27, 2020
bf04422
Move installing of index templates and ingest pipelines to package in…
neptunian Feb 27, 2020
83d7ea5
Merge branch 'master' into feature-ingest
Feb 27, 2020
98d1719
[Fleet] Add a schema of all of our saved objects (#58769)
nchaulet Feb 28, 2020
8023f4f
[Fleet] Do not use default id for saved objects that need to be encry…
nchaulet Mar 2, 2020
463c2b8
Adding events for index pattern generation (#58908)
jonathan-buttner Mar 2, 2020
809246f
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
nchaulet Mar 2, 2020
6c36d3c
Merge branch 'master' of github.com:elastic/kibana into feature-ingest
nchaulet Mar 2, 2020
f2dc18a
Fix yarn.lock after merge
nchaulet Mar 2, 2020
f3a62b2
[Fleet] create agent config before enabling fleet user (#59166)
nchaulet Mar 3, 2020
bc7fbf5
support for top level elasticsearch assets installation (#58869)
neptunian Mar 4, 2020
cc04eb8
[Fleet] Create default output while creating default config (#59223)
nchaulet Mar 4, 2020
e7e1b08
Use the new definitions from package-registry#176 (#59311)
Mar 4, 2020
5cab6bd
[Fleet] Remove our custom API key authentication (#59212)
nchaulet Mar 4, 2020
3a29d3a
[Ingest] Full agent config schema & API (#59262)
jen-huang Mar 4, 2020
203303d
Merge branch 'master' into feature-ingest
elasticmachine Mar 5, 2020
0340a92
[Fleet] UI Agent enrollment flyout (#58524)
nchaulet Mar 5, 2020
16b3616
Use POST vs GET for EPM install & remove (#59367)
Mar 5, 2020
c479755
install default packages during setup (#59330)
neptunian Mar 5, 2020
1135b25
[Ingest] Updates to Agent Configuration List UI (#59374)
paul-tavares Mar 5, 2020
785f934
Update docs from /api/:section to /api/ingest_manager/:section (#59422)
Mar 5, 2020
dcab91b
[EPM] Add Streams TS type to mirror EPR's (#59446)
Mar 6, 2020
dcade4c
Don't code in modify src/plugins/management
Mar 6, 2020
cf5bacb
[Ingest] Add agent counts to each agent config output of `/agent_conf…
paul-tavares Mar 6, 2020
624e0d9
[Fleet] Agent list header (#59487)
nchaulet Mar 6, 2020
fea5a1f
Merge branch 'master' into feature-ingest
elasticmachine Mar 8, 2020
cf40b2c
[EPM] Use /packages & /packages/{pkgkey} (#59550)
Mar 9, 2020
a5683d8
[Ingest] Design sync for Agent Configuration Create Flyout (#59479)
paul-tavares Mar 9, 2020
97cf2ff
[Ingest] Create data source step 1 & 2 (#59590)
jen-huang Mar 9, 2020
2279881
Use lowercase pkgkey for consistency
Mar 9, 2020
5f4fd17
Merge branch 'master' into feature-ingest
elasticmachine Mar 9, 2020
5ca355d
Update EPM file path to use /packages (#59693)
Mar 10, 2020
2db4723
fixed header padding (#59711)
Mar 10, 2020
3477080
[EPM] Use icons from packages, if present (#59765)
Mar 10, 2020
189b4b9
[Ingest] Create data source step 3 (#59822)
jen-huang Mar 10, 2020
576f61e
[Ingest] Agent Config Details header and sub tabs navigation (#59783)
paul-tavares Mar 11, 2020
8dac462
[Fleet] update agent list UI (#59685)
nchaulet Mar 11, 2020
111a170
Merge remote-tracking branch 'upstream/master' into feature-ingest
Mar 11, 2020
fe96065
[Fleet] ensure default packages are added to the default config (#59759)
nchaulet Mar 11, 2020
ab43d14
Merge branch 'feature-ingest' of github.com:elastic/kibana into featu…
Mar 11, 2020
27d85cf
[Fleet] fix output rename api_token => api_key (#60001)
nchaulet Mar 12, 2020
e12a8ad
[Ingest] Address #59376 feedback (#59961)
Mar 12, 2020
352e5f6
Missed one in e12a8ad8a4
Mar 12, 2020
1ee3c1e
Use package icon as default when no other can be found (#60025)
Mar 12, 2020
e83b67b
Merge remote-tracking branch 'upstream/master' into feature-ingest
Mar 12, 2020
fe7cf47
Remove duplicate xpack setting
Mar 12, 2020
4a9af8d
Update EPM file tests to use /packages/{pkgkey}
Mar 12, 2020
755ba3a
[Ingest] Add `revision` to agent configs & data sources (#59848)
jen-huang Mar 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
146 changes: 146 additions & 0 deletions docs/epm/index.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
[role="xpack"]
[[epm]]
== Elastic Package Manager

These are the docs for the Elastic Package Manager (EPM).


=== Configuration

The Elastic Package Manager by default access `epr.elastic.co` to retrieve the package. The url can be configured with:

```
xpack.epm.registryUrl: 'http://localhost:8080'
```

=== API

The Package Manager offers an API. Here an example on how they can be used.

List installed packages:

```
curl localhost:5601/api/ingest_manager/epm/packages
```

Install a package:

```
curl -X POST localhost:5601/api/ingest_manager/epm/packages/iptables-1.0.4
```

Delete a package:

```
curl -X DELETE localhost:5601/api/ingest_manager/epm/packages/iptables-1.0.4
```

=== Definitions

This section is to define terms used across ingest management.

==== Elastic Agent
A single, unified agent that users can deploy to hosts or containers. It controls which data is collected from the host or containers and where the data is sent. It will run Beats, Endpoint or other monitoring programs as needed. It can operate standalone or pull a configuration policy from Fleet.

==== Namespace
A user-specified string that will be used to part of the index name in Elasticsearch. It helps users identify logs coming from a specific environment (like prod or test), an application, or other identifiers.

==== Package

A package contains all the assets for the Elastic Stack. A more detailed definition of a package can be found under https://github.com/elastic/package-registry .


== Indexing Strategy

Ingest Management enforces an indexing strategy to allow the system to automically detect indices and run queries on it. In short the indexing strategy looks as following:

```
{type}-{dataset}-{namespace}
```

The `{type}` can be `logs` or `metrics`. The `{namespace}` is the part where the user can use free form. The only two requirement are that it has only characters allowed in an Elasticsearch index name and does NOT contain a `-`. The `dataset` is defined by the data that is indexed. The same requirements as for the namespace apply. It is expected that the fields for type, namespace and dataset are part of each event and are constant keywords.

Note: More `{type}`s might be added in the future like `apm` and `endpoint`.

This indexing strategy has a few advantages:

* Each index contains only the fields which are relevant for the dataset. This leads to more dense indices and better field completion.
* ILM policies can be applied per namespace per dataset.
* Rollups can be specified per namespace per dataset.
* Having the namespace user configurable makes setting security permissions possible.
* Having a global metrics and logs template, allows to create new indices on demand which still follow the convention. This is common in the case of k8s as an example.
* Constant keywords allow to narrow down the indices we need to access for querying very efficiently. This is especially relevant in environments which a large number of indices or with indices on slower nodes.

=== Ingest Pipeline

The ingest pipelines for a specific dataset will have the following naming scheme:

```
{type}-{dataset}-{package.version}
```

As an example, the ingest pipeline for the Nginx access logs is called `logs-nginx.access-3.4.1`. The same ingest pipeline is used for all namespaces. It is possible that a dataset has multiple ingest pipelines in which case a suffix is added to the name.

The version is included in each pipeline to allow upgrades. The pipeline itself is listed in the index template and is automatically applied at ingest time.

=== Templates & ILM Policies

To make the above strategy possible, alias templates are required. For each type there is a basic alias template with a default ILM policy. These default templates apply to all indices which follow the indexing strategy and do not have a more specific dataset alias template.

The `metrics` and `logs` alias template contain all the basic fields from ECS.

Each type template contains an ILM policy. Modifying this default ILM policy will affect all data covered by the default templates.

The templates for a dataset are called as following:

```
{type}-{dataset}
```

The pattern used inside the index template is `{type}-{dataset}-*` to match all namespaces.

=== Defaults

If the Elastic Agent is used to ingest data and only the type is specified, `default` for the namespace is used and `generic` for the dataset.

=== Data filtering

Filtering for data in queries for example in visualizations or dashboards should always be done on the constant keyword fields. Visualizations needing data for the nginx.access dataset should query on `type:logs AND dataset:nginx.access`. As these are constant keywords the prefiltering is very efficient.

=== Security permissions

Security permissions can be set on different levels. To set special permissions for the access on the prod namespace an index pattern as below can be used:

```
/(logs|metrics)-[^-]+-prod-$/
```

To set specific permissions on the logs index, the following can be used:

```
/^(logs|metrics)-.*/
```

Todo: The above queries need to be tested.



== Package Manager

=== Package Upgrades

When upgrading a package between a bugfix or a minor version, no breaking changes should happen. Upgrading a package has the following effect:

* Removal of existing dashboards
* Installation of new dashboards
* Write new ingest pipelines with the version
* Write new Elasticsearch alias templates
* Trigger a rollover for all the affected indices

The new ingest pipeline is expected to still work with the data coming from older configurations. In most cases this means some of the fields can be missing. For this to work, each event must contain the version of config / package it is coming from to make such a decision.

In case of a breaking change in the data structure, the new ingest pipeline is also expected to deal with this change. In case there are breaking changes which cannot be dealt with in an ingest pipeline, a new package has to be created.

Each package lists its minimal required agent version. In case there are agents enrolled with an older version, the user is notified to upgrade these agents as otherwise the new configs cannot be rolled out.


2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
"@kbn/test-subj-selector": "0.2.1",
"@kbn/ui-framework": "1.0.0",
"@kbn/ui-shared-deps": "1.0.0",
"@types/tar": "^4.0.3",
"JSONStream": "1.3.5",
"abortcontroller-polyfill": "^1.4.0",
"angular": "^1.7.9",
Expand Down Expand Up @@ -454,6 +455,7 @@
"listr": "^0.14.1",
"load-grunt-config": "^3.0.1",
"mocha": "^6.2.2",
"mock-http-server": "1.3.0",
"multistream": "^2.1.1",
"murmurhash3js": "3.0.1",
"mutation-observer": "^1.0.3",
Expand Down
16 changes: 16 additions & 0 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,14 @@
'@types/jquery',
],
},
{
groupSlug: 'js-search',
groupName: 'js-search related packages',
packageNames: [
'js-search',
'@types/js-search',
],
},
{
groupSlug: 'js-yaml',
groupName: 'js-yaml related packages',
Expand Down Expand Up @@ -877,6 +885,14 @@
'@types/supertest-as-promised',
],
},
{
groupSlug: 'tar',
groupName: 'tar related packages',
packageNames: [
'tar',
'@types/tar',
],
},
{
groupSlug: 'tar-fs',
groupName: 'tar-fs related packages',
Expand Down
2 changes: 1 addition & 1 deletion src/test_utils/kbn_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export function createTestServers({

return {
startES: async () => {
await es.start();
await es.start(get(settings, 'es.esArgs', []));

if (['gold', 'trial'].includes(license)) {
await setupUsers({
Expand Down
5 changes: 5 additions & 0 deletions x-pack/legacy/plugins/ingest_manager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
OUTPUT_SAVED_OBJECT_TYPE,
AGENT_CONFIG_SAVED_OBJECT_TYPE,
DATASOURCE_SAVED_OBJECT_TYPE,
PACKAGES_SAVED_OBJECT_TYPE,
} from '../../../plugins/ingest_manager/server';

// TODO https://github.com/elastic/kibana/issues/46373
Expand All @@ -34,6 +35,10 @@ export function ingestManager(kibana: any) {
isNamespaceAgnostic: true,
// indexPattern: INDEX_NAMES.INGEST,
},
[PACKAGES_SAVED_OBJECT_TYPE]: {
isNamespaceAgnostic: true,
// indexPattern: INDEX_NAMES.INGEST,
},
},
mappings: savedObjectMappings,
},
Expand Down
4 changes: 3 additions & 1 deletion x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@kbn/plugin-helpers": "9.0.2",
"@kbn/test": "1.0.0",
"@kbn/utility-types": "1.0.0",
"@mattapperson/slapshot": "1.4.0",
"@mattapperson/slapshot": "1.4.3",
"@storybook/addon-actions": "^5.2.6",
"@storybook/addon-console": "^1.2.1",
"@storybook/addon-knobs": "^5.2.6",
Expand Down Expand Up @@ -69,6 +69,7 @@
"@types/history": "^4.7.3",
"@types/jest": "24.0.19",
"@types/joi": "^13.4.2",
"@types/js-search": "^1.4.0",
"@types/js-yaml": "^3.11.1",
"@types/jsdom": "^12.2.4",
"@types/json-stable-stringify": "^1.0.32",
Expand Down Expand Up @@ -258,6 +259,7 @@
"isbinaryfile": "4.0.2",
"joi": "^13.5.2",
"jquery": "^3.4.1",
"js-search": "^1.4.3",
"js-yaml": "3.13.1",
"json-stable-stringify": "^1.0.1",
"jsonwebtoken": "^8.5.1",
Expand Down
87 changes: 74 additions & 13 deletions x-pack/plugins/ingest_manager/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,81 @@
# Ingest Manager
## Plugin
- No features enabled by default. See the TypeScript type for the [the available plugin configuration options](https://github.com/elastic/kibana/blob/feature-ingest/x-pack/plugins/ingest_manager/common/types/index.ts#L9-L19)
- Setting `xpack.ingestManager.enabled=true` is required to enable the plugin. It adds the `DATASOURCE_API_ROUTES` and `AGENT_CONFIG_API_ROUTES` values in [`common/constants/routes.ts`](./common/constants/routes.ts)
- Adding `--xpack.ingestManager.epm.enabled=true` will add the EPM API & UI
- Adding `--xpack.ingestManager.fleet.enabled=true` will add the Fleet API & UI
- [code for adding the routes](https://github.com/elastic/kibana/blob/1f27d349533b1c2865c10c45b2cf705d7416fb36/x-pack/plugins/ingest_manager/server/plugin.ts#L115-L133)
- [Integration tests](server/integration_tests/router.test.ts)
- Both EPM and Fleet require `ingestManager` be enabled. They are not standalone features.

## Getting started
See the Kibana docs for [how to set up your dev environment](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#setting-up-your-development-environment), [run Elasticsearch](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#running-elasticsearch), and [start Kibana](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#running-kibana).
## Development

One common workflow is:
### Getting started
See the Kibana docs for [how to set up your dev environment](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#setting-up-your-development-environment), [run Elasticsearch](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#running-elasticsearch), and [start Kibana](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#running-kibana)

1. `yarn es snapshot`
1. In another shell: `yarn start --xpack.ingestManager.enabled=true` (or set in `config.yml`)

## HTTP API
1. Nothing by default. If `xpack.ingestManager.enabled=true`, it adds the `DATASOURCE_API_ROUTES` and `AGENT_CONFIG_API_ROUTES` values in [`common/constants/routes.ts`](./common/constants/routes.ts)
1. [Integration tests](../../test/api_integration/apis/ingest_manager/endpoints.ts)
1. In later versions the EPM and Fleet routes will be added when their flags are enabled. See the [currently disabled logic to add those routes](https://github.com/jfsiii/kibana/blob/feature-ingest-manager/x-pack/plugins/ingest_manager/server/plugin.ts#L86-L90).
One common development workflow is:
- Start Elasticsearch in one shell
```
yarn es snapshot -E xpack.security.authc.api_key.enabled=true
```
- Start Kibana in another shell
```
yarn start --xpack.ingestManager.enabled=true --xpack.ingestManager.epm.enabled=true --xpack.ingestManager.fleet.enabled=true
```

## Plugin architecture
Follows the `common`, `server`, `public` structure from the [Architecture Style Guide
](https://github.com/elastic/kibana/blob/master/style_guides/architecture_style_guide.md#file-and-folder-structure).
This plugin follows the `common`, `server`, `public` structure from the [Architecture Style Guide
](https://github.com/elastic/kibana/blob/master/style_guides/architecture_style_guide.md#file-and-folder-structure). We also follow the pattern of developing feature branches under your personal fork of Kibana.

We use New Platform approach (structure, APIs, etc) where possible. There's a `kibana.json` manifest, and the server uses the `server/{index,plugin}.ts` approach from [`MIGRATION.md`](https://github.com/elastic/kibana/blob/master/src/core/MIGRATION.md#architecture).
### API Tests
#### Ingest & Fleet
1. In one terminal, change to the `x-pack` directory and start the test server with
```
node scripts/functional_tests_server.js --config test/api_integration/config.ts
```

1. in a second terminal, run the tests from the Kibana root directory with
```
node scripts/functional_test_runner.js --config x-pack/test/api_integration/config.ts
```
#### EPM
1. In one terminal, change to the `x-pack` directory and start the test server with
```
node scripts/functional_tests_server.js --config test/epm_api_integration/config.ts
```

1. in a second terminal, run the tests from the Kibana root directory with
```
node scripts/functional_test_runner.js --config x-pack/test/epm_api_integration/config.ts
```

### Staying up-to-date with `master`
While we're developing in the `feature-ingest` feature branch, here's is more information on keeping up to date with upstream kibana.

<details>
<summary>merge upstream <code>master</code> into <code>feature-ingest</code></summary>

```bash
## checkout feature branch to your fork
git checkout -B feature-ingest origin/feature-ingest

## make sure your feature branch is current with upstream feature branch
git pull upstream feature-ingest

## pull in changes from upstream master
git pull upstream master

## push changes to your remote
git push origin

# /!\ Open a DRAFT PR /!\
# Normal PRs will re-notify authors of commits already merged
# Draft PR will trigger CI run. Once CI is green ...
# /!\ DO NOT USE THE GITHUB UI TO MERGE THE PR /!\

## push your changes to upstream feature branch from the terminal; not GitHub UI
git push upstream
```
</details>

See https://github.com/elastic/kibana/pull/37950 for an example.
16 changes: 16 additions & 0 deletions x-pack/plugins/ingest_manager/common/constants/agent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

export const AGENT_SAVED_OBJECT_TYPE = 'agents';

export const AGENT_EVENT_SAVED_OBJECT_TYPE = 'agent_events';

export const AGENT_TYPE_PERMANENT = 'PERMANENT';
export const AGENT_TYPE_EPHEMERAL = 'EPHEMERAL';
export const AGENT_TYPE_TEMPORARY = 'TEMPORARY';

export const AGENT_POLLING_THRESHOLD_MS = 30000;
export const AGENT_POLLING_INTERVAL = 1000;
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { AgentConfigStatus } from '../types';
import { AgentConfigStatus, DefaultPackages } from '../types';

export const AGENT_CONFIG_SAVED_OBJECT_TYPE = 'agent_configs';

export const DEFAULT_AGENT_CONFIG_ID = 'default';

export const DEFAULT_AGENT_CONFIG = {
name: 'Default config',
namespace: 'default',
description: 'Default agent configuration created by Kibana',
status: AgentConfigStatus.Active,
datasources: [],
is_default: true,
};

export const DEFAULT_AGENT_CONFIGS_PACKAGES = [DefaultPackages.system];
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

export const ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE = 'enrollment_api_keys';
8 changes: 8 additions & 0 deletions x-pack/plugins/ingest_manager/common/constants/epm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

export const PACKAGES_SAVED_OBJECT_TYPE = 'epm-package';
export const INDEX_PATTERN_SAVED_OBJECT_TYPE = 'index-pattern';
Loading