-
Notifications
You must be signed in to change notification settings - Fork 8.3k
/
epm.ts
57 lines (46 loc) · 1.98 KB
/
epm.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
export const PACKAGES_SAVED_OBJECT_TYPE = 'epm-packages';
export const ASSETS_SAVED_OBJECT_TYPE = 'epm-packages-assets';
export const MAX_TIME_COMPLETE_INSTALL = 60000;
export const FLEET_SYSTEM_PACKAGE = 'system';
export const FLEET_ELASTIC_AGENT_PACKAGE = 'elastic_agent';
export const FLEET_SERVER_PACKAGE = 'fleet_server';
export const FLEET_ENDPOINT_PACKAGE = 'endpoint';
/*
Package rules:
| | unremovablePackages | defaultPackages | autoUpdatePackages |
|---------------|:---------------------:|:---------------:|:------------------:|
| Removable | ❌ | ✔️ | ✔️ |
| Auto-installs | ❌ | ✔️ | ❌ |
| Auto-updates | ❌ | ✔️ | ✔️ |
`endpoint` is a special package. It needs to autoupdate, it needs to _not_ be
removable, but it doesn't install by default. Following the table, it needs to
be in `unremovablePackages` and in `autoUpdatePackages`, but not in
`defaultPackages`.
*/
export const unremovablePackages = [
FLEET_SYSTEM_PACKAGE,
FLEET_ELASTIC_AGENT_PACKAGE,
FLEET_SERVER_PACKAGE,
FLEET_ENDPOINT_PACKAGE,
];
export const defaultPackages = unremovablePackages.filter((p) => p !== FLEET_ENDPOINT_PACKAGE);
export const autoUpdatePackages = [FLEET_ENDPOINT_PACKAGE];
export const agentAssetTypes = {
Input: 'input',
} as const;
export const dataTypes = {
Logs: 'logs',
Metrics: 'metrics',
} as const;
// currently identical but may be a subset or otherwise different some day
export const monitoringTypes = Object.values(dataTypes);
export const installationStatuses = {
Installed: 'installed',
NotInstalled: 'not_installed',
} as const;