-
Notifications
You must be signed in to change notification settings - Fork 8.3k
/
Copy pathfile_storage.ts
38 lines (35 loc) · 1.6 KB
/
file_storage.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
/*
* 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.
*/
// File storage indexes supporting file upload from the host to Elastic/Kibana
// If needing to get an integration specific index name, use the utility functions
// found in `common/services/file_storage`
export const FILE_STORAGE_METADATA_INDEX_PATTERN = '.fleet-fileds-fromhost-meta-*';
export const FILE_STORAGE_DATA_INDEX_PATTERN = '.fleet-fileds-fromhost-data-*';
// File storage indexes supporting user uploaded files (via kibana) that will be
// delivered to the host agent/endpoint
export const FILE_STORAGE_TO_HOST_METADATA_INDEX_PATTERN = '.fleet-fileds-tohost-meta-*';
export const FILE_STORAGE_TO_HOST_DATA_INDEX_PATTERN = '.fleet-fileds-tohost-data-*';
// which integrations support file upload and the name to use for the file upload index
export const FILE_STORAGE_INTEGRATION_INDEX_NAMES: Readonly<
Record<
string,
Readonly<{
/** name to be used for the index */
name: string;
/** If integration supports files sent from host to ES/Kibana */
fromHost: boolean;
/** If integration supports files to be sent to host from kibana */
toHost: boolean;
}>
>
> = {
elastic_agent: { name: 'agent', fromHost: true, toHost: false },
endpoint: { name: 'endpoint', fromHost: true, toHost: true },
};
export const FILE_STORAGE_INTEGRATION_NAMES: Readonly<string[]> = Object.keys(
FILE_STORAGE_INTEGRATION_INDEX_NAMES
);