From 4348a34da948d07bd2ae5f7279b04695c84c5bca Mon Sep 17 00:00:00 2001 From: Xavier Mouligneau <189600+XavierM@users.noreply.github.com> Date: Wed, 22 Jan 2020 19:51:54 -0500 Subject: [PATCH 01/72] [SIEM] Detections bugs (#55626) * Fix permissions * Fix selection of event type on timeline * add link to rule name * add filter in data provider * Add rule status in saved object * Fix reset field browser * fix swallow error on creation of prepackaged rules * fix test --- .../components/fields_browser/header.tsx | 64 +++++++++------ .../public/components/link_to/link_to.tsx | 6 +- .../link_to/redirect_to_detection_engine.tsx | 17 +++- .../body/column_headers/column_header.tsx | 1 + .../body/data_driven_columns/index.test.tsx | 1 + .../body/data_driven_columns/index.tsx | 7 +- .../body/events/event_column_view.tsx | 1 + .../body/renderers/column_renderer.ts | 2 + .../timeline/body/renderers/constants.tsx | 1 + .../body/renderers/formatted_field.tsx | 25 +++++- .../body/renderers/plain_column_renderer.tsx | 4 + .../siem/public/components/timeline/index.tsx | 1 + .../components/timeline/timeline.test.tsx | 12 +++ .../public/components/timeline/timeline.tsx | 5 +- .../rules/use_pre_packaged_rules.tsx | 10 +-- .../signals/use_privilege_user.tsx | 7 +- .../siem/public/containers/timeline/index.tsx | 11 ++- .../components/signals/actions.tsx | 22 +++++- .../components/signals/default_config.tsx | 1 + .../pages/detection_engine/rules/index.tsx | 4 +- .../rules/add_prepackaged_rules_route.ts | 4 +- .../routes/rules/create_rules_bulk_route.ts | 2 +- .../detection_engine/rules/create_rules.ts | 2 +- .../rules/install_prepacked_rules.ts | 77 ++++++++++--------- x-pack/legacy/plugins/siem/server/plugin.ts | 3 + .../plugins/siem/server/saved_objects.ts | 12 ++- 26 files changed, 212 insertions(+), 90 deletions(-) diff --git a/x-pack/legacy/plugins/siem/public/components/fields_browser/header.tsx b/x-pack/legacy/plugins/siem/public/components/fields_browser/header.tsx index 45b331f133e85e..ccf6ec67521b0b 100644 --- a/x-pack/legacy/plugins/siem/public/components/fields_browser/header.tsx +++ b/x-pack/legacy/plugins/siem/public/components/fields_browser/header.tsx @@ -12,13 +12,16 @@ import { EuiText, EuiTitle, } from '@elastic/eui'; -import React from 'react'; +import React, { useCallback } from 'react'; import styled from 'styled-components'; import { BrowserFields } from '../../containers/source'; +import { signalsHeaders } from '../../pages/detection_engine/components/signals/default_config'; +import { alertsHeaders } from '../alerts_viewer/default_headers'; import { defaultHeaders as eventsDefaultHeaders } from '../events_viewer/default_headers'; import { defaultHeaders } from '../timeline/body/column_headers/default_headers'; import { OnUpdateColumns } from '../timeline/events'; +import { useTimelineTypeContext } from '../timeline/timeline_context'; import { getFieldBrowserSearchInputClassName, getFieldCount, SEARCH_INPUT_WIDTH } from './helpers'; @@ -96,27 +99,44 @@ const TitleRow = React.memo<{ isEventViewer?: boolean; onOutsideClick: () => void; onUpdateColumns: OnUpdateColumns; -}>(({ isEventViewer, onOutsideClick, onUpdateColumns }) => ( - - - -

{i18n.CUSTOMIZE_COLUMNS}

-
-
- - - { - onUpdateColumns(isEventViewer ? eventsDefaultHeaders : defaultHeaders); - onOutsideClick(); - }} - > - {i18n.RESET_FIELDS} - - -
-)); +}>(({ isEventViewer, onOutsideClick, onUpdateColumns }) => { + const timelineTypeContext = useTimelineTypeContext(); + const handleResetColumns = useCallback(() => { + let resetDefaultHeaders = defaultHeaders; + if (isEventViewer) { + if (timelineTypeContext.documentType?.toLocaleLowerCase() === 'alerts') { + resetDefaultHeaders = alertsHeaders; + } else if (timelineTypeContext.documentType?.toLocaleLowerCase() === 'signals') { + resetDefaultHeaders = signalsHeaders; + } else { + resetDefaultHeaders = eventsDefaultHeaders; + } + } + onUpdateColumns(resetDefaultHeaders); + onOutsideClick(); + }, [isEventViewer, onOutsideClick, onUpdateColumns, timelineTypeContext]); + + return ( + + + +

{i18n.CUSTOMIZE_COLUMNS}

+
+
+ + + + {i18n.RESET_FIELDS} + + +
+ ); +}); TitleRow.displayName = 'TitleRow'; diff --git a/x-pack/legacy/plugins/siem/public/components/link_to/link_to.tsx b/x-pack/legacy/plugins/siem/public/components/link_to/link_to.tsx index 3180fc955c6906..3eda945c9224e6 100644 --- a/x-pack/legacy/plugins/siem/public/components/link_to/link_to.tsx +++ b/x-pack/legacy/plugins/siem/public/components/link_to/link_to.tsx @@ -77,16 +77,16 @@ export const LinkToPage = React.memo(({ match }) => ( /> ; @@ -41,14 +42,24 @@ export const RedirectToCreateRulePage = ({ }; export const RedirectToRuleDetailsPage = ({ + match: { + params: { detailName }, + }, location: { search }, }: DetectionEngineComponentProps) => { - return ; + return ; }; -export const RedirectToEditRulePage = ({ location: { search } }: DetectionEngineComponentProps) => { +export const RedirectToEditRulePage = ({ + match: { + params: { detailName }, + }, + location: { search }, +}: DetectionEngineComponentProps) => { return ( - + ); }; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/column_header.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/column_header.tsx index ccaeeff972a812..9df805bddcc827 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/column_header.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/body/column_headers/column_header.tsx @@ -30,6 +30,7 @@ export interface ColumnHeader { format?: string; id: ColumnId; label?: string; + linkField?: string; placeholder?: string; type?: string; width: number; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/index.test.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/index.test.tsx index 36427015260a7f..098bd3108dba16 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/index.test.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/index.test.tsx @@ -23,6 +23,7 @@ describe('Columns', () => { columnHeaders={headersSansTimestamp} columnRenderers={columnRenderers} data={mockTimelineData[0].data} + ecsData={mockTimelineData[0].ecs} onColumnResized={jest.fn()} timelineId="test" /> diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/index.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/index.tsx index 37b6e302150560..416c72cfbc2554 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/body/data_driven_columns/index.tsx @@ -6,7 +6,8 @@ import React from 'react'; -import { TimelineNonEcsData } from '../../../../graphql/types'; +import { getOr } from 'lodash/fp'; +import { Ecs, TimelineNonEcsData } from '../../../../graphql/types'; import { OnColumnResized } from '../../events'; import { EventsTd, EventsTdContent, EventsTdGroupData } from '../../styles'; import { ColumnHeader } from '../column_headers/column_header'; @@ -18,12 +19,13 @@ interface Props { columnHeaders: ColumnHeader[]; columnRenderers: ColumnRenderer[]; data: TimelineNonEcsData[]; + ecsData: Ecs; onColumnResized: OnColumnResized; timelineId: string; } export const DataDrivenColumns = React.memo( - ({ _id, columnHeaders, columnRenderers, data, timelineId }) => { + ({ _id, columnHeaders, columnRenderers, data, ecsData, timelineId }) => { // Passing the styles directly to the component because the width is // being calculated and is recommended by Styled Components for performance // https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291 @@ -36,6 +38,7 @@ export const DataDrivenColumns = React.memo( columnName: header.id, eventId: _id, field: header, + linkValues: getOr([], header.linkField ?? '', ecsData), timelineId, truncate: true, values: getMappedNonEcsValue({ diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/events/event_column_view.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/body/events/event_column_view.tsx index 1036c6b53b4c1d..74476c3dc1d617 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/body/events/event_column_view.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/body/events/event_column_view.tsx @@ -127,6 +127,7 @@ export const EventColumnView = React.memo( columnHeaders={columnHeaders} columnRenderers={columnRenderers} data={data} + ecsData={ecsData} onColumnResized={onColumnResized} timelineId={timelineId} /> diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/column_renderer.ts b/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/column_renderer.ts index f64d0f39e3b291..d1807c82d188e4 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/column_renderer.ts +++ b/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/column_renderer.ts @@ -16,6 +16,7 @@ export interface ColumnRenderer { timelineId, truncate, values, + linkValues, }: { columnName: string; eventId: string; @@ -23,5 +24,6 @@ export interface ColumnRenderer { timelineId: string; truncate?: boolean; values: string[] | null | undefined; + linkValues?: string[] | null | undefined; }) => React.ReactNode; } diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/constants.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/constants.tsx index f22c338f2d8797..0330fb458e3640 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/constants.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/constants.tsx @@ -8,3 +8,4 @@ export const DATE_FIELD_TYPE = 'date'; export const HOST_NAME_FIELD_NAME = 'host.name'; export const IP_FIELD_TYPE = 'ip'; export const MESSAGE_FIELD_NAME = 'message'; +export const SIGNAL_RULE_NAME_FIELD_NAME = 'signal.rule.name'; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/formatted_field.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/formatted_field.tsx index 888029600d8609..010a328d2993dd 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/formatted_field.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/formatted_field.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiToolTip, EuiLink } from '@elastic/eui'; import { isNumber, isString, isEmpty } from 'lodash/fp'; import React from 'react'; @@ -15,6 +15,7 @@ import { getOrEmptyTagFromValue, getEmptyTagValue } from '../../../empty_value'; import { FormattedDate } from '../../../formatted_date'; import { FormattedIp } from '../../../formatted_ip'; import { HostDetailsLink } from '../../../links'; +import { getRuleDetailsUrl } from '../../../link_to/redirect_to_detection_engine'; import { Port, PORT_NAMES } from '../../../port'; import { TruncatableText } from '../../../truncatable_text'; import { @@ -22,6 +23,7 @@ import { HOST_NAME_FIELD_NAME, IP_FIELD_TYPE, MESSAGE_FIELD_NAME, + SIGNAL_RULE_NAME_FIELD_NAME, } from './constants'; // simple black-list to prevent dragging and dropping fields such as message name @@ -35,7 +37,8 @@ const FormattedFieldValueComponent: React.FC<{ fieldType: string; truncate?: boolean; value: string | number | undefined | null; -}> = ({ contextId, eventId, fieldFormat, fieldName, fieldType, truncate, value }) => { + linkValue?: string | null | undefined; +}> = ({ contextId, eventId, fieldFormat, fieldName, fieldType, truncate, value, linkValue }) => { if (fieldType === IP_FIELD_TYPE) { return ( {value} ); + } else if (fieldName === SIGNAL_RULE_NAME_FIELD_NAME) { + const ruleName = `${value}`; + const ruleId = linkValue; + + return isString(value) && ruleName.length > 0 && ruleId != null ? ( + + + {value} + + + ) : ( + getEmptyTagValue() + ); } else { const contentValue = getOrEmptyTagFromValue(value); const content = truncate ? {contentValue} : contentValue; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/plain_column_renderer.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/plain_column_renderer.tsx index 70485c41f3b889..deeec05bc07074 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/plain_column_renderer.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/plain_column_renderer.tsx @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ +import { head } from 'lodash/fp'; import React from 'react'; import { TimelineNonEcsData } from '../../../../graphql/types'; @@ -27,6 +28,7 @@ export const plainColumnRenderer: ColumnRenderer = { timelineId, truncate, values, + linkValues, }: { columnName: string; eventId: string; @@ -34,6 +36,7 @@ export const plainColumnRenderer: ColumnRenderer = { timelineId: string; truncate?: boolean; values: string[] | undefined | null; + linkValues?: string[] | null | undefined; }) => values != null ? values.map(value => ( @@ -46,6 +49,7 @@ export const plainColumnRenderer: ColumnRenderer = { fieldType={field.type || ''} value={parseValue(value)} truncate={truncate} + linkValue={head(linkValues)} /> )) : getEmptyTagValue(), diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/index.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/index.tsx index bb8b04f6e304ef..ff556a1a9bdfc7 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/index.tsx @@ -268,6 +268,7 @@ const StatefulTimelineComponent = React.memo( columns={columns} dataProviders={dataProviders!} end={end} + eventType={eventType} filters={filters} flyoutHeaderHeight={flyoutHeaderHeight} flyoutHeight={flyoutHeight} diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/timeline.test.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/timeline.test.tsx index 0be5e69abea382..f7c0d0b4757347 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/timeline.test.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/timeline.test.tsx @@ -54,6 +54,7 @@ describe('Timeline', () => { id="foo" dataProviders={mockDataProviders} end={endDate} + eventType="raw" filters={[]} flyoutHeight={testFlyoutHeight} flyoutHeaderHeight={flyoutHeaderHeight} @@ -92,6 +93,7 @@ describe('Timeline', () => { id="foo" dataProviders={mockDataProviders} end={endDate} + eventType="raw" filters={[]} flyoutHeight={testFlyoutHeight} flyoutHeaderHeight={flyoutHeaderHeight} @@ -133,6 +135,7 @@ describe('Timeline', () => { id="foo" dataProviders={mockDataProviders} end={endDate} + eventType="raw" filters={[]} flyoutHeight={testFlyoutHeight} flyoutHeaderHeight={flyoutHeaderHeight} @@ -174,6 +177,7 @@ describe('Timeline', () => { id="foo" dataProviders={mockDataProviders} end={endDate} + eventType="raw" filters={[]} flyoutHeight={testFlyoutHeight} flyoutHeaderHeight={flyoutHeaderHeight} @@ -220,6 +224,7 @@ describe('Timeline', () => { id="foo" dataProviders={mockDataProviders} end={endDate} + eventType="raw" filters={[]} flyoutHeight={testFlyoutHeight} flyoutHeaderHeight={flyoutHeaderHeight} @@ -268,6 +273,7 @@ describe('Timeline', () => { id="foo" dataProviders={mockDataProviders} end={endDate} + eventType="raw" filters={[]} flyoutHeight={testFlyoutHeight} flyoutHeaderHeight={flyoutHeaderHeight} @@ -324,6 +330,7 @@ describe('Timeline', () => { id="foo" dataProviders={mockDataProviders} end={endDate} + eventType="raw" filters={[]} flyoutHeight={testFlyoutHeight} flyoutHeaderHeight={flyoutHeaderHeight} @@ -384,6 +391,7 @@ describe('Timeline', () => { id="foo" dataProviders={mockDataProviders} end={endDate} + eventType="raw" filters={[]} flyoutHeight={testFlyoutHeight} flyoutHeaderHeight={flyoutHeaderHeight} @@ -447,6 +455,7 @@ describe('Timeline', () => { id="foo" dataProviders={dataProviders} end={endDate} + eventType="raw" filters={[]} flyoutHeight={testFlyoutHeight} flyoutHeaderHeight={flyoutHeaderHeight} @@ -500,6 +509,7 @@ describe('Timeline', () => { id="foo" dataProviders={dataProviders} end={endDate} + eventType="raw" filters={[]} flyoutHeight={testFlyoutHeight} flyoutHeaderHeight={flyoutHeaderHeight} @@ -559,6 +569,7 @@ describe('Timeline', () => { id="foo" dataProviders={dataProviders} end={endDate} + eventType="raw" filters={[]} flyoutHeight={testFlyoutHeight} flyoutHeaderHeight={flyoutHeaderHeight} @@ -622,6 +633,7 @@ describe('Timeline', () => { id="foo" dataProviders={dataProviders} end={endDate} + eventType="raw" filters={[]} flyoutHeight={testFlyoutHeight} flyoutHeaderHeight={flyoutHeaderHeight} diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/timeline.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/timeline.tsx index ece5b4fa18d1c4..11886b45b0bec2 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/timeline.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/timeline.tsx @@ -13,7 +13,7 @@ import { BrowserFields } from '../../containers/source'; import { TimelineQuery } from '../../containers/timeline'; import { Direction } from '../../graphql/types'; import { useKibana } from '../../lib/kibana'; -import { KqlMode } from '../../store/timeline/model'; +import { KqlMode, EventType } from '../../store/timeline/model'; import { AutoSizer } from '../auto_sizer'; import { ColumnHeader } from './body/column_headers/column_header'; import { defaultHeaders } from './body/column_headers/default_headers'; @@ -60,6 +60,7 @@ interface Props { columns: ColumnHeader[]; dataProviders: DataProvider[]; end: number; + eventType: EventType; filters: esFilters.Filter[]; flyoutHeaderHeight: number; flyoutHeight: number; @@ -92,6 +93,7 @@ export const TimelineComponent = ({ columns, dataProviders, end, + eventType, filters, flyoutHeaderHeight, flyoutHeight, @@ -159,6 +161,7 @@ export const TimelineComponent = ({ {combinedQueries != null ? ( c.id)} diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_pre_packaged_rules.tsx b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_pre_packaged_rules.tsx index abb43f3570e6c0..ee34cad8730211 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_pre_packaged_rules.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_pre_packaged_rules.tsx @@ -25,7 +25,7 @@ interface Return { interface UsePrePackagedRuleProps { canUserCRUD: boolean | null; - hasIndexManage: boolean | null; + hasIndexWrite: boolean | null; hasManageApiKey: boolean | null; isAuthenticated: boolean | null; isSignalIndexExists: boolean | null; @@ -34,7 +34,7 @@ interface UsePrePackagedRuleProps { /** * Hook for using to get status about pre-packaged Rules from the Detection Engine API * - * @param hasIndexManage boolean + * @param hasIndexWrite boolean * @param hasManageApiKey boolean * @param isAuthenticated boolean * @param isSignalIndexExists boolean @@ -42,7 +42,7 @@ interface UsePrePackagedRuleProps { */ export const usePrePackagedRules = ({ canUserCRUD, - hasIndexManage, + hasIndexWrite, hasManageApiKey, isAuthenticated, isSignalIndexExists, @@ -90,7 +90,7 @@ export const usePrePackagedRules = ({ try { if ( canUserCRUD && - hasIndexManage && + hasIndexWrite && hasManageApiKey && isAuthenticated && isSignalIndexExists @@ -152,7 +152,7 @@ export const usePrePackagedRules = ({ isSubscribed = false; abortCtrl.abort(); }; - }, [canUserCRUD, hasIndexManage, hasManageApiKey, isAuthenticated, isSignalIndexExists]); + }, [canUserCRUD, hasIndexWrite, hasManageApiKey, isAuthenticated, isSignalIndexExists]); return { loading, diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_privilege_user.tsx b/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_privilege_user.tsx index 564cf224a9fc8e..d225241875d4bf 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_privilege_user.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_privilege_user.tsx @@ -46,7 +46,12 @@ export const usePrivilegeUser = (): Return => { if (privilege.index != null && Object.keys(privilege.index).length > 0) { const indexName = Object.keys(privilege.index)[0]; setHasIndexManage(privilege.index[indexName].manage); - setHasIndexWrite(privilege.index[indexName].write); + setHasIndexWrite( + privilege.index[indexName].create || + privilege.index[indexName].create_doc || + privilege.index[indexName].index || + privilege.index[indexName].write + ); setHasManageApiKey( privilege.cluster.manage_security || privilege.cluster.manage_api_key || diff --git a/x-pack/legacy/plugins/siem/public/containers/timeline/index.tsx b/x-pack/legacy/plugins/siem/public/containers/timeline/index.tsx index 97f007452854ca..03fe68ca1398d2 100644 --- a/x-pack/legacy/plugins/siem/public/containers/timeline/index.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/timeline/index.tsx @@ -11,6 +11,7 @@ import { Query } from 'react-apollo'; import { compose } from 'redux'; import { connect } from 'react-redux'; +import { IIndexPattern } from '../../../../../../../src/plugins/data/common/index_patterns'; import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import { GetTimelineQuery, @@ -23,9 +24,8 @@ import { inputsModel, inputsSelectors, State } from '../../store'; import { withKibana, WithKibanaProps } from '../../lib/kibana'; import { createFilter } from '../helpers'; import { QueryTemplate, QueryTemplateProps } from '../query_template'; - +import { EventType } from '../../store/timeline/model'; import { timelineQuery } from './index.gql_query'; -import { IIndexPattern } from '../../../../../../../src/plugins/data/common/index_patterns'; export interface TimelineArgs { events: TimelineItem[]; @@ -45,6 +45,7 @@ export interface TimelineQueryReduxProps { export interface OwnProps extends QueryTemplateProps { children?: (args: TimelineArgs) => React.ReactNode; + eventType?: EventType; id: string; indexPattern?: IIndexPattern; indexToAdd?: string[]; @@ -70,6 +71,7 @@ class TimelineQueryComponent extends QueryTemplate< public render() { const { children, + eventType = 'raw', id, indexPattern, indexToAdd = [], @@ -83,7 +85,10 @@ class TimelineQueryComponent extends QueryTemplate< } = this.props; const defaultKibanaIndex = kibana.services.uiSettings.get(DEFAULT_INDEX_KEY); const defaultIndex = isEmpty(indexPattern) - ? [...defaultKibanaIndex, ...indexToAdd] + ? [ + ...(['all', 'raw'].includes(eventType) ? defaultKibanaIndex : []), + ...(['all', 'signal'].includes(eventType) ? indexToAdd : []), + ] : indexPattern?.title.split(',') ?? []; const variables: GetTimelineQuery.Variables = { fieldRequested: fields, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/actions.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/actions.tsx index 4701ed93dc4f0a..a33efeda2196b5 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/actions.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/actions.tsx @@ -151,11 +151,25 @@ export const sendSignalToTimelineAction = async ({ updateTimelineIsLoading({ id: 'timeline-1', isLoading: false }); } } else { - const query = `_id: ${ecsData._id}`; createTimeline({ from, timeline: { ...timelineDefaults, + dataProviders: [ + { + and: [], + id: `send-signal-to-timeline-action-default-draggable-event-details-value-formatted-field-value-timeline-1-signal-id-${ecsData._id}`, + name: ecsData._id, + enabled: true, + excluded: false, + kqlQuery: '', + queryMatch: { + field: '_id', + value: ecsData._id, + operator: ':', + }, + }, + ], id: 'timeline-1', dateRange: { start: from, @@ -166,13 +180,13 @@ export const sendSignalToTimelineAction = async ({ filterQuery: { kuery: { kind: 'kuery', - expression: query, + expression: '', }, - serializedQuery: convertKueryToElasticSearchQuery(query), + serializedQuery: '', }, filterQueryDraft: { kind: 'kuery', - expression: query, + expression: '', }, }, }, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/default_config.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/default_config.tsx index f4406c83136063..f5d138a3afcb8c 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/default_config.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals/default_config.tsx @@ -90,6 +90,7 @@ export const signalsHeaders: ColumnHeader[] = [ columnHeaderType: defaultColumnHeaderType, id: 'signal.rule.name', label: i18n.SIGNALS_HEADERS_RULE, + linkField: 'signal.rule.id', width: DEFAULT_COLUMN_MIN_WIDTH, }, { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/index.tsx index 8be4f6dd3b99ba..75b1ce71efbb6b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/index.tsx @@ -36,7 +36,7 @@ const RulesPageComponent: React.FC = () => { isSignalIndexExists, isAuthenticated, canUserCRUD, - hasIndexManage, + hasIndexWrite, hasManageApiKey, } = useUserInfo(); const { @@ -49,7 +49,7 @@ const RulesPageComponent: React.FC = () => { rulesNotUpdated, } = usePrePackagedRules({ canUserCRUD, - hasIndexManage, + hasIndexWrite, hasManageApiKey, isSignalIndexExists, isAuthenticated, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts index 3c9cad8dc4d4b1..3e2337f2bb5a5b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts @@ -60,7 +60,9 @@ export const createAddPrepackedRulesRoute = (server: ServerFacade): Hapi.ServerR ); } } - await installPrepackagedRules(alertsClient, actionsClient, rulesToInstall, spaceIndex); + await Promise.all( + installPrepackagedRules(alertsClient, actionsClient, rulesToInstall, spaceIndex) + ); await updatePrepackagedRules( alertsClient, actionsClient, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts index 00a1d2eb980ec3..1fe73f5ba196f1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts @@ -47,7 +47,7 @@ export const createCreateRulesBulkRoute = (server: ServerFacade): Hapi.ServerRou return headers.response().code(404); } - const rules = Promise.all( + const rules = await Promise.all( request.payload.map(async payloadRule => { const { created_at: createdAt, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.ts index d2f76907d7aa3e..1d3801d80de113 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.ts @@ -8,7 +8,7 @@ import { APP_ID, SIGNALS_ID } from '../../../../common/constants'; import { RuleParams } from './types'; import { addTags } from './add_tags'; -export const createRules = async ({ +export const createRules = ({ alertsClient, actionsClient, // TODO: Use this actionsClient once we have actions such as email, etc... description, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts index 78ad5dd54f70b0..555063854dc60e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts @@ -6,16 +6,17 @@ import { ActionsClient } from '../../../../../../../plugins/actions/server'; import { AlertsClient } from '../../../../../alerting'; +import { Alert } from '../../../../../alerting/server/types'; import { createRules } from './create_rules'; import { PrepackagedRules } from '../types'; -export const installPrepackagedRules = async ( +export const installPrepackagedRules = ( alertsClient: AlertsClient, actionsClient: ActionsClient, rules: PrepackagedRules[], outputIndex: string -): Promise => { - await rules.forEach(async rule => { +): Array> => + rules.reduce>>((acc, rule) => { const { description, enabled, @@ -43,37 +44,39 @@ export const installPrepackagedRules = async ( references, version, } = rule; - createRules({ - alertsClient, - actionsClient, - description, - enabled, - falsePositives, - from, - immutable, - query, - language, - outputIndex, - savedId, - timelineId, - timelineTitle, - meta, - filters, - ruleId, - index, - interval, - maxSignals, - riskScore, - name, - severity, - tags, - to, - type, - threats, - references, - version, - createdAt: new Date().toISOString(), - updatedAt: new Date().toISOString(), - }); - }); -}; + return [ + ...acc, + createRules({ + alertsClient, + actionsClient, + description, + enabled, + falsePositives, + from, + immutable, + query, + language, + outputIndex, + savedId, + timelineId, + timelineTitle, + meta, + filters, + ruleId, + index, + interval, + maxSignals, + riskScore, + name, + severity, + tags, + to, + type, + threats, + references, + version, + createdAt: new Date().toISOString(), + updatedAt: new Date().toISOString(), + }), + ]; + }, []); diff --git a/x-pack/legacy/plugins/siem/server/plugin.ts b/x-pack/legacy/plugins/siem/server/plugin.ts index 9d1983cf1d4daa..96eef2f44e5a06 100644 --- a/x-pack/legacy/plugins/siem/server/plugin.ts +++ b/x-pack/legacy/plugins/siem/server/plugin.ts @@ -14,6 +14,7 @@ import { noteSavedObjectType, pinnedEventSavedObjectType, timelineSavedObjectType, + ruleStatusSavedObjectType, } from './saved_objects'; export type SiemPluginSecurity = Pick; @@ -57,6 +58,7 @@ export class Plugin { noteSavedObjectType, pinnedEventSavedObjectType, timelineSavedObjectType, + ruleStatusSavedObjectType, ], read: ['config'], }, @@ -80,6 +82,7 @@ export class Plugin { noteSavedObjectType, pinnedEventSavedObjectType, timelineSavedObjectType, + ruleStatusSavedObjectType, ], }, ui: [ diff --git a/x-pack/legacy/plugins/siem/server/saved_objects.ts b/x-pack/legacy/plugins/siem/server/saved_objects.ts index 1d65e351fc86a9..8b9a1891c8a500 100644 --- a/x-pack/legacy/plugins/siem/server/saved_objects.ts +++ b/x-pack/legacy/plugins/siem/server/saved_objects.ts @@ -12,9 +12,17 @@ import { timelineSavedObjectType, timelineSavedObjectMappings, } from './lib/timeline/saved_object_mappings'; -import { ruleStatusSavedObjectMappings } from './lib/detection_engine/rules/saved_object_mappings'; +import { + ruleStatusSavedObjectMappings, + ruleStatusSavedObjectType, +} from './lib/detection_engine/rules/saved_object_mappings'; -export { noteSavedObjectType, pinnedEventSavedObjectType, timelineSavedObjectType }; +export { + noteSavedObjectType, + pinnedEventSavedObjectType, + ruleStatusSavedObjectType, + timelineSavedObjectType, +}; export const savedObjectMappings = { ...timelineSavedObjectMappings, ...noteSavedObjectMappings, From da5710dac6be0e45835034e1e86b7c8e15cde5ab Mon Sep 17 00:00:00 2001 From: Frank Hassanabad Date: Wed, 22 Jan 2020 18:17:28 -0700 Subject: [PATCH 02/72] [SIEM][Detection Engine] Reworks actionClient to work with new platform ## Summary * Changes action client to use new platform from their changes * Removes unit tests not needed * Updates unit tests that need updating ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. ~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~ ~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~ ~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~ - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios ~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~ ### For maintainers ~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~ - [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process) --- x-pack/legacy/plugins/siem/index.ts | 2 +- .../routes/__mocks__/_mock_server.ts | 46 ++--- .../rules/add_prepackaged_rules_route.test.ts | 20 --- .../rules/add_prepackaged_rules_route.ts | 9 +- .../rules/create_rules_bulk_route.test.ts | 18 -- .../routes/rules/create_rules_bulk_route.ts | 9 +- .../routes/rules/create_rules_route.test.ts | 18 -- .../routes/rules/create_rules_route.ts | 9 +- .../rules/delete_rules_bulk_route.test.ts | 18 -- .../routes/rules/delete_rules_bulk_route.ts | 109 ++++++------ .../routes/rules/delete_rules_route.test.ts | 18 -- .../routes/rules/delete_rules_route.ts | 97 +++++----- .../routes/rules/export_rules_route.ts | 5 +- .../routes/rules/find_rules_route.test.ts | 18 -- .../routes/rules/find_rules_route.ts | 99 ++++++----- .../routes/rules/find_rules_status_route.ts | 3 +- .../get_prepackaged_rule_status_route.test.ts | 22 --- .../get_prepackaged_rules_status_route.ts | 5 +- .../routes/rules/import_rules_route.ts | 9 +- .../routes/rules/read_rules_route.test.ts | 18 -- .../routes/rules/read_rules_route.ts | 3 +- .../routes/rules/update_rules_bulk.test.ts | 18 -- .../routes/rules/update_rules_bulk_route.ts | 9 +- .../routes/rules/update_rules_route.test.ts | 18 -- .../routes/rules/update_rules_route.ts | 167 +++++++++--------- .../routes/tags/read_tags_route.ts | 4 +- x-pack/legacy/plugins/siem/server/types.ts | 2 + 27 files changed, 288 insertions(+), 485 deletions(-) diff --git a/x-pack/legacy/plugins/siem/index.ts b/x-pack/legacy/plugins/siem/index.ts index f6f2ead2d64fac..cd9b7f59226b0b 100644 --- a/x-pack/legacy/plugins/siem/index.ts +++ b/x-pack/legacy/plugins/siem/index.ts @@ -153,11 +153,11 @@ export const siem = (kibana: any) => { const { config, newPlatform, plugins, route } = server; const { coreContext, env, setup } = newPlatform; const initializerContext = { ...coreContext, env } as PluginInitializerContext; - const serverFacade = { config, plugins: { alerting: plugins.alerting, + actions: newPlatform.start.plugins.actions, elasticsearch: plugins.elasticsearch, spaces: plugins.spaces, savedObjects: server.savedObjects.SavedObjectsClient, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/_mock_server.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/_mock_server.ts index ed194188a54040..4bf7b3279374b8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/_mock_server.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/_mock_server.ts @@ -59,9 +59,12 @@ export const createMockServer = (config: Record = defaultConfig) }; server.decorate('request', 'getAlertsClient', () => alertsClient); server.decorate('request', 'getBasePath', () => '/s/default'); - server.decorate('request', 'getActionsClient', () => actionsClient); server.plugins.elasticsearch = (elasticsearch as unknown) as ElasticsearchPlugin; server.plugins.spaces = { getSpaceId: () => 'default' }; + server.plugins.actions = { + getActionsClientWithRequest: () => actionsClient, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any; // The types have really bad conflicts at the moment so I have to use any server.decorate('request', 'getSavedObjectsClient', () => savedObjectsClient); return { server: server as ServerFacade & Hapi.Server, @@ -79,11 +82,16 @@ export const createMockServerWithoutAlertClientDecoration = ( port: 0, }); + const savedObjectsClient = savedObjectsClientMock.create(); serverWithoutAlertClient.config = () => createMockKibanaConfig(config); + serverWithoutAlertClient.decorate('request', 'getSavedObjectsClient', () => savedObjectsClient); + serverWithoutAlertClient.plugins.actions = { + getActionsClientWithRequest: () => actionsClient, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any; // The types have really bad conflicts at the moment so I have to use any const actionsClient = actionsClientMock.create(); serverWithoutAlertClient.decorate('request', 'getBasePath', () => '/s/default'); - serverWithoutAlertClient.decorate('request', 'getActionsClient', () => actionsClient); return { serverWithoutAlertClient: serverWithoutAlertClient as ServerFacade & Hapi.Server, @@ -91,40 +99,6 @@ export const createMockServerWithoutAlertClientDecoration = ( }; }; -export const createMockServerWithoutActionClientDecoration = ( - config: Record = defaultConfig -) => { - const serverWithoutActionClient = new Hapi.Server({ - port: 0, - }); - - serverWithoutActionClient.config = () => createMockKibanaConfig(config); - - const alertsClient = alertsClientMock.create(); - serverWithoutActionClient.decorate('request', 'getBasePath', () => '/s/default'); - serverWithoutActionClient.decorate('request', 'getAlertsClient', () => alertsClient); - - return { - serverWithoutActionClient: serverWithoutActionClient as ServerFacade & Hapi.Server, - alertsClient, - }; -}; - -export const createMockServerWithoutActionOrAlertClientDecoration = ( - config: Record = defaultConfig -) => { - const serverWithoutActionOrAlertClient = new Hapi.Server({ - port: 0, - }); - - serverWithoutActionOrAlertClient.config = () => createMockKibanaConfig(config); - - return { - serverWithoutActionOrAlertClient: serverWithoutActionOrAlertClient as ServerFacade & - Hapi.Server, - }; -}; - export const getMockIndexName = () => jest.fn().mockImplementation(() => ({ callWithRequest: jest.fn().mockImplementationOnce(() => 'index-name'), diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts index a99893433ea8df..4b04cb257d4ac5 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts @@ -6,9 +6,7 @@ import { createMockServer, - createMockServerWithoutActionClientDecoration, createMockServerWithoutAlertClientDecoration, - createMockServerWithoutActionOrAlertClientDecoration, getMockEmptyIndex, getMockNonEmptyIndex, } from '../__mocks__/_mock_server'; @@ -67,30 +65,12 @@ describe('add_prepackaged_rules_route', () => { expect(statusCode).toBe(200); }); - test('returns 404 if actionClient is not available on the route', async () => { - const { serverWithoutActionClient } = createMockServerWithoutActionClientDecoration(); - createRulesRoute(serverWithoutActionClient); - const { statusCode } = await serverWithoutActionClient.inject(addPrepackagedRulesRequest()); - expect(statusCode).toBe(404); - }); - test('returns 404 if alertClient is not available on the route', async () => { const { serverWithoutAlertClient } = createMockServerWithoutAlertClientDecoration(); createRulesRoute(serverWithoutAlertClient); const { statusCode } = await serverWithoutAlertClient.inject(addPrepackagedRulesRequest()); expect(statusCode).toBe(404); }); - - test('returns 404 if alertClient and actionClient are both not available on the route', async () => { - const { - serverWithoutActionOrAlertClient, - } = createMockServerWithoutActionOrAlertClientDecoration(); - createRulesRoute(serverWithoutActionOrAlertClient); - const { statusCode } = await serverWithoutActionOrAlertClient.inject( - addPrepackagedRulesRequest() - ); - expect(statusCode).toBe(404); - }); }); describe('validation', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts index 3e2337f2bb5a5b..28af530272bc77 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts @@ -18,6 +18,7 @@ import { updatePrepackagedRules } from '../../rules/update_prepacked_rules'; import { getRulesToInstall } from '../../rules/get_rules_to_install'; import { getRulesToUpdate } from '../../rules/get_rules_to_update'; import { getExistingPrepackagedRules } from '../../rules/get_existing_prepackaged_rules'; +import { KibanaRequest } from '../../../../../../../../../src/core/server'; export const createAddPrepackedRulesRoute = (server: ServerFacade): Hapi.ServerRoute => { return { @@ -33,13 +34,13 @@ export const createAddPrepackedRulesRoute = (server: ServerFacade): Hapi.ServerR }, async handler(request: RequestFacade, headers) { const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) - ? request.getActionsClient() - : null; + const actionsClient = await server.plugins.actions.getActionsClientWithRequest( + KibanaRequest.from((request as unknown) as Hapi.Request) + ); const savedObjectsClient = isFunction(request.getSavedObjectsClient) ? request.getSavedObjectsClient() : null; - if (!alertsClient || !actionsClient || !savedObjectsClient) { + if (!alertsClient || !savedObjectsClient) { return headers.response().code(404); } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts index 0931e941f8e464..5cf6d8955d8b2a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.test.ts @@ -6,9 +6,7 @@ import { createMockServer, - createMockServerWithoutActionClientDecoration, createMockServerWithoutAlertClientDecoration, - createMockServerWithoutActionOrAlertClientDecoration, getMockEmptyIndex, } from '../__mocks__/_mock_server'; import { createRulesRoute } from './create_rules_route'; @@ -42,28 +40,12 @@ describe('create_rules_bulk', () => { expect(statusCode).toBe(200); }); - test('returns 404 if actionClient is not available on the route', async () => { - const { serverWithoutActionClient } = createMockServerWithoutActionClientDecoration(); - createRulesRoute(serverWithoutActionClient); - const { statusCode } = await serverWithoutActionClient.inject(getReadBulkRequest()); - expect(statusCode).toBe(404); - }); - test('returns 404 if alertClient is not available on the route', async () => { const { serverWithoutAlertClient } = createMockServerWithoutAlertClientDecoration(); createRulesRoute(serverWithoutAlertClient); const { statusCode } = await serverWithoutAlertClient.inject(getReadBulkRequest()); expect(statusCode).toBe(404); }); - - test('returns 404 if alertClient and actionClient are both not available on the route', async () => { - const { - serverWithoutActionOrAlertClient, - } = createMockServerWithoutActionOrAlertClientDecoration(); - createRulesRoute(serverWithoutActionOrAlertClient); - const { statusCode } = await serverWithoutActionOrAlertClient.inject(getReadBulkRequest()); - expect(statusCode).toBe(404); - }); }); describe('validation', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts index 1fe73f5ba196f1..0c98507bc6fa8d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts @@ -21,6 +21,7 @@ import { createBulkErrorObject, } from '../utils'; import { createRulesBulkSchema } from '../schemas/create_rules_bulk_schema'; +import { KibanaRequest } from '../../../../../../../../../src/core/server'; export const createCreateRulesBulkRoute = (server: ServerFacade): Hapi.ServerRoute => { return { @@ -37,13 +38,13 @@ export const createCreateRulesBulkRoute = (server: ServerFacade): Hapi.ServerRou }, async handler(request: BulkRulesRequest, headers) { const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) - ? request.getActionsClient() - : null; + const actionsClient = await server.plugins.actions.getActionsClientWithRequest( + KibanaRequest.from((request as unknown) as Hapi.Request) + ); const savedObjectsClient = isFunction(request.getSavedObjectsClient) ? request.getSavedObjectsClient() : null; - if (!alertsClient || !actionsClient || !savedObjectsClient) { + if (!alertsClient || !savedObjectsClient) { return headers.response().code(404); } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts index 77c6f6f3b4840d..27575fb264f7b4 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.test.ts @@ -6,9 +6,7 @@ import { createMockServer, - createMockServerWithoutActionClientDecoration, createMockServerWithoutAlertClientDecoration, - createMockServerWithoutActionOrAlertClientDecoration, getMockNonEmptyIndex, getMockEmptyIndex, } from '../__mocks__/_mock_server'; @@ -58,28 +56,12 @@ describe('create_rules', () => { expect(statusCode).toBe(200); }); - test('returns 404 if actionClient is not available on the route', async () => { - const { serverWithoutActionClient } = createMockServerWithoutActionClientDecoration(); - createRulesRoute(serverWithoutActionClient); - const { statusCode } = await serverWithoutActionClient.inject(getCreateRequest()); - expect(statusCode).toBe(404); - }); - test('returns 404 if alertClient is not available on the route', async () => { const { serverWithoutAlertClient } = createMockServerWithoutAlertClientDecoration(); createRulesRoute(serverWithoutAlertClient); const { statusCode } = await serverWithoutAlertClient.inject(getCreateRequest()); expect(statusCode).toBe(404); }); - - test('returns 404 if alertClient and actionClient are both not available on the route', async () => { - const { - serverWithoutActionOrAlertClient, - } = createMockServerWithoutActionOrAlertClientDecoration(); - createRulesRoute(serverWithoutActionOrAlertClient); - const { statusCode } = await serverWithoutActionOrAlertClient.inject(getCreateRequest()); - expect(statusCode).toBe(404); - }); }); describe('validation', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts index 23acd12d341ed8..4480186d9a7a65 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts @@ -18,6 +18,7 @@ import { ruleStatusSavedObjectType } from '../../rules/saved_object_mappings'; import { transformOrError } from './utils'; import { getIndexExists } from '../../index/get_index_exists'; import { callWithRequestFactory, getIndex, transformError } from '../utils'; +import { KibanaRequest } from '../../../../../../../../../src/core/server'; export const createCreateRulesRoute = (server: ServerFacade): Hapi.ServerRoute => { return { @@ -62,13 +63,13 @@ export const createCreateRulesRoute = (server: ServerFacade): Hapi.ServerRoute = references, } = request.payload; const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) - ? request.getActionsClient() - : null; + const actionsClient = await server.plugins.actions.getActionsClientWithRequest( + KibanaRequest.from((request as unknown) as Hapi.Request) + ); const savedObjectsClient = isFunction(request.getSavedObjectsClient) ? request.getSavedObjectsClient() : null; - if (!alertsClient || !actionsClient || !savedObjectsClient) { + if (!alertsClient || !savedObjectsClient) { return headers.response().code(404); } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts index 7b8496b2fe7251..e66fc765c08bf5 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.test.ts @@ -6,9 +6,7 @@ import { createMockServer, - createMockServerWithoutActionClientDecoration, createMockServerWithoutAlertClientDecoration, - createMockServerWithoutActionOrAlertClientDecoration, } from '../__mocks__/_mock_server'; import { ServerInjectOptions } from 'hapi'; @@ -97,28 +95,12 @@ describe('delete_rules', () => { expect(parsed).toEqual(expected); }); - test('returns 404 if actionClient is not available on the route', async () => { - const { serverWithoutActionClient } = createMockServerWithoutActionClientDecoration(); - deleteRulesBulkRoute(serverWithoutActionClient); - const { statusCode } = await serverWithoutActionClient.inject(getDeleteBulkRequest()); - expect(statusCode).toBe(404); - }); - test('returns 404 if alertClient is not available on the route', async () => { const { serverWithoutAlertClient } = createMockServerWithoutAlertClientDecoration(); deleteRulesBulkRoute(serverWithoutAlertClient); const { statusCode } = await serverWithoutAlertClient.inject(getDeleteBulkRequest()); expect(statusCode).toBe(404); }); - - test('returns 404 if alertClient and actionClient are both not available on the route', async () => { - const { - serverWithoutActionOrAlertClient, - } = createMockServerWithoutActionOrAlertClientDecoration(); - deleteRulesBulkRoute(serverWithoutActionOrAlertClient); - const { statusCode } = await serverWithoutActionOrAlertClient.inject(getDeleteBulkRequest()); - expect(statusCode).toBe(404); - }); }); describe('validation', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts index b77ae56a486c87..c2b5576c091835 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts @@ -15,64 +15,69 @@ import { transformOrBulkError, getIdBulkError } from './utils'; import { transformBulkError } from '../utils'; import { QueryBulkRequest, IRuleSavedAttributesSavedObjectAttributes } from '../../rules/types'; import { ruleStatusSavedObjectType } from '../../rules/saved_object_mappings'; +import { KibanaRequest } from '../../../../../../../../../src/core/server'; -export const createDeleteRulesBulkRoute: Hapi.ServerRoute = { - method: ['POST', 'DELETE'], // allow both POST and DELETE in case their client does not support bodies in DELETE - path: `${DETECTION_ENGINE_RULES_URL}/_bulk_delete`, - options: { - tags: ['access:siem'], - validate: { - options: { - abortEarly: false, +export const createDeleteRulesBulkRoute = (server: ServerFacade): Hapi.ServerRoute => { + return { + method: ['POST', 'DELETE'], // allow both POST and DELETE in case their client does not support bodies in DELETE + path: `${DETECTION_ENGINE_RULES_URL}/_bulk_delete`, + options: { + tags: ['access:siem'], + validate: { + options: { + abortEarly: false, + }, + payload: queryRulesBulkSchema, }, - payload: queryRulesBulkSchema, }, - }, - async handler(request: QueryBulkRequest, headers) { - const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) ? request.getActionsClient() : null; - const savedObjectsClient = isFunction(request.getSavedObjectsClient) - ? request.getSavedObjectsClient() - : null; - if (!alertsClient || !actionsClient || !savedObjectsClient) { - return headers.response().code(404); - } - const rules = Promise.all( - request.payload.map(async payloadRule => { - const { id, rule_id: ruleId } = payloadRule; - const idOrRuleIdOrUnknown = id ?? ruleId ?? '(unknown id)'; - try { - const rule = await deleteRules({ - actionsClient, - alertsClient, - id, - ruleId, - }); - if (rule != null) { - const ruleStatuses = await savedObjectsClient.find< - IRuleSavedAttributesSavedObjectAttributes - >({ - type: ruleStatusSavedObjectType, - perPage: 6, - search: rule.id, - searchFields: ['alertId'], + async handler(request: QueryBulkRequest, headers) { + const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; + const actionsClient = await server.plugins.actions.getActionsClientWithRequest( + KibanaRequest.from((request as unknown) as Hapi.Request) + ); + const savedObjectsClient = isFunction(request.getSavedObjectsClient) + ? request.getSavedObjectsClient() + : null; + if (!alertsClient || !savedObjectsClient) { + return headers.response().code(404); + } + const rules = Promise.all( + request.payload.map(async payloadRule => { + const { id, rule_id: ruleId } = payloadRule; + const idOrRuleIdOrUnknown = id ?? ruleId ?? '(unknown id)'; + try { + const rule = await deleteRules({ + actionsClient, + alertsClient, + id, + ruleId, }); - ruleStatuses.saved_objects.forEach(async obj => - savedObjectsClient.delete(ruleStatusSavedObjectType, obj.id) - ); - return transformOrBulkError(idOrRuleIdOrUnknown, rule); - } else { - return getIdBulkError({ id, ruleId }); + if (rule != null) { + const ruleStatuses = await savedObjectsClient.find< + IRuleSavedAttributesSavedObjectAttributes + >({ + type: ruleStatusSavedObjectType, + perPage: 6, + search: rule.id, + searchFields: ['alertId'], + }); + ruleStatuses.saved_objects.forEach(async obj => + savedObjectsClient.delete(ruleStatusSavedObjectType, obj.id) + ); + return transformOrBulkError(idOrRuleIdOrUnknown, rule); + } else { + return getIdBulkError({ id, ruleId }); + } + } catch (err) { + return transformBulkError(idOrRuleIdOrUnknown, err); } - } catch (err) { - return transformBulkError(idOrRuleIdOrUnknown, err); - } - }) - ); - return rules; - }, + }) + ); + return rules; + }, + }; }; export const deleteRulesBulkRoute = (server: ServerFacade): void => { - server.route(createDeleteRulesBulkRoute); + server.route(createDeleteRulesBulkRoute(server)); }; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts index 2854312246c5f1..0aa60d3bbd9229 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.test.ts @@ -6,9 +6,7 @@ import { createMockServer, - createMockServerWithoutActionClientDecoration, createMockServerWithoutAlertClientDecoration, - createMockServerWithoutActionOrAlertClientDecoration, } from '../__mocks__/_mock_server'; import { deleteRulesRoute } from './delete_rules_route'; @@ -67,28 +65,12 @@ describe('delete_rules', () => { expect(statusCode).toBe(404); }); - test('returns 404 if actionClient is not available on the route', async () => { - const { serverWithoutActionClient } = createMockServerWithoutActionClientDecoration(); - deleteRulesRoute(serverWithoutActionClient); - const { statusCode } = await serverWithoutActionClient.inject(getDeleteRequest()); - expect(statusCode).toBe(404); - }); - test('returns 404 if alertClient is not available on the route', async () => { const { serverWithoutAlertClient } = createMockServerWithoutAlertClientDecoration(); deleteRulesRoute(serverWithoutAlertClient); const { statusCode } = await serverWithoutAlertClient.inject(getDeleteRequest()); expect(statusCode).toBe(404); }); - - test('returns 404 if alertClient and actionClient are both not available on the route', async () => { - const { - serverWithoutActionOrAlertClient, - } = createMockServerWithoutActionOrAlertClientDecoration(); - deleteRulesRoute(serverWithoutActionOrAlertClient); - const { statusCode } = await serverWithoutActionOrAlertClient.inject(getDeleteRequest()); - expect(statusCode).toBe(404); - }); }); describe('validation', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts index ea8b54a79a5e3c..33f181cfbb5a5c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/delete_rules_route.ts @@ -15,59 +15,64 @@ import { getIdError, transformOrError } from './utils'; import { transformError } from '../utils'; import { QueryRequest, IRuleSavedAttributesSavedObjectAttributes } from '../../rules/types'; import { ruleStatusSavedObjectType } from '../../rules/saved_object_mappings'; +import { KibanaRequest } from '../../../../../../../../../src/core/server'; -export const createDeleteRulesRoute: Hapi.ServerRoute = { - method: 'DELETE', - path: DETECTION_ENGINE_RULES_URL, - options: { - tags: ['access:siem'], - validate: { - options: { - abortEarly: false, +export const createDeleteRulesRoute = (server: ServerFacade): Hapi.ServerRoute => { + return { + method: 'DELETE', + path: DETECTION_ENGINE_RULES_URL, + options: { + tags: ['access:siem'], + validate: { + options: { + abortEarly: false, + }, + query: queryRulesSchema, }, - query: queryRulesSchema, }, - }, - async handler(request: QueryRequest, headers) { - const { id, rule_id: ruleId } = request.query; - const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) ? request.getActionsClient() : null; - const savedObjectsClient = isFunction(request.getSavedObjectsClient) - ? request.getSavedObjectsClient() - : null; - if (!alertsClient || !actionsClient || !savedObjectsClient) { - return headers.response().code(404); - } + async handler(request: QueryRequest, headers) { + const { id, rule_id: ruleId } = request.query; + const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; + const actionsClient = await server.plugins.actions.getActionsClientWithRequest( + KibanaRequest.from((request as unknown) as Hapi.Request) + ); + const savedObjectsClient = isFunction(request.getSavedObjectsClient) + ? request.getSavedObjectsClient() + : null; + if (!alertsClient || !savedObjectsClient) { + return headers.response().code(404); + } - try { - const rule = await deleteRules({ - actionsClient, - alertsClient, - id, - ruleId, - }); - if (rule != null) { - const ruleStatuses = await savedObjectsClient.find< - IRuleSavedAttributesSavedObjectAttributes - >({ - type: ruleStatusSavedObjectType, - perPage: 6, - search: rule.id, - searchFields: ['alertId'], + try { + const rule = await deleteRules({ + actionsClient, + alertsClient, + id, + ruleId, }); - ruleStatuses.saved_objects.forEach(async obj => - savedObjectsClient.delete(ruleStatusSavedObjectType, obj.id) - ); - return transformOrError(rule, ruleStatuses.saved_objects[0]); - } else { - return getIdError({ id, ruleId }); + if (rule != null) { + const ruleStatuses = await savedObjectsClient.find< + IRuleSavedAttributesSavedObjectAttributes + >({ + type: ruleStatusSavedObjectType, + perPage: 6, + search: rule.id, + searchFields: ['alertId'], + }); + ruleStatuses.saved_objects.forEach(async obj => + savedObjectsClient.delete(ruleStatusSavedObjectType, obj.id) + ); + return transformOrError(rule, ruleStatuses.saved_objects[0]); + } else { + return getIdError({ id, ruleId }); + } + } catch (err) { + return transformError(err); } - } catch (err) { - return transformError(err); - } - }, + }, + }; }; export const deleteRulesRoute = (server: ServerFacade): void => { - server.route(createDeleteRulesRoute); + server.route(createDeleteRulesRoute(server)); }; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts index aa17946849027c..b9ff2e60186242 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts @@ -31,11 +31,8 @@ export const createExportRulesRoute = (server: ServerFacade): Hapi.ServerRoute = }, async handler(request: ExportRulesRequest, headers) { const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) - ? request.getActionsClient() - : null; - if (!alertsClient || !actionsClient) { + if (!alertsClient) { return headers.response().code(404); } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts index 0aab02281a5364..62c9f44da1e332 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.test.ts @@ -6,9 +6,7 @@ import { createMockServer, - createMockServerWithoutActionClientDecoration, createMockServerWithoutAlertClientDecoration, - createMockServerWithoutActionOrAlertClientDecoration, } from '../__mocks__/_mock_server'; import { findRulesRoute } from './find_rules_route'; @@ -43,28 +41,12 @@ describe('find_rules', () => { expect(statusCode).toBe(200); }); - test('returns 404 if actionClient is not available on the route', async () => { - const { serverWithoutActionClient } = createMockServerWithoutActionClientDecoration(); - findRulesRoute(serverWithoutActionClient); - const { statusCode } = await serverWithoutActionClient.inject(getFindRequest()); - expect(statusCode).toBe(404); - }); - test('returns 404 if alertClient is not available on the route', async () => { const { serverWithoutAlertClient } = createMockServerWithoutAlertClientDecoration(); findRulesRoute(serverWithoutAlertClient); const { statusCode } = await serverWithoutAlertClient.inject(getFindRequest()); expect(statusCode).toBe(404); }); - - test('returns 404 if alertClient and actionClient are both not available on the route', async () => { - const { - serverWithoutActionOrAlertClient, - } = createMockServerWithoutActionOrAlertClientDecoration(); - findRulesRoute(serverWithoutActionOrAlertClient); - const { statusCode } = await serverWithoutActionOrAlertClient.inject(getFindRequest()); - expect(statusCode).toBe(404); - }); }); describe('validation', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts index 6cbc794751f9fb..5b12703590407c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_route.ts @@ -15,58 +15,61 @@ import { transformFindAlertsOrError } from './utils'; import { transformError } from '../utils'; import { ruleStatusSavedObjectType } from '../../rules/saved_object_mappings'; -export const createFindRulesRoute: Hapi.ServerRoute = { - method: 'GET', - path: `${DETECTION_ENGINE_RULES_URL}/_find`, - options: { - tags: ['access:siem'], - validate: { - options: { - abortEarly: false, +export const createFindRulesRoute = (): Hapi.ServerRoute => { + return { + method: 'GET', + path: `${DETECTION_ENGINE_RULES_URL}/_find`, + options: { + tags: ['access:siem'], + validate: { + options: { + abortEarly: false, + }, + query: findRulesSchema, }, - query: findRulesSchema, }, - }, - async handler(request: FindRulesRequest, headers) { - const { query } = request; - const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) ? request.getActionsClient() : null; - const savedObjectsClient = isFunction(request.getSavedObjectsClient) - ? request.getSavedObjectsClient() - : null; - if (!alertsClient || !actionsClient || !savedObjectsClient) { - return headers.response().code(404); - } + async handler(request: FindRulesRequest, headers) { + const { query } = request; + const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; + const savedObjectsClient = isFunction(request.getSavedObjectsClient) + ? request.getSavedObjectsClient() + : null; + if (!alertsClient || !savedObjectsClient) { + return headers.response().code(404); + } - try { - const rules = await findRules({ - alertsClient, - perPage: query.per_page, - page: query.page, - sortField: query.sort_field, - sortOrder: query.sort_order, - filter: query.filter, - }); - const ruleStatuses = await Promise.all( - rules.data.map(async rule => { - const results = await savedObjectsClient.find({ - type: ruleStatusSavedObjectType, - perPage: 1, - sortField: 'statusDate', - sortOrder: 'desc', - search: rule.id, - searchFields: ['alertId'], - }); - return results; - }) - ); - return transformFindAlertsOrError(rules, ruleStatuses); - } catch (err) { - return transformError(err); - } - }, + try { + const rules = await findRules({ + alertsClient, + perPage: query.per_page, + page: query.page, + sortField: query.sort_field, + sortOrder: query.sort_order, + filter: query.filter, + }); + const ruleStatuses = await Promise.all( + rules.data.map(async rule => { + const results = await savedObjectsClient.find< + IRuleSavedAttributesSavedObjectAttributes + >({ + type: ruleStatusSavedObjectType, + perPage: 1, + sortField: 'statusDate', + sortOrder: 'desc', + search: rule.id, + searchFields: ['alertId'], + }); + return results; + }) + ); + return transformFindAlertsOrError(rules, ruleStatuses); + } catch (err) { + return transformError(err); + } + }, + }; }; export const findRulesRoute = (server: ServerFacade) => { - server.route(createFindRulesRoute); + server.route(createFindRulesRoute()); }; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts index 545c2e488b1c8b..8b3113a044b5ac 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/find_rules_status_route.ts @@ -44,11 +44,10 @@ export const createFindRulesStatusRoute: Hapi.ServerRoute = { async handler(request: FindRulesStatusesRequest, headers) { const { query } = request; const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) ? request.getActionsClient() : null; const savedObjectsClient = isFunction(request.getSavedObjectsClient) ? request.getSavedObjectsClient() : null; - if (!alertsClient || !actionsClient || !savedObjectsClient) { + if (!alertsClient || !savedObjectsClient) { return headers.response().code(404); } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rule_status_route.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rule_status_route.test.ts index f07d6a9fc65a6f..67680a8f86eec2 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rule_status_route.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rule_status_route.test.ts @@ -6,9 +6,7 @@ import { createMockServer, - createMockServerWithoutActionClientDecoration, createMockServerWithoutAlertClientDecoration, - createMockServerWithoutActionOrAlertClientDecoration, getMockNonEmptyIndex, } from '../__mocks__/_mock_server'; import { createRulesRoute } from './create_rules_route'; @@ -65,15 +63,6 @@ describe('get_prepackaged_rule_status_route', () => { expect(statusCode).toBe(200); }); - test('returns 404 if actionClient is not available on the route', async () => { - const { serverWithoutActionClient } = createMockServerWithoutActionClientDecoration(); - createRulesRoute(serverWithoutActionClient); - const { statusCode } = await serverWithoutActionClient.inject( - getPrepackagedRulesStatusRequest() - ); - expect(statusCode).toBe(404); - }); - test('returns 404 if alertClient is not available on the route', async () => { const { serverWithoutAlertClient } = createMockServerWithoutAlertClientDecoration(); createRulesRoute(serverWithoutAlertClient); @@ -82,17 +71,6 @@ describe('get_prepackaged_rule_status_route', () => { ); expect(statusCode).toBe(404); }); - - test('returns 404 if alertClient and actionClient are both not available on the route', async () => { - const { - serverWithoutActionOrAlertClient, - } = createMockServerWithoutActionOrAlertClientDecoration(); - createRulesRoute(serverWithoutActionOrAlertClient); - const { statusCode } = await serverWithoutActionOrAlertClient.inject( - getPrepackagedRulesStatusRequest() - ); - expect(statusCode).toBe(404); - }); }); describe('payload', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts index 99e29242bced07..0208a209c5eaef 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts @@ -29,11 +29,8 @@ export const createGetPrepackagedRulesStatusRoute = (): Hapi.ServerRoute => { }, async handler(request: RequestFacade, headers) { const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) - ? request.getActionsClient() - : null; - if (!alertsClient || !actionsClient) { + if (!alertsClient) { return headers.response().code(404); } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts index 6efaa1fea60d08..0dfdee2d713756 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts @@ -27,6 +27,7 @@ import { ImportRuleAlertRest } from '../../types'; import { transformOrImportError } from './utils'; import { updateRules } from '../../rules/update_rules'; import { importRulesQuerySchema, importRulesPayloadSchema } from '../schemas/import_rules_schema'; +import { KibanaRequest } from '../../../../../../../../../src/core/server'; export const createImportRulesRoute = (server: ServerFacade): Hapi.ServerRoute => { return { @@ -49,13 +50,13 @@ export const createImportRulesRoute = (server: ServerFacade): Hapi.ServerRoute = }, async handler(request: ImportRulesRequest, headers) { const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) - ? request.getActionsClient() - : null; + const actionsClient = await server.plugins.actions.getActionsClientWithRequest( + KibanaRequest.from((request as unknown) as Hapi.Request) + ); const savedObjectsClient = isFunction(request.getSavedObjectsClient) ? request.getSavedObjectsClient() : null; - if (!alertsClient || !actionsClient || !savedObjectsClient) { + if (!alertsClient || !savedObjectsClient) { return headers.response().code(404); } const { filename } = request.payload.file.hapi; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts index 4190225bea1f1e..000cd29af8ba9c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.test.ts @@ -6,9 +6,7 @@ import { createMockServer, - createMockServerWithoutActionClientDecoration, createMockServerWithoutAlertClientDecoration, - createMockServerWithoutActionOrAlertClientDecoration, } from '../__mocks__/_mock_server'; import { readRulesRoute } from './read_rules_route'; @@ -44,28 +42,12 @@ describe('read_signals', () => { expect(statusCode).toBe(200); }); - test('returns 404 if actionClient is not available on the route', async () => { - const { serverWithoutActionClient } = createMockServerWithoutActionClientDecoration(); - readRulesRoute(serverWithoutActionClient); - const { statusCode } = await serverWithoutActionClient.inject(getReadRequest()); - expect(statusCode).toBe(404); - }); - test('returns 404 if alertClient is not available on the route', async () => { const { serverWithoutAlertClient } = createMockServerWithoutAlertClientDecoration(); readRulesRoute(serverWithoutAlertClient); const { statusCode } = await serverWithoutAlertClient.inject(getReadRequest()); expect(statusCode).toBe(404); }); - - test('returns 404 if alertClient and actionClient are both not available on the route', async () => { - const { - serverWithoutActionOrAlertClient, - } = createMockServerWithoutActionOrAlertClientDecoration(); - readRulesRoute(serverWithoutActionOrAlertClient); - const { statusCode } = await serverWithoutActionOrAlertClient.inject(getReadRequest()); - expect(statusCode).toBe(404); - }); }); describe('validation', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts index 25d8e6770f6999..55fecdc14f7558 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/read_rules_route.ts @@ -31,11 +31,10 @@ export const createReadRulesRoute: Hapi.ServerRoute = { async handler(request: QueryRequest, headers) { const { id, rule_id: ruleId } = request.query; const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) ? request.getActionsClient() : null; const savedObjectsClient = isFunction(request.getSavedObjectsClient) ? request.getSavedObjectsClient() : null; - if (!alertsClient || !actionsClient || !savedObjectsClient) { + if (!alertsClient || !savedObjectsClient) { return headers.response().code(404); } try { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk.test.ts index cc41800671d7d1..81b6444f386031 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk.test.ts @@ -6,9 +6,7 @@ import { createMockServer, - createMockServerWithoutActionClientDecoration, createMockServerWithoutAlertClientDecoration, - createMockServerWithoutActionOrAlertClientDecoration, } from '../__mocks__/_mock_server'; import { updateRulesRoute } from './update_rules_route'; @@ -70,28 +68,12 @@ describe('update_rules_bulk', () => { expect(parsed).toEqual(expected); }); - test('returns 404 if actionClient is not available on the route', async () => { - const { serverWithoutActionClient } = createMockServerWithoutActionClientDecoration(); - updateRulesRoute(serverWithoutActionClient); - const { statusCode } = await serverWithoutActionClient.inject(getUpdateBulkRequest()); - expect(statusCode).toBe(404); - }); - test('returns 404 if alertClient is not available on the route', async () => { const { serverWithoutAlertClient } = createMockServerWithoutAlertClientDecoration(); updateRulesRoute(serverWithoutAlertClient); const { statusCode } = await serverWithoutAlertClient.inject(getUpdateBulkRequest()); expect(statusCode).toBe(404); }); - - test('returns 404 if alertClient and actionClient are both not available on the route', async () => { - const { - serverWithoutActionOrAlertClient, - } = createMockServerWithoutActionOrAlertClientDecoration(); - updateRulesRoute(serverWithoutActionOrAlertClient); - const { statusCode } = await serverWithoutActionOrAlertClient.inject(getUpdateBulkRequest()); - expect(statusCode).toBe(404); - }); }); describe('validation', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts index e0d2672cf356a5..cf98043529bc03 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts @@ -17,6 +17,7 @@ import { transformBulkError } from '../utils'; import { updateRulesBulkSchema } from '../schemas/update_rules_bulk_schema'; import { updateRules } from '../../rules/update_rules'; import { ruleStatusSavedObjectType } from '../../rules/saved_object_mappings'; +import { KibanaRequest } from '../../../../../../../../../src/core/server'; export const createUpdateRulesBulkRoute = (server: ServerFacade): Hapi.ServerRoute => { return { @@ -33,13 +34,13 @@ export const createUpdateRulesBulkRoute = (server: ServerFacade): Hapi.ServerRou }, async handler(request: BulkUpdateRulesRequest, headers) { const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) - ? request.getActionsClient() - : null; + const actionsClient = await server.plugins.actions.getActionsClientWithRequest( + KibanaRequest.from((request as unknown) as Hapi.Request) + ); const savedObjectsClient = isFunction(request.getSavedObjectsClient) ? request.getSavedObjectsClient() : null; - if (!alertsClient || !actionsClient || !savedObjectsClient) { + if (!alertsClient || !savedObjectsClient) { return headers.response().code(404); } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts index a7e8f1b1c0a7e5..c4f10d7a203271 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.test.ts @@ -6,9 +6,7 @@ import { createMockServer, - createMockServerWithoutActionClientDecoration, createMockServerWithoutAlertClientDecoration, - createMockServerWithoutActionOrAlertClientDecoration, } from '../__mocks__/_mock_server'; import { updateRulesRoute } from './update_rules_route'; @@ -55,28 +53,12 @@ describe('update_rules', () => { expect(statusCode).toBe(404); }); - test('returns 404 if actionClient is not available on the route', async () => { - const { serverWithoutActionClient } = createMockServerWithoutActionClientDecoration(); - updateRulesRoute(serverWithoutActionClient); - const { statusCode } = await serverWithoutActionClient.inject(getUpdateRequest()); - expect(statusCode).toBe(404); - }); - test('returns 404 if alertClient is not available on the route', async () => { const { serverWithoutAlertClient } = createMockServerWithoutAlertClientDecoration(); updateRulesRoute(serverWithoutAlertClient); const { statusCode } = await serverWithoutAlertClient.inject(getUpdateRequest()); expect(statusCode).toBe(404); }); - - test('returns 404 if alertClient and actionClient are both not available on the route', async () => { - const { - serverWithoutActionOrAlertClient, - } = createMockServerWithoutActionOrAlertClientDecoration(); - updateRulesRoute(serverWithoutActionOrAlertClient); - const { statusCode } = await serverWithoutActionOrAlertClient.inject(getUpdateRequest()); - expect(statusCode).toBe(404); - }); }); describe('validation', () => { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts index 49c9304ae2d25a..cbb66317186a13 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts @@ -14,81 +14,41 @@ import { ServerFacade } from '../../../../types'; import { getIdError, transformOrError } from './utils'; import { transformError } from '../utils'; import { ruleStatusSavedObjectType } from '../../rules/saved_object_mappings'; +import { KibanaRequest } from '../../../../../../../../../src/core/server'; -export const createUpdateRulesRoute: Hapi.ServerRoute = { - method: 'PUT', - path: DETECTION_ENGINE_RULES_URL, - options: { - tags: ['access:siem'], - validate: { - options: { - abortEarly: false, +export const createUpdateRulesRoute = (server: ServerFacade): Hapi.ServerRoute => { + return { + method: 'PUT', + path: DETECTION_ENGINE_RULES_URL, + options: { + tags: ['access:siem'], + validate: { + options: { + abortEarly: false, + }, + payload: updateRulesSchema, }, - payload: updateRulesSchema, }, - }, - async handler(request: UpdateRulesRequest, headers) { - const { - description, - enabled, - false_positives: falsePositives, - from, - query, - language, - output_index: outputIndex, - saved_id: savedId, - timeline_id: timelineId, - timeline_title: timelineTitle, - meta, - filters, - rule_id: ruleId, - id, - index, - interval, - max_signals: maxSignals, - risk_score: riskScore, - name, - severity, - tags, - to, - type, - threats, - references, - version, - } = request.payload; - - const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) ? request.getActionsClient() : null; - const savedObjectsClient = isFunction(request.getSavedObjectsClient) - ? request.getSavedObjectsClient() - : null; - if (!alertsClient || !actionsClient || !savedObjectsClient) { - return headers.response().code(404); - } - - try { - const rule = await updateRules({ - alertsClient, - actionsClient, + async handler(request: UpdateRulesRequest, headers) { + const { description, enabled, - falsePositives, + false_positives: falsePositives, from, query, language, - outputIndex, - savedId, - savedObjectsClient, - timelineId, - timelineTitle, + output_index: outputIndex, + saved_id: savedId, + timeline_id: timelineId, + timeline_title: timelineTitle, meta, filters, + rule_id: ruleId, id, - ruleId, index, interval, - maxSignals, - riskScore, + max_signals: maxSignals, + risk_score: riskScore, name, severity, tags, @@ -97,28 +57,73 @@ export const createUpdateRulesRoute: Hapi.ServerRoute = { threats, references, version, - }); - if (rule != null) { - const ruleStatuses = await savedObjectsClient.find< - IRuleSavedAttributesSavedObjectAttributes - >({ - type: ruleStatusSavedObjectType, - perPage: 1, - sortField: 'statusDate', - sortOrder: 'desc', - search: rule.id, - searchFields: ['alertId'], + } = request.payload; + + const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; + const actionsClient = await server.plugins.actions.getActionsClientWithRequest( + KibanaRequest.from((request as unknown) as Hapi.Request) + ); + const savedObjectsClient = isFunction(request.getSavedObjectsClient) + ? request.getSavedObjectsClient() + : null; + if (!alertsClient || !savedObjectsClient) { + return headers.response().code(404); + } + + try { + const rule = await updateRules({ + alertsClient, + actionsClient, + description, + enabled, + falsePositives, + from, + query, + language, + outputIndex, + savedId, + savedObjectsClient, + timelineId, + timelineTitle, + meta, + filters, + id, + ruleId, + index, + interval, + maxSignals, + riskScore, + name, + severity, + tags, + to, + type, + threats, + references, + version, }); - return transformOrError(rule, ruleStatuses.saved_objects[0]); - } else { - return getIdError({ id, ruleId }); + if (rule != null) { + const ruleStatuses = await savedObjectsClient.find< + IRuleSavedAttributesSavedObjectAttributes + >({ + type: ruleStatusSavedObjectType, + perPage: 1, + sortField: 'statusDate', + sortOrder: 'desc', + search: rule.id, + searchFields: ['alertId'], + }); + return transformOrError(rule, ruleStatuses.saved_objects[0]); + } else { + return getIdError({ id, ruleId }); + } + } catch (err) { + return transformError(err); } - } catch (err) { - return transformError(err); - } - }, + }, + }; }; export const updateRulesRoute = (server: ServerFacade) => { - server.route(createUpdateRulesRoute); + server.route(createUpdateRulesRoute(server)); }; diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts index beef8b4199c15e..c598e22ff596c5 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/tags/read_tags_route.ts @@ -24,9 +24,7 @@ export const createReadTagsRoute: Hapi.ServerRoute = { }, async handler(request: RequestFacade, headers) { const alertsClient = isFunction(request.getAlertsClient) ? request.getAlertsClient() : null; - const actionsClient = isFunction(request.getActionsClient) ? request.getActionsClient() : null; - - if (!alertsClient || !actionsClient) { + if (!alertsClient) { return headers.response().code(404); } diff --git a/x-pack/legacy/plugins/siem/server/types.ts b/x-pack/legacy/plugins/siem/server/types.ts index bbcfbe7b9c0ec8..3fa2268afe92c3 100644 --- a/x-pack/legacy/plugins/siem/server/types.ts +++ b/x-pack/legacy/plugins/siem/server/types.ts @@ -9,6 +9,8 @@ import { Legacy } from 'kibana'; export interface ServerFacade { config: Legacy.Server['config']; plugins: { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + actions: any; // We have to do this at the moment because the types are not compatible alerting?: Legacy.Server['plugins']['alerting']; elasticsearch: Legacy.Server['plugins']['elasticsearch']; spaces: Legacy.Server['plugins']['spaces']; From 90e3bb0a6292fa383fe78806ba9b68186282d264 Mon Sep 17 00:00:00 2001 From: Garrett Spong Date: Wed, 22 Jan 2020 18:33:34 -0700 Subject: [PATCH 03/72] [SIEM] [Detection Engine] All Rules fixes (#55641) ## Summary This PR addresses bugs outlined in https://github.com/elastic/kibana/issues/54935 Including: * Add Risk Score column * Remove Method column * Fixes `Showing Events` on Alerts table * Fixes Tag overflow * Shows Tags/Filters ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [ ] ~This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~ - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md) - [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~ - [ ] ~[Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~ - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ ### For maintainers - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [ ] ~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ --- .../components/alerts_viewer/alerts_table.tsx | 1 + .../events_viewer/events_viewer.tsx | 16 ++- .../components/timeline/timeline_context.tsx | 2 + .../containers/detection_engine/rules/api.ts | 81 ++++++++++---- .../detection_engine/rules/translations.ts | 7 ++ .../detection_engine/rules/types.ts | 4 +- .../detection_engine/rules/use_rules.tsx | 3 + .../detection_engine/rules/use_tags.tsx | 57 ++++++++++ .../rules/all/__mocks__/mock.ts | 10 +- .../detection_engine/rules/all/columns.tsx | 9 +- .../detection_engine/rules/all/helpers.ts | 8 +- .../detection_engine/rules/all/index.tsx | 65 +++++++---- .../rules_table_filters.tsx | 105 ++++++++++++++++++ .../tags_filter_popover.tsx | 96 ++++++++++++++++ .../detection_engine/rules/translations.ts | 44 ++++++-- .../pages/detection_engine/rules/types.ts | 8 +- 16 files changed, 425 insertions(+), 91 deletions(-) create mode 100644 x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_tags.tsx create mode 100644 x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.tsx create mode 100644 x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx diff --git a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/alerts_table.tsx b/x-pack/legacy/plugins/siem/public/components/alerts_viewer/alerts_table.tsx index 19011019573076..65ade52ef7d3cf 100644 --- a/x-pack/legacy/plugins/siem/public/components/alerts_viewer/alerts_table.tsx +++ b/x-pack/legacy/plugins/siem/public/components/alerts_viewer/alerts_table.tsx @@ -64,6 +64,7 @@ const AlertsTableComponent: React.FC = ({ endDate, startDate, pageFilters documentType: i18n.ALERTS_DOCUMENT_TYPE, footerText: i18n.TOTAL_COUNT_OF_ALERTS, title: i18n.ALERTS_TABLE_TITLE, + unit: i18n.UNIT, }), [] ); diff --git a/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx b/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx index 05a33eeba14349..163b345da40bd8 100644 --- a/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx +++ b/x-pack/legacy/plugins/siem/public/components/events_viewer/events_viewer.tsx @@ -154,20 +154,18 @@ const EventsViewerComponent: React.FC = ({ const totalCountMinusDeleted = totalCount > 0 ? totalCount - deletedEventIds.length : 0; + const subtitle = `${ + i18n.SHOWING + }: ${totalCountMinusDeleted.toLocaleString()} ${timelineTypeContext.unit?.( + totalCountMinusDeleted + ) ?? i18n.UNIT(totalCountMinusDeleted)}`; + // TODO: Reset eventDeletedIds/eventLoadingIds on refresh/loadmore (getUpdatedAt) return ( <> {headerFilterGroup} diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/timeline_context.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/timeline_context.tsx index 611452cc7ccd13..15759c2efff0b5 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/timeline_context.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/timeline_context.tsx @@ -23,6 +23,7 @@ export interface TimelineTypeContextProps { selectAll?: boolean; timelineActions?: TimelineAction[]; title?: string; + unit?: (totalCount: number) => string; } const initTimelineType: TimelineTypeContextProps = { documentType: undefined, @@ -32,6 +33,7 @@ const initTimelineType: TimelineTypeContextProps = { selectAll: false, timelineActions: [], title: undefined, + unit: undefined, }; export const TimelineTypeContext = createContext(initTimelineType); export const useTimelineTypeContext = () => useContext(TimelineTypeContext); diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts index 6c9fd5c0ff3bc7..22fb837ffb8010 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/api.ts @@ -28,6 +28,7 @@ import { DETECTION_ENGINE_PREPACKAGED_URL, DETECTION_ENGINE_RULES_STATUS_URL, DETECTION_ENGINE_PREPACKAGED_RULES_STATUS_URL, + DETECTION_ENGINE_TAGS_URL, } from '../../../../common/constants'; import * as i18n from '../../../pages/detection_engine/rules/translations'; @@ -54,61 +55,72 @@ export const addRule = async ({ rule, signal }: AddRulesProps): Promise }; /** - * Fetches all rules or single specified rule from the Detection Engine API + * Fetches all rules from the Detection Engine API * * @param filterOptions desired filters (e.g. filter/sortField/sortOrder) * @param pagination desired pagination options (e.g. page/perPage) - * @param id if specified, will return specific rule if exists * @param signal to cancel request + * */ export const fetchRules = async ({ filterOptions = { filter: '', - sortField: 'name', + sortField: 'enabled', sortOrder: 'desc', + showCustomRules: false, + showElasticRules: false, + tags: [], }, pagination = { page: 1, perPage: 20, total: 0, }, - id, signal, }: FetchRulesProps): Promise => { + const filters = [ + ...(filterOptions.filter.length !== 0 + ? [`alert.attributes.name:%20${encodeURIComponent(filterOptions.filter)}`] + : []), + ...(filterOptions.showCustomRules + ? ['alert.attributes.tags:%20%22__internal_immutable:false%22'] + : []), + ...(filterOptions.showElasticRules + ? ['alert.attributes.tags:%20%22__internal_immutable:true%22'] + : []), + ...(filterOptions.tags?.map(t => `alert.attributes.tags:${encodeURIComponent(t)}`) ?? []), + ]; + const queryParams = [ `page=${pagination.page}`, `per_page=${pagination.perPage}`, `sort_field=${filterOptions.sortField}`, `sort_order=${filterOptions.sortOrder}`, - ...(filterOptions.filter.length !== 0 - ? [`filter=alert.attributes.name:%20${encodeURIComponent(filterOptions.filter)}`] - : []), + ...(filters.length > 0 ? [`filter=${filters.join('%20AND%20')}`] : []), ]; - const endpoint = - id != null - ? `${chrome.getBasePath()}${DETECTION_ENGINE_RULES_URL}?id="${id}"` - : `${chrome.getBasePath()}${DETECTION_ENGINE_RULES_URL}/_find?${queryParams.join('&')}`; - - const response = await fetch(endpoint, { - method: 'GET', - signal, - }); + const response = await fetch( + `${chrome.getBasePath()}${DETECTION_ENGINE_RULES_URL}/_find?${queryParams.join('&')}`, + { + method: 'GET', + credentials: 'same-origin', + headers: { + 'content-type': 'application/json', + 'kbn-xsrf': 'true', + }, + signal, + } + ); await throwIfNotOk(response); - return id != null - ? { - page: 0, - perPage: 1, - total: 1, - data: response.json(), - } - : response.json(); + return response.json(); }; /** * Fetch a Rule by providing a Rule ID * * @param id Rule ID's (not rule_id) + * @param signal to cancel request + * */ export const fetchRuleById = async ({ id, signal }: FetchRuleProps): Promise => { const response = await fetch(`${chrome.getBasePath()}${DETECTION_ENGINE_RULES_URL}?id=${id}`, { @@ -344,6 +356,27 @@ export const getRuleStatusById = async ({ return response.json(); }; +/** + * Fetch all unique Tags used by Rules + * + * @param signal to cancel request + * + */ +export const fetchTags = async ({ signal }: { signal: AbortSignal }): Promise => { + const response = await fetch(`${chrome.getBasePath()}${DETECTION_ENGINE_TAGS_URL}`, { + method: 'GET', + credentials: 'same-origin', + headers: { + 'content-type': 'application/json', + 'kbn-xsrf': 'true', + }, + signal, + }); + + await throwIfNotOk(response); + return response.json(); +}; + /** * Get pre packaged rules Status * diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/translations.ts b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/translations.ts index a493e471a9bf6f..84e008312fefe6 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/translations.ts +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/translations.ts @@ -30,3 +30,10 @@ export const RULE_PREPACKAGED_SUCCESS = i18n.translate( defaultMessage: 'Installed pre-packaged rules from elastic', } ); + +export const TAG_FETCH_FAILURE = i18n.translate( + 'xpack.siem.containers.detectionEngine.tagFetchFailDescription', + { + defaultMessage: 'Failed to fetch Tags', + } +); diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts index 0dcd0da5be8f61..2e776738547df9 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts @@ -114,7 +114,6 @@ export interface PaginationOptions { export interface FetchRulesProps { pagination?: PaginationOptions; filterOptions?: FilterOptions; - id?: string; signal: AbortSignal; } @@ -122,6 +121,9 @@ export interface FilterOptions { filter: string; sortField: string; sortOrder: 'asc' | 'desc'; + showCustomRules?: boolean; + showElasticRules?: boolean; + tags?: string[]; } export interface FetchRulesResponse { diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rules.tsx b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rules.tsx index 04475ab1bc1787..254e8cbdc9a883 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rules.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_rules.tsx @@ -70,6 +70,9 @@ export const useRules = (pagination: PaginationOptions, filterOptions: FilterOpt filterOptions.filter, filterOptions.sortField, filterOptions.sortOrder, + filterOptions.tags?.sort().join(), + filterOptions.showCustomRules, + filterOptions.showElasticRules, ]); return [loading, rules, reFetchRules.current]; diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_tags.tsx b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_tags.tsx new file mode 100644 index 00000000000000..1c961d530422a5 --- /dev/null +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/use_tags.tsx @@ -0,0 +1,57 @@ +/* + * 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. + */ + +import { useEffect, useState } from 'react'; +import { useStateToaster } from '../../../components/toasters'; +import { fetchTags } from './api'; +import { errorToToaster } from '../../../components/ml/api/error_to_toaster'; +import * as i18n from './translations'; + +type Return = [boolean, string[]]; + +/** + * Hook for using the list of Tags from the Detection Engine API + * + */ +export const useTags = (): Return => { + const [tags, setTags] = useState([]); + const [loading, setLoading] = useState(true); + const [, dispatchToaster] = useStateToaster(); + + useEffect(() => { + let isSubscribed = true; + const abortCtrl = new AbortController(); + + async function fetchData() { + setLoading(true); + try { + const fetchTagsResult = await fetchTags({ + signal: abortCtrl.signal, + }); + + if (isSubscribed) { + setTags(fetchTagsResult); + } + } catch (error) { + if (isSubscribed) { + errorToToaster({ title: i18n.TAG_FETCH_FAILURE, error, dispatchToaster }); + } + } + if (isSubscribed) { + setLoading(false); + } + } + + fetchData(); + + return () => { + isSubscribed = false; + abortCtrl.abort(); + }; + }, []); + + return [loading, tags]; +}; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts index b79b3ed091f169..b62247e8f9a4f5 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts @@ -56,13 +56,10 @@ export const mockTableData: TableData[] = [ id: 'abe6c564-050d-45a5-aaf0-386c37dd1f61', immutable: false, isLoading: false, - lastCompletedRun: undefined, - lastResponse: { type: '—' }, - method: 'saved_query', + risk_score: 21, rule: { href: '#/detections/rules/id/abe6c564-050d-45a5-aaf0-386c37dd1f61', name: 'Home Grown!', - status: 'Status Placeholder', }, rule_id: 'b5ba41ab-aaf3-4f43-971b-bdf9434ce0ea', severity: 'low', @@ -108,13 +105,10 @@ export const mockTableData: TableData[] = [ id: '63f06f34-c181-4b2d-af35-f2ace572a1ee', immutable: false, isLoading: false, - lastCompletedRun: undefined, - lastResponse: { type: '—' }, - method: 'saved_query', + risk_score: 21, rule: { href: '#/detections/rules/id/63f06f34-c181-4b2d-af35-f2ace572a1ee', name: 'Home Grown!', - status: 'Status Placeholder', }, rule_id: 'b5ba41ab-aaf3-4f43-971b-bdf9434ce0ea', severity: 'low', diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx index d546c4edb55d35..d648854368c28b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/columns.tsx @@ -31,6 +31,7 @@ import { RuleSwitch } from '../components/rule_switch'; import { SeverityBadge } from '../components/severity_badge'; import { ActionToaster } from '../../../../components/toasters'; import { getStatusColor } from '../components/rule_status/helpers'; +import { TruncatableText } from '../../../../components/truncatable_text'; const getActions = ( dispatch: React.Dispatch, @@ -84,8 +85,8 @@ export const getColumns = ( width: '24%', }, { - field: 'method', - name: i18n.COLUMN_METHOD, + field: 'risk_score', + name: i18n.COLUMN_RISK_SCORE, truncateText: true, width: '14%', }, @@ -129,13 +130,13 @@ export const getColumns = ( field: 'tags', name: i18n.COLUMN_TAGS, render: (value: TableData['tags']) => ( - <> + {value.map((tag, i) => ( {tag} ))} - + ), truncateText: true, width: '20%', diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/helpers.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/helpers.ts index 07a2f2f2789874..3616d4dbaad241 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/helpers.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/helpers.ts @@ -10,7 +10,6 @@ import { RuleResponseBuckets, } from '../../../../containers/detection_engine/rules'; import { TableData } from '../types'; -import { getEmptyValue } from '../../../../components/empty_value'; /** * Formats rules into the correct format for the AllRulesTable @@ -26,14 +25,9 @@ export const formatRules = (rules: Rule[], selectedIds?: string[]): TableData[] rule: { href: `#/detections/rules/id/${encodeURIComponent(rule.id)}`, name: rule.name, - status: 'Status Placeholder', }, - method: rule.type, // TODO: Map to i18n? + risk_score: rule.risk_score, severity: rule.severity, - lastCompletedRun: undefined, // TODO: Not available yet - lastResponse: { - type: getEmptyValue(), // TODO: Not available yet - }, tags: rule.tags ?? [], activate: rule.enabled, status: rule.status ?? null, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/index.tsx index 677033b258837d..a4e7d7a3615ccc 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/index.tsx @@ -6,8 +6,9 @@ import { EuiBasicTable, + EuiButton, EuiContextMenuPanel, - EuiFieldSearch, + EuiEmptyPrompt, EuiLoadingContent, EuiSpacer, } from '@elastic/eui'; @@ -16,7 +17,11 @@ import React, { useCallback, useEffect, useMemo, useReducer, useState } from 're import { useHistory } from 'react-router-dom'; import uuid from 'uuid'; -import { useRules, CreatePreBuiltRules } from '../../../../containers/detection_engine/rules'; +import { + useRules, + CreatePreBuiltRules, + FilterOptions, +} from '../../../../containers/detection_engine/rules'; import { HeaderSection } from '../../../../components/header_section'; import { UtilityBar, @@ -36,6 +41,8 @@ import { EuiBasicTableOnChange, TableData } from '../types'; import { getBatchItems } from './batch_actions'; import { getColumns } from './columns'; import { allRulesReducer, State } from './reducer'; +import { RulesTableFilters } from './rules_table_filters/rules_table_filters'; +import { DETECTION_ENGINE_PAGE_NAME } from '../../../../components/link_to/redirect_to_detection_engine'; const initialState: State = { isLoading: true, @@ -209,6 +216,20 @@ export const AllRules = React.memo( [] ); + const onFilterChangedCallback = useCallback((newFilterOptions: Partial) => { + dispatch({ + type: 'updateFilterOptions', + filterOptions: { + ...filterOptions, + ...newFilterOptions, + }, + }); + dispatch({ + type: 'updatePagination', + pagination: { ...pagination, page: 1 }, + }); + }, []); + return ( <> ( <> {rulesInstalled != null && rulesInstalled > 0 && ( - - { - dispatch({ - type: 'updateFilterOptions', - filterOptions: { - ...filterOptions, - filter: filterString, - }, - }); - dispatch({ - type: 'updatePagination', - pagination: { ...pagination, page: 1 }, - }); - }} - /> + + )} {isInitialLoad && isEmpty(tableData) && ( @@ -301,6 +304,24 @@ export const AllRules = React.memo( isSelectable={!hasNoPermissions ?? false} itemId="id" items={tableData} + noItemsMessage={ + {i18n.NO_RULES}} + titleSize="xs" + body={i18n.NO_RULES_BODY} + actions={ + + {i18n.ADD_NEW_RULE} + + } + /> + } onChange={tableOnChangeCallback} pagination={{ pageIndex: pagination.page - 1, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.tsx new file mode 100644 index 00000000000000..daf519f5af6958 --- /dev/null +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.tsx @@ -0,0 +1,105 @@ +/* + * 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. + */ + +import React, { useCallback, useEffect, useState } from 'react'; + +import { + EuiFieldSearch, + EuiFilterButton, + EuiFilterGroup, + EuiFlexGroup, + EuiFlexItem, +} from '@elastic/eui'; +import * as i18n from '../../translations'; + +import { FilterOptions } from '../../../../../containers/detection_engine/rules'; +import { useTags } from '../../../../../containers/detection_engine/rules/use_tags'; +import { TagsFilterPopover } from './tags_filter_popover'; + +interface RulesTableFiltersProps { + onFilterChanged: (filterOptions: Partial) => void; +} + +/** + * Collection of filters for filtering data within the RulesTable. Contains search bar, Elastic/Custom + * Rules filter button toggle, and tag selection + * + * @param onFilterChanged change listener to be notified on filter changes + */ +const RulesTableFiltersComponent = ({ onFilterChanged }: RulesTableFiltersProps) => { + const [filter, setFilter] = useState(''); + const [selectedTags, setSelectedTags] = useState([]); + const [showCustomRules, setShowCustomRules] = useState(false); + const [showElasticRules, setShowElasticRules] = useState(false); + const [isLoadingTags, tags] = useTags(); + + // Propagate filter changes to parent + useEffect(() => { + onFilterChanged({ filter, showCustomRules, showElasticRules, tags: selectedTags }); + }, [filter, selectedTags, showCustomRules, showElasticRules, onFilterChanged]); + + const handleOnSearch = useCallback(filterString => setFilter(filterString.trim()), [setFilter]); + + const handleElasticRulesClick = useCallback(() => { + setShowElasticRules(!showElasticRules); + setShowCustomRules(false); + }, [setShowElasticRules, showElasticRules, setShowCustomRules]); + + const handleCustomRulesClick = useCallback(() => { + setShowCustomRules(!showCustomRules); + setShowElasticRules(false); + }, [setShowElasticRules, showCustomRules, setShowCustomRules]); + + return ( + + + + + + + + + + + + + + + {i18n.ELASTIC_RULES} + + + {i18n.CUSTOM_RULES} + + + + + ); +}; + +RulesTableFiltersComponent.displayName = 'RulesTableFiltersComponent'; + +export const RulesTableFilters = React.memo(RulesTableFiltersComponent); + +RulesTableFilters.displayName = 'RulesTableFilters'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx new file mode 100644 index 00000000000000..b9d2c97f063b1e --- /dev/null +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx @@ -0,0 +1,96 @@ +/* + * 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. + */ + +import React, { Dispatch, SetStateAction, useEffect, useState } from 'react'; +import { + EuiFilterButton, + EuiFilterSelectItem, + EuiFlexGroup, + EuiFlexItem, + EuiPanel, + EuiPopover, + EuiText, +} from '@elastic/eui'; +import styled from 'styled-components'; +import * as i18n from '../../translations'; +import { toggleSelectedGroup } from '../../../../../components/ml_popover/jobs_table/filters/toggle_selected_group'; + +interface TagsFilterPopoverProps { + tags: string[]; + onSelectedTagsChanged: Dispatch>; + isLoading: boolean; +} + +const ScrollableDiv = styled.div` + max-height: 250px; + overflow: auto; +`; + +/** + * Popover for selecting tags to filter on + * + * @param tags to display for filtering + * @param onSelectedTagsChanged change listener to be notified when tag selection changes + */ +export const TagsFilterPopoverComponent = ({ + tags, + onSelectedTagsChanged, +}: TagsFilterPopoverProps) => { + const [isTagPopoverOpen, setIsTagPopoverOpen] = useState(false); + const [selectedTags, setSelectedTags] = useState([]); + + useEffect(() => { + onSelectedTagsChanged(selectedTags); + }, [selectedTags.sort().join()]); + + return ( + setIsTagPopoverOpen(!isTagPopoverOpen)} + isSelected={isTagPopoverOpen} + hasActiveFilters={selectedTags.length > 0} + numActiveFilters={selectedTags.length} + > + {i18n.TAGS} + + } + isOpen={isTagPopoverOpen} + closePopover={() => setIsTagPopoverOpen(!isTagPopoverOpen)} + panelPaddingSize="none" + > + + {tags.map((tag, index) => ( + toggleSelectedGroup(tag, selectedTags, setSelectedTags)} + > + {`${tag}`} + + ))} + + {tags.length === 0 && ( + + + + {i18n.NO_TAGS_AVAILABLE} + + + + )} + + ); +}; + +TagsFilterPopoverComponent.displayName = 'TagsFilterPopoverComponent'; + +export const TagsFilterPopover = React.memo(TagsFilterPopoverComponent); + +TagsFilterPopover.displayName = 'TagsFilterPopover'; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/translations.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/translations.ts index 672aab8ef83140..5b1ee049371d28 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/translations.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/translations.ts @@ -213,10 +213,10 @@ export const COLUMN_RULE = i18n.translate( } ); -export const COLUMN_METHOD = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.methodTitle', +export const COLUMN_RISK_SCORE = i18n.translate( + 'xpack.siem.detectionEngine.rules.allRules.columns.riskScoreTitle', { - defaultMessage: 'Method', + defaultMessage: 'Risk score', } ); @@ -255,16 +255,42 @@ export const COLUMN_ACTIVATE = i18n.translate( } ); -export const COLUMN_STATUS = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.currentStatusTitle', +export const CUSTOM_RULES = i18n.translate( + 'xpack.siem.detectionEngine.rules.allRules.filters.customRulesTitle', { - defaultMessage: 'Current status', + defaultMessage: 'Custom rules', } ); -export const NO_STATUS = i18n.translate( - 'xpack.siem.detectionEngine.rules.allRules.columns.unknownStatusDescription', + +export const ELASTIC_RULES = i18n.translate( + 'xpack.siem.detectionEngine.rules.allRules.filters.elasticRulesTitle', + { + defaultMessage: 'Elastic rules', + } +); + +export const TAGS = i18n.translate('xpack.siem.detectionEngine.rules.allRules.filters.tagsLabel', { + defaultMessage: 'Tags', +}); + +export const NO_TAGS_AVAILABLE = i18n.translate( + 'xpack.siem.detectionEngine.rules.allRules.filters.noTagsAvailableDescription', + { + defaultMessage: 'No tags available', + } +); + +export const NO_RULES = i18n.translate( + 'xpack.siem.detectionEngine.rules.allRules.filters.noRulesTitle', + { + defaultMessage: 'No rules found', + } +); + +export const NO_RULES_BODY = i18n.translate( + 'xpack.siem.detectionEngine.rules.allRules.filters.noRulesBodyTitle', { - defaultMessage: 'Unknown', + defaultMessage: "We weren't able to find any rules with the above filters.", } ); diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts index 5ae516dda5b389..2b50e32a367ec4 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts @@ -30,15 +30,9 @@ export interface TableData { rule: { href: string; name: string; - status: string; }; - method: string; + risk_score: number; severity: string; - lastCompletedRun: string | undefined; - lastResponse: { - type: string; - message?: string; - }; tags: string[]; activate: boolean; isLoading: boolean; From 2b66759dc7de99ca47029f08c3f5dc996566d28a Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Thu, 23 Jan 2020 02:30:32 +0000 Subject: [PATCH 04/72] fix(NA): allow plugins index to be a ts file in kbn-plugin-helpers (#55194) Co-authored-by: Elastic Machine --- packages/kbn-plugin-helpers/lib/plugin_config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-plugin-helpers/lib/plugin_config.js b/packages/kbn-plugin-helpers/lib/plugin_config.js index 07bbbfedc15da7..60baa7fc976607 100644 --- a/packages/kbn-plugin-helpers/lib/plugin_config.js +++ b/packages/kbn-plugin-helpers/lib/plugin_config.js @@ -32,7 +32,7 @@ module.exports = function(root) { 'yarn.lock', 'tsconfig.json', 'package.json', - 'index.js', + 'index.{js,ts}', '{lib,public,server,webpackShims,translations}/**/*', ]; From 111d0db7e3807a9e45d4eb7eb37867f16799e524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loix?= Date: Thu, 23 Jan 2020 14:15:28 +0530 Subject: [PATCH 05/72] [Mappings editor] Add missing parameters to object & nested (#55152) --- .../helpers/template_form.helpers.ts | 2 +- .../field_parameters/analyzers_parameter.tsx | 10 +- .../field_parameters/dynamic_parameter.tsx | 93 +++++++++++++++++++ .../field_parameters/enabled_parameter.tsx | 39 ++++++++ .../document_fields/field_parameters/index.ts | 9 +- .../fields/field_types/date_type.tsx | 2 +- .../fields/field_types/index.ts | 4 + .../fields/field_types/nested_type.tsx | 24 +++++ .../fields/field_types/numeric_type.tsx | 2 +- .../fields/field_types/object_type.tsx | 26 ++++++ .../fields/field_types/range_type.tsx | 2 +- .../fields/field_types/token_count_type.tsx | 2 +- .../fields/fields_list_item.tsx | 15 +-- .../constants/parameters_definition.tsx | 40 +++++--- .../lib/mappings_validator.test.ts | 14 ++- .../components/mappings_editor/lib/utils.ts | 4 +- .../app/components/mappings_editor/reducer.ts | 12 +-- .../app/components/mappings_editor/types.ts | 19 +++- .../public/app/services/documentation.ts | 18 +++- 19 files changed, 295 insertions(+), 42 deletions(-) create mode 100644 x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/dynamic_parameter.tsx create mode 100644 x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/enabled_parameter.tsx create mode 100644 x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/nested_type.tsx create mode 100644 x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/object_type.tsx diff --git a/x-pack/legacy/plugins/index_management/__jest__/client_integration/helpers/template_form.helpers.ts b/x-pack/legacy/plugins/index_management/__jest__/client_integration/helpers/template_form.helpers.ts index 48ae51b711f9cc..a7c87723b33fb8 100644 --- a/x-pack/legacy/plugins/index_management/__jest__/client_integration/helpers/template_form.helpers.ts +++ b/x-pack/legacy/plugins/index_management/__jest__/client_integration/helpers/template_form.helpers.ts @@ -198,7 +198,7 @@ export type TestSubjects = | 'backButton' | 'codeEditorContainer' | 'confirmModalConfirmButton' - | 'createFieldWrapper.addChildButton' + | 'createFieldWrapper.addPropertyButton' | 'createFieldWrapper.addButton' | 'createFieldWrapper.addFieldButton' | 'createFieldWrapper.addMultiFieldButton' diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/analyzers_parameter.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/analyzers_parameter.tsx index 46b0ece4b325ea..0cf22946bf60a6 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/analyzers_parameter.tsx +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/analyzers_parameter.tsx @@ -46,7 +46,11 @@ export const AnalyzersParameter = ({ field, withSearchQuoteAnalyzer = false }: P }); return ( - + ); }} @@ -74,7 +78,7 @@ export const AnalyzersParameter = ({ field, withSearchQuoteAnalyzer = false }: P @@ -88,7 +92,7 @@ export const AnalyzersParameter = ({ field, withSearchQuoteAnalyzer = false }: P diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/dynamic_parameter.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/dynamic_parameter.tsx new file mode 100644 index 00000000000000..975a6cd9bba4f5 --- /dev/null +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/dynamic_parameter.tsx @@ -0,0 +1,93 @@ +/* + * 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. + */ + +import React from 'react'; +import { i18n } from '@kbn/i18n'; + +import { documentationService } from '../../../../../services/documentation'; +import { UseField, CheckBoxField } from '../../../shared_imports'; +import { getFieldConfig } from '../../../lib'; +import { Field } from '../../../types'; +import { EditFieldFormRow } from '../fields/edit_field'; + +/** + * Export custom serializer to be used when we need to serialize the form data to be sent to ES + * @param field The field to be serialized + */ +export const dynamicSerializer = (field: Field): Field => { + if (field.dynamic_toggle === undefined) { + return field; + } + + const dynamic = + field.dynamic_toggle === true ? true : field.dynamic_strict === true ? 'strict' : false; + const { dynamic_toggle, dynamic_strict, ...rest } = field; + + return { + ...rest, + dynamic, + }; +}; + +/** + * Export custom deserializer to be used when we need to deserialize the data coming from ES + * @param field The field to be serialized + */ +export const dynamicDeserializer = (field: Field): Field => { + if (field.dynamic === undefined) { + return field; + } + + const dynamicToggleValue = field.dynamic === true; + const dynamicStrictValue = field.dynamic === 'strict'; + + return { + ...field, + dynamic_toggle: dynamicToggleValue, + dynamic_strict: dynamicStrictValue, + }; +}; +interface Props { + defaultToggleValue: boolean; +} + +export const DynamicParameter = ({ defaultToggleValue }: Props) => { + return ( + + {isOn => { + return isOn === false ? ( + + ) : null; + }} + + ); +}; diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/enabled_parameter.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/enabled_parameter.tsx new file mode 100644 index 00000000000000..719dd89d4c05c9 --- /dev/null +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/enabled_parameter.tsx @@ -0,0 +1,39 @@ +/* + * 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. + */ + +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { EuiCode } from '@elastic/eui'; + +import { documentationService } from '../../../../../services/documentation'; +import { EditFieldFormRow } from '../fields/edit_field'; + +export const EnabledParameter = () => { + return ( + _source, + }} + /> + } + docLink={{ + text: i18n.translate('xpack.idxMgmt.mappingsEditor.enabledDocLinkText', { + defaultMessage: 'Enabled documentation', + }), + href: documentationService.getEnabledLink(), + }} + formFieldPath="enabled" + /> + ); +}; diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/index.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/index.ts index 94a49012f1c3b3..663017e2e47afd 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/index.ts +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/field_parameters/index.ts @@ -5,6 +5,7 @@ */ import { relationsSerializer, relationsDeserializer } from './relations_parameter'; +import { dynamicSerializer, dynamicDeserializer } from './dynamic_parameter'; export * from './name_parameter'; @@ -54,10 +55,14 @@ export * from './split_queries_on_whitespace_parameter'; export * from './locale_parameter'; +export * from './dynamic_parameter'; + +export * from './enabled_parameter'; + export * from './max_shingle_size_parameter'; export * from './relations_parameter'; -export const PARAMETER_SERIALIZERS = [relationsSerializer]; +export const PARAMETER_SERIALIZERS = [relationsSerializer, dynamicSerializer]; -export const PARAMETER_DESERIALIZERS = [relationsDeserializer]; +export const PARAMETER_DESERIALIZERS = [relationsDeserializer, dynamicDeserializer]; diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/date_type.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/date_type.tsx index 3165f18aff4b3d..0c067d09046d73 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/date_type.tsx +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/date_type.tsx @@ -48,7 +48,7 @@ export const DateType = ({ field }: Props) => { diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/index.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/index.ts index bad41d1f88efcc..6e18e29f827d4c 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/index.ts +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/index.ts @@ -24,6 +24,8 @@ import { SearchAsYouType } from './search_as_you_type'; import { FlattenedType } from './flattened_type'; import { ShapeType } from './shape_type'; import { DenseVectorType } from './dense_vector_type'; +import { ObjectType } from './object_type'; +import { NestedType } from './nested_type'; import { JoinType } from './join_type'; const typeToParametersFormMap: { [key in DataType]?: ComponentType } = { @@ -45,6 +47,8 @@ const typeToParametersFormMap: { [key in DataType]?: ComponentType } = { flattened: FlattenedType, shape: ShapeType, dense_vector: DenseVectorType, + object: ObjectType, + nested: NestedType, join: JoinType, }; diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/nested_type.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/nested_type.tsx new file mode 100644 index 00000000000000..72aa88ed75ffb4 --- /dev/null +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/nested_type.tsx @@ -0,0 +1,24 @@ +/* + * 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. + */ +import React from 'react'; + +import { NormalizedField } from '../../../../types'; +import { DynamicParameter } from '../../field_parameters'; +import { BasicParametersSection } from '../edit_field'; + +interface Props { + field: NormalizedField; +} + +export const NestedType = ({ field }: Props) => { + return ( + + + + ); +}; diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/numeric_type.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/numeric_type.tsx index 367a7002815819..89af480d79a205 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/numeric_type.tsx +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/numeric_type.tsx @@ -50,7 +50,7 @@ export const NumericType = ({ field }: Props) => { {formData => formData.subType === 'scaled_float' ? ( diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/object_type.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/object_type.tsx new file mode 100644 index 00000000000000..fef1f9860ca51f --- /dev/null +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/object_type.tsx @@ -0,0 +1,26 @@ +/* + * 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. + */ +import React from 'react'; + +import { NormalizedField } from '../../../../types'; +import { DynamicParameter, EnabledParameter } from '../../field_parameters'; +import { BasicParametersSection } from '../edit_field'; + +interface Props { + field: NormalizedField; +} + +export const ObjectType = ({ field }: Props) => { + return ( + + + + + + ); +}; diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/range_type.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/range_type.tsx index 0be754bcfb966d..a7d2af41c83e68 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/range_type.tsx +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/range_type.tsx @@ -36,7 +36,7 @@ export const RangeType = ({ field }: Props) => { {formData => formData.subType === 'date_range' ? ( ) : null diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/token_count_type.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/token_count_type.tsx index a2b429373a3e4e..42854673269aee 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/token_count_type.tsx +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/field_types/token_count_type.tsx @@ -60,7 +60,7 @@ export const TokenCountType = ({ field }: Props) => { diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/fields_list_item.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/fields_list_item.tsx index 285598fc8c3c13..4c1c8bc1da1143 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/fields_list_item.tsx +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/fields/fields_list_item.tsx @@ -113,9 +113,12 @@ function FieldListItemComponent( } ); - const addChildButtonLabel = i18n.translate('xpack.idxMgmt.mappingsEditor.addChildButtonLabel', { - defaultMessage: 'Add child', - }); + const addPropertyButtonLabel = i18n.translate( + 'xpack.idxMgmt.mappingsEditor.addPropertyButtonLabel', + { + defaultMessage: 'Add property', + } + ); const editButtonLabel = i18n.translate('xpack.idxMgmt.mappingsEditor.editFieldButtonLabel', { defaultMessage: 'Edit', @@ -145,12 +148,12 @@ function FieldListItemComponent( {canHaveChildFields && ( - + diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/constants/parameters_definition.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/constants/parameters_definition.tsx index 2ea525bdb522f5..732449f382f93c 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/constants/parameters_definition.tsx +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/constants/parameters_definition.tsx @@ -17,7 +17,13 @@ import { fieldFormatters, FieldConfig, } from '../shared_imports'; -import { AliasOption, DataType, ComboBoxOption } from '../types'; +import { + AliasOption, + DataType, + ComboBoxOption, + ParameterName, + ParameterDefinition, +} from '../types'; import { documentationService } from '../../../services/documentation'; import { INDEX_DEFAULT } from './default_values'; import { TYPE_DEFINITION } from './data_types_definition'; @@ -124,7 +130,7 @@ const analyzerValidations = [ * * As a consequence, if a parameter is *not* declared here, we won't be able to declare it in the Json editor. */ -export const PARAMETERS_DEFINITION = { +export const PARAMETERS_DEFINITION: { [key in ParameterName]: ParameterDefinition } = { name: { fieldConfig: { label: i18n.translate('xpack.idxMgmt.mappingsEditor.nameFieldLabel', { @@ -537,20 +543,32 @@ export const PARAMETERS_DEFINITION = { }, dynamic: { fieldConfig: { - label: i18n.translate('xpack.idxMgmt.mappingsEditor.dynamicFieldLabel', { - defaultMessage: 'Dynamic', - }), - type: FIELD_TYPES.CHECKBOX, defaultValue: true, }, - schema: t.boolean, + schema: t.union([t.boolean, t.literal('strict')]), }, - enabled: { + dynamic_toggle: { + fieldConfig: { + defaultValue: true, + }, + }, + dynamic_strict: { fieldConfig: { - label: i18n.translate('xpack.idxMgmt.mappingsEditor.enabledFieldLabel', { - defaultMessage: 'Enabled', + defaultValue: false, + label: i18n.translate('xpack.idxMgmt.mappingsEditor.dynamicStrictParameter.fieldTitle', { + defaultMessage: 'Throw an exception when the object contains an unmapped property', }), - type: FIELD_TYPES.CHECKBOX, + helpText: i18n.translate( + 'xpack.idxMgmt.mappingsEditor.dynamicStrictParameter.fieldHelpText', + { + defaultMessage: + 'By default, unmapped properties will be silently ignored when dynamic mapping is disabled. Optionally, you can choose to throw an exception when an object contains an unmapped property.', + } + ), + }, + }, + enabled: { + fieldConfig: { defaultValue: true, }, schema: t.boolean, diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/mappings_validator.test.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/mappings_validator.test.ts index c8bb7e5b60fb39..c70462a656e2f7 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/mappings_validator.test.ts +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/mappings_validator.test.ts @@ -280,7 +280,7 @@ describe('Properties validator', () => { orientation: 'ccw', boost: 1.5, scaling_factor: 2.5, - dynamic: true, + dynamic: 'strict', // true | false | 'strict' are allowed enabled: true, format: 'strict_date_optional_time', analyzer: 'standard', @@ -310,14 +310,24 @@ describe('Properties validator', () => { dims: 'abc', max_shingle_size: 2, }, + goodField2: { + type: 'object', + dynamic: true, + }, + goodField3: { + type: 'object', + dynamic: false, + }, }; const { value, errors } = validateProperties(properties as any); - expect(Object.keys(value)).toEqual(['wrongField', 'goodField']); + expect(Object.keys(value)).toEqual(['wrongField', 'goodField', 'goodField2', 'goodField3']); expect(value.wrongField).toEqual({ type: 'text' }); // All parameters have been stripped out but the "type". expect(value.goodField).toEqual(properties.goodField); // All parameters are stil there. + expect(value.goodField2).toEqual(properties.goodField2); + expect(value.goodField3).toEqual(properties.goodField3); const allWrongParameters = Object.keys(properties.wrongField).filter(v => v !== 'type'); expect(errors).toEqual( diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/utils.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/utils.ts index 50e4023c8c7426..337554ab5fa5a1 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/utils.ts +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/utils.ts @@ -79,10 +79,10 @@ export const getFieldConfig = (param: ParameterName, prop?: string): FieldConfig ) { throw new Error(`No field config found for prop "${prop}" on param "${param}" `); } - return (PARAMETERS_DEFINITION[param] as any).props[prop].fieldConfig || {}; + return (PARAMETERS_DEFINITION[param] as any).props[prop]?.fieldConfig || {}; } - return (PARAMETERS_DEFINITION[param] as any).fieldConfig || {}; + return (PARAMETERS_DEFINITION[param] as any)?.fieldConfig || {}; }; /** diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/reducer.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/reducer.ts index 26d5b8e1edfa58..1e6733b1632d76 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/reducer.ts +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/reducer.ts @@ -174,7 +174,7 @@ const updateAliasesReferences = ( ); } - const targetId = field.source.path!; + const targetId = field.source.path! as string; if (!updatedAliases[targetId]) { updatedAliases[targetId] = []; @@ -420,7 +420,7 @@ export const reducer = (state: State, action: Action): State => { /** * If we delete an alias field, we need to remove its id from the reference Array */ - const targetId = field.source.path; + const targetId = field.source.path as string; updatedFields.aliases = { ...updatedFields.aliases, [targetId]: updatedFields.aliases[targetId].filter(aliasId => aliasId !== id), @@ -455,7 +455,7 @@ export const reducer = (state: State, action: Action): State => { updatedFields.aliases = updateAliasesReferences( newField, updatedFields, - previousField.source.path + previousField.source.path as string ); } @@ -489,9 +489,9 @@ export const reducer = (state: State, action: Action): State => { // We need to remove its reference from our state.aliases map updatedFields.aliases = { ...updatedFields.aliases, - [previousField.source.path]: updatedFields.aliases[previousField.source.path].filter( - aliasId => aliasId !== fieldToEdit - ), + [previousField.source.path as string]: updatedFields.aliases[ + previousField.source.path as string + ].filter(aliasId => aliasId !== fieldToEdit), }; } else { const nextTypeCanHaveAlias = !PARAMETERS_DEFINITION.path.targetTypesNotAllowed.includes( diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/types.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/types.ts index 55ec2fbcc99e65..5d9c15caf9cd91 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/types.ts +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/types.ts @@ -19,6 +19,19 @@ export interface DataTypeDefinition { description?: () => ReactNode; } +export interface ParameterDefinition { + title?: string; + description?: JSX.Element | string; + fieldConfig: FieldConfig; + schema?: any; + props?: { [key: string]: ParameterDefinition }; + documentation?: { + main: string; + [key: string]: string; + }; + [key: string]: any; +} + export type MainType = | 'text' | 'keyword' @@ -88,6 +101,8 @@ export type ParameterName = | 'null_value_ip' | 'copy_to' | 'dynamic' + | 'dynamic_toggle' + | 'dynamic_strict' | 'enabled' | 'boost' | 'locale' @@ -144,10 +159,10 @@ interface FieldBasic { } type FieldParams = { - [K in ParameterName]: typeof PARAMETERS_DEFINITION[K]['fieldConfig']['defaultValue']; + [K in ParameterName]: typeof PARAMETERS_DEFINITION[K]['fieldConfig']['defaultValue'] | unknown; }; -export type Field = FieldBasic & FieldParams; +export type Field = FieldBasic & Partial; export interface FieldMeta { childFieldsName: ChildFieldName | undefined; diff --git a/x-pack/legacy/plugins/index_management/public/app/services/documentation.ts b/x-pack/legacy/plugins/index_management/public/app/services/documentation.ts index d705dfa94adcac..f63dc622453fe1 100644 --- a/x-pack/legacy/plugins/index_management/public/app/services/documentation.ts +++ b/x-pack/legacy/plugins/index_management/public/app/services/documentation.ts @@ -40,13 +40,17 @@ class DocumentationService { return `${this.kibanaDocsBase}/managing-indices.html`; } - public getTypeDocLink = (type: DataType, uri = 'main'): string | undefined => { + public getTypeDocLink = (type: DataType, docType = 'main'): string | undefined => { const typeDefinition = TYPE_DEFINITION[type]; - if (!typeDefinition || !typeDefinition.documentation || !typeDefinition.documentation[uri]) { + if ( + !typeDefinition || + !typeDefinition.documentation || + !typeDefinition.documentation[docType] + ) { return undefined; } - return `${this.esDocsBase}${typeDefinition.documentation[uri]}`; + return `${this.esDocsBase}${typeDefinition.documentation[docType]}`; }; public getMappingTypesLink() { @@ -181,6 +185,14 @@ class DocumentationService { return `${this.esDocsBase}/parent-join.html#_parent_join_and_performance`; } + public getDynamicLink() { + return `${this.esDocsBase}/dynamic.html`; + } + + public getEnabledLink() { + return `${this.esDocsBase}/enabled.html`; + } + public getWellKnownTextLink() { return 'http://docs.opengeospatial.org/is/12-063r5/12-063r5.html'; } From 4a8542f859d3bc29f8e1ddead04d967980ca148f Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Thu, 23 Jan 2020 12:21:50 +0300 Subject: [PATCH 06/72] browser[SEVERE] webpack: A component is changing an uncontrolled input of type %s to be controlled (#55323) * browser[SEVERE] webpack: A component is changing an uncontrolled input of type %s to be controlled. Closes: #41017 * fix PR comments * fix PR comment --- .../public/components/aggs/agg_row.js | 15 +- .../public/components/aggs/agg_select.js | 17 +- .../public/components/aggs/calculation.js | 177 +++++++-------- .../public/components/aggs/math.js | 214 +++++++++--------- .../public/components/aggs/percentile.js | 133 ++++++----- .../public/components/aggs/vars.js | 23 +- 6 files changed, 275 insertions(+), 304 deletions(-) diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/agg_row.js b/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/agg_row.js index b07e1cef4fc812..a2f1640904dd02 100644 --- a/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/agg_row.js +++ b/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/agg_row.js @@ -22,14 +22,13 @@ import React from 'react'; import { last } from 'lodash'; import { AddDeleteButtons } from '../add_delete_buttons'; import { EuiIcon, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { injectI18n } from '@kbn/i18n/react'; import { SeriesDragHandler } from '../series_drag_handler'; +import { i18n } from '@kbn/i18n'; -function AggRowUi(props) { +export function AggRow(props) { let iconType = 'eyeClosed'; let iconColor = 'subdued'; const lastSibling = last(props.siblings); - const { intl } = props; if (lastSibling.id === props.model.id) { iconType = 'eye'; @@ -57,12 +56,10 @@ function AggRowUi(props) { { return value === option.value && isMetricEnabled(option.value, uiRestrictions); @@ -247,8 +247,7 @@ function AggSelectUi(props) { options = [ { - label: intl.formatMessage({ - id: 'visTypeTimeseries.aggSelect.aggGroups.metricAggLabel', + label: i18n.translate('visTypeTimeseries.aggSelect.aggGroups.metricAggLabel', { defaultMessage: 'Metric Aggregations', }), options: metricAggs.map(agg => ({ @@ -257,22 +256,19 @@ function AggSelectUi(props) { })), }, { - label: intl.formatMessage({ - id: 'visTypeTimeseries.aggSelect.aggGroups.parentPipelineAggLabel', + label: i18n.translate('visTypeTimeseries.aggSelect.aggGroups.parentPipelineAggLabel', { defaultMessage: 'Parent Pipeline Aggregations', }), options: pipelineAggs.filter(filterByPanelType(panelType)).map(disableSiblingAggs), }, { - label: intl.formatMessage({ - id: 'visTypeTimeseries.aggSelect.aggGroups.siblingPipelineAggLabel', + label: i18n.translate('visTypeTimeseries.aggSelect.aggGroups.siblingPipelineAggLabel', { defaultMessage: 'Sibling Pipeline Aggregations', }), options: siblingAggs.map(disableSiblingAggs), }, { - label: intl.formatMessage({ - id: 'visTypeTimeseries.aggSelect.aggGroups.specialAggLabel', + label: i18n.translate('visTypeTimeseries.aggSelect.aggGroups.specialAggLabel', { defaultMessage: 'Special Aggregations', }), options: specialAggs.map(disableSiblingAggs), @@ -289,8 +285,7 @@ function AggSelectUi(props) {
Array.isArray(model.variables) && model.script !== undefined; - render() { - const { siblings } = this.props; +export function CalculationAgg(props) { + const htmlId = htmlIdGenerator(); + const { siblings, model } = props; - const defaults = { script: '' }; - const model = { ...defaults, ...this.props.model }; + const handleChange = createChangeHandler(props.onChange, model); + const handleSelectChange = createSelectHandler(handleChange); + const handleTextChange = createTextHandler(handleChange); - const handleChange = createChangeHandler(this.props.onChange, model); - const handleSelectChange = createSelectHandler(handleChange); - const handleTextChange = createTextHandler(handleChange); + useEffect(() => { + if (!checkModel(model)) { + handleChange({ + variables: [newVariable()], + script: '', + }); + } + }, [handleChange, model]); - const htmlId = htmlIdGenerator(); + return ( + + + + + + + + + - return ( - - - - - - - - + + - + + + + - - + + - - - - - - - - } - fullWidth - helpText={ -
- params, - paramsName: params.<name>, - paramsInterval: params._interval, - }} - /> -
- } - > - -
-
-
-
- ); - } + values={{ + params: params, + paramsName: params.<name>, + paramsInterval: params._interval, + }} + /> +
+ } + > + + +
+ + + ); } CalculationAgg.propTypes = { diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/math.js b/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/math.js index c62012927f951b..5ffcef12c3fcb1 100644 --- a/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/math.js +++ b/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/math.js @@ -17,17 +17,15 @@ * under the License. */ -import React, { Component } from 'react'; +import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; -import _ from 'lodash'; -import uuid from 'uuid'; import { AggRow } from './agg_row'; import { AggSelect } from './agg_select'; import { createChangeHandler } from '../lib/create_change_handler'; import { createSelectHandler } from '../lib/create_select_handler'; import { createTextHandler } from '../lib/create_text_handler'; -import { CalculationVars } from './vars'; +import { CalculationVars, newVariable } from './vars'; import { htmlIdGenerator, EuiFlexGroup, @@ -41,125 +39,121 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -export class MathAgg extends Component { - UNSAFE_componentWillMount() { - if (!this.props.model.variables) { - this.props.onChange( - _.assign({}, this.props.model, { - variables: [{ id: uuid.v1() }], - }) - ); - } - } +const checkModel = model => Array.isArray(model.variables) && model.script !== undefined; - render() { - const { siblings } = this.props; - const htmlId = htmlIdGenerator(); +export function MathAgg(props) { + const { siblings, model } = props; + const htmlId = htmlIdGenerator(); - const defaults = { script: '' }; - const model = { ...defaults, ...this.props.model }; + const handleChange = createChangeHandler(props.onChange, model); + const handleSelectChange = createSelectHandler(handleChange); + const handleTextChange = createTextHandler(handleChange); - const handleChange = createChangeHandler(this.props.onChange, model); - const handleSelectChange = createSelectHandler(handleChange); - const handleTextChange = createTextHandler(handleChange); + useEffect(() => { + if (!checkModel(model)) { + handleChange({ + variables: [newVariable()], + script: '', + }); + } + }, [handleChange, model]); - return ( - - - - - - - - + + + + - + + + + - - - - - - + + - + + + + - - - } - fullWidth - helpText={ - + } + fullWidth + helpText={ + - - - ), - params: params, - paramsName: params.<name>, - paramsValues: params._all.<name>.values, - paramsTimestamps: params._all.<name>.timestamps, - paramsTimestamp: params._timestamp, - paramsIndex: params._index, - paramsInterval: params._interval, - }} - /> - } - > - + + + ), + params: params, + paramsName: params.<name>, + paramsValues: params._all.<name>.values, + paramsTimestamps: params._all.<name>.timestamps, + paramsTimestamp: params._timestamp, + paramsIndex: params._index, + paramsInterval: params._interval, + }} /> - - - - - ); - } + } + > + + + + + + ); } MathAgg.propTypes = { diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/percentile.js b/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/percentile.js index 3ce5be5b6875a8..500bba14d66c93 100644 --- a/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/percentile.js +++ b/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/percentile.js @@ -18,8 +18,7 @@ */ import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import _ from 'lodash'; +import React, { useEffect } from 'react'; import { AggSelect } from './agg_select'; import { FieldSelect } from './field_select'; import { AggRow } from './agg_row'; @@ -39,82 +38,78 @@ import { Percentiles, newPercentile } from './percentile_ui'; const RESTRICT_FIELDS = [KBN_FIELD_TYPES.NUMBER]; -export class PercentileAgg extends Component { - // eslint-disable-line react/no-multi-comp +const checkModel = model => Array.isArray(model.percentiles); - UNSAFE_componentWillMount() { - if (!this.props.model.percentiles) { - this.props.onChange( - _.assign({}, this.props.model, { - percentiles: [newPercentile({ value: 50 })], - }) - ); - } - } +export function PercentileAgg(props) { + const { series, model, panel, fields } = props; + const htmlId = htmlIdGenerator(); - render() { - const { series, model, panel, fields } = this.props; + const handleChange = createChangeHandler(props.onChange, model); + const handleSelectChange = createSelectHandler(handleChange); + const indexPattern = + (series.override_index_pattern && series.series_index_pattern) || panel.index_pattern; - const handleChange = createChangeHandler(this.props.onChange, model); - const handleSelectChange = createSelectHandler(handleChange); - const indexPattern = - (series.override_index_pattern && series.series_index_pattern) || panel.index_pattern; - const htmlId = htmlIdGenerator(); + useEffect(() => { + if (!checkModel(model)) { + handleChange({ + percentiles: [newPercentile({ value: 50 })], + }); + } + }, [handleChange, model]); - return ( - - - - + return ( + + + + + + + + + + + - - - + - - - - } - > - - - - + + + - + - - - ); - } + + + ); } PercentileAgg.propTypes = { diff --git a/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/vars.js b/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/vars.js index 8553f08af1353e..3d4ce601c7244b 100644 --- a/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/vars.js +++ b/src/legacy/core_plugins/vis_type_timeseries/public/components/aggs/vars.js @@ -19,14 +19,17 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; +import uuid from 'uuid'; +import { i18n } from '@kbn/i18n'; import _ from 'lodash'; import { AddDeleteButtons } from '../add_delete_buttons'; import { collectionActions } from '../lib/collection_actions'; import { MetricSelect } from './metric_select'; import { EuiFlexGroup, EuiFlexItem, EuiFieldText } from '@elastic/eui'; -import { injectI18n } from '@kbn/i18n/react'; -class CalculationVarsUi extends Component { +export const newVariable = opts => ({ id: uuid.v1(), name: '', field: '', ...opts }); + +export class CalculationVars extends Component { constructor(props) { super(props); this.renderRow = this.renderRow.bind(this); @@ -42,21 +45,19 @@ class CalculationVarsUi extends Component { } renderRow(row, i, items) { - const handleAdd = collectionActions.handleAdd.bind(null, this.props); + const handleAdd = collectionActions.handleAdd.bind(null, this.props, newVariable); const handleDelete = collectionActions.handleDelete.bind(null, this.props, row); - const { intl } = this.props; + return ( Date: Thu, 23 Jan 2020 10:24:29 +0100 Subject: [PATCH 07/72] [Console] Styling for split panel (#55530) * Update z-index on output panel * Add z-index setting to console input too --- .../console/public/np_ready/application/styles/_app.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/legacy/core_plugins/console/public/np_ready/application/styles/_app.scss b/src/legacy/core_plugins/console/public/np_ready/application/styles/_app.scss index c69440225236b0..b89a43f7455a54 100644 --- a/src/legacy/core_plugins/console/public/np_ready/application/styles/_app.scss +++ b/src/legacy/core_plugins/console/public/np_ready/application/styles/_app.scss @@ -27,6 +27,9 @@ // Required on IE11 to render ace editor correctly after first input. position: relative; + // Give the aria selection border priority when the divider is selected + z-index: 0; + &__spinner { width: 100%; } @@ -35,6 +38,8 @@ .conApp__output { display: flex; flex: 1 1 1px; + // Give the aria selection border priority when the divider is selected + z-index: -1; } .conApp__textAreaLabelHack, From a75436d93efd1f8fd7b5808cb28f3701129afccd Mon Sep 17 00:00:00 2001 From: Pierre Gayvallet Date: Thu, 23 Jan 2020 10:41:21 +0100 Subject: [PATCH 08/72] Run SO migration after plugins setup phase. (#55012) * change setClientFactory api to setClientFactoryProvider * cleanup and add test for service * change the signatures of SO start/setup * fix registerCoreContext by accessing stored start contract reference * move migration inside `start` * adapt and add service tests * add doc and export new types * adapt plugins code * update generated doc * better core access * address some review comments * remove parametrized type from SavedObjectsClientFactory, use KibanaRequest instead * add logs when starting and ending so migration * fix KibanaRequest imports * NITs and review comments * fix alerting FTR test * review comments --- .../core/server/kibana-plugin-server.md | 450 +++++++++--------- ...plugin-server.savedobjectsclientfactory.md | 30 +- ...erver.savedobjectsclientfactoryprovider.md | 13 + ...server.savedobjectsclientwrapperfactory.md | 26 +- ...server.savedobjectsclientwrapperoptions.md | 42 +- ...avedobjectsclientwrapperoptions.request.md | 22 +- ...ositoryfactory.createinternalrepository.md | 13 + ...epositoryfactory.createscopedrepository.md | 13 + ...in-server.savedobjectsrepositoryfactory.md | 21 + ...vedobjectsservicesetup.addclientwrapper.md | 26 +- ...tsservicesetup.createinternalrepository.md | 18 - ...ectsservicesetup.createscopedrepository.md | 18 - ...-plugin-server.savedobjectsservicesetup.md | 68 ++- ...vedobjectsservicesetup.setclientfactory.md | 13 - ...tsservicesetup.setclientfactoryprovider.md | 13 + ...tsservicestart.createinternalrepository.md | 13 + ...ectsservicestart.createscopedrepository.md | 18 + ...-plugin-server.savedobjectsservicestart.md | 42 +- .../elasticsearch/retry_call_cluster.ts | 11 +- src/core/server/index.ts | 2 + src/core/server/legacy/legacy_service.ts | 10 +- src/core/server/plugins/plugin_context.ts | 6 +- src/core/server/saved_objects/index.ts | 1 + .../saved_objects_service.mock.ts | 20 +- .../saved_objects_service.test.mocks.ts | 32 ++ .../saved_objects_service.test.ts | 156 ++++-- .../saved_objects/saved_objects_service.ts | 286 ++++++----- .../server/saved_objects/service/index.ts | 11 +- .../server/saved_objects/service/lib/index.ts | 1 + .../service/lib/scoped_client_provider.ts | 48 +- src/core/server/server.api.md | 35 +- src/core/server/server.ts | 17 +- .../create_or_upgrade.test.ts | 5 +- .../integration_tests/lib/servers.ts | 5 +- .../telemetry_management_collector.ts | 2 +- .../kql_telemetry/kql_telemetry_service.ts | 4 +- .../data/server/kql_telemetry/route.ts | 3 +- .../sample_data/sample_data_registry.ts | 2 +- .../services/sample_data/usage/usage.ts | 8 +- .../validation_telemetry_service.ts | 5 +- .../legacy/plugins/alerting/server/plugin.ts | 9 +- .../export_types/csv/server/execute_job.ts | 6 +- .../server/lib/generate_csv_search.ts | 6 +- .../lib/adapters/framework/adapter_types.ts | 2 +- .../encrypted_saved_objects/server/plugin.ts | 6 +- .../server/saved_objects/index.ts | 7 +- .../security/server/saved_objects/index.ts | 6 +- x-pack/plugins/task_manager/server/plugin.ts | 3 +- 48 files changed, 913 insertions(+), 661 deletions(-) create mode 100644 docs/development/core/server/kibana-plugin-server.savedobjectsclientfactoryprovider.md create mode 100644 docs/development/core/server/kibana-plugin-server.savedobjectsrepositoryfactory.createinternalrepository.md create mode 100644 docs/development/core/server/kibana-plugin-server.savedobjectsrepositoryfactory.createscopedrepository.md create mode 100644 docs/development/core/server/kibana-plugin-server.savedobjectsrepositoryfactory.md delete mode 100644 docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.createinternalrepository.md delete mode 100644 docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.createscopedrepository.md delete mode 100644 docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.setclientfactory.md create mode 100644 docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.setclientfactoryprovider.md create mode 100644 docs/development/core/server/kibana-plugin-server.savedobjectsservicestart.createinternalrepository.md create mode 100644 docs/development/core/server/kibana-plugin-server.savedobjectsservicestart.createscopedrepository.md create mode 100644 src/core/server/saved_objects/saved_objects_service.test.mocks.ts diff --git a/docs/development/core/server/kibana-plugin-server.md b/docs/development/core/server/kibana-plugin-server.md index cd469fe6a98c2a..15f5329d494c22 100644 --- a/docs/development/core/server/kibana-plugin-server.md +++ b/docs/development/core/server/kibana-plugin-server.md @@ -1,224 +1,226 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) - -## kibana-plugin-server package - -The Kibana Core APIs for server-side plugins. - -A plugin requires a `kibana.json` file at it's root directory that follows [the manfiest schema](./kibana-plugin-server.pluginmanifest.md) to define static plugin information required to load the plugin. - -A plugin's `server/index` file must contain a named import, `plugin`, that implements [PluginInitializer](./kibana-plugin-server.plugininitializer.md) which returns an object that implements [Plugin](./kibana-plugin-server.plugin.md). - -The plugin integrates with the core system via lifecycle events: `setup`, `start`, and `stop`. In each lifecycle method, the plugin will receive the corresponding core services available (either [CoreSetup](./kibana-plugin-server.coresetup.md) or [CoreStart](./kibana-plugin-server.corestart.md)) and any interfaces returned by dependency plugins' lifecycle method. Anything returned by the plugin's lifecycle method will be exposed to downstream dependencies when their corresponding lifecycle methods are invoked. - -## Classes - -| Class | Description | -| --- | --- | -| [BasePath](./kibana-plugin-server.basepath.md) | Access or manipulate the Kibana base path | -| [ClusterClient](./kibana-plugin-server.clusterclient.md) | Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via asScoped(...)).See [ClusterClient](./kibana-plugin-server.clusterclient.md). | -| [CspConfig](./kibana-plugin-server.cspconfig.md) | CSP configuration for use in Kibana. | -| [ElasticsearchErrorHelpers](./kibana-plugin-server.elasticsearcherrorhelpers.md) | Helpers for working with errors returned from the Elasticsearch service.Since the internal data of errors are subject to change, consumers of the Elasticsearch service should always use these helpers to classify errors instead of checking error internals such as body.error.header[WWW-Authenticate] | -| [KibanaRequest](./kibana-plugin-server.kibanarequest.md) | Kibana specific abstraction for an incoming request. | -| [RouteValidationError](./kibana-plugin-server.routevalidationerror.md) | Error to return when the validation is not successful. | -| [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) | | -| [SavedObjectsErrorHelpers](./kibana-plugin-server.savedobjectserrorhelpers.md) | | -| [SavedObjectsRepository](./kibana-plugin-server.savedobjectsrepository.md) | | -| [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md) | Serves the same purpose as "normal" ClusterClient but exposes additional callAsCurrentUser method that doesn't use credentials of the Kibana internal user (as callAsInternalUser does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API.See [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md). | - -## Enumerations - -| Enumeration | Description | -| --- | --- | -| [AuthResultType](./kibana-plugin-server.authresulttype.md) | | -| [AuthStatus](./kibana-plugin-server.authstatus.md) | Status indicating an outcome of the authentication. | - -## Interfaces - -| Interface | Description | -| --- | --- | -| [APICaller](./kibana-plugin-server.apicaller.md) | | -| [AssistanceAPIResponse](./kibana-plugin-server.assistanceapiresponse.md) | | -| [AssistantAPIClientParams](./kibana-plugin-server.assistantapiclientparams.md) | | -| [Authenticated](./kibana-plugin-server.authenticated.md) | | -| [AuthResultParams](./kibana-plugin-server.authresultparams.md) | Result of an incoming request authentication. | -| [AuthToolkit](./kibana-plugin-server.authtoolkit.md) | A tool set defining an outcome of Auth interceptor for incoming request. | -| [CallAPIOptions](./kibana-plugin-server.callapioptions.md) | The set of options that defines how API call should be made and result be processed. | -| [Capabilities](./kibana-plugin-server.capabilities.md) | The read-only set of capabilities available for the current UI session. Capabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID, and the boolean is a flag indicating if the capability is enabled or disabled. | -| [CapabilitiesSetup](./kibana-plugin-server.capabilitiessetup.md) | APIs to manage the [Capabilities](./kibana-plugin-server.capabilities.md) that will be used by the application.Plugins relying on capabilities to toggle some of their features should register them during the setup phase using the registerProvider method.Plugins having the responsibility to restrict capabilities depending on a given context should register their capabilities switcher using the registerSwitcher method.Refers to the methods documentation for complete description and examples. | -| [CapabilitiesStart](./kibana-plugin-server.capabilitiesstart.md) | APIs to access the application [Capabilities](./kibana-plugin-server.capabilities.md). | -| [ConfigDeprecationFactory](./kibana-plugin-server.configdeprecationfactory.md) | Provides helpers to generates the most commonly used [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md) when invoking a [ConfigDeprecationProvider](./kibana-plugin-server.configdeprecationprovider.md).See methods documentation for more detailed examples. | -| [ContextSetup](./kibana-plugin-server.contextsetup.md) | An object that handles registration of context providers and configuring handlers with context. | -| [CoreSetup](./kibana-plugin-server.coresetup.md) | Context passed to the plugins setup method. | -| [CoreStart](./kibana-plugin-server.corestart.md) | Context passed to the plugins start method. | -| [CustomHttpResponseOptions](./kibana-plugin-server.customhttpresponseoptions.md) | HTTP response parameters for a response with adjustable status code. | -| [DeprecationAPIClientParams](./kibana-plugin-server.deprecationapiclientparams.md) | | -| [DeprecationAPIResponse](./kibana-plugin-server.deprecationapiresponse.md) | | -| [DeprecationInfo](./kibana-plugin-server.deprecationinfo.md) | | -| [DeprecationSettings](./kibana-plugin-server.deprecationsettings.md) | UiSettings deprecation field options. | -| [DiscoveredPlugin](./kibana-plugin-server.discoveredplugin.md) | Small container object used to expose information about discovered plugins that may or may not have been started. | -| [ElasticsearchError](./kibana-plugin-server.elasticsearcherror.md) | | -| [ElasticsearchServiceSetup](./kibana-plugin-server.elasticsearchservicesetup.md) | | -| [EnvironmentMode](./kibana-plugin-server.environmentmode.md) | | -| [ErrorHttpResponseOptions](./kibana-plugin-server.errorhttpresponseoptions.md) | HTTP response parameters | -| [FakeRequest](./kibana-plugin-server.fakerequest.md) | Fake request object created manually by Kibana plugins. | -| [HttpResponseOptions](./kibana-plugin-server.httpresponseoptions.md) | HTTP response parameters | -| [HttpServiceSetup](./kibana-plugin-server.httpservicesetup.md) | Kibana HTTP Service provides own abstraction for work with HTTP stack. Plugins don't have direct access to hapi server and its primitives anymore. Moreover, plugins shouldn't rely on the fact that HTTP Service uses one or another library under the hood. This gives the platform flexibility to upgrade or changing our internal HTTP stack without breaking plugins. If the HTTP Service lacks functionality you need, we are happy to discuss and support your needs. | -| [HttpServiceStart](./kibana-plugin-server.httpservicestart.md) | | -| [IContextContainer](./kibana-plugin-server.icontextcontainer.md) | An object that handles registration of context providers and configuring handlers with context. | -| [ICspConfig](./kibana-plugin-server.icspconfig.md) | CSP configuration for use in Kibana. | -| [IKibanaResponse](./kibana-plugin-server.ikibanaresponse.md) | A response data object, expected to returned as a result of [RequestHandler](./kibana-plugin-server.requesthandler.md) execution | -| [IKibanaSocket](./kibana-plugin-server.ikibanasocket.md) | A tiny abstraction for TCP socket. | -| [ImageValidation](./kibana-plugin-server.imagevalidation.md) | | -| [IndexSettingsDeprecationInfo](./kibana-plugin-server.indexsettingsdeprecationinfo.md) | | -| [IRenderOptions](./kibana-plugin-server.irenderoptions.md) | | -| [IRouter](./kibana-plugin-server.irouter.md) | Registers route handlers for specified resource path and method. See [RouteConfig](./kibana-plugin-server.routeconfig.md) and [RequestHandler](./kibana-plugin-server.requesthandler.md) for more information about arguments to route registrations. | -| [IScopedRenderingClient](./kibana-plugin-server.iscopedrenderingclient.md) | | -| [IUiSettingsClient](./kibana-plugin-server.iuisettingsclient.md) | Server-side client that provides access to the advanced settings stored in elasticsearch. The settings provide control over the behavior of the Kibana application. For example, a user can specify how to display numeric or date fields. Users can adjust the settings via Management UI. | -| [KibanaRequestEvents](./kibana-plugin-server.kibanarequestevents.md) | Request events. | -| [KibanaRequestRoute](./kibana-plugin-server.kibanarequestroute.md) | Request specific route information exposed to a handler. | -| [LegacyRequest](./kibana-plugin-server.legacyrequest.md) | | -| [LegacyServiceSetupDeps](./kibana-plugin-server.legacyservicesetupdeps.md) | | -| [LegacyServiceStartDeps](./kibana-plugin-server.legacyservicestartdeps.md) | | -| [Logger](./kibana-plugin-server.logger.md) | Logger exposes all the necessary methods to log any type of information and this is the interface used by the logging consumers including plugins. | -| [LoggerFactory](./kibana-plugin-server.loggerfactory.md) | The single purpose of LoggerFactory interface is to define a way to retrieve a context-based logger instance. | -| [LogMeta](./kibana-plugin-server.logmeta.md) | Contextual metadata | -| [OnPostAuthToolkit](./kibana-plugin-server.onpostauthtoolkit.md) | A tool set defining an outcome of OnPostAuth interceptor for incoming request. | -| [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. | -| [OnPreResponseExtensions](./kibana-plugin-server.onpreresponseextensions.md) | Additional data to extend a response. | -| [OnPreResponseInfo](./kibana-plugin-server.onpreresponseinfo.md) | Response status code. | -| [OnPreResponseToolkit](./kibana-plugin-server.onpreresponsetoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. | -| [PackageInfo](./kibana-plugin-server.packageinfo.md) | | -| [Plugin](./kibana-plugin-server.plugin.md) | The interface that should be returned by a PluginInitializer. | -| [PluginConfigDescriptor](./kibana-plugin-server.pluginconfigdescriptor.md) | Describes a plugin configuration properties. | -| [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md) | Context that's available to plugins during initialization stage. | -| [PluginManifest](./kibana-plugin-server.pluginmanifest.md) | Describes the set of required and optional properties plugin can define in its mandatory JSON manifest file. | -| [PluginsServiceSetup](./kibana-plugin-server.pluginsservicesetup.md) | | -| [PluginsServiceStart](./kibana-plugin-server.pluginsservicestart.md) | | -| [RequestHandlerContext](./kibana-plugin-server.requesthandlercontext.md) | Plugin specific context passed to a route handler.Provides the following clients: - [rendering](./kibana-plugin-server.iscopedrenderingclient.md) - Rendering client which uses the data of the incoming request - [savedObjects.client](./kibana-plugin-server.savedobjectsclient.md) - Saved Objects client which uses the credentials of the incoming request - [elasticsearch.dataClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch data client which uses the credentials of the incoming request - [elasticsearch.adminClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch admin client which uses the credentials of the incoming request - [uiSettings.client](./kibana-plugin-server.iuisettingsclient.md) - uiSettings client which uses the credentials of the incoming request | -| [RouteConfig](./kibana-plugin-server.routeconfig.md) | Route specific configuration. | -| [RouteConfigOptions](./kibana-plugin-server.routeconfigoptions.md) | Additional route options. | -| [RouteConfigOptionsBody](./kibana-plugin-server.routeconfigoptionsbody.md) | Additional body options for a route | -| [RouteValidationResultFactory](./kibana-plugin-server.routevalidationresultfactory.md) | Validation result factory to be used in the custom validation function to return the valid data or validation errorsSee [RouteValidationFunction](./kibana-plugin-server.routevalidationfunction.md). | -| [RouteValidatorConfig](./kibana-plugin-server.routevalidatorconfig.md) | The configuration object to the RouteValidator class. Set params, query and/or body to specify the validation logic to follow for that property. | -| [RouteValidatorOptions](./kibana-plugin-server.routevalidatoroptions.md) | Additional options for the RouteValidator class to modify its default behaviour. | -| [SavedObject](./kibana-plugin-server.savedobject.md) | | -| [SavedObjectAttributes](./kibana-plugin-server.savedobjectattributes.md) | The data for a Saved Object is stored as an object in the attributes property. | -| [SavedObjectReference](./kibana-plugin-server.savedobjectreference.md) | A reference to another saved object. | -| [SavedObjectsBaseOptions](./kibana-plugin-server.savedobjectsbaseoptions.md) | | -| [SavedObjectsBulkCreateObject](./kibana-plugin-server.savedobjectsbulkcreateobject.md) | | -| [SavedObjectsBulkGetObject](./kibana-plugin-server.savedobjectsbulkgetobject.md) | | -| [SavedObjectsBulkResponse](./kibana-plugin-server.savedobjectsbulkresponse.md) | | -| [SavedObjectsBulkUpdateObject](./kibana-plugin-server.savedobjectsbulkupdateobject.md) | | -| [SavedObjectsBulkUpdateOptions](./kibana-plugin-server.savedobjectsbulkupdateoptions.md) | | -| [SavedObjectsBulkUpdateResponse](./kibana-plugin-server.savedobjectsbulkupdateresponse.md) | | -| [SavedObjectsClientProviderOptions](./kibana-plugin-server.savedobjectsclientprovideroptions.md) | Options to control the creation of the Saved Objects Client. | -| [SavedObjectsClientWrapperOptions](./kibana-plugin-server.savedobjectsclientwrapperoptions.md) | Options passed to each SavedObjectsClientWrapperFactory to aid in creating the wrapper instance. | -| [SavedObjectsCreateOptions](./kibana-plugin-server.savedobjectscreateoptions.md) | | -| [SavedObjectsDeleteByNamespaceOptions](./kibana-plugin-server.savedobjectsdeletebynamespaceoptions.md) | | -| [SavedObjectsDeleteOptions](./kibana-plugin-server.savedobjectsdeleteoptions.md) | | -| [SavedObjectsExportOptions](./kibana-plugin-server.savedobjectsexportoptions.md) | Options controlling the export operation. | -| [SavedObjectsExportResultDetails](./kibana-plugin-server.savedobjectsexportresultdetails.md) | Structure of the export result details entry | -| [SavedObjectsFindOptions](./kibana-plugin-server.savedobjectsfindoptions.md) | | -| [SavedObjectsFindResponse](./kibana-plugin-server.savedobjectsfindresponse.md) | Return type of the Saved Objects find() method.\*Note\*: this type is different between the Public and Server Saved Objects clients. | -| [SavedObjectsImportConflictError](./kibana-plugin-server.savedobjectsimportconflicterror.md) | Represents a failure to import due to a conflict. | -| [SavedObjectsImportError](./kibana-plugin-server.savedobjectsimporterror.md) | Represents a failure to import. | -| [SavedObjectsImportMissingReferencesError](./kibana-plugin-server.savedobjectsimportmissingreferenceserror.md) | Represents a failure to import due to missing references. | -| [SavedObjectsImportOptions](./kibana-plugin-server.savedobjectsimportoptions.md) | Options to control the import operation. | -| [SavedObjectsImportResponse](./kibana-plugin-server.savedobjectsimportresponse.md) | The response describing the result of an import. | -| [SavedObjectsImportRetry](./kibana-plugin-server.savedobjectsimportretry.md) | Describes a retry operation for importing a saved object. | -| [SavedObjectsImportUnknownError](./kibana-plugin-server.savedobjectsimportunknownerror.md) | Represents a failure to import due to an unknown reason. | -| [SavedObjectsImportUnsupportedTypeError](./kibana-plugin-server.savedobjectsimportunsupportedtypeerror.md) | Represents a failure to import due to having an unsupported saved object type. | -| [SavedObjectsIncrementCounterOptions](./kibana-plugin-server.savedobjectsincrementcounteroptions.md) | | -| [SavedObjectsMigrationLogger](./kibana-plugin-server.savedobjectsmigrationlogger.md) | | -| [SavedObjectsMigrationVersion](./kibana-plugin-server.savedobjectsmigrationversion.md) | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | -| [SavedObjectsRawDoc](./kibana-plugin-server.savedobjectsrawdoc.md) | A raw document as represented directly in the saved object index. | -| [SavedObjectsResolveImportErrorsOptions](./kibana-plugin-server.savedobjectsresolveimporterrorsoptions.md) | Options to control the "resolve import" operation. | -| [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) | Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing and querying state. The SavedObjectsServiceSetup API exposes methods for creating and registering Saved Object client wrappers. | -| [SavedObjectsServiceStart](./kibana-plugin-server.savedobjectsservicestart.md) | Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing and querying state. The SavedObjectsServiceStart API provides a scoped Saved Objects client for interacting with Saved Objects. | -| [SavedObjectsUpdateOptions](./kibana-plugin-server.savedobjectsupdateoptions.md) | | -| [SavedObjectsUpdateResponse](./kibana-plugin-server.savedobjectsupdateresponse.md) | | -| [SessionCookieValidationResult](./kibana-plugin-server.sessioncookievalidationresult.md) | Return type from a function to validate cookie contents. | -| [SessionStorage](./kibana-plugin-server.sessionstorage.md) | Provides an interface to store and retrieve data across requests. | -| [SessionStorageCookieOptions](./kibana-plugin-server.sessionstoragecookieoptions.md) | Configuration used to create HTTP session storage based on top of cookie mechanism. | -| [SessionStorageFactory](./kibana-plugin-server.sessionstoragefactory.md) | SessionStorage factory to bind one to an incoming request | -| [StringValidation](./kibana-plugin-server.stringvalidation.md) | | -| [UiSettingsParams](./kibana-plugin-server.uisettingsparams.md) | UiSettings parameters defined by the plugins. | -| [UiSettingsServiceSetup](./kibana-plugin-server.uisettingsservicesetup.md) | | -| [UiSettingsServiceStart](./kibana-plugin-server.uisettingsservicestart.md) | | -| [UserProvidedValues](./kibana-plugin-server.userprovidedvalues.md) | Describes the values explicitly set by user. | -| [UuidServiceSetup](./kibana-plugin-server.uuidservicesetup.md) | APIs to access the application's instance uuid. | - -## Variables - -| Variable | Description | -| --- | --- | -| [kibanaResponseFactory](./kibana-plugin-server.kibanaresponsefactory.md) | Set of helpers used to create KibanaResponse to form HTTP response on an incoming request. Should be returned as a result of [RequestHandler](./kibana-plugin-server.requesthandler.md) execution. | -| [validBodyOutput](./kibana-plugin-server.validbodyoutput.md) | The set of valid body.output | - -## Type Aliases - -| Type Alias | Description | -| --- | --- | -| [AuthenticationHandler](./kibana-plugin-server.authenticationhandler.md) | See [AuthToolkit](./kibana-plugin-server.authtoolkit.md). | -| [AuthHeaders](./kibana-plugin-server.authheaders.md) | Auth Headers map | -| [AuthResult](./kibana-plugin-server.authresult.md) | | -| [CapabilitiesProvider](./kibana-plugin-server.capabilitiesprovider.md) | See [CapabilitiesSetup](./kibana-plugin-server.capabilitiessetup.md) | -| [CapabilitiesSwitcher](./kibana-plugin-server.capabilitiesswitcher.md) | See [CapabilitiesSetup](./kibana-plugin-server.capabilitiessetup.md) | -| [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md) | Configuration deprecation returned from [ConfigDeprecationProvider](./kibana-plugin-server.configdeprecationprovider.md) that handles a single deprecation from the configuration. | -| [ConfigDeprecationLogger](./kibana-plugin-server.configdeprecationlogger.md) | Logger interface used when invoking a [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md) | -| [ConfigDeprecationProvider](./kibana-plugin-server.configdeprecationprovider.md) | A provider that should returns a list of [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md).See [ConfigDeprecationFactory](./kibana-plugin-server.configdeprecationfactory.md) for more usage examples. | -| [ConfigPath](./kibana-plugin-server.configpath.md) | | -| [ElasticsearchClientConfig](./kibana-plugin-server.elasticsearchclientconfig.md) | | -| [GetAuthHeaders](./kibana-plugin-server.getauthheaders.md) | Get headers to authenticate a user against Elasticsearch. | -| [GetAuthState](./kibana-plugin-server.getauthstate.md) | Get authentication state for a request. Returned by auth interceptor. | -| [HandlerContextType](./kibana-plugin-server.handlercontexttype.md) | Extracts the type of the first argument of a [HandlerFunction](./kibana-plugin-server.handlerfunction.md) to represent the type of the context. | -| [HandlerFunction](./kibana-plugin-server.handlerfunction.md) | A function that accepts a context object and an optional number of additional arguments. Used for the generic types in [IContextContainer](./kibana-plugin-server.icontextcontainer.md) | -| [HandlerParameters](./kibana-plugin-server.handlerparameters.md) | Extracts the types of the additional arguments of a [HandlerFunction](./kibana-plugin-server.handlerfunction.md), excluding the [HandlerContextType](./kibana-plugin-server.handlercontexttype.md). | -| [Headers](./kibana-plugin-server.headers.md) | Http request headers to read. | -| [HttpResponsePayload](./kibana-plugin-server.httpresponsepayload.md) | Data send to the client as a response payload. | -| [IBasePath](./kibana-plugin-server.ibasepath.md) | Access or manipulate the Kibana base path[BasePath](./kibana-plugin-server.basepath.md) | -| [IClusterClient](./kibana-plugin-server.iclusterclient.md) | Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via asScoped(...)).See [ClusterClient](./kibana-plugin-server.clusterclient.md). | -| [IContextProvider](./kibana-plugin-server.icontextprovider.md) | A function that returns a context value for a specific key of given context type. | -| [ICustomClusterClient](./kibana-plugin-server.icustomclusterclient.md) | Represents an Elasticsearch cluster API client created by a plugin. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via asScoped(...)).See [ClusterClient](./kibana-plugin-server.clusterclient.md). | -| [IsAuthenticated](./kibana-plugin-server.isauthenticated.md) | Return authentication status for a request. | -| [ISavedObjectsRepository](./kibana-plugin-server.isavedobjectsrepository.md) | See [SavedObjectsRepository](./kibana-plugin-server.savedobjectsrepository.md) | -| [IScopedClusterClient](./kibana-plugin-server.iscopedclusterclient.md) | Serves the same purpose as "normal" ClusterClient but exposes additional callAsCurrentUser method that doesn't use credentials of the Kibana internal user (as callAsInternalUser does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API.See [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md). | -| [KibanaRequestRouteOptions](./kibana-plugin-server.kibanarequestrouteoptions.md) | Route options: If 'GET' or 'OPTIONS' method, body options won't be returned. | -| [KibanaResponseFactory](./kibana-plugin-server.kibanaresponsefactory.md) | Creates an object containing request response payload, HTTP headers, error details, and other data transmitted to the client. | -| [KnownHeaders](./kibana-plugin-server.knownheaders.md) | Set of well-known HTTP headers. | -| [LifecycleResponseFactory](./kibana-plugin-server.lifecycleresponsefactory.md) | Creates an object containing redirection or error response with error details, HTTP headers, and other data transmitted to the client. | -| [MIGRATION\_ASSISTANCE\_INDEX\_ACTION](./kibana-plugin-server.migration_assistance_index_action.md) | | -| [MIGRATION\_DEPRECATION\_LEVEL](./kibana-plugin-server.migration_deprecation_level.md) | | -| [MutatingOperationRefreshSetting](./kibana-plugin-server.mutatingoperationrefreshsetting.md) | Elasticsearch Refresh setting for mutating operation | -| [OnPostAuthHandler](./kibana-plugin-server.onpostauthhandler.md) | See [OnPostAuthToolkit](./kibana-plugin-server.onpostauthtoolkit.md). | -| [OnPreAuthHandler](./kibana-plugin-server.onpreauthhandler.md) | See [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md). | -| [OnPreResponseHandler](./kibana-plugin-server.onpreresponsehandler.md) | See [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md). | -| [PluginConfigSchema](./kibana-plugin-server.pluginconfigschema.md) | Dedicated type for plugin configuration schema. | -| [PluginInitializer](./kibana-plugin-server.plugininitializer.md) | The plugin export at the root of a plugin's server directory should conform to this interface. | -| [PluginName](./kibana-plugin-server.pluginname.md) | Dedicated type for plugin name/id that is supposed to make Map/Set/Arrays that use it as a key or value more obvious. | -| [PluginOpaqueId](./kibana-plugin-server.pluginopaqueid.md) | | -| [RecursiveReadonly](./kibana-plugin-server.recursivereadonly.md) | | -| [RedirectResponseOptions](./kibana-plugin-server.redirectresponseoptions.md) | HTTP response parameters for redirection response | -| [RequestHandler](./kibana-plugin-server.requesthandler.md) | A function executed when route path matched requested resource path. Request handler is expected to return a result of one of [KibanaResponseFactory](./kibana-plugin-server.kibanaresponsefactory.md) functions. | -| [RequestHandlerContextContainer](./kibana-plugin-server.requesthandlercontextcontainer.md) | An object that handles registration of http request context providers. | -| [RequestHandlerContextProvider](./kibana-plugin-server.requesthandlercontextprovider.md) | Context provider for request handler. Extends request context object with provided functionality or data. | -| [ResponseError](./kibana-plugin-server.responseerror.md) | Error message and optional data send to the client in case of error. | -| [ResponseErrorAttributes](./kibana-plugin-server.responseerrorattributes.md) | Additional data to provide error details. | -| [ResponseHeaders](./kibana-plugin-server.responseheaders.md) | Http response headers to set. | -| [RouteContentType](./kibana-plugin-server.routecontenttype.md) | The set of supported parseable Content-Types | -| [RouteMethod](./kibana-plugin-server.routemethod.md) | The set of common HTTP methods supported by Kibana routing. | -| [RouteRegistrar](./kibana-plugin-server.routeregistrar.md) | Route handler common definition | -| [RouteValidationFunction](./kibana-plugin-server.routevalidationfunction.md) | The custom validation function if @kbn/config-schema is not a valid solution for your specific plugin requirements. | -| [RouteValidationSpec](./kibana-plugin-server.routevalidationspec.md) | Allowed property validation options: either @kbn/config-schema validations or custom validation functionsSee [RouteValidationFunction](./kibana-plugin-server.routevalidationfunction.md) for custom validation. | -| [RouteValidatorFullConfig](./kibana-plugin-server.routevalidatorfullconfig.md) | Route validations config and options merged into one object | -| [SavedObjectAttribute](./kibana-plugin-server.savedobjectattribute.md) | Type definition for a Saved Object attribute value | -| [SavedObjectAttributeSingle](./kibana-plugin-server.savedobjectattributesingle.md) | Don't use this type, it's simply a helper type for [SavedObjectAttribute](./kibana-plugin-server.savedobjectattribute.md) | -| [SavedObjectsClientContract](./kibana-plugin-server.savedobjectsclientcontract.md) | Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing plugin state.\#\# SavedObjectsClient errorsSince the SavedObjectsClient has its hands in everything we are a little paranoid about the way we present errors back to to application code. Ideally, all errors will be either:1. Caused by bad implementation (ie. undefined is not a function) and as such unpredictable 2. An error that has been classified and decorated appropriately by the decorators in [SavedObjectsErrorHelpers](./kibana-plugin-server.savedobjectserrorhelpers.md)Type 1 errors are inevitable, but since all expected/handle-able errors should be Type 2 the isXYZError() helpers exposed at SavedObjectsErrorHelpers should be used to understand and manage error responses from the SavedObjectsClient.Type 2 errors are decorated versions of the source error, so if the elasticsearch client threw an error it will be decorated based on its type. That means that rather than looking for error.body.error.type or doing substring checks on error.body.error.reason, just use the helpers to understand the meaning of the error:\`\`\`js if (SavedObjectsErrorHelpers.isNotFoundError(error)) { // handle 404 }if (SavedObjectsErrorHelpers.isNotAuthorizedError(error)) { // 401 handling should be automatic, but in case you wanted to know }// always rethrow the error unless you handle it throw error; \`\`\`\#\#\# 404s from missing indexFrom the perspective of application code and APIs the SavedObjectsClient is a black box that persists objects. One of the internal details that users have no control over is that we use an elasticsearch index for persistance and that index might be missing.At the time of writing we are in the process of transitioning away from the operating assumption that the SavedObjects index is always available. Part of this transition is handling errors resulting from an index missing. These used to trigger a 500 error in most cases, and in others cause 404s with different error messages.From my (Spencer) perspective, a 404 from the SavedObjectsApi is a 404; The object the request/call was targeting could not be found. This is why \#14141 takes special care to ensure that 404 errors are generic and don't distinguish between index missing or document missing.\#\#\# 503s from missing indexUnlike all other methods, create requests are supposed to succeed even when the Kibana index does not exist because it will be automatically created by elasticsearch. When that is not the case it is because Elasticsearch's action.auto_create_index setting prevents it from being created automatically so we throw a special 503 with the intention of informing the user that their Elasticsearch settings need to be updated.See [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) See [SavedObjectsErrorHelpers](./kibana-plugin-server.savedobjectserrorhelpers.md) | -| [SavedObjectsClientFactory](./kibana-plugin-server.savedobjectsclientfactory.md) | Describes the factory used to create instances of the Saved Objects Client. | -| [SavedObjectsClientWrapperFactory](./kibana-plugin-server.savedobjectsclientwrapperfactory.md) | Describes the factory used to create instances of Saved Objects Client Wrappers. | -| [ScopeableRequest](./kibana-plugin-server.scopeablerequest.md) | A user credentials container. It accommodates the necessary auth credentials to impersonate the current user.See [KibanaRequest](./kibana-plugin-server.kibanarequest.md). | -| [SharedGlobalConfig](./kibana-plugin-server.sharedglobalconfig.md) | | -| [UiSettingsType](./kibana-plugin-server.uisettingstype.md) | UI element type to represent the settings. | - + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) + +## kibana-plugin-server package + +The Kibana Core APIs for server-side plugins. + +A plugin requires a `kibana.json` file at it's root directory that follows [the manfiest schema](./kibana-plugin-server.pluginmanifest.md) to define static plugin information required to load the plugin. + +A plugin's `server/index` file must contain a named import, `plugin`, that implements [PluginInitializer](./kibana-plugin-server.plugininitializer.md) which returns an object that implements [Plugin](./kibana-plugin-server.plugin.md). + +The plugin integrates with the core system via lifecycle events: `setup`, `start`, and `stop`. In each lifecycle method, the plugin will receive the corresponding core services available (either [CoreSetup](./kibana-plugin-server.coresetup.md) or [CoreStart](./kibana-plugin-server.corestart.md)) and any interfaces returned by dependency plugins' lifecycle method. Anything returned by the plugin's lifecycle method will be exposed to downstream dependencies when their corresponding lifecycle methods are invoked. + +## Classes + +| Class | Description | +| --- | --- | +| [BasePath](./kibana-plugin-server.basepath.md) | Access or manipulate the Kibana base path | +| [ClusterClient](./kibana-plugin-server.clusterclient.md) | Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via asScoped(...)).See [ClusterClient](./kibana-plugin-server.clusterclient.md). | +| [CspConfig](./kibana-plugin-server.cspconfig.md) | CSP configuration for use in Kibana. | +| [ElasticsearchErrorHelpers](./kibana-plugin-server.elasticsearcherrorhelpers.md) | Helpers for working with errors returned from the Elasticsearch service.Since the internal data of errors are subject to change, consumers of the Elasticsearch service should always use these helpers to classify errors instead of checking error internals such as body.error.header[WWW-Authenticate] | +| [KibanaRequest](./kibana-plugin-server.kibanarequest.md) | Kibana specific abstraction for an incoming request. | +| [RouteValidationError](./kibana-plugin-server.routevalidationerror.md) | Error to return when the validation is not successful. | +| [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) | | +| [SavedObjectsErrorHelpers](./kibana-plugin-server.savedobjectserrorhelpers.md) | | +| [SavedObjectsRepository](./kibana-plugin-server.savedobjectsrepository.md) | | +| [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md) | Serves the same purpose as "normal" ClusterClient but exposes additional callAsCurrentUser method that doesn't use credentials of the Kibana internal user (as callAsInternalUser does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API.See [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md). | + +## Enumerations + +| Enumeration | Description | +| --- | --- | +| [AuthResultType](./kibana-plugin-server.authresulttype.md) | | +| [AuthStatus](./kibana-plugin-server.authstatus.md) | Status indicating an outcome of the authentication. | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [APICaller](./kibana-plugin-server.apicaller.md) | | +| [AssistanceAPIResponse](./kibana-plugin-server.assistanceapiresponse.md) | | +| [AssistantAPIClientParams](./kibana-plugin-server.assistantapiclientparams.md) | | +| [Authenticated](./kibana-plugin-server.authenticated.md) | | +| [AuthResultParams](./kibana-plugin-server.authresultparams.md) | Result of an incoming request authentication. | +| [AuthToolkit](./kibana-plugin-server.authtoolkit.md) | A tool set defining an outcome of Auth interceptor for incoming request. | +| [CallAPIOptions](./kibana-plugin-server.callapioptions.md) | The set of options that defines how API call should be made and result be processed. | +| [Capabilities](./kibana-plugin-server.capabilities.md) | The read-only set of capabilities available for the current UI session. Capabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID, and the boolean is a flag indicating if the capability is enabled or disabled. | +| [CapabilitiesSetup](./kibana-plugin-server.capabilitiessetup.md) | APIs to manage the [Capabilities](./kibana-plugin-server.capabilities.md) that will be used by the application.Plugins relying on capabilities to toggle some of their features should register them during the setup phase using the registerProvider method.Plugins having the responsibility to restrict capabilities depending on a given context should register their capabilities switcher using the registerSwitcher method.Refers to the methods documentation for complete description and examples. | +| [CapabilitiesStart](./kibana-plugin-server.capabilitiesstart.md) | APIs to access the application [Capabilities](./kibana-plugin-server.capabilities.md). | +| [ConfigDeprecationFactory](./kibana-plugin-server.configdeprecationfactory.md) | Provides helpers to generates the most commonly used [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md) when invoking a [ConfigDeprecationProvider](./kibana-plugin-server.configdeprecationprovider.md).See methods documentation for more detailed examples. | +| [ContextSetup](./kibana-plugin-server.contextsetup.md) | An object that handles registration of context providers and configuring handlers with context. | +| [CoreSetup](./kibana-plugin-server.coresetup.md) | Context passed to the plugins setup method. | +| [CoreStart](./kibana-plugin-server.corestart.md) | Context passed to the plugins start method. | +| [CustomHttpResponseOptions](./kibana-plugin-server.customhttpresponseoptions.md) | HTTP response parameters for a response with adjustable status code. | +| [DeprecationAPIClientParams](./kibana-plugin-server.deprecationapiclientparams.md) | | +| [DeprecationAPIResponse](./kibana-plugin-server.deprecationapiresponse.md) | | +| [DeprecationInfo](./kibana-plugin-server.deprecationinfo.md) | | +| [DeprecationSettings](./kibana-plugin-server.deprecationsettings.md) | UiSettings deprecation field options. | +| [DiscoveredPlugin](./kibana-plugin-server.discoveredplugin.md) | Small container object used to expose information about discovered plugins that may or may not have been started. | +| [ElasticsearchError](./kibana-plugin-server.elasticsearcherror.md) | | +| [ElasticsearchServiceSetup](./kibana-plugin-server.elasticsearchservicesetup.md) | | +| [EnvironmentMode](./kibana-plugin-server.environmentmode.md) | | +| [ErrorHttpResponseOptions](./kibana-plugin-server.errorhttpresponseoptions.md) | HTTP response parameters | +| [FakeRequest](./kibana-plugin-server.fakerequest.md) | Fake request object created manually by Kibana plugins. | +| [HttpResponseOptions](./kibana-plugin-server.httpresponseoptions.md) | HTTP response parameters | +| [HttpServiceSetup](./kibana-plugin-server.httpservicesetup.md) | Kibana HTTP Service provides own abstraction for work with HTTP stack. Plugins don't have direct access to hapi server and its primitives anymore. Moreover, plugins shouldn't rely on the fact that HTTP Service uses one or another library under the hood. This gives the platform flexibility to upgrade or changing our internal HTTP stack without breaking plugins. If the HTTP Service lacks functionality you need, we are happy to discuss and support your needs. | +| [HttpServiceStart](./kibana-plugin-server.httpservicestart.md) | | +| [IContextContainer](./kibana-plugin-server.icontextcontainer.md) | An object that handles registration of context providers and configuring handlers with context. | +| [ICspConfig](./kibana-plugin-server.icspconfig.md) | CSP configuration for use in Kibana. | +| [IKibanaResponse](./kibana-plugin-server.ikibanaresponse.md) | A response data object, expected to returned as a result of [RequestHandler](./kibana-plugin-server.requesthandler.md) execution | +| [IKibanaSocket](./kibana-plugin-server.ikibanasocket.md) | A tiny abstraction for TCP socket. | +| [ImageValidation](./kibana-plugin-server.imagevalidation.md) | | +| [IndexSettingsDeprecationInfo](./kibana-plugin-server.indexsettingsdeprecationinfo.md) | | +| [IRenderOptions](./kibana-plugin-server.irenderoptions.md) | | +| [IRouter](./kibana-plugin-server.irouter.md) | Registers route handlers for specified resource path and method. See [RouteConfig](./kibana-plugin-server.routeconfig.md) and [RequestHandler](./kibana-plugin-server.requesthandler.md) for more information about arguments to route registrations. | +| [IScopedRenderingClient](./kibana-plugin-server.iscopedrenderingclient.md) | | +| [IUiSettingsClient](./kibana-plugin-server.iuisettingsclient.md) | Server-side client that provides access to the advanced settings stored in elasticsearch. The settings provide control over the behavior of the Kibana application. For example, a user can specify how to display numeric or date fields. Users can adjust the settings via Management UI. | +| [KibanaRequestEvents](./kibana-plugin-server.kibanarequestevents.md) | Request events. | +| [KibanaRequestRoute](./kibana-plugin-server.kibanarequestroute.md) | Request specific route information exposed to a handler. | +| [LegacyRequest](./kibana-plugin-server.legacyrequest.md) | | +| [LegacyServiceSetupDeps](./kibana-plugin-server.legacyservicesetupdeps.md) | | +| [LegacyServiceStartDeps](./kibana-plugin-server.legacyservicestartdeps.md) | | +| [Logger](./kibana-plugin-server.logger.md) | Logger exposes all the necessary methods to log any type of information and this is the interface used by the logging consumers including plugins. | +| [LoggerFactory](./kibana-plugin-server.loggerfactory.md) | The single purpose of LoggerFactory interface is to define a way to retrieve a context-based logger instance. | +| [LogMeta](./kibana-plugin-server.logmeta.md) | Contextual metadata | +| [OnPostAuthToolkit](./kibana-plugin-server.onpostauthtoolkit.md) | A tool set defining an outcome of OnPostAuth interceptor for incoming request. | +| [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. | +| [OnPreResponseExtensions](./kibana-plugin-server.onpreresponseextensions.md) | Additional data to extend a response. | +| [OnPreResponseInfo](./kibana-plugin-server.onpreresponseinfo.md) | Response status code. | +| [OnPreResponseToolkit](./kibana-plugin-server.onpreresponsetoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. | +| [PackageInfo](./kibana-plugin-server.packageinfo.md) | | +| [Plugin](./kibana-plugin-server.plugin.md) | The interface that should be returned by a PluginInitializer. | +| [PluginConfigDescriptor](./kibana-plugin-server.pluginconfigdescriptor.md) | Describes a plugin configuration properties. | +| [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md) | Context that's available to plugins during initialization stage. | +| [PluginManifest](./kibana-plugin-server.pluginmanifest.md) | Describes the set of required and optional properties plugin can define in its mandatory JSON manifest file. | +| [PluginsServiceSetup](./kibana-plugin-server.pluginsservicesetup.md) | | +| [PluginsServiceStart](./kibana-plugin-server.pluginsservicestart.md) | | +| [RequestHandlerContext](./kibana-plugin-server.requesthandlercontext.md) | Plugin specific context passed to a route handler.Provides the following clients: - [rendering](./kibana-plugin-server.iscopedrenderingclient.md) - Rendering client which uses the data of the incoming request - [savedObjects.client](./kibana-plugin-server.savedobjectsclient.md) - Saved Objects client which uses the credentials of the incoming request - [elasticsearch.dataClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch data client which uses the credentials of the incoming request - [elasticsearch.adminClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch admin client which uses the credentials of the incoming request - [uiSettings.client](./kibana-plugin-server.iuisettingsclient.md) - uiSettings client which uses the credentials of the incoming request | +| [RouteConfig](./kibana-plugin-server.routeconfig.md) | Route specific configuration. | +| [RouteConfigOptions](./kibana-plugin-server.routeconfigoptions.md) | Additional route options. | +| [RouteConfigOptionsBody](./kibana-plugin-server.routeconfigoptionsbody.md) | Additional body options for a route | +| [RouteValidationResultFactory](./kibana-plugin-server.routevalidationresultfactory.md) | Validation result factory to be used in the custom validation function to return the valid data or validation errorsSee [RouteValidationFunction](./kibana-plugin-server.routevalidationfunction.md). | +| [RouteValidatorConfig](./kibana-plugin-server.routevalidatorconfig.md) | The configuration object to the RouteValidator class. Set params, query and/or body to specify the validation logic to follow for that property. | +| [RouteValidatorOptions](./kibana-plugin-server.routevalidatoroptions.md) | Additional options for the RouteValidator class to modify its default behaviour. | +| [SavedObject](./kibana-plugin-server.savedobject.md) | | +| [SavedObjectAttributes](./kibana-plugin-server.savedobjectattributes.md) | The data for a Saved Object is stored as an object in the attributes property. | +| [SavedObjectReference](./kibana-plugin-server.savedobjectreference.md) | A reference to another saved object. | +| [SavedObjectsBaseOptions](./kibana-plugin-server.savedobjectsbaseoptions.md) | | +| [SavedObjectsBulkCreateObject](./kibana-plugin-server.savedobjectsbulkcreateobject.md) | | +| [SavedObjectsBulkGetObject](./kibana-plugin-server.savedobjectsbulkgetobject.md) | | +| [SavedObjectsBulkResponse](./kibana-plugin-server.savedobjectsbulkresponse.md) | | +| [SavedObjectsBulkUpdateObject](./kibana-plugin-server.savedobjectsbulkupdateobject.md) | | +| [SavedObjectsBulkUpdateOptions](./kibana-plugin-server.savedobjectsbulkupdateoptions.md) | | +| [SavedObjectsBulkUpdateResponse](./kibana-plugin-server.savedobjectsbulkupdateresponse.md) | | +| [SavedObjectsClientProviderOptions](./kibana-plugin-server.savedobjectsclientprovideroptions.md) | Options to control the creation of the Saved Objects Client. | +| [SavedObjectsClientWrapperOptions](./kibana-plugin-server.savedobjectsclientwrapperoptions.md) | Options passed to each SavedObjectsClientWrapperFactory to aid in creating the wrapper instance. | +| [SavedObjectsCreateOptions](./kibana-plugin-server.savedobjectscreateoptions.md) | | +| [SavedObjectsDeleteByNamespaceOptions](./kibana-plugin-server.savedobjectsdeletebynamespaceoptions.md) | | +| [SavedObjectsDeleteOptions](./kibana-plugin-server.savedobjectsdeleteoptions.md) | | +| [SavedObjectsExportOptions](./kibana-plugin-server.savedobjectsexportoptions.md) | Options controlling the export operation. | +| [SavedObjectsExportResultDetails](./kibana-plugin-server.savedobjectsexportresultdetails.md) | Structure of the export result details entry | +| [SavedObjectsFindOptions](./kibana-plugin-server.savedobjectsfindoptions.md) | | +| [SavedObjectsFindResponse](./kibana-plugin-server.savedobjectsfindresponse.md) | Return type of the Saved Objects find() method.\*Note\*: this type is different between the Public and Server Saved Objects clients. | +| [SavedObjectsImportConflictError](./kibana-plugin-server.savedobjectsimportconflicterror.md) | Represents a failure to import due to a conflict. | +| [SavedObjectsImportError](./kibana-plugin-server.savedobjectsimporterror.md) | Represents a failure to import. | +| [SavedObjectsImportMissingReferencesError](./kibana-plugin-server.savedobjectsimportmissingreferenceserror.md) | Represents a failure to import due to missing references. | +| [SavedObjectsImportOptions](./kibana-plugin-server.savedobjectsimportoptions.md) | Options to control the import operation. | +| [SavedObjectsImportResponse](./kibana-plugin-server.savedobjectsimportresponse.md) | The response describing the result of an import. | +| [SavedObjectsImportRetry](./kibana-plugin-server.savedobjectsimportretry.md) | Describes a retry operation for importing a saved object. | +| [SavedObjectsImportUnknownError](./kibana-plugin-server.savedobjectsimportunknownerror.md) | Represents a failure to import due to an unknown reason. | +| [SavedObjectsImportUnsupportedTypeError](./kibana-plugin-server.savedobjectsimportunsupportedtypeerror.md) | Represents a failure to import due to having an unsupported saved object type. | +| [SavedObjectsIncrementCounterOptions](./kibana-plugin-server.savedobjectsincrementcounteroptions.md) | | +| [SavedObjectsMigrationLogger](./kibana-plugin-server.savedobjectsmigrationlogger.md) | | +| [SavedObjectsMigrationVersion](./kibana-plugin-server.savedobjectsmigrationversion.md) | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | +| [SavedObjectsRawDoc](./kibana-plugin-server.savedobjectsrawdoc.md) | A raw document as represented directly in the saved object index. | +| [SavedObjectsRepositoryFactory](./kibana-plugin-server.savedobjectsrepositoryfactory.md) | Factory provided when invoking a [client factory provider](./kibana-plugin-server.savedobjectsclientfactoryprovider.md) See [SavedObjectsServiceSetup.setClientFactoryProvider](./kibana-plugin-server.savedobjectsservicesetup.setclientfactoryprovider.md) | +| [SavedObjectsResolveImportErrorsOptions](./kibana-plugin-server.savedobjectsresolveimporterrorsoptions.md) | Options to control the "resolve import" operation. | +| [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) | Saved Objects is Kibana's data persistence mechanism allowing plugins to use Elasticsearch for storing and querying state. The SavedObjectsServiceSetup API exposes methods for creating and registering Saved Object client wrappers. | +| [SavedObjectsServiceStart](./kibana-plugin-server.savedobjectsservicestart.md) | Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing and querying state. The SavedObjectsServiceStart API provides a scoped Saved Objects client for interacting with Saved Objects. | +| [SavedObjectsUpdateOptions](./kibana-plugin-server.savedobjectsupdateoptions.md) | | +| [SavedObjectsUpdateResponse](./kibana-plugin-server.savedobjectsupdateresponse.md) | | +| [SessionCookieValidationResult](./kibana-plugin-server.sessioncookievalidationresult.md) | Return type from a function to validate cookie contents. | +| [SessionStorage](./kibana-plugin-server.sessionstorage.md) | Provides an interface to store and retrieve data across requests. | +| [SessionStorageCookieOptions](./kibana-plugin-server.sessionstoragecookieoptions.md) | Configuration used to create HTTP session storage based on top of cookie mechanism. | +| [SessionStorageFactory](./kibana-plugin-server.sessionstoragefactory.md) | SessionStorage factory to bind one to an incoming request | +| [StringValidation](./kibana-plugin-server.stringvalidation.md) | | +| [UiSettingsParams](./kibana-plugin-server.uisettingsparams.md) | UiSettings parameters defined by the plugins. | +| [UiSettingsServiceSetup](./kibana-plugin-server.uisettingsservicesetup.md) | | +| [UiSettingsServiceStart](./kibana-plugin-server.uisettingsservicestart.md) | | +| [UserProvidedValues](./kibana-plugin-server.userprovidedvalues.md) | Describes the values explicitly set by user. | +| [UuidServiceSetup](./kibana-plugin-server.uuidservicesetup.md) | APIs to access the application's instance uuid. | + +## Variables + +| Variable | Description | +| --- | --- | +| [kibanaResponseFactory](./kibana-plugin-server.kibanaresponsefactory.md) | Set of helpers used to create KibanaResponse to form HTTP response on an incoming request. Should be returned as a result of [RequestHandler](./kibana-plugin-server.requesthandler.md) execution. | +| [validBodyOutput](./kibana-plugin-server.validbodyoutput.md) | The set of valid body.output | + +## Type Aliases + +| Type Alias | Description | +| --- | --- | +| [AuthenticationHandler](./kibana-plugin-server.authenticationhandler.md) | See [AuthToolkit](./kibana-plugin-server.authtoolkit.md). | +| [AuthHeaders](./kibana-plugin-server.authheaders.md) | Auth Headers map | +| [AuthResult](./kibana-plugin-server.authresult.md) | | +| [CapabilitiesProvider](./kibana-plugin-server.capabilitiesprovider.md) | See [CapabilitiesSetup](./kibana-plugin-server.capabilitiessetup.md) | +| [CapabilitiesSwitcher](./kibana-plugin-server.capabilitiesswitcher.md) | See [CapabilitiesSetup](./kibana-plugin-server.capabilitiessetup.md) | +| [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md) | Configuration deprecation returned from [ConfigDeprecationProvider](./kibana-plugin-server.configdeprecationprovider.md) that handles a single deprecation from the configuration. | +| [ConfigDeprecationLogger](./kibana-plugin-server.configdeprecationlogger.md) | Logger interface used when invoking a [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md) | +| [ConfigDeprecationProvider](./kibana-plugin-server.configdeprecationprovider.md) | A provider that should returns a list of [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md).See [ConfigDeprecationFactory](./kibana-plugin-server.configdeprecationfactory.md) for more usage examples. | +| [ConfigPath](./kibana-plugin-server.configpath.md) | | +| [ElasticsearchClientConfig](./kibana-plugin-server.elasticsearchclientconfig.md) | | +| [GetAuthHeaders](./kibana-plugin-server.getauthheaders.md) | Get headers to authenticate a user against Elasticsearch. | +| [GetAuthState](./kibana-plugin-server.getauthstate.md) | Get authentication state for a request. Returned by auth interceptor. | +| [HandlerContextType](./kibana-plugin-server.handlercontexttype.md) | Extracts the type of the first argument of a [HandlerFunction](./kibana-plugin-server.handlerfunction.md) to represent the type of the context. | +| [HandlerFunction](./kibana-plugin-server.handlerfunction.md) | A function that accepts a context object and an optional number of additional arguments. Used for the generic types in [IContextContainer](./kibana-plugin-server.icontextcontainer.md) | +| [HandlerParameters](./kibana-plugin-server.handlerparameters.md) | Extracts the types of the additional arguments of a [HandlerFunction](./kibana-plugin-server.handlerfunction.md), excluding the [HandlerContextType](./kibana-plugin-server.handlercontexttype.md). | +| [Headers](./kibana-plugin-server.headers.md) | Http request headers to read. | +| [HttpResponsePayload](./kibana-plugin-server.httpresponsepayload.md) | Data send to the client as a response payload. | +| [IBasePath](./kibana-plugin-server.ibasepath.md) | Access or manipulate the Kibana base path[BasePath](./kibana-plugin-server.basepath.md) | +| [IClusterClient](./kibana-plugin-server.iclusterclient.md) | Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via asScoped(...)).See [ClusterClient](./kibana-plugin-server.clusterclient.md). | +| [IContextProvider](./kibana-plugin-server.icontextprovider.md) | A function that returns a context value for a specific key of given context type. | +| [ICustomClusterClient](./kibana-plugin-server.icustomclusterclient.md) | Represents an Elasticsearch cluster API client created by a plugin. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via asScoped(...)).See [ClusterClient](./kibana-plugin-server.clusterclient.md). | +| [IsAuthenticated](./kibana-plugin-server.isauthenticated.md) | Return authentication status for a request. | +| [ISavedObjectsRepository](./kibana-plugin-server.isavedobjectsrepository.md) | See [SavedObjectsRepository](./kibana-plugin-server.savedobjectsrepository.md) | +| [IScopedClusterClient](./kibana-plugin-server.iscopedclusterclient.md) | Serves the same purpose as "normal" ClusterClient but exposes additional callAsCurrentUser method that doesn't use credentials of the Kibana internal user (as callAsInternalUser does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API.See [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md). | +| [KibanaRequestRouteOptions](./kibana-plugin-server.kibanarequestrouteoptions.md) | Route options: If 'GET' or 'OPTIONS' method, body options won't be returned. | +| [KibanaResponseFactory](./kibana-plugin-server.kibanaresponsefactory.md) | Creates an object containing request response payload, HTTP headers, error details, and other data transmitted to the client. | +| [KnownHeaders](./kibana-plugin-server.knownheaders.md) | Set of well-known HTTP headers. | +| [LifecycleResponseFactory](./kibana-plugin-server.lifecycleresponsefactory.md) | Creates an object containing redirection or error response with error details, HTTP headers, and other data transmitted to the client. | +| [MIGRATION\_ASSISTANCE\_INDEX\_ACTION](./kibana-plugin-server.migration_assistance_index_action.md) | | +| [MIGRATION\_DEPRECATION\_LEVEL](./kibana-plugin-server.migration_deprecation_level.md) | | +| [MutatingOperationRefreshSetting](./kibana-plugin-server.mutatingoperationrefreshsetting.md) | Elasticsearch Refresh setting for mutating operation | +| [OnPostAuthHandler](./kibana-plugin-server.onpostauthhandler.md) | See [OnPostAuthToolkit](./kibana-plugin-server.onpostauthtoolkit.md). | +| [OnPreAuthHandler](./kibana-plugin-server.onpreauthhandler.md) | See [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md). | +| [OnPreResponseHandler](./kibana-plugin-server.onpreresponsehandler.md) | See [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md). | +| [PluginConfigSchema](./kibana-plugin-server.pluginconfigschema.md) | Dedicated type for plugin configuration schema. | +| [PluginInitializer](./kibana-plugin-server.plugininitializer.md) | The plugin export at the root of a plugin's server directory should conform to this interface. | +| [PluginName](./kibana-plugin-server.pluginname.md) | Dedicated type for plugin name/id that is supposed to make Map/Set/Arrays that use it as a key or value more obvious. | +| [PluginOpaqueId](./kibana-plugin-server.pluginopaqueid.md) | | +| [RecursiveReadonly](./kibana-plugin-server.recursivereadonly.md) | | +| [RedirectResponseOptions](./kibana-plugin-server.redirectresponseoptions.md) | HTTP response parameters for redirection response | +| [RequestHandler](./kibana-plugin-server.requesthandler.md) | A function executed when route path matched requested resource path. Request handler is expected to return a result of one of [KibanaResponseFactory](./kibana-plugin-server.kibanaresponsefactory.md) functions. | +| [RequestHandlerContextContainer](./kibana-plugin-server.requesthandlercontextcontainer.md) | An object that handles registration of http request context providers. | +| [RequestHandlerContextProvider](./kibana-plugin-server.requesthandlercontextprovider.md) | Context provider for request handler. Extends request context object with provided functionality or data. | +| [ResponseError](./kibana-plugin-server.responseerror.md) | Error message and optional data send to the client in case of error. | +| [ResponseErrorAttributes](./kibana-plugin-server.responseerrorattributes.md) | Additional data to provide error details. | +| [ResponseHeaders](./kibana-plugin-server.responseheaders.md) | Http response headers to set. | +| [RouteContentType](./kibana-plugin-server.routecontenttype.md) | The set of supported parseable Content-Types | +| [RouteMethod](./kibana-plugin-server.routemethod.md) | The set of common HTTP methods supported by Kibana routing. | +| [RouteRegistrar](./kibana-plugin-server.routeregistrar.md) | Route handler common definition | +| [RouteValidationFunction](./kibana-plugin-server.routevalidationfunction.md) | The custom validation function if @kbn/config-schema is not a valid solution for your specific plugin requirements. | +| [RouteValidationSpec](./kibana-plugin-server.routevalidationspec.md) | Allowed property validation options: either @kbn/config-schema validations or custom validation functionsSee [RouteValidationFunction](./kibana-plugin-server.routevalidationfunction.md) for custom validation. | +| [RouteValidatorFullConfig](./kibana-plugin-server.routevalidatorfullconfig.md) | Route validations config and options merged into one object | +| [SavedObjectAttribute](./kibana-plugin-server.savedobjectattribute.md) | Type definition for a Saved Object attribute value | +| [SavedObjectAttributeSingle](./kibana-plugin-server.savedobjectattributesingle.md) | Don't use this type, it's simply a helper type for [SavedObjectAttribute](./kibana-plugin-server.savedobjectattribute.md) | +| [SavedObjectsClientContract](./kibana-plugin-server.savedobjectsclientcontract.md) | Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing plugin state.\#\# SavedObjectsClient errorsSince the SavedObjectsClient has its hands in everything we are a little paranoid about the way we present errors back to to application code. Ideally, all errors will be either:1. Caused by bad implementation (ie. undefined is not a function) and as such unpredictable 2. An error that has been classified and decorated appropriately by the decorators in [SavedObjectsErrorHelpers](./kibana-plugin-server.savedobjectserrorhelpers.md)Type 1 errors are inevitable, but since all expected/handle-able errors should be Type 2 the isXYZError() helpers exposed at SavedObjectsErrorHelpers should be used to understand and manage error responses from the SavedObjectsClient.Type 2 errors are decorated versions of the source error, so if the elasticsearch client threw an error it will be decorated based on its type. That means that rather than looking for error.body.error.type or doing substring checks on error.body.error.reason, just use the helpers to understand the meaning of the error:\`\`\`js if (SavedObjectsErrorHelpers.isNotFoundError(error)) { // handle 404 }if (SavedObjectsErrorHelpers.isNotAuthorizedError(error)) { // 401 handling should be automatic, but in case you wanted to know }// always rethrow the error unless you handle it throw error; \`\`\`\#\#\# 404s from missing indexFrom the perspective of application code and APIs the SavedObjectsClient is a black box that persists objects. One of the internal details that users have no control over is that we use an elasticsearch index for persistance and that index might be missing.At the time of writing we are in the process of transitioning away from the operating assumption that the SavedObjects index is always available. Part of this transition is handling errors resulting from an index missing. These used to trigger a 500 error in most cases, and in others cause 404s with different error messages.From my (Spencer) perspective, a 404 from the SavedObjectsApi is a 404; The object the request/call was targeting could not be found. This is why \#14141 takes special care to ensure that 404 errors are generic and don't distinguish between index missing or document missing.\#\#\# 503s from missing indexUnlike all other methods, create requests are supposed to succeed even when the Kibana index does not exist because it will be automatically created by elasticsearch. When that is not the case it is because Elasticsearch's action.auto_create_index setting prevents it from being created automatically so we throw a special 503 with the intention of informing the user that their Elasticsearch settings need to be updated.See [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) See [SavedObjectsErrorHelpers](./kibana-plugin-server.savedobjectserrorhelpers.md) | +| [SavedObjectsClientFactory](./kibana-plugin-server.savedobjectsclientfactory.md) | Describes the factory used to create instances of the Saved Objects Client. | +| [SavedObjectsClientFactoryProvider](./kibana-plugin-server.savedobjectsclientfactoryprovider.md) | Provider to invoke to retrieve a [SavedObjectsClientFactory](./kibana-plugin-server.savedobjectsclientfactory.md). | +| [SavedObjectsClientWrapperFactory](./kibana-plugin-server.savedobjectsclientwrapperfactory.md) | Describes the factory used to create instances of Saved Objects Client Wrappers. | +| [ScopeableRequest](./kibana-plugin-server.scopeablerequest.md) | A user credentials container. It accommodates the necessary auth credentials to impersonate the current user.See [KibanaRequest](./kibana-plugin-server.kibanarequest.md). | +| [SharedGlobalConfig](./kibana-plugin-server.sharedglobalconfig.md) | | +| [UiSettingsType](./kibana-plugin-server.uisettingstype.md) | UI element type to represent the settings. | + diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsclientfactory.md b/docs/development/core/server/kibana-plugin-server.savedobjectsclientfactory.md index 9e307597206800..01c6c6a108b7b0 100644 --- a/docs/development/core/server/kibana-plugin-server.savedobjectsclientfactory.md +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsclientfactory.md @@ -1,15 +1,15 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClientFactory](./kibana-plugin-server.savedobjectsclientfactory.md) - -## SavedObjectsClientFactory type - -Describes the factory used to create instances of the Saved Objects Client. - -Signature: - -```typescript -export declare type SavedObjectsClientFactory = ({ request, }: { - request: Request; -}) => SavedObjectsClientContract; -``` + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClientFactory](./kibana-plugin-server.savedobjectsclientfactory.md) + +## SavedObjectsClientFactory type + +Describes the factory used to create instances of the Saved Objects Client. + +Signature: + +```typescript +export declare type SavedObjectsClientFactory = ({ request, }: { + request: KibanaRequest; +}) => SavedObjectsClientContract; +``` diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsclientfactoryprovider.md b/docs/development/core/server/kibana-plugin-server.savedobjectsclientfactoryprovider.md new file mode 100644 index 00000000000000..59617b6be443cd --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsclientfactoryprovider.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClientFactoryProvider](./kibana-plugin-server.savedobjectsclientfactoryprovider.md) + +## SavedObjectsClientFactoryProvider type + +Provider to invoke to retrieve a [SavedObjectsClientFactory](./kibana-plugin-server.savedobjectsclientfactory.md). + +Signature: + +```typescript +export declare type SavedObjectsClientFactoryProvider = (repositoryFactory: SavedObjectsRepositoryFactory) => SavedObjectsClientFactory; +``` diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsclientwrapperfactory.md b/docs/development/core/server/kibana-plugin-server.savedobjectsclientwrapperfactory.md index 3ef2fac727b018..f429c922099007 100644 --- a/docs/development/core/server/kibana-plugin-server.savedobjectsclientwrapperfactory.md +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsclientwrapperfactory.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClientWrapperFactory](./kibana-plugin-server.savedobjectsclientwrapperfactory.md) - -## SavedObjectsClientWrapperFactory type - -Describes the factory used to create instances of Saved Objects Client Wrappers. - -Signature: - -```typescript -export declare type SavedObjectsClientWrapperFactory = (options: SavedObjectsClientWrapperOptions) => SavedObjectsClientContract; -``` + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClientWrapperFactory](./kibana-plugin-server.savedobjectsclientwrapperfactory.md) + +## SavedObjectsClientWrapperFactory type + +Describes the factory used to create instances of Saved Objects Client Wrappers. + +Signature: + +```typescript +export declare type SavedObjectsClientWrapperFactory = (options: SavedObjectsClientWrapperOptions) => SavedObjectsClientContract; +``` diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsclientwrapperoptions.md b/docs/development/core/server/kibana-plugin-server.savedobjectsclientwrapperoptions.md index 65e7cfa64c2a66..dfff863898a2b3 100644 --- a/docs/development/core/server/kibana-plugin-server.savedobjectsclientwrapperoptions.md +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsclientwrapperoptions.md @@ -1,21 +1,21 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClientWrapperOptions](./kibana-plugin-server.savedobjectsclientwrapperoptions.md) - -## SavedObjectsClientWrapperOptions interface - -Options passed to each SavedObjectsClientWrapperFactory to aid in creating the wrapper instance. - -Signature: - -```typescript -export interface SavedObjectsClientWrapperOptions -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [client](./kibana-plugin-server.savedobjectsclientwrapperoptions.client.md) | SavedObjectsClientContract | | -| [request](./kibana-plugin-server.savedobjectsclientwrapperoptions.request.md) | Request | | - + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClientWrapperOptions](./kibana-plugin-server.savedobjectsclientwrapperoptions.md) + +## SavedObjectsClientWrapperOptions interface + +Options passed to each SavedObjectsClientWrapperFactory to aid in creating the wrapper instance. + +Signature: + +```typescript +export interface SavedObjectsClientWrapperOptions +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [client](./kibana-plugin-server.savedobjectsclientwrapperoptions.client.md) | SavedObjectsClientContract | | +| [request](./kibana-plugin-server.savedobjectsclientwrapperoptions.request.md) | KibanaRequest | | + diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsclientwrapperoptions.request.md b/docs/development/core/server/kibana-plugin-server.savedobjectsclientwrapperoptions.request.md index 0ff75028612d03..89c7e0ed207ffb 100644 --- a/docs/development/core/server/kibana-plugin-server.savedobjectsclientwrapperoptions.request.md +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsclientwrapperoptions.request.md @@ -1,11 +1,11 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClientWrapperOptions](./kibana-plugin-server.savedobjectsclientwrapperoptions.md) > [request](./kibana-plugin-server.savedobjectsclientwrapperoptions.request.md) - -## SavedObjectsClientWrapperOptions.request property - -Signature: - -```typescript -request: Request; -``` + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClientWrapperOptions](./kibana-plugin-server.savedobjectsclientwrapperoptions.md) > [request](./kibana-plugin-server.savedobjectsclientwrapperoptions.request.md) + +## SavedObjectsClientWrapperOptions.request property + +Signature: + +```typescript +request: KibanaRequest; +``` diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsrepositoryfactory.createinternalrepository.md b/docs/development/core/server/kibana-plugin-server.savedobjectsrepositoryfactory.createinternalrepository.md new file mode 100644 index 00000000000000..b808d38793fffc --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsrepositoryfactory.createinternalrepository.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsRepositoryFactory](./kibana-plugin-server.savedobjectsrepositoryfactory.md) > [createInternalRepository](./kibana-plugin-server.savedobjectsrepositoryfactory.createinternalrepository.md) + +## SavedObjectsRepositoryFactory.createInternalRepository property + +Creates a [Saved Objects repository](./kibana-plugin-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. + +Signature: + +```typescript +createInternalRepository: (extraTypes?: string[]) => ISavedObjectsRepository; +``` diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsrepositoryfactory.createscopedrepository.md b/docs/development/core/server/kibana-plugin-server.savedobjectsrepositoryfactory.createscopedrepository.md new file mode 100644 index 00000000000000..20322d809dce76 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsrepositoryfactory.createscopedrepository.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsRepositoryFactory](./kibana-plugin-server.savedobjectsrepositoryfactory.md) > [createScopedRepository](./kibana-plugin-server.savedobjectsrepositoryfactory.createscopedrepository.md) + +## SavedObjectsRepositoryFactory.createScopedRepository property + +Creates a [Saved Objects repository](./kibana-plugin-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. + +Signature: + +```typescript +createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository; +``` diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsrepositoryfactory.md b/docs/development/core/server/kibana-plugin-server.savedobjectsrepositoryfactory.md new file mode 100644 index 00000000000000..fc6c4a516284ad --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsrepositoryfactory.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsRepositoryFactory](./kibana-plugin-server.savedobjectsrepositoryfactory.md) + +## SavedObjectsRepositoryFactory interface + +Factory provided when invoking a [client factory provider](./kibana-plugin-server.savedobjectsclientfactoryprovider.md) See [SavedObjectsServiceSetup.setClientFactoryProvider](./kibana-plugin-server.savedobjectsservicesetup.setclientfactoryprovider.md) + +Signature: + +```typescript +export interface SavedObjectsRepositoryFactory +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [createInternalRepository](./kibana-plugin-server.savedobjectsrepositoryfactory.createinternalrepository.md) | (extraTypes?: string[]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. | +| [createScopedRepository](./kibana-plugin-server.savedobjectsrepositoryfactory.createscopedrepository.md) | (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. | + diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.addclientwrapper.md b/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.addclientwrapper.md index e787d737ada17e..becff5bd2821e1 100644 --- a/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.addclientwrapper.md +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.addclientwrapper.md @@ -1,13 +1,13 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) > [addClientWrapper](./kibana-plugin-server.savedobjectsservicesetup.addclientwrapper.md) - -## SavedObjectsServiceSetup.addClientWrapper property - -Add a client wrapper with the given priority. - -Signature: - -```typescript -addClientWrapper: (priority: number, id: string, factory: SavedObjectsClientWrapperFactory) => void; -``` + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) > [addClientWrapper](./kibana-plugin-server.savedobjectsservicesetup.addclientwrapper.md) + +## SavedObjectsServiceSetup.addClientWrapper property + +Add a [client wrapper factory](./kibana-plugin-server.savedobjectsclientwrapperfactory.md) with the given priority. + +Signature: + +```typescript +addClientWrapper: (priority: number, id: string, factory: SavedObjectsClientWrapperFactory) => void; +``` diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.createinternalrepository.md b/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.createinternalrepository.md deleted file mode 100644 index 492aa1a2453a19..00000000000000 --- a/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.createinternalrepository.md +++ /dev/null @@ -1,18 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) > [createInternalRepository](./kibana-plugin-server.savedobjectsservicesetup.createinternalrepository.md) - -## SavedObjectsServiceSetup.createInternalRepository property - -Creates a [Saved Objects repository](./kibana-plugin-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. - -Signature: - -```typescript -createInternalRepository: (extraTypes?: string[]) => ISavedObjectsRepository; -``` - -## Remarks - -The repository should only be used for creating and registering a client factory or client wrapper. Using the repository directly for interacting with Saved Objects is an anti-pattern. Use the Saved Objects client from the [SavedObjectsServiceStart\#getScopedClient](./kibana-plugin-server.savedobjectsservicestart.md) method or the [route handler context](./kibana-plugin-server.requesthandlercontext.md) instead. - diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.createscopedrepository.md b/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.createscopedrepository.md deleted file mode 100644 index fc5aa40c21a208..00000000000000 --- a/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.createscopedrepository.md +++ /dev/null @@ -1,18 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) > [createScopedRepository](./kibana-plugin-server.savedobjectsservicesetup.createscopedrepository.md) - -## SavedObjectsServiceSetup.createScopedRepository property - -Creates a [Saved Objects repository](./kibana-plugin-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. - -Signature: - -```typescript -createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository; -``` - -## Remarks - -The repository should only be used for creating and registering a client factory or client wrapper. Using the repository directly for interacting with Saved Objects is an anti-pattern. Use the Saved Objects client from the [SavedObjectsServiceStart\#getScopedClient](./kibana-plugin-server.savedobjectsservicestart.md) method or the [route handler context](./kibana-plugin-server.requesthandlercontext.md) instead. - diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.md b/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.md index 95bd817a43da68..64fb1f4a5f6389 100644 --- a/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.md +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.md @@ -1,35 +1,33 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) - -## SavedObjectsServiceSetup interface - -Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing and querying state. The SavedObjectsServiceSetup API exposes methods for creating and registering Saved Object client wrappers. - -Signature: - -```typescript -export interface SavedObjectsServiceSetup -``` - -## Remarks - -Note: The Saved Object setup API's should only be used for creating and registering client wrappers. Constructing a Saved Objects client or repository for use within your own plugin won't have any of the registered wrappers applied and is considered an anti-pattern. Use the Saved Objects client from the [SavedObjectsServiceStart\#getScopedClient](./kibana-plugin-server.savedobjectsservicestart.md) method or the [route handler context](./kibana-plugin-server.requesthandlercontext.md) instead. - -When plugins access the Saved Objects client, a new client is created using the factory provided to `setClientFactory` and wrapped by all wrappers registered through `addClientWrapper`. To create a factory or wrapper, plugins will have to construct a Saved Objects client. First create a repository by calling `scopedRepository` or `internalRepository` and then use this repository as the argument to the [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) constructor. - -## Example - -import {SavedObjectsClient, CoreSetup} from 'src/core/server'; - -export class Plugin() { setup: (core: CoreSetup) => { core.savedObjects.setClientFactory(({request: KibanaRequest}) => { return new SavedObjectsClient(core.savedObjects.scopedRepository(request)); }) } } - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [addClientWrapper](./kibana-plugin-server.savedobjectsservicesetup.addclientwrapper.md) | (priority: number, id: string, factory: SavedObjectsClientWrapperFactory<KibanaRequest>) => void | Add a client wrapper with the given priority. | -| [createInternalRepository](./kibana-plugin-server.savedobjectsservicesetup.createinternalrepository.md) | (extraTypes?: string[]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. | -| [createScopedRepository](./kibana-plugin-server.savedobjectsservicesetup.createscopedrepository.md) | (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. | -| [setClientFactory](./kibana-plugin-server.savedobjectsservicesetup.setclientfactory.md) | (customClientFactory: SavedObjectsClientFactory<KibanaRequest>) => void | Set a default factory for creating Saved Objects clients. Only one client factory can be set, subsequent calls to this method will fail. | - + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) + +## SavedObjectsServiceSetup interface + +Saved Objects is Kibana's data persistence mechanism allowing plugins to use Elasticsearch for storing and querying state. The SavedObjectsServiceSetup API exposes methods for creating and registering Saved Object client wrappers. + +Signature: + +```typescript +export interface SavedObjectsServiceSetup +``` + +## Remarks + +Note: The Saved Object setup API's should only be used for creating and registering client wrappers. Constructing a Saved Objects client or repository for use within your own plugin won't have any of the registered wrappers applied and is considered an anti-pattern. Use the Saved Objects client from the [SavedObjectsServiceStart\#getScopedClient](./kibana-plugin-server.savedobjectsservicestart.md) method or the [route handler context](./kibana-plugin-server.requesthandlercontext.md) instead. + +When plugins access the Saved Objects client, a new client is created using the factory provided to `setClientFactory` and wrapped by all wrappers registered through `addClientWrapper`. To create a factory or wrapper, plugins will have to construct a Saved Objects client. First create a repository by calling `scopedRepository` or `internalRepository` and then use this repository as the argument to the [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) constructor. + +## Example + +import { SavedObjectsClient, CoreSetup } from 'src/core/server'; + +export class Plugin() { setup: (core: CoreSetup) => { core.savedObjects.setClientFactory(({ request: KibanaRequest }) => { return new SavedObjectsClient(core.savedObjects.scopedRepository(request)); }) } } + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [addClientWrapper](./kibana-plugin-server.savedobjectsservicesetup.addclientwrapper.md) | (priority: number, id: string, factory: SavedObjectsClientWrapperFactory) => void | Add a [client wrapper factory](./kibana-plugin-server.savedobjectsclientwrapperfactory.md) with the given priority. | +| [setClientFactoryProvider](./kibana-plugin-server.savedobjectsservicesetup.setclientfactoryprovider.md) | (clientFactoryProvider: SavedObjectsClientFactoryProvider) => void | Set the default [factory provider](./kibana-plugin-server.savedobjectsclientfactoryprovider.md) for creating Saved Objects clients. Only one provider can be set, subsequent calls to this method will fail. | + diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.setclientfactory.md b/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.setclientfactory.md deleted file mode 100644 index 544e0b9d5fa736..00000000000000 --- a/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.setclientfactory.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) > [setClientFactory](./kibana-plugin-server.savedobjectsservicesetup.setclientfactory.md) - -## SavedObjectsServiceSetup.setClientFactory property - -Set a default factory for creating Saved Objects clients. Only one client factory can be set, subsequent calls to this method will fail. - -Signature: - -```typescript -setClientFactory: (customClientFactory: SavedObjectsClientFactory) => void; -``` diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.setclientfactoryprovider.md b/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.setclientfactoryprovider.md new file mode 100644 index 00000000000000..ed11255048f19e --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsservicesetup.setclientfactoryprovider.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) > [setClientFactoryProvider](./kibana-plugin-server.savedobjectsservicesetup.setclientfactoryprovider.md) + +## SavedObjectsServiceSetup.setClientFactoryProvider property + +Set the default [factory provider](./kibana-plugin-server.savedobjectsclientfactoryprovider.md) for creating Saved Objects clients. Only one provider can be set, subsequent calls to this method will fail. + +Signature: + +```typescript +setClientFactoryProvider: (clientFactoryProvider: SavedObjectsClientFactoryProvider) => void; +``` diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsservicestart.createinternalrepository.md b/docs/development/core/server/kibana-plugin-server.savedobjectsservicestart.createinternalrepository.md new file mode 100644 index 00000000000000..d639a8bc66b7e5 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsservicestart.createinternalrepository.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsServiceStart](./kibana-plugin-server.savedobjectsservicestart.md) > [createInternalRepository](./kibana-plugin-server.savedobjectsservicestart.createinternalrepository.md) + +## SavedObjectsServiceStart.createInternalRepository property + +Creates a [Saved Objects repository](./kibana-plugin-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. + +Signature: + +```typescript +createInternalRepository: (extraTypes?: string[]) => ISavedObjectsRepository; +``` diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsservicestart.createscopedrepository.md b/docs/development/core/server/kibana-plugin-server.savedobjectsservicestart.createscopedrepository.md new file mode 100644 index 00000000000000..7683a9e46c51d6 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsservicestart.createscopedrepository.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsServiceStart](./kibana-plugin-server.savedobjectsservicestart.md) > [createScopedRepository](./kibana-plugin-server.savedobjectsservicestart.createscopedrepository.md) + +## SavedObjectsServiceStart.createScopedRepository property + +Creates a [Saved Objects repository](./kibana-plugin-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. + +Signature: + +```typescript +createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository; +``` + +## Remarks + +Prefer using `getScopedClient`. This should only be used when using methods not exposed on [SavedObjectsClientContract](./kibana-plugin-server.savedobjectsclientcontract.md) + diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsservicestart.md b/docs/development/core/server/kibana-plugin-server.savedobjectsservicestart.md index 5a869b3b6c1cbc..cf2b4f57a74612 100644 --- a/docs/development/core/server/kibana-plugin-server.savedobjectsservicestart.md +++ b/docs/development/core/server/kibana-plugin-server.savedobjectsservicestart.md @@ -1,20 +1,22 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsServiceStart](./kibana-plugin-server.savedobjectsservicestart.md) - -## SavedObjectsServiceStart interface - -Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing and querying state. The SavedObjectsServiceStart API provides a scoped Saved Objects client for interacting with Saved Objects. - -Signature: - -```typescript -export interface SavedObjectsServiceStart -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [getScopedClient](./kibana-plugin-server.savedobjectsservicestart.getscopedclient.md) | (req: KibanaRequest, options?: SavedObjectsClientProviderOptions) => SavedObjectsClientContract | Creates a [Saved Objects client](./kibana-plugin-server.savedobjectsclientcontract.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. If other plugins have registered Saved Objects client wrappers, these will be applied to extend the functionality of the client.A client that is already scoped to the incoming request is also exposed from the route handler context see [RequestHandlerContext](./kibana-plugin-server.requesthandlercontext.md). | - + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsServiceStart](./kibana-plugin-server.savedobjectsservicestart.md) + +## SavedObjectsServiceStart interface + +Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing and querying state. The SavedObjectsServiceStart API provides a scoped Saved Objects client for interacting with Saved Objects. + +Signature: + +```typescript +export interface SavedObjectsServiceStart +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [createInternalRepository](./kibana-plugin-server.savedobjectsservicestart.createinternalrepository.md) | (extraTypes?: string[]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-server.isavedobjectsrepository.md) that uses the internal Kibana user for authenticating with Elasticsearch. | +| [createScopedRepository](./kibana-plugin-server.savedobjectsservicestart.createscopedrepository.md) | (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository | Creates a [Saved Objects repository](./kibana-plugin-server.isavedobjectsrepository.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. | +| [getScopedClient](./kibana-plugin-server.savedobjectsservicestart.getscopedclient.md) | (req: KibanaRequest, options?: SavedObjectsClientProviderOptions) => SavedObjectsClientContract | Creates a [Saved Objects client](./kibana-plugin-server.savedobjectsclientcontract.md) that uses the credentials from the passed in request to authenticate with Elasticsearch. If other plugins have registered Saved Objects client wrappers, these will be applied to extend the functionality of the client.A client that is already scoped to the incoming request is also exposed from the route handler context see [RequestHandlerContext](./kibana-plugin-server.requesthandlercontext.md). | + diff --git a/src/core/server/elasticsearch/retry_call_cluster.ts b/src/core/server/elasticsearch/retry_call_cluster.ts index 89d7b88b1675a0..bd72ecf7264616 100644 --- a/src/core/server/elasticsearch/retry_call_cluster.ts +++ b/src/core/server/elasticsearch/retry_call_cluster.ts @@ -22,6 +22,7 @@ import { defer, throwError, iif, timer } from 'rxjs'; import * as legacyElasticsearch from 'elasticsearch'; import { CallAPIOptions } from '.'; +import { APICaller } from './api_types'; import { Logger } from '../logging'; const esErrors = legacyElasticsearch.errors; @@ -34,15 +35,11 @@ const esErrors = legacyElasticsearch.errors; * different error is received. * * @param apiCaller + * @param log + * @param delay */ - -// TODO: Replace with APICaller from './scoped_cluster_client' once #46668 is merged export function migrationsRetryCallCluster( - apiCaller: ( - endpoint: string, - clientParams: Record, - options?: CallAPIOptions - ) => Promise, + apiCaller: APICaller, log: Logger, delay: number = 2500 ) { diff --git a/src/core/server/index.ts b/src/core/server/index.ts index a97d2970dca881..cdc2ec91134ed1 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -180,6 +180,7 @@ export { SavedObjectsClientWrapperFactory, SavedObjectsClientWrapperOptions, SavedObjectsClientFactory, + SavedObjectsClientFactoryProvider, SavedObjectsCreateOptions, SavedObjectsErrorHelpers, SavedObjectsExportOptions, @@ -195,6 +196,7 @@ export { SavedObjectsImportUnsupportedTypeError, SavedObjectsMigrationLogger, SavedObjectsRawDoc, + SavedObjectsRepositoryFactory, SavedObjectsResolveImportErrorsOptions, SavedObjectsSchema, SavedObjectsSerializer, diff --git a/src/core/server/legacy/legacy_service.ts b/src/core/server/legacy/legacy_service.ts index 7862412fbad06d..ca1204f0ac05ce 100644 --- a/src/core/server/legacy/legacy_service.ts +++ b/src/core/server/legacy/legacy_service.ts @@ -258,7 +258,11 @@ export class LegacyService implements CoreService { ) { const coreStart: CoreStart = { capabilities: startDeps.core.capabilities, - savedObjects: { getScopedClient: startDeps.core.savedObjects.getScopedClient }, + savedObjects: { + getScopedClient: startDeps.core.savedObjects.getScopedClient, + createScopedRepository: startDeps.core.savedObjects.createScopedRepository, + createInternalRepository: startDeps.core.savedObjects.createInternalRepository, + }, uiSettings: { asScopedToClient: startDeps.core.uiSettings.asScopedToClient }, }; @@ -286,10 +290,8 @@ export class LegacyService implements CoreService { isTlsEnabled: setupDeps.core.http.isTlsEnabled, }, savedObjects: { - setClientFactory: setupDeps.core.savedObjects.setClientFactory, + setClientFactoryProvider: setupDeps.core.savedObjects.setClientFactoryProvider, addClientWrapper: setupDeps.core.savedObjects.addClientWrapper, - createInternalRepository: setupDeps.core.savedObjects.createInternalRepository, - createScopedRepository: setupDeps.core.savedObjects.createScopedRepository, }, uiSettings: { register: setupDeps.core.uiSettings.register, diff --git a/src/core/server/plugins/plugin_context.ts b/src/core/server/plugins/plugin_context.ts index f266172cb4bd9e..99cd4eda7374ce 100644 --- a/src/core/server/plugins/plugin_context.ts +++ b/src/core/server/plugins/plugin_context.ts @@ -165,10 +165,8 @@ export function createPluginSetupContext( isTlsEnabled: deps.http.isTlsEnabled, }, savedObjects: { - setClientFactory: deps.savedObjects.setClientFactory, + setClientFactoryProvider: deps.savedObjects.setClientFactoryProvider, addClientWrapper: deps.savedObjects.addClientWrapper, - createInternalRepository: deps.savedObjects.createInternalRepository, - createScopedRepository: deps.savedObjects.createScopedRepository, }, uiSettings: { register: deps.uiSettings.register, @@ -203,6 +201,8 @@ export function createPluginStartContext( }, savedObjects: { getScopedClient: deps.savedObjects.getScopedClient, + createInternalRepository: deps.savedObjects.createInternalRepository, + createScopedRepository: deps.savedObjects.createScopedRepository, }, uiSettings: { asScopedToClient: deps.uiSettings.asScopedToClient, diff --git a/src/core/server/saved_objects/index.ts b/src/core/server/saved_objects/index.ts index 1100c18bcc72fa..181025d73817dc 100644 --- a/src/core/server/saved_objects/index.ts +++ b/src/core/server/saved_objects/index.ts @@ -41,6 +41,7 @@ export { SavedObjectsServiceStart, SavedObjectsServiceSetup, InternalSavedObjectsServiceSetup, + SavedObjectsRepositoryFactory, } from './saved_objects_service'; export { diff --git a/src/core/server/saved_objects/saved_objects_service.mock.ts b/src/core/server/saved_objects/saved_objects_service.mock.ts index b2596146a02d47..a15d1f5b864b7d 100644 --- a/src/core/server/saved_objects/saved_objects_service.mock.ts +++ b/src/core/server/saved_objects/saved_objects_service.mock.ts @@ -33,29 +33,27 @@ const createStartContractMock = () => { const startContract: jest.Mocked = { clientProvider: savedObjectsClientProviderMock.create(), getScopedClient: jest.fn(), + createInternalRepository: jest.fn(), + createScopedRepository: jest.fn(), migrator: mockKibanaMigrator.create(), }; + startContract.getScopedClient.mockReturnValue(savedObjectsClientMock.create()); + startContract.createInternalRepository.mockReturnValue(savedObjectsRepositoryMock.create()); + startContract.createScopedRepository.mockReturnValue(savedObjectsRepositoryMock.create()); + return startContract; }; const createSetupContractMock = () => { const setupContract: jest.Mocked = { - getScopedClient: jest.fn(), - setClientFactory: jest.fn(), + setClientFactoryProvider: jest.fn(), addClientWrapper: jest.fn(), - createInternalRepository: jest.fn(), - createScopedRepository: jest.fn(), }; - - setupContract.getScopedClient.mockReturnValue(savedObjectsClientMock.create()); - setupContract.createInternalRepository.mockReturnValue(savedObjectsRepositoryMock.create()); - setupContract.createScopedRepository.mockReturnValue(savedObjectsRepositoryMock.create()); - return setupContract; }; -const createsavedObjectsServiceMock = () => { +const createSavedObjectsServiceMock = () => { const mocked: jest.Mocked = { setup: jest.fn(), start: jest.fn(), @@ -69,7 +67,7 @@ const createsavedObjectsServiceMock = () => { }; export const savedObjectsServiceMock = { - create: createsavedObjectsServiceMock, + create: createSavedObjectsServiceMock, createSetupContract: createSetupContractMock, createStartContract: createStartContractMock, }; diff --git a/src/core/server/saved_objects/saved_objects_service.test.mocks.ts b/src/core/server/saved_objects/saved_objects_service.test.mocks.ts new file mode 100644 index 00000000000000..a9ad0778d4757d --- /dev/null +++ b/src/core/server/saved_objects/saved_objects_service.test.mocks.ts @@ -0,0 +1,32 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { mockKibanaMigrator } from './migrations/kibana/kibana_migrator.mock'; +import { savedObjectsClientProviderMock } from './service/lib/scoped_client_provider.mock'; + +export const migratorInstanceMock = mockKibanaMigrator.create(); +export const KibanaMigratorMock = jest.fn().mockImplementation(() => migratorInstanceMock); +jest.doMock('./migrations/kibana/kibana_migrator', () => ({ + KibanaMigrator: KibanaMigratorMock, +})); + +export const clientProviderInstanceMock = savedObjectsClientProviderMock.create(); +jest.doMock('./service/lib/scoped_client_provider', () => ({ + SavedObjectsClientProvider: jest.fn().mockImplementation(() => clientProviderInstanceMock), +})); diff --git a/src/core/server/saved_objects/saved_objects_service.test.ts b/src/core/server/saved_objects/saved_objects_service.test.ts index deb6f98e17b7b7..6668d57045a957 100644 --- a/src/core/server/saved_objects/saved_objects_service.test.ts +++ b/src/core/server/saved_objects/saved_objects_service.test.ts @@ -17,95 +17,149 @@ * under the License. */ -jest.mock('./migrations/kibana/kibana_migrator'); +import { + KibanaMigratorMock, + migratorInstanceMock, + clientProviderInstanceMock, +} from './saved_objects_service.test.mocks'; -import { SavedObjectsService, SavedObjectsSetupDeps } from './saved_objects_service'; +import { SavedObjectsService } from './saved_objects_service'; import { mockCoreContext } from '../core_context.mock'; -// @ts-ignore Typescript doesn't know about the jest mock -import { KibanaMigrator, mockKibanaMigratorInstance } from './migrations/kibana/kibana_migrator'; import * as legacyElasticsearch from 'elasticsearch'; import { Env } from '../config'; import { configServiceMock } from '../mocks'; - -afterEach(() => { - jest.clearAllMocks(); -}); +import { elasticsearchServiceMock } from '../elasticsearch/elasticsearch_service.mock'; +import { legacyServiceMock } from '../legacy/legacy_service.mock'; +import { SavedObjectsClientFactoryProvider } from './service/lib'; describe('SavedObjectsService', () => { + const createSetupDeps = () => { + return { + elasticsearch: elasticsearchServiceMock.createInternalSetup(), + legacyPlugins: legacyServiceMock.createDiscoverPlugins(), + }; + }; + + afterEach(() => { + jest.clearAllMocks(); + }); + describe('#setup()', () => { + describe('#setClientFactoryProvider', () => { + it('registers the factory to the clientProvider', async () => { + const coreContext = mockCoreContext.create(); + const soService = new SavedObjectsService(coreContext); + const setup = await soService.setup(createSetupDeps()); + + const factory = jest.fn(); + const factoryProvider: SavedObjectsClientFactoryProvider = () => factory; + + setup.setClientFactoryProvider(factoryProvider); + + await soService.start({}); + + expect(clientProviderInstanceMock.setClientFactory).toHaveBeenCalledWith(factory); + }); + it('throws if a factory is already registered', async () => { + const coreContext = mockCoreContext.create(); + const soService = new SavedObjectsService(coreContext); + const setup = await soService.setup(createSetupDeps()); + + const firstFactory = () => jest.fn(); + const secondFactory = () => jest.fn(); + + setup.setClientFactoryProvider(firstFactory); + + expect(() => { + setup.setClientFactoryProvider(secondFactory); + }).toThrowErrorMatchingInlineSnapshot( + `"custom client factory is already set, and can only be set once"` + ); + }); + }); + + describe('#addClientWrapper', () => { + it('registers the wrapper to the clientProvider', async () => { + const coreContext = mockCoreContext.create(); + const soService = new SavedObjectsService(coreContext); + const setup = await soService.setup(createSetupDeps()); + + const wrapperA = jest.fn(); + const wrapperB = jest.fn(); + + setup.addClientWrapper(1, 'A', wrapperA); + setup.addClientWrapper(2, 'B', wrapperB); + + await soService.start({}); + + expect(clientProviderInstanceMock.addClientWrapperFactory).toHaveBeenCalledTimes(2); + expect(clientProviderInstanceMock.addClientWrapperFactory).toHaveBeenCalledWith( + 1, + 'A', + wrapperA + ); + expect(clientProviderInstanceMock.addClientWrapperFactory).toHaveBeenCalledWith( + 2, + 'B', + wrapperB + ); + }); + }); + }); + + describe('#start()', () => { it('creates a KibanaMigrator which retries NoConnections errors from callAsInternalUser', async () => { const coreContext = mockCoreContext.create(); - let i = 0; - const clusterClient = { - callAsInternalUser: jest - .fn() - .mockImplementation(() => - i++ <= 2 - ? Promise.reject(new legacyElasticsearch.errors.NoConnections()) - : Promise.resolve('success') - ), - }; const soService = new SavedObjectsService(coreContext); - const coreSetup = ({ - elasticsearch: { adminClient: clusterClient }, - legacyPlugins: { uiExports: { savedObjectMappings: [] }, pluginExtendedConfig: {} }, - } as unknown) as SavedObjectsSetupDeps; + const coreSetup = createSetupDeps(); + + let i = 0; + coreSetup.elasticsearch.adminClient.callAsInternalUser = jest + .fn() + .mockImplementation(() => + i++ <= 2 + ? Promise.reject(new legacyElasticsearch.errors.NoConnections()) + : Promise.resolve('success') + ); - await soService.setup(coreSetup, 1); + await soService.setup(coreSetup); + await soService.start({}, 1); - return expect((KibanaMigrator as jest.Mock).mock.calls[0][0].callCluster()).resolves.toMatch( - 'success' - ); + return expect(KibanaMigratorMock.mock.calls[0][0].callCluster()).resolves.toMatch('success'); }); - }); - describe('#start()', () => { it('skips KibanaMigrator migrations when --optimize=true', async () => { const coreContext = mockCoreContext.create({ env: ({ cliArgs: { optimize: true }, packageInfo: { version: 'x.x.x' } } as unknown) as Env, }); const soService = new SavedObjectsService(coreContext); - const coreSetup = ({ - elasticsearch: { adminClient: { callAsInternalUser: jest.fn() } }, - legacyPlugins: { uiExports: {}, pluginExtendedConfig: {} }, - } as unknown) as SavedObjectsSetupDeps; - await soService.setup(coreSetup); + await soService.setup(createSetupDeps()); await soService.start({}); - expect(mockKibanaMigratorInstance.runMigrations).toHaveBeenCalledWith(true); + expect(migratorInstanceMock.runMigrations).toHaveBeenCalledWith(true); }); it('skips KibanaMigrator migrations when migrations.skip=true', async () => { const configService = configServiceMock.create({ atPath: { skip: true } }); const coreContext = mockCoreContext.create({ configService }); const soService = new SavedObjectsService(coreContext); - const coreSetup = ({ - elasticsearch: { adminClient: { callAsInternalUser: jest.fn() } }, - legacyPlugins: { uiExports: {}, pluginExtendedConfig: {} }, - } as unknown) as SavedObjectsSetupDeps; - - await soService.setup(coreSetup); + await soService.setup(createSetupDeps()); await soService.start({}); - expect(mockKibanaMigratorInstance.runMigrations).toHaveBeenCalledWith(true); + expect(migratorInstanceMock.runMigrations).toHaveBeenCalledWith(true); }); it('resolves with KibanaMigrator after waiting for migrations to complete', async () => { const configService = configServiceMock.create({ atPath: { skip: false } }); const coreContext = mockCoreContext.create({ configService }); const soService = new SavedObjectsService(coreContext); - const coreSetup = ({ - elasticsearch: { adminClient: { callAsInternalUser: jest.fn() } }, - legacyPlugins: { uiExports: {}, pluginExtendedConfig: {} }, - } as unknown) as SavedObjectsSetupDeps; - - await soService.setup(coreSetup); - expect(mockKibanaMigratorInstance.runMigrations).toHaveBeenCalledTimes(0); + await soService.setup(createSetupDeps()); + expect(migratorInstanceMock.runMigrations).toHaveBeenCalledTimes(0); const startContract = await soService.start({}); - expect(startContract.migrator).toBe(mockKibanaMigratorInstance); - expect(mockKibanaMigratorInstance.runMigrations).toHaveBeenCalledWith(false); - expect(mockKibanaMigratorInstance.runMigrations).toHaveBeenCalledTimes(1); + expect(startContract.migrator).toBe(migratorInstanceMock); + expect(migratorInstanceMock.runMigrations).toHaveBeenCalledWith(false); + expect(migratorInstanceMock.runMigrations).toHaveBeenCalledTimes(1); }); }); }); diff --git a/src/core/server/saved_objects/saved_objects_service.ts b/src/core/server/saved_objects/saved_objects_service.ts index 69ca8306ca4da8..b08033a19242b0 100644 --- a/src/core/server/saved_objects/saved_objects_service.ts +++ b/src/core/server/saved_objects/saved_objects_service.ts @@ -37,13 +37,17 @@ import { KibanaRequest } from '../http'; import { SavedObjectsClientContract } from './types'; import { ISavedObjectsRepository, SavedObjectsRepository } from './service/lib/repository'; import { - SavedObjectsClientFactory, + SavedObjectsClientFactoryProvider, SavedObjectsClientWrapperFactory, } from './service/lib/scoped_client_provider'; -import { Logger } from '..'; +import { Logger } from '../logging'; +import { SavedObjectsMapping } from './mappings'; +import { MigrationDefinition } from './migrations/core/document_migrator'; +import { SavedObjectsSchemaDefinition } from './schema'; +import { PropertyValidators } from './validation'; /** - * Saved Objects is Kibana's data persisentence mechanism allowing plugins to + * Saved Objects is Kibana's data persistence mechanism allowing plugins to * use Elasticsearch for storing and querying state. The * SavedObjectsServiceSetup API exposes methods for creating and registering * Saved Object client wrappers. @@ -66,11 +70,11 @@ import { Logger } from '..'; * constructor. * * @example - * import {SavedObjectsClient, CoreSetup} from 'src/core/server'; + * import { SavedObjectsClient, CoreSetup } from 'src/core/server'; * * export class Plugin() { * setup: (core: CoreSetup) => { - * core.savedObjects.setClientFactory(({request: KibanaRequest}) => { + * core.savedObjects.setClientFactory(({ request: KibanaRequest }) => { * return new SavedObjectsClient(core.savedObjects.scopedRepository(request)); * }) * } @@ -80,61 +84,25 @@ import { Logger } from '..'; */ export interface SavedObjectsServiceSetup { /** - * Set a default factory for creating Saved Objects clients. Only one client - * factory can be set, subsequent calls to this method will fail. + * Set the default {@link SavedObjectsClientFactoryProvider | factory provider} for creating Saved Objects clients. + * Only one provider can be set, subsequent calls to this method will fail. */ - setClientFactory: (customClientFactory: SavedObjectsClientFactory) => void; + setClientFactoryProvider: (clientFactoryProvider: SavedObjectsClientFactoryProvider) => void; /** - * Add a client wrapper with the given priority. + * Add a {@link SavedObjectsClientWrapperFactory | client wrapper factory} with the given priority. */ addClientWrapper: ( priority: number, id: string, - factory: SavedObjectsClientWrapperFactory + factory: SavedObjectsClientWrapperFactory ) => void; - - /** - * Creates a {@link ISavedObjectsRepository | Saved Objects repository} that - * uses the credentials from the passed in request to authenticate with - * Elasticsearch. - * - * @remarks - * The repository should only be used for creating and registering a client - * factory or client wrapper. Using the repository directly for interacting - * with Saved Objects is an anti-pattern. Use the Saved Objects client from - * the - * {@link SavedObjectsServiceStart | SavedObjectsServiceStart#getScopedClient } - * method or the {@link RequestHandlerContext | route handler context} - * instead. - */ - createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository; - - /** - * Creates a {@link ISavedObjectsRepository | Saved Objects repository} that - * uses the internal Kibana user for authenticating with Elasticsearch. - * - * @remarks - * The repository should only be used for creating and registering a client - * factory or client wrapper. Using the repository directly for interacting - * with Saved Objects is an anti-pattern. Use the Saved Objects client from - * the - * {@link SavedObjectsServiceStart | SavedObjectsServiceStart#getScopedClient } - * method or the {@link RequestHandlerContext | route handler context} - * instead. - */ - createInternalRepository: (extraTypes?: string[]) => ISavedObjectsRepository; } /** * @internal */ -export interface InternalSavedObjectsServiceSetup extends SavedObjectsServiceSetup { - getScopedClient: ( - req: KibanaRequest, - options?: SavedObjectsClientProviderOptions - ) => SavedObjectsClientContract; -} +export type InternalSavedObjectsServiceSetup = SavedObjectsServiceSetup; /** * Saved Objects is Kibana's data persisentence mechanism allowing plugins to @@ -158,6 +126,26 @@ export interface SavedObjectsServiceStart { req: KibanaRequest, options?: SavedObjectsClientProviderOptions ) => SavedObjectsClientContract; + /** + * Creates a {@link ISavedObjectsRepository | Saved Objects repository} that + * uses the credentials from the passed in request to authenticate with + * Elasticsearch. + * + * @param req - The request to create the scoped repository from. + * @param extraTypes - A list of additional hidden types the repository should have access to. + * + * @remarks + * Prefer using `getScopedClient`. This should only be used when using methods + * not exposed on {@link SavedObjectsClientContract} + */ + createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository; + /** + * Creates a {@link ISavedObjectsRepository | Saved Objects repository} that + * uses the internal Kibana user for authenticating with Elasticsearch. + * + * @param extraTypes - A list of additional hidden types the repository should have access to. + */ + createInternalRepository: (extraTypes?: string[]) => ISavedObjectsRepository; } export interface InternalSavedObjectsServiceStart extends SavedObjectsServiceStart { @@ -171,130 +159,200 @@ export interface InternalSavedObjectsServiceStart extends SavedObjectsServiceSta clientProvider: ISavedObjectsClientProvider; } +/** + * Factory provided when invoking a {@link SavedObjectsClientFactoryProvider | client factory provider} + * See {@link SavedObjectsServiceSetup.setClientFactoryProvider} + * + * @public + */ +export interface SavedObjectsRepositoryFactory { + /** + * Creates a {@link ISavedObjectsRepository | Saved Objects repository} that + * uses the credentials from the passed in request to authenticate with + * Elasticsearch. + * + * @param extraTypes - A list of additional hidden types the repository should have access to. + */ + createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository; + /** + * Creates a {@link ISavedObjectsRepository | Saved Objects repository} that + * uses the internal Kibana user for authenticating with Elasticsearch. + * + * @param extraTypes - A list of additional hidden types the repository should have access to. + */ + createInternalRepository: (extraTypes?: string[]) => ISavedObjectsRepository; +} + /** @internal */ export interface SavedObjectsSetupDeps { legacyPlugins: LegacyServiceDiscoverPlugins; elasticsearch: InternalElasticsearchServiceSetup; } +interface WrappedClientFactoryWrapper { + priority: number; + id: string; + factory: SavedObjectsClientWrapperFactory; +} + /** @internal */ // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface SavedObjectsStartDeps {} export class SavedObjectsService implements CoreService { - private migrator: KibanaMigrator | undefined; private logger: Logger; - private clientProvider: ISavedObjectsClientProvider | undefined; + + private setupDeps?: SavedObjectsSetupDeps; + private clientFactoryProvider?: SavedObjectsClientFactoryProvider; + private clientFactoryWrappers: WrappedClientFactoryWrapper[] = []; + + private mappings: SavedObjectsMapping[] = []; + private migrations: MigrationDefinition = {}; + private schemas: SavedObjectsSchemaDefinition = {}; + private validations: PropertyValidators = {}; constructor(private readonly coreContext: CoreContext) { this.logger = coreContext.logger.get('savedobjects-service'); } - public async setup( - setupDeps: SavedObjectsSetupDeps, - migrationsRetryDelay?: number - ): Promise { + public async setup(setupDeps: SavedObjectsSetupDeps): Promise { this.logger.debug('Setting up SavedObjects service'); + this.setupDeps = setupDeps; + const { savedObjectSchemas: savedObjectsSchemasDefinition, savedObjectMappings, savedObjectMigrations, savedObjectValidations, } = setupDeps.legacyPlugins.uiExports; + this.mappings = savedObjectMappings; + this.migrations = savedObjectMigrations; + this.schemas = savedObjectsSchemasDefinition; + this.validations = savedObjectValidations; - const savedObjectSchemas = new SavedObjectsSchema(savedObjectsSchemasDefinition); + return { + setClientFactoryProvider: provider => { + if (this.clientFactoryProvider) { + throw new Error('custom client factory is already set, and can only be set once'); + } + this.clientFactoryProvider = provider; + }, + addClientWrapper: (priority, id, factory) => { + this.clientFactoryWrappers.push({ + priority, + id, + factory, + }); + }, + }; + } + + public async start( + core: SavedObjectsStartDeps, + migrationsRetryDelay?: number + ): Promise { + if (!this.setupDeps) { + throw new Error('#setup() needs to be run first'); + } + + this.logger.debug('Starting SavedObjects service'); const kibanaConfig = await this.coreContext.configService .atPath('kibana') .pipe(first()) .toPromise(); - const savedObjectsConfig = await this.coreContext.configService .atPath('migrations') .pipe(first()) .toPromise(); + const adminClient = this.setupDeps!.elasticsearch.adminClient; + const migrator = this.createMigrator(kibanaConfig, savedObjectsConfig, migrationsRetryDelay); - const adminClient = setupDeps.elasticsearch.adminClient; + /** + * Note: We want to ensure that migrations have completed before + * continuing with further Core start steps that might use SavedObjects + * such as running the legacy server, legacy plugins and allowing incoming + * HTTP requests. + * + * However, our build system optimize step and some tests depend on the + * HTTP server running without an Elasticsearch server being available. + * So, when the `migrations.skip` is true, we skip migrations altogether. + */ + const cliArgs = this.coreContext.env.cliArgs; + const skipMigrations = cliArgs.optimize || savedObjectsConfig.skip; - const migrator = (this.migrator = new KibanaMigrator({ - savedObjectSchemas, - savedObjectMappings, - savedObjectMigrations, - savedObjectValidations, - logger: this.coreContext.logger.get('migrations'), - kibanaVersion: this.coreContext.env.packageInfo.version, - config: setupDeps.legacyPlugins.pluginExtendedConfig, - savedObjectsConfig, - kibanaConfig, - callCluster: migrationsRetryCallCluster( - adminClient.callAsInternalUser, - this.coreContext.logger.get('migrations'), - migrationsRetryDelay - ), - })); + this.logger.debug('Starting saved objects migration'); + await migrator.runMigrations(skipMigrations); + this.logger.debug('Saved objects migration completed'); - const createSORepository = (callCluster: APICaller, extraTypes: string[] = []) => { + const createRepository = (callCluster: APICaller, extraTypes: string[] = []) => { return SavedObjectsRepository.createRepository( migrator, - savedObjectSchemas, - setupDeps.legacyPlugins.pluginExtendedConfig, + new SavedObjectsSchema(this.schemas), + this.setupDeps!.legacyPlugins.pluginExtendedConfig, kibanaConfig.index, callCluster, extraTypes ); }; - this.clientProvider = new SavedObjectsClientProvider({ + const repositoryFactory: SavedObjectsRepositoryFactory = { + createInternalRepository: (extraTypes?: string[]) => + createRepository(adminClient.callAsInternalUser, extraTypes), + createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => + createRepository(adminClient.asScoped(req).callAsCurrentUser, extraTypes), + }; + + const clientProvider = new SavedObjectsClientProvider({ defaultClientFactory({ request }) { - const repository = createSORepository(adminClient.asScoped(request).callAsCurrentUser); + const repository = repositoryFactory.createScopedRepository(request); return new SavedObjectsClient(repository); }, }); + if (this.clientFactoryProvider) { + const clientFactory = this.clientFactoryProvider(repositoryFactory); + clientProvider.setClientFactory(clientFactory); + } + this.clientFactoryWrappers.forEach(({ id, factory, priority }) => { + clientProvider.addClientWrapperFactory(priority, id, factory); + }); return { - getScopedClient: this.clientProvider.getClient.bind(this.clientProvider), - setClientFactory: this.clientProvider.setClientFactory.bind(this.clientProvider), - addClientWrapper: this.clientProvider.addClientWrapperFactory.bind(this.clientProvider), - createInternalRepository: (extraTypes?: string[]) => - createSORepository(adminClient.callAsInternalUser, extraTypes), - createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => - createSORepository(adminClient.asScoped(req).callAsCurrentUser, extraTypes), + migrator, + clientProvider, + getScopedClient: clientProvider.getClient.bind(clientProvider), + createScopedRepository: repositoryFactory.createScopedRepository, + createInternalRepository: repositoryFactory.createInternalRepository, }; } - public async start(core: SavedObjectsStartDeps): Promise { - if (!this.clientProvider) { - throw new Error('#setup() needs to be run first'); - } - - this.logger.debug('Starting SavedObjects service'); + public async stop() {} - /** - * Note: We want to ensure that migrations have completed before - * continuing with further Core startup steps that might use SavedObjects - * such as running the legacy server, legacy plugins and allowing incoming - * HTTP requests. - * - * However, our build system optimize step and some tests depend on the - * HTTP server running without an Elasticsearch server being available. - * So, when the `migrations.skip` is true, we skip migrations altogether. - */ - const cliArgs = this.coreContext.env.cliArgs; - const savedObjectsConfig = await this.coreContext.configService - .atPath('migrations') - .pipe(first()) - .toPromise(); - const skipMigrations = cliArgs.optimize || savedObjectsConfig.skip; - await this.migrator!.runMigrations(skipMigrations); + private createMigrator( + kibanaConfig: KibanaConfigType, + savedObjectsConfig: SavedObjectsConfigType, + migrationsRetryDelay?: number + ): KibanaMigrator { + const savedObjectSchemas = new SavedObjectsSchema(this.schemas); + const adminClient = this.setupDeps!.elasticsearch.adminClient; - return { - migrator: this.migrator!, - clientProvider: this.clientProvider, - getScopedClient: this.clientProvider.getClient.bind(this.clientProvider), - }; + return new KibanaMigrator({ + savedObjectSchemas, + savedObjectMappings: this.mappings, + savedObjectMigrations: this.migrations, + savedObjectValidations: this.validations, + logger: this.coreContext.logger.get('migrations'), + kibanaVersion: this.coreContext.env.packageInfo.version, + config: this.setupDeps!.legacyPlugins.pluginExtendedConfig, + savedObjectsConfig, + kibanaConfig, + callCluster: migrationsRetryCallCluster( + adminClient.callAsInternalUser, + this.coreContext.logger.get('migrations'), + migrationsRetryDelay + ), + }); } - - public async stop() {} } diff --git a/src/core/server/saved_objects/service/index.ts b/src/core/server/saved_objects/service/index.ts index f50ee1759dad7c..9f625b4732e264 100644 --- a/src/core/server/saved_objects/service/index.ts +++ b/src/core/server/saved_objects/service/index.ts @@ -29,13 +29,11 @@ import { SavedObjectsResolveImportErrorsOptions } from '../import/types'; * @internal * @deprecated */ -export interface SavedObjectsLegacyService { +export interface SavedObjectsLegacyService { // ATTENTION: these types are incomplete - addScopedSavedObjectsClientWrapperFactory: SavedObjectsClientProvider< - Request - >['addClientWrapperFactory']; - setScopedSavedObjectsClientFactory: SavedObjectsClientProvider['setClientFactory']; - getScopedSavedObjectsClient: SavedObjectsClientProvider['getClient']; + addScopedSavedObjectsClientWrapperFactory: SavedObjectsClientProvider['addClientWrapperFactory']; + setScopedSavedObjectsClientFactory: SavedObjectsClientProvider['setClientFactory']; + getScopedSavedObjectsClient: SavedObjectsClientProvider['getClient']; SavedObjectsClient: typeof SavedObjectsClient; types: string[]; schema: SavedObjectsSchema; @@ -59,6 +57,7 @@ export { SavedObjectsClientWrapperOptions, SavedObjectsErrorHelpers, SavedObjectsClientFactory, + SavedObjectsClientFactoryProvider, } from './lib'; export * from './saved_objects_client'; diff --git a/src/core/server/saved_objects/service/lib/index.ts b/src/core/server/saved_objects/service/lib/index.ts index c26128acc5050f..e103120388e354 100644 --- a/src/core/server/saved_objects/service/lib/index.ts +++ b/src/core/server/saved_objects/service/lib/index.ts @@ -26,6 +26,7 @@ export { SavedObjectsClientProvider, SavedObjectsClientProviderOptions, SavedObjectsClientFactory, + SavedObjectsClientFactoryProvider, } from './scoped_client_provider'; export { SavedObjectsErrorHelpers } from './errors'; diff --git a/src/core/server/saved_objects/service/lib/scoped_client_provider.ts b/src/core/server/saved_objects/service/lib/scoped_client_provider.ts index 42f75e25171264..8aadc4f57317c6 100644 --- a/src/core/server/saved_objects/service/lib/scoped_client_provider.ts +++ b/src/core/server/saved_objects/service/lib/scoped_client_provider.ts @@ -18,34 +18,44 @@ */ import { PriorityCollection } from './priority_collection'; import { SavedObjectsClientContract } from '../../types'; +import { SavedObjectsRepositoryFactory } from '../../saved_objects_service'; +import { KibanaRequest } from '../../../http'; /** * Options passed to each SavedObjectsClientWrapperFactory to aid in creating the wrapper instance. * @public */ -export interface SavedObjectsClientWrapperOptions { +export interface SavedObjectsClientWrapperOptions { client: SavedObjectsClientContract; - request: Request; + request: KibanaRequest; } /** * Describes the factory used to create instances of Saved Objects Client Wrappers. * @public */ -export type SavedObjectsClientWrapperFactory = ( - options: SavedObjectsClientWrapperOptions +export type SavedObjectsClientWrapperFactory = ( + options: SavedObjectsClientWrapperOptions ) => SavedObjectsClientContract; /** * Describes the factory used to create instances of the Saved Objects Client. * @public */ -export type SavedObjectsClientFactory = ({ +export type SavedObjectsClientFactory = ({ request, }: { - request: Request; + request: KibanaRequest; }) => SavedObjectsClientContract; +/** + * Provider to invoke to retrieve a {@link SavedObjectsClientFactory}. + * @public + */ +export type SavedObjectsClientFactoryProvider = ( + repositoryFactory: SavedObjectsRepositoryFactory +) => SavedObjectsClientFactory; + /** * Options to control the creation of the Saved Objects Client. * @public @@ -57,8 +67,8 @@ export interface SavedObjectsClientProviderOptions { /** * @internal */ -export type ISavedObjectsClientProvider = Pick< - SavedObjectsClientProvider, +export type ISavedObjectsClientProvider = Pick< + SavedObjectsClientProvider, keyof SavedObjectsClientProvider >; @@ -67,26 +77,22 @@ export type ISavedObjectsClientProvider = Pick< * * @internal */ -export class SavedObjectsClientProvider { +export class SavedObjectsClientProvider { private readonly _wrapperFactories = new PriorityCollection<{ id: string; - factory: SavedObjectsClientWrapperFactory; + factory: SavedObjectsClientWrapperFactory; }>(); - private _clientFactory: SavedObjectsClientFactory; - private readonly _originalClientFactory: SavedObjectsClientFactory; - - constructor({ - defaultClientFactory, - }: { - defaultClientFactory: SavedObjectsClientFactory; - }) { + private _clientFactory: SavedObjectsClientFactory; + private readonly _originalClientFactory: SavedObjectsClientFactory; + + constructor({ defaultClientFactory }: { defaultClientFactory: SavedObjectsClientFactory }) { this._originalClientFactory = this._clientFactory = defaultClientFactory; } addClientWrapperFactory( priority: number, id: string, - factory: SavedObjectsClientWrapperFactory + factory: SavedObjectsClientWrapperFactory ): void { if (this._wrapperFactories.has(entry => entry.id === id)) { throw new Error(`wrapper factory with id ${id} is already defined`); @@ -95,7 +101,7 @@ export class SavedObjectsClientProvider { this._wrapperFactories.add(priority, { id, factory }); } - setClientFactory(customClientFactory: SavedObjectsClientFactory) { + setClientFactory(customClientFactory: SavedObjectsClientFactory) { if (this._clientFactory !== this._originalClientFactory) { throw new Error(`custom client factory is already set, unable to replace the current one`); } @@ -104,7 +110,7 @@ export class SavedObjectsClientProvider { } getClient( - request: Request, + request: KibanaRequest, options: SavedObjectsClientProviderOptions = {} ): SavedObjectsClientContract { const client = this._clientFactory({ diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index aa9ed8ecdbd40e..060587448642fd 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -1498,10 +1498,13 @@ export class SavedObjectsClient { export type SavedObjectsClientContract = Pick; // @public -export type SavedObjectsClientFactory = ({ request, }: { - request: Request; +export type SavedObjectsClientFactory = ({ request, }: { + request: KibanaRequest; }) => SavedObjectsClientContract; +// @public +export type SavedObjectsClientFactoryProvider = (repositoryFactory: SavedObjectsRepositoryFactory) => SavedObjectsClientFactory; + // @public export interface SavedObjectsClientProviderOptions { // (undocumented) @@ -1509,14 +1512,14 @@ export interface SavedObjectsClientProviderOptions { } // @public -export type SavedObjectsClientWrapperFactory = (options: SavedObjectsClientWrapperOptions) => SavedObjectsClientContract; +export type SavedObjectsClientWrapperFactory = (options: SavedObjectsClientWrapperOptions) => SavedObjectsClientContract; // @public -export interface SavedObjectsClientWrapperOptions { +export interface SavedObjectsClientWrapperOptions { // (undocumented) client: SavedObjectsClientContract; // (undocumented) - request: Request; + request: KibanaRequest; } // @public (undocumented) @@ -1752,15 +1755,15 @@ export interface SavedObjectsIncrementCounterOptions extends SavedObjectsBaseOpt } // @internal @deprecated (undocumented) -export interface SavedObjectsLegacyService { +export interface SavedObjectsLegacyService { // Warning: (ae-forgotten-export) The symbol "SavedObjectsClientProvider" needs to be exported by the entry point index.d.ts // // (undocumented) - addScopedSavedObjectsClientWrapperFactory: SavedObjectsClientProvider['addClientWrapperFactory']; + addScopedSavedObjectsClientWrapperFactory: SavedObjectsClientProvider['addClientWrapperFactory']; // (undocumented) getSavedObjectsRepository(...rest: any[]): any; // (undocumented) - getScopedSavedObjectsClient: SavedObjectsClientProvider['getClient']; + getScopedSavedObjectsClient: SavedObjectsClientProvider['getClient']; // (undocumented) importExport: { objectLimit: number; @@ -1773,7 +1776,7 @@ export interface SavedObjectsLegacyService { // (undocumented) schema: SavedObjectsSchema; // (undocumented) - setScopedSavedObjectsClientFactory: SavedObjectsClientProvider['setClientFactory']; + setScopedSavedObjectsClientFactory: SavedObjectsClientProvider['setClientFactory']; // (undocumented) types: string[]; } @@ -1836,6 +1839,12 @@ export class SavedObjectsRepository { update(type: string, id: string, attributes: Partial, options?: SavedObjectsUpdateOptions): Promise>; } +// @public +export interface SavedObjectsRepositoryFactory { + createInternalRepository: (extraTypes?: string[]) => ISavedObjectsRepository; + createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository; +} + // @public export interface SavedObjectsResolveImportErrorsOptions { // (undocumented) @@ -1878,14 +1887,14 @@ export class SavedObjectsSerializer { // @public export interface SavedObjectsServiceSetup { - addClientWrapper: (priority: number, id: string, factory: SavedObjectsClientWrapperFactory) => void; - createInternalRepository: (extraTypes?: string[]) => ISavedObjectsRepository; - createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository; - setClientFactory: (customClientFactory: SavedObjectsClientFactory) => void; + addClientWrapper: (priority: number, id: string, factory: SavedObjectsClientWrapperFactory) => void; + setClientFactoryProvider: (clientFactoryProvider: SavedObjectsClientFactoryProvider) => void; } // @public export interface SavedObjectsServiceStart { + createInternalRepository: (extraTypes?: string[]) => ISavedObjectsRepository; + createScopedRepository: (req: KibanaRequest, extraTypes?: string[]) => ISavedObjectsRepository; getScopedClient: (req: KibanaRequest, options?: SavedObjectsClientProviderOptions) => SavedObjectsClientContract; } diff --git a/src/core/server/server.ts b/src/core/server/server.ts index 89a5bdc4802fd9..96adb3bbcd2104 100644 --- a/src/core/server/server.ts +++ b/src/core/server/server.ts @@ -47,7 +47,7 @@ import { config as uiSettingsConfig } from './ui_settings'; import { mapToObject } from '../utils'; import { ContextService } from './context'; import { RequestHandlerContext } from '.'; -import { InternalCoreSetup } from './internal_types'; +import { InternalCoreSetup, InternalCoreStart } from './internal_types'; import { CapabilitiesService } from './capabilities'; import { UuidService } from './uuid'; @@ -68,6 +68,8 @@ export class Server { private readonly uiSettings: UiSettingsService; private readonly uuid: UuidService; + private coreStart?: InternalCoreStart; + constructor( rawConfigProvider: RawConfigurationProvider, public readonly env: Env, @@ -174,21 +176,24 @@ export class Server { uiSettings: uiSettingsStart, }); - const coreStart = { + this.coreStart = { capabilities: capabilitiesStart, savedObjects: savedObjectsStart, uiSettings: uiSettingsStart, - plugins: pluginsStart, }; + await this.legacy.start({ - core: coreStart, + core: { + ...this.coreStart, + plugins: pluginsStart, + }, plugins: mapToObject(pluginsStart.contracts), }); await this.http.start(); await this.rendering.start(); - return coreStart; + return this.coreStart; } public async stop() { @@ -215,7 +220,7 @@ export class Server { coreId, 'core', async (context, req, res): Promise => { - const savedObjectsClient = coreSetup.savedObjects.getScopedClient(req); + const savedObjectsClient = this.coreStart!.savedObjects.getScopedClient(req); const uiSettingsClient = coreSetup.uiSettings.asScopedToClient(savedObjectsClient); return { diff --git a/src/core/server/ui_settings/create_or_upgrade_saved_config/integration_tests/create_or_upgrade.test.ts b/src/core/server/ui_settings/create_or_upgrade_saved_config/integration_tests/create_or_upgrade.test.ts index f7dbf992e87286..218de8e7acb3ae 100644 --- a/src/core/server/ui_settings/create_or_upgrade_saved_config/integration_tests/create_or_upgrade.test.ts +++ b/src/core/server/ui_settings/create_or_upgrade_saved_config/integration_tests/create_or_upgrade.test.ts @@ -27,6 +27,7 @@ import { } from '../../../../../test_utils/kbn_server'; import { createOrUpgradeSavedConfig } from '../create_or_upgrade_saved_config'; import { loggingServiceMock } from '../../../logging/logging_service.mock'; +import { httpServerMock } from '../../../http/http_server.mocks'; const logger = loggingServiceMock.create().get(); describe('createOrUpgradeSavedConfig()', () => { @@ -48,7 +49,9 @@ describe('createOrUpgradeSavedConfig()', () => { kbnServer = kbn.kbnServer; const savedObjects = kbnServer.server.savedObjects; - savedObjectsClient = savedObjects.getScopedSavedObjectsClient({}); + savedObjectsClient = savedObjects.getScopedSavedObjectsClient( + httpServerMock.createKibanaRequest() + ); await savedObjectsClient.bulkCreate([ { diff --git a/src/core/server/ui_settings/integration_tests/lib/servers.ts b/src/core/server/ui_settings/integration_tests/lib/servers.ts index 1abe6dc2d06838..57448541d68c58 100644 --- a/src/core/server/ui_settings/integration_tests/lib/servers.ts +++ b/src/core/server/ui_settings/integration_tests/lib/servers.ts @@ -26,6 +26,7 @@ import { TestUtils, } from '../../../../../test_utils/kbn_server'; import { APICaller } from '../../../elasticsearch/'; +import { httpServerMock } from '../../../http/http_server.mocks'; let servers: TestUtils; let esServer: TestElasticsearchUtils; @@ -83,7 +84,9 @@ export function getServices() { const callCluster = esServer.es.getCallCluster(); const savedObjects = kbnServer.server.savedObjects; - const savedObjectsClient = savedObjects.getScopedSavedObjectsClient({}); + const savedObjectsClient = savedObjects.getScopedSavedObjectsClient( + httpServerMock.createKibanaRequest() + ); const uiSettings = kbnServer.server.uiSettingsServiceFactory({ savedObjectsClient, diff --git a/src/legacy/core_plugins/telemetry/server/collectors/management/telemetry_management_collector.ts b/src/legacy/core_plugins/telemetry/server/collectors/management/telemetry_management_collector.ts index 44926b644ced5c..481b1e9af2a79b 100644 --- a/src/legacy/core_plugins/telemetry/server/collectors/management/telemetry_management_collector.ts +++ b/src/legacy/core_plugins/telemetry/server/collectors/management/telemetry_management_collector.ts @@ -32,7 +32,7 @@ export async function getTranslationCount(loader: any, locale: string): Promise< export function createCollectorFetch(server: Server) { return async function fetchUsageStats(): Promise { - const internalRepo = server.newPlatform.setup.core.savedObjects.createInternalRepository(); + const internalRepo = server.newPlatform.start.core.savedObjects.createInternalRepository(); const uiSettingsClient = server.newPlatform.start.core.uiSettings.asScopedToClient( new SavedObjectsClient(internalRepo) ); diff --git a/src/plugins/data/server/kql_telemetry/kql_telemetry_service.ts b/src/plugins/data/server/kql_telemetry/kql_telemetry_service.ts index 8f68e63703d407..e45ad796bd9d46 100644 --- a/src/plugins/data/server/kql_telemetry/kql_telemetry_service.ts +++ b/src/plugins/data/server/kql_telemetry/kql_telemetry_service.ts @@ -27,12 +27,12 @@ export class KqlTelemetryService implements Plugin { constructor(private initializerContext: PluginInitializerContext) {} public setup( - { http, savedObjects }: CoreSetup, + { http, getStartServices }: CoreSetup, { usageCollection }: { usageCollection?: UsageCollectionSetup } ) { registerKqlTelemetryRoute( http.createRouter(), - savedObjects, + getStartServices, this.initializerContext.logger.get('data', 'kql-telemetry') ); diff --git a/src/plugins/data/server/kql_telemetry/route.ts b/src/plugins/data/server/kql_telemetry/route.ts index 3185da22b12b32..d5725c859c9a90 100644 --- a/src/plugins/data/server/kql_telemetry/route.ts +++ b/src/plugins/data/server/kql_telemetry/route.ts @@ -22,7 +22,7 @@ import { schema } from '@kbn/config-schema'; export function registerKqlTelemetryRoute( router: IRouter, - savedObjects: CoreSetup['savedObjects'], + getStartServices: CoreSetup['getStartServices'], logger: Logger ) { router.post( @@ -35,6 +35,7 @@ export function registerKqlTelemetryRoute( }, }, async (context, request, response) => { + const [{ savedObjects }] = await getStartServices(); const internalRepository = savedObjects.createScopedRepository(request); const { diff --git a/src/plugins/home/server/services/sample_data/sample_data_registry.ts b/src/plugins/home/server/services/sample_data/sample_data_registry.ts index 7a4909668fff2e..aac680211e52e4 100644 --- a/src/plugins/home/server/services/sample_data/sample_data_registry.ts +++ b/src/plugins/home/server/services/sample_data/sample_data_registry.ts @@ -51,7 +51,7 @@ export class SampleDataRegistry { makeSampleDataUsageCollector(usageCollections, this.initContext); } const usageTracker = usage( - core.savedObjects, + core.getStartServices().then(([coreStart]) => coreStart.savedObjects), this.initContext.logger.get('sample_data', 'telemetry') ); const router = core.http.createRouter(); diff --git a/src/plugins/home/server/services/sample_data/usage/usage.ts b/src/plugins/home/server/services/sample_data/usage/usage.ts index a06dde387bb367..59599a1bee68fc 100644 --- a/src/plugins/home/server/services/sample_data/usage/usage.ts +++ b/src/plugins/home/server/services/sample_data/usage/usage.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Logger, SavedObjectsServiceSetup } from 'kibana/server'; +import { Logger, SavedObjectsServiceStart } from 'kibana/server'; const SAVED_OBJECT_ID = 'sample-data-telemetry'; @@ -27,7 +27,7 @@ export interface SampleDataUsageTracker { } export function usage( - savedObjects: SavedObjectsServiceSetup, + savedObjects: Promise, logger: Logger ): SampleDataUsageTracker { const handleIncrementError = (err: Error) => { @@ -37,11 +37,12 @@ export function usage( logger.warn(`saved objects repository incrementCounter encountered an error: ${err}`); }; - const internalRepository = savedObjects.createInternalRepository(); + const internalRepositoryPromise = savedObjects.then(so => so.createInternalRepository()); return { addInstall: async (dataSet: string) => { try { + const internalRepository = await internalRepositoryPromise; await internalRepository.incrementCounter(SAVED_OBJECT_ID, dataSet, `installCount`); } catch (err) { handleIncrementError(err); @@ -49,6 +50,7 @@ export function usage( }, addUninstall: async (dataSet: string) => { try { + const internalRepository = await internalRepositoryPromise; await internalRepository.incrementCounter(SAVED_OBJECT_ID, dataSet, `unInstallCount`); } catch (err) { handleIncrementError(err); diff --git a/src/plugins/vis_type_timeseries/server/validation_telemetry/validation_telemetry_service.ts b/src/plugins/vis_type_timeseries/server/validation_telemetry/validation_telemetry_service.ts index 136f5b9e5cfad8..e49664265b8bbb 100644 --- a/src/plugins/vis_type_timeseries/server/validation_telemetry/validation_telemetry_service.ts +++ b/src/plugins/vis_type_timeseries/server/validation_telemetry/validation_telemetry_service.ts @@ -64,11 +64,14 @@ export class ValidationTelemetryService implements Plugin start.savedObjects.createInternalRepository()); return { logFailedValidation: async () => { try { + const internalRepository = await internalRepositoryPromise; await internalRepository.incrementCounter( 'tsvb-validation-telemetry', 'tsvb-validation-telemetry', diff --git a/x-pack/legacy/plugins/alerting/server/plugin.ts b/x-pack/legacy/plugins/alerting/server/plugin.ts index 357db9e3df97ed..3218d9eeb2ef46 100644 --- a/x-pack/legacy/plugins/alerting/server/plugin.ts +++ b/x-pack/legacy/plugins/alerting/server/plugin.ts @@ -128,11 +128,12 @@ export class Plugin { this.taskRunnerFactory.initialize({ logger: this.logger, - getServices(request: Hapi.Request): Services { + getServices(rawRequest: Hapi.Request): Services { + const request = KibanaRequest.from(rawRequest); return { - callCluster: (...args) => - adminClient!.asScoped(KibanaRequest.from(request)).callAsCurrentUser(...args), - savedObjectsClient: core.savedObjects.getScopedSavedObjectsClient(request), + callCluster: (...args) => adminClient!.asScoped(request).callAsCurrentUser(...args), + // rawRequest is actually a fake request, converting it to KibanaRequest causes issue in SO access + savedObjectsClient: core.savedObjects.getScopedSavedObjectsClient(rawRequest as any), }; }, spaceIdToNamespace, diff --git a/x-pack/legacy/plugins/reporting/export_types/csv/server/execute_job.ts b/x-pack/legacy/plugins/reporting/export_types/csv/server/execute_job.ts index f35ffa0e45bfe1..83bcc90ba92ed3 100644 --- a/x-pack/legacy/plugins/reporting/export_types/csv/server/execute_job.ts +++ b/x-pack/legacy/plugins/reporting/export_types/csv/server/execute_job.ts @@ -5,6 +5,8 @@ */ import { i18n } from '@kbn/i18n'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { KibanaRequest } from '../../../../../../../src/core/server'; import { ExecuteJobFactory, ESQueueWorkerExecuteFn, @@ -82,7 +84,9 @@ export const executeJobFactory: ExecuteJobFactory { const { savedObjects, uiSettingsServiceFactory } = server; - const savedObjectsClient = savedObjects.getScopedSavedObjectsClient(req.getRawRequest()); + const savedObjectsClient = savedObjects.getScopedSavedObjectsClient( + KibanaRequest.from(req.getRawRequest()) + ); const { indexPatternSavedObjectId, timerange } = searchPanel; const savedSearchObjectAttr = searchPanel.attributes as SavedSearchObjectAttributes; const { indexPatternSavedObject } = await getDataSource( diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/framework/adapter_types.ts b/x-pack/legacy/plugins/uptime/server/lib/adapters/framework/adapter_types.ts index b490bf17e292c3..2f72081a709884 100644 --- a/x-pack/legacy/plugins/uptime/server/lib/adapters/framework/adapter_types.ts +++ b/x-pack/legacy/plugins/uptime/server/lib/adapters/framework/adapter_types.ts @@ -48,7 +48,7 @@ export interface UptimeCoreSetup { } export interface UptimeCorePlugins { - savedObjects: SavedObjectsLegacyService; + savedObjects: SavedObjectsLegacyService; usageCollection: UsageCollectionSetup; xpack: any; } diff --git a/x-pack/plugins/encrypted_saved_objects/server/plugin.ts b/x-pack/plugins/encrypted_saved_objects/server/plugin.ts index 39da4c7d2d3531..ecd917ff90d003 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/plugin.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/plugin.ts @@ -71,7 +71,11 @@ export class Plugin { ) ); - this.savedObjectsSetup = setupSavedObjects({ service, savedObjects: core.savedObjects }); + this.savedObjectsSetup = setupSavedObjects({ + service, + savedObjects: core.savedObjects, + getStartServices: core.getStartServices, + }); return { registerType: (typeRegistration: EncryptedSavedObjectTypeRegistration) => diff --git a/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts b/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts index c967c92deb6ffb..80bd2ab7b5171b 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts @@ -16,6 +16,7 @@ import { EncryptedSavedObjectsClientWrapper } from './encrypted_saved_objects_cl interface SetupSavedObjectsParams { service: PublicMethodsOf; savedObjects: CoreSetup['savedObjects']; + getStartServices: CoreSetup['getStartServices']; } export interface SavedObjectsSetup { @@ -29,6 +30,7 @@ export interface SavedObjectsSetup { export function setupSavedObjects({ service, savedObjects, + getStartServices, }: SetupSavedObjectsParams): SavedObjectsSetup { // Register custom saved object client that will encrypt, decrypt and strip saved object // attributes where appropriate for any saved object repository request. We choose max possible @@ -41,13 +43,16 @@ export function setupSavedObjects({ ({ client: baseClient }) => new EncryptedSavedObjectsClientWrapper({ baseClient, service }) ); - const internalRepository = savedObjects.createInternalRepository(); + const internalRepositoryPromise = getStartServices().then(([core]) => + core.savedObjects.createInternalRepository() + ); return { getDecryptedAsInternalUser: async ( type: string, id: string, options?: SavedObjectsBaseOptions ): Promise> => { + const internalRepository = await internalRepositoryPromise; const savedObject = await internalRepository.get(type, id, options); return { ...savedObject, diff --git a/x-pack/plugins/security/server/saved_objects/index.ts b/x-pack/plugins/security/server/saved_objects/index.ts index 556dc4fda85cf5..59547295628479 100644 --- a/x-pack/plugins/security/server/saved_objects/index.ts +++ b/x-pack/plugins/security/server/saved_objects/index.ts @@ -24,12 +24,12 @@ export function setupSavedObjects({ auditLogger, authz, savedObjects }: SetupSav const getKibanaRequest = (request: KibanaRequest | LegacyRequest) => request instanceof KibanaRequest ? request : KibanaRequest.from(request); - savedObjects.setClientFactory(({ request }) => { + savedObjects.setClientFactoryProvider(repositoryFactory => ({ request }) => { const kibanaRequest = getKibanaRequest(request); return new SavedObjectsClient( authz.mode.useRbacForRequest(kibanaRequest) - ? savedObjects.createInternalRepository() - : savedObjects.createScopedRepository(kibanaRequest) + ? repositoryFactory.createInternalRepository() + : repositoryFactory.createScopedRepository(kibanaRequest) ); }); diff --git a/x-pack/plugins/task_manager/server/plugin.ts b/x-pack/plugins/task_manager/server/plugin.ts index 9bdd1ce6d87485..8b09f8f2b445a8 100644 --- a/x-pack/plugins/task_manager/server/plugin.ts +++ b/x-pack/plugins/task_manager/server/plugin.ts @@ -38,12 +38,13 @@ export class TaskManagerPlugin public setup(core: CoreSetup, plugins: any): TaskManagerSetupContract { const logger = this.initContext.logger.get('taskManager'); const config$ = this.initContext.config.create(); - const savedObjectsRepository = core.savedObjects.createInternalRepository(['task']); const elasticsearch = core.elasticsearch.adminClient; return { config$, registerLegacyAPI: once((__LEGACY: PluginLegacyDependencies) => { config$.subscribe(async config => { + const [{ savedObjects }] = await core.getStartServices(); + const savedObjectsRepository = savedObjects.createInternalRepository(['task']); this.legacyTaskManager$.next( createTaskManager(core, { logger, From 4bd329e5895fc73d575100d9e4a1d1ff81212d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20St=C3=BCrmer?= Date: Thu, 23 Jan 2020 12:27:52 +0100 Subject: [PATCH 09/72] [Logs UI] Fix base path in tutorial URLs (#55459) This fixes the way the base path is prepended to several tutorial URLs, which broke with #52867. fixes #55350 --- .../pages/infrastructure/snapshot/index.tsx | 8 +++++--- .../logs/stream/page_no_indices_content.tsx | 17 +++++++++++------ .../pages/metrics/components/invalid_node.tsx | 6 ++++-- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/x-pack/legacy/plugins/infra/public/pages/infrastructure/snapshot/index.tsx b/x-pack/legacy/plugins/infra/public/pages/infrastructure/snapshot/index.tsx index b9651763e43c06..27d276a50c30d0 100644 --- a/x-pack/legacy/plugins/infra/public/pages/infrastructure/snapshot/index.tsx +++ b/x-pack/legacy/plugins/infra/public/pages/infrastructure/snapshot/index.tsx @@ -6,8 +6,9 @@ import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; - +import { identity } from 'fp-ts/lib/function'; import React, { useContext } from 'react'; + import { SnapshotPageContent } from './page_content'; import { SnapshotToolbar } from './toolbar'; @@ -38,10 +39,11 @@ export const SnapshotPage = () => { loadSource, metricIndicesExist, } = useContext(Source.Context); - const basePath = useKibana().services.http?.basePath || ''; useTrackPageview({ app: 'infra_metrics', path: 'inventory' }); useTrackPageview({ app: 'infra_metrics', path: 'inventory', delay: 15000 }); + const prependBasePath = useKibana().services.http?.basePath.prepend ?? identity; + return ( { { - const basePath = useKibana().services.http?.basePath || ''; - const uiCapabilities = useKibana().services.application?.capabilities; + const { + services: { application, http }, + } = useKibana<{}>(); + + const canConfigureSource = application?.capabilities?.logs?.configureSource ? true : false; + const prependBasePath = http?.basePath.prepend ?? identity; + return ( { { })} - {uiCapabilities?.logs?.configureSource ? ( + {canConfigureSource ? ( = ({ nodeName }) => { - const basePath = useKibana().services.http?.basePath || ''; + const prependBasePath = useKibana().services.http?.basePath.prepend ?? identity; + return ( = From 071db79a00597dc584353bf6cbdf55457073983d Mon Sep 17 00:00:00 2001 From: Pierre Gayvallet Date: Thu, 23 Jan 2020 12:37:37 +0100 Subject: [PATCH 10/72] ApplicationService: emit from currentAppId$ in legacy mode (#55536) * emit currentAppId$ in legacy mode * fix karma tests * fix karma json structure * flip if/else * filter undefined from currentAppId$ --- .../application/application_service.test.ts | 20 +++++++++++++++++-- .../application/application_service.tsx | 14 +++++++++---- .../public/application/ui/app_container.tsx | 1 - .../injected_metadata_service.mock.ts | 4 ++++ .../injected_metadata_service.ts | 10 ++++++++-- .../tests_bundle/tests_entry_template.js | 4 ++++ 6 files changed, 44 insertions(+), 9 deletions(-) diff --git a/src/core/public/application/application_service.test.ts b/src/core/public/application/application_service.test.ts index 54489fbd182b47..8757f73a1206ca 100644 --- a/src/core/public/application/application_service.test.ts +++ b/src/core/public/application/application_service.test.ts @@ -19,7 +19,7 @@ import { createElement } from 'react'; import { BehaviorSubject, Subject } from 'rxjs'; -import { bufferCount, skip, take, takeUntil } from 'rxjs/operators'; +import { bufferCount, take, takeUntil } from 'rxjs/operators'; import { shallow } from 'enzyme'; import { injectedMetadataServiceMock } from '../injected_metadata/injected_metadata_service.mock'; @@ -518,6 +518,22 @@ describe('#start()', () => { expect([...availableApps.keys()]).toEqual(['app1', 'legacyApp1']); }); + describe('currentAppId$', () => { + it('emits the legacy app id when in legacy mode', async () => { + setupDeps.injectedMetadata.getLegacyMode.mockReturnValue(true); + setupDeps.injectedMetadata.getLegacyMetadata.mockReturnValue({ + app: { + id: 'legacy', + title: 'Legacy App', + }, + } as any); + await service.setup(setupDeps); + const { currentAppId$ } = await service.start(startDeps); + + expect(await currentAppId$.pipe(take(1)).toPromise()).toEqual('legacy'); + }); + }); + describe('getComponent', () => { it('returns renderable JSX tree', async () => { service.setup(setupDeps); @@ -651,7 +667,7 @@ describe('#start()', () => { const { currentAppId$, navigateToApp } = await service.start(startDeps); const stop$ = new Subject(); - const promise = currentAppId$.pipe(skip(1), bufferCount(4), takeUntil(stop$)).toPromise(); + const promise = currentAppId$.pipe(bufferCount(4), takeUntil(stop$)).toPromise(); await navigateToApp('alpha'); await navigateToApp('beta'); diff --git a/src/core/public/application/application_service.tsx b/src/core/public/application/application_service.tsx index 4d714c8f9dad2d..511f348e118230 100644 --- a/src/core/public/application/application_service.tsx +++ b/src/core/public/application/application_service.tsx @@ -19,7 +19,7 @@ import React from 'react'; import { BehaviorSubject, Observable, Subject, Subscription } from 'rxjs'; -import { map, shareReplay, takeUntil } from 'rxjs/operators'; +import { map, shareReplay, takeUntil, distinctUntilChanged, filter } from 'rxjs/operators'; import { createBrowserHistory, History } from 'history'; import { InjectedMetadataSetup } from '../injected_metadata'; @@ -114,8 +114,10 @@ export class ApplicationService { history, }: SetupDeps): InternalApplicationSetup { const basename = basePath.get(); - // Only setup history if we're not in legacy mode - if (!injectedMetadata.getLegacyMode()) { + if (injectedMetadata.getLegacyMode()) { + this.currentAppId$.next(injectedMetadata.getLegacyMetadata().app.id); + } else { + // Only setup history if we're not in legacy mode this.history = history || createBrowserHistory({ basename }); } @@ -264,7 +266,11 @@ export class ApplicationService { return { applications$, capabilities, - currentAppId$: this.currentAppId$.pipe(takeUntil(this.stop$)), + currentAppId$: this.currentAppId$.pipe( + filter(appId => appId !== undefined), + distinctUntilChanged(), + takeUntil(this.stop$) + ), registerMountContext: this.mountContext.registerContext, getUrlForApp: (appId, { path }: { path?: string } = {}) => getAppUrl(availableMounters, appId, path), diff --git a/src/core/public/application/ui/app_container.tsx b/src/core/public/application/ui/app_container.tsx index 6a630608b2c205..66c837d238276c 100644 --- a/src/core/public/application/ui/app_container.tsx +++ b/src/core/public/application/ui/app_container.tsx @@ -45,7 +45,6 @@ export const AppContainer: FunctionComponent = ({ const [appNotFound, setAppNotFound] = useState(false); const elementRef = useRef(null); const unmountRef: MutableRefObject = useRef(null); - // const appStatus = useObservable(appStatus$); useLayoutEffect(() => { const unmount = () => { diff --git a/src/core/public/injected_metadata/injected_metadata_service.mock.ts b/src/core/public/injected_metadata/injected_metadata_service.mock.ts index 9dfe0191166697..3c06f40d976db6 100644 --- a/src/core/public/injected_metadata/injected_metadata_service.mock.ts +++ b/src/core/public/injected_metadata/injected_metadata_service.mock.ts @@ -35,6 +35,10 @@ const createSetupContractMock = () => { setupContract.getKibanaVersion.mockReturnValue('kibanaVersion'); setupContract.getLegacyMode.mockReturnValue(true); setupContract.getLegacyMetadata.mockReturnValue({ + app: { + id: 'foo', + title: 'Foo App', + }, nav: [], uiSettings: { defaults: { legacyInjectedUiSettingDefaults: true }, diff --git a/src/core/public/injected_metadata/injected_metadata_service.ts b/src/core/public/injected_metadata/injected_metadata_service.ts index 1075a7741ee324..64a8b8a855fb46 100644 --- a/src/core/public/injected_metadata/injected_metadata_service.ts +++ b/src/core/public/injected_metadata/injected_metadata_service.ts @@ -68,7 +68,10 @@ export interface InjectedMetadataParams { uiPlugins: InjectedPluginMetadata[]; legacyMode: boolean; legacyMetadata: { - app: unknown; + app: { + id: string; + title: string; + }; bundleId: string; nav: LegacyNavLink[]; version: string; @@ -171,7 +174,10 @@ export interface InjectedMetadataSetup { /** Indicates whether or not we are rendering a known legacy app. */ getLegacyMode: () => boolean; getLegacyMetadata: () => { - app: unknown; + app: { + id: string; + title: string; + }; bundleId: string; nav: LegacyNavLink[]; version: string; diff --git a/src/legacy/core_plugins/tests_bundle/tests_entry_template.js b/src/legacy/core_plugins/tests_bundle/tests_entry_template.js index 94263e7b76a976..57adf730f3dd96 100644 --- a/src/legacy/core_plugins/tests_bundle/tests_entry_template.js +++ b/src/legacy/core_plugins/tests_bundle/tests_entry_template.js @@ -78,6 +78,10 @@ const coreSystem = new CoreSystem({ buildNumber: 1234, legacyMode: true, legacyMetadata: { + app: { + id: 'karma', + title: 'Karma', + }, nav: [], version: '1.2.3', buildNum: 1234, From 2cc9ed6decd139b87b786f122b0dd56d6214567f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loix?= Date: Thu, 23 Jan 2020 17:59:26 +0530 Subject: [PATCH 11/72] [Mappings editor] Accommodate legacy index templates (#55388) --- .../client_integration/helpers/index.ts | 17 +++ .../helpers/mappings_editor.helpers.ts | 16 +++ .../mappings_editor.test.tsx | 55 +++++++ .../document_fields/document_fields.tsx | 4 +- .../mappings_editor/components/index.ts | 2 + .../components/multiple_mappings_warning.tsx | 42 ++++++ .../lib/extract_mappings_definition.test.ts | 128 +++++++++++++++++ .../lib/extract_mappings_definition.ts | 103 +++++++++++++ .../components/mappings_editor/lib/index.ts | 2 + .../lib/mappings_validator.test.ts | 7 +- .../mappings_editor/lib/mappings_validator.ts | 19 ++- .../mappings_editor/mappings_editor.tsx | 136 +++++++++++------- .../app/components/mappings_editor/types.ts | 4 + .../public/app/services/documentation.ts | 4 + 14 files changed, 471 insertions(+), 68 deletions(-) create mode 100644 x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/__jest__/client_integration/helpers/index.ts create mode 100644 x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/__jest__/client_integration/helpers/mappings_editor.helpers.ts create mode 100644 x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/__jest__/client_integration/mappings_editor.test.tsx create mode 100644 x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/multiple_mappings_warning.tsx create mode 100644 x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/extract_mappings_definition.test.ts create mode 100644 x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/extract_mappings_definition.ts diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/__jest__/client_integration/helpers/index.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/__jest__/client_integration/helpers/index.ts new file mode 100644 index 00000000000000..e3313bfba56fd9 --- /dev/null +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/__jest__/client_integration/helpers/index.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ +import { setup as mappingsEditorSetup } from './mappings_editor.helpers'; + +export { + nextTick, + getRandomString, + findTestSubject, + TestBed, +} from '../../../../../../../../../../test_utils'; + +export const componentHelpers = { + mappingsEditor: { setup: mappingsEditorSetup }, +}; diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/__jest__/client_integration/helpers/mappings_editor.helpers.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/__jest__/client_integration/helpers/mappings_editor.helpers.ts new file mode 100644 index 00000000000000..b8b67a0f36bd2e --- /dev/null +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/__jest__/client_integration/helpers/mappings_editor.helpers.ts @@ -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. + */ + +import { registerTestBed } from '../../../../../../../../../../test_utils'; +import { MappingsEditor } from '../../../mappings_editor'; + +export const setup = (props: any) => + registerTestBed(MappingsEditor, { + memoryRouter: { + wrapComponent: false, + }, + defaultProps: props, + }); diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/__jest__/client_integration/mappings_editor.test.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/__jest__/client_integration/mappings_editor.test.tsx new file mode 100644 index 00000000000000..9e390e785c7d56 --- /dev/null +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/__jest__/client_integration/mappings_editor.test.tsx @@ -0,0 +1,55 @@ +/* + * 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. + */ + +import { componentHelpers } from './helpers'; + +const { setup } = componentHelpers.mappingsEditor; +const mockOnUpdate = () => undefined; + +describe('', () => { + describe('multiple mappings detection', () => { + test('should show a warning when multiple mappings are detected', async () => { + const defaultValue = { + type1: { + properties: { + name1: { + type: 'keyword', + }, + }, + }, + type2: { + properties: { + name2: { + type: 'keyword', + }, + }, + }, + }; + const testBed = await setup({ onUpdate: mockOnUpdate, defaultValue })(); + const { exists } = testBed; + + expect(exists('mappingsEditor')).toBe(true); + expect(exists('mappingTypesDetectedCallout')).toBe(true); + expect(exists('documentFields')).toBe(false); + }); + + test('should not show a warning when mappings a single-type', async () => { + const defaultValue = { + properties: { + name1: { + type: 'keyword', + }, + }, + }; + const testBed = await setup({ onUpdate: mockOnUpdate, defaultValue })(); + const { exists } = testBed; + + expect(exists('mappingsEditor')).toBe(true); + expect(exists('mappingTypesDetectedCallout')).toBe(false); + expect(exists('documentFields')).toBe(true); + }); + }); +}); diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/document_fields.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/document_fields.tsx index 71b5966c3295db..378d669dee69cb 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/document_fields.tsx +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/document_fields/document_fields.tsx @@ -48,7 +48,7 @@ export const DocumentFields = React.memo(() => { const searchTerm = search.term.trim(); return ( - <> +
{searchTerm !== '' ? ( @@ -57,6 +57,6 @@ export const DocumentFields = React.memo(() => { editor )} {renderEditField()} - +
); }); diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/index.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/index.ts index d5ad51ba358391..2958ecd75910f3 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/index.ts +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/index.ts @@ -9,3 +9,5 @@ export * from './configuration_form'; export * from './document_fields'; export * from './templates_form'; + +export * from './multiple_mappings_warning'; diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/multiple_mappings_warning.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/multiple_mappings_warning.tsx new file mode 100644 index 00000000000000..507e4dac262ff0 --- /dev/null +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/multiple_mappings_warning.tsx @@ -0,0 +1,42 @@ +/* + * 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. + */ + +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { EuiCallOut, EuiLink } from '@elastic/eui'; + +import { documentationService } from '../../../services/documentation'; + +export const MultipleMappingsWarning = () => ( + +

+ + {i18n.translate( + 'xpack.idxMgmt.mappingsEditor.mappingTypesDetectedCallOutDocumentationLink', + { + defaultMessage: 'Consider these alternatives to mapping types.', + } + )} + + ), + }} + /> +

+
+); diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/extract_mappings_definition.test.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/extract_mappings_definition.test.ts new file mode 100644 index 00000000000000..3e38ff5991a8c7 --- /dev/null +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/extract_mappings_definition.test.ts @@ -0,0 +1,128 @@ +/* + * 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. + */ + +import { extractMappingsDefinition } from './extract_mappings_definition'; + +describe('extractMappingsDefinition', () => { + test('should detect that the mappings has multiple types and return null', () => { + const mappings = { + type1: { + properties: { + name1: { + type: 'keyword', + }, + }, + }, + type2: { + properties: { + name2: { + type: 'keyword', + }, + }, + }, + }; + + expect(extractMappingsDefinition(mappings)).toBe(null); + }); + + test('should detect that the mappings has multiple types even when one of the type has not defined any "properties"', () => { + const mappings = { + type1: { + _source: { + excludes: [], + includes: [], + enabled: true, + }, + _routing: { + required: false, + }, + }, + type2: { + properties: { + name2: { + type: 'keyword', + }, + }, + }, + }; + + expect(extractMappingsDefinition(mappings)).toBe(null); + }); + + test('should detect that one of the mapping type is invalid and filter it out', () => { + const mappings = { + type1: { + invalidSetting: { + excludes: [], + includes: [], + enabled: true, + }, + _routing: { + required: false, + }, + }, + type2: { + properties: { + name2: { + type: 'keyword', + }, + }, + }, + }; + + expect(extractMappingsDefinition(mappings)).toBe(mappings.type2); + }); + + test('should detect that the mappings has one type and return its mapping definition', () => { + const mappings = { + myType: { + _source: { + excludes: [], + includes: [], + enabled: true, + }, + _meta: {}, + _routing: { + required: false, + }, + dynamic: true, + properties: { + title: { + type: 'keyword', + }, + }, + }, + }; + + expect(extractMappingsDefinition(mappings)).toBe(mappings.myType); + }); + + test('should detect that the mappings has one type at root level', () => { + const mappings = { + _source: { + excludes: [], + includes: [], + enabled: true, + }, + _meta: {}, + _routing: { + required: false, + }, + dynamic: true, + numeric_detection: false, + date_detection: true, + dynamic_date_formats: ['strict_date_optional_time'], + dynamic_templates: [], + properties: { + title: { + type: 'keyword', + }, + }, + }; + + expect(extractMappingsDefinition(mappings)).toBe(mappings); + }); +}); diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/extract_mappings_definition.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/extract_mappings_definition.ts new file mode 100644 index 00000000000000..eae3c5b15759ca --- /dev/null +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/extract_mappings_definition.ts @@ -0,0 +1,103 @@ +/* + * 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. + */ +import { isPlainObject } from 'lodash'; + +import { GenericObject } from '../types'; +import { + validateMappingsConfiguration, + mappingsConfigurationSchemaKeys, +} from './mappings_validator'; + +const ALLOWED_PARAMETERS = [...mappingsConfigurationSchemaKeys, 'dynamic_templates', 'properties']; + +const isMappingDefinition = (obj: GenericObject): boolean => { + const areAllKeysValid = Object.keys(obj).every(key => ALLOWED_PARAMETERS.includes(key)); + + if (!areAllKeysValid) { + return false; + } + + const { properties, dynamic_templates: dynamicTemplates, ...mappingsConfiguration } = obj; + + const { errors } = validateMappingsConfiguration(mappingsConfiguration); + const isConfigurationValid = errors.length === 0; + const isPropertiesValid = properties === undefined || isPlainObject(properties); + const isDynamicTemplatesValid = dynamicTemplates === undefined || Array.isArray(dynamicTemplates); + + // If the configuration, the properties and the dynamic templates are valid + // we can assume that the mapping is declared at root level (no types) + return isConfigurationValid && isPropertiesValid && isDynamicTemplatesValid; +}; + +/** + * 5.x index templates can be created with multiple types. + * e.g. + ``` + const mappings = { + type1: { + properties: { + name1: { + type: 'keyword', + }, + }, + }, + type2: { + properties: { + name2: { + type: 'keyword', + }, + }, + }, + }; + ``` + * A mappings can also be declared under an explicit "_doc" property. + ``` + const mappings = { + _doc: { + _source: { + "enabled": false + }, + properties: { + name1: { + type: 'keyword', + }, + }, + }, + }; + ``` + * This helpers parse the mappings provided an removes any possible mapping "type" declared + * + * @param mappings The mappings object to validate + */ +export const extractMappingsDefinition = (mappings: GenericObject = {}): GenericObject | null => { + if (isMappingDefinition(mappings)) { + // No need to go any further + return mappings; + } + + // At this point there must be one or more type mappings + const typedMappings = Object.values(mappings).reduce((acc: GenericObject[], value) => { + if (isMappingDefinition(value)) { + acc.push(value as GenericObject); + } + return acc; + }, []); + + // If there are no typed mappings found this means that one of the type must did not pass + // the "isMappingDefinition()" validation. + // In theory this should never happen but let's make sure the UI does not try to load an invalid mapping + if (typedMappings.length === 0) { + return null; + } + + // If there's only one mapping type then we can consume it as if the type doesn't exist. + if (typedMappings.length === 1) { + return typedMappings[0]; + } + + // If there's more than one mapping type, then the mappings object isn't usable. + return null; +}; diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/index.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/index.ts index 1b1c5cc8dc8d48..8cd1bbf0764ab0 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/index.ts +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/index.ts @@ -13,3 +13,5 @@ export * from './validators'; export * from './mappings_validator'; export * from './search_fields'; + +export * from './extract_mappings_definition'; diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/mappings_validator.test.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/mappings_validator.test.ts index c70462a656e2f7..f1e6efb06c6492 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/mappings_validator.test.ts +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/mappings_validator.test.ts @@ -3,8 +3,9 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ +import { isPlainObject } from 'lodash'; -import { validateMappings, validateProperties, isObject } from './mappings_validator'; +import { validateMappings, validateProperties } from './mappings_validator'; describe('Mappings configuration validator', () => { it('should convert non object to empty object', () => { @@ -12,7 +13,7 @@ describe('Mappings configuration validator', () => { tests.forEach(testValue => { const { value, errors } = validateMappings(testValue as any); - expect(isObject(value)).toBe(true); + expect(isPlainObject(value)).toBe(true); expect(errors).toBe(undefined); }); }); @@ -76,7 +77,7 @@ describe('Properties validator', () => { tests.forEach(testValue => { const { value, errors } = validateProperties(testValue as any); - expect(isObject(value)).toBe(true); + expect(isPlainObject(value)).toBe(true); expect(errors).toEqual([]); }); }); diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/mappings_validator.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/mappings_validator.ts index fff735da2e7585..6ccbfeb50dcf44 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/mappings_validator.ts +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/mappings_validator.ts @@ -3,15 +3,16 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { pick } from 'lodash'; +import { pick, isPlainObject } from 'lodash'; import * as t from 'io-ts'; import { ordString } from 'fp-ts/lib/Ord'; import { toArray } from 'fp-ts/lib/Set'; import { isLeft, isRight } from 'fp-ts/lib/Either'; + import { errorReporter } from './error_reporter'; import { ALL_DATA_TYPES, PARAMETERS_DEFINITION } from '../constants'; import { FieldMeta } from '../types'; -import { getFieldMeta } from '../lib'; +import { getFieldMeta } from './utils'; const ALLOWED_FIELD_PROPERTIES = [ ...Object.keys(PARAMETERS_DEFINITION), @@ -49,8 +50,6 @@ interface GenericObject { [key: string]: any; } -export const isObject = (obj: any) => obj != null && obj.constructor.name === 'Object'; - const validateFieldType = (type: any): boolean => { if (typeof type !== 'string') { return false; @@ -72,7 +71,7 @@ const validateParameter = (parameter: string, value: any): boolean => { } if (parameter === 'properties' || parameter === 'fields') { - return isObject(value); + return isPlainObject(value); } const parameterSchema = (PARAMETERS_DEFINITION as any)[parameter]!.schema; @@ -100,7 +99,7 @@ const stripUnknownOrInvalidParameter = (field: GenericObject): FieldValidatorRes const parseField = (field: any): FieldValidatorResponse & { meta?: FieldMeta } => { // Sanitize the input to make sure we are working with an object - if (!isObject(field)) { + if (!isPlainObject(field)) { return { parametersRemoved: [] }; } // Make sure the field "type" is valid @@ -186,7 +185,7 @@ const parseFields = ( */ export const validateProperties = (properties = {}): PropertiesValidatorResponse => { // Sanitize the input to make sure we are working with an object - if (!isObject(properties)) { + if (!isPlainObject(properties)) { return { value: {}, errors: [] }; } @@ -213,9 +212,9 @@ export const mappingsConfigurationSchema = t.partial({ }), }); -const mappingsConfigurationSchemaKeys = Object.keys(mappingsConfigurationSchema.props); +export const mappingsConfigurationSchemaKeys = Object.keys(mappingsConfigurationSchema.props); -const validateMappingsConfiguration = ( +export const validateMappingsConfiguration = ( mappingsConfiguration: any ): { value: any; errors: MappingsValidationError[] } => { // Set to keep track of invalid configuration parameters. @@ -249,7 +248,7 @@ const validateMappingsConfiguration = ( }; export const validateMappings = (mappings: any = {}): MappingsValidatorResponse => { - if (!isObject(mappings)) { + if (!isPlainObject(mappings)) { return { value: {} }; } diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/mappings_editor.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/mappings_editor.tsx index e3fdf42d889e97..d79a023386e8d6 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/mappings_editor.tsx +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/mappings_editor.tsx @@ -4,14 +4,20 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { useMemo, useState } from 'react'; +import React, { useMemo, useState, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiSpacer, EuiTabs, EuiTab } from '@elastic/eui'; -import { ConfigurationForm, DocumentFields, TemplatesForm } from './components'; +import { + ConfigurationForm, + DocumentFields, + TemplatesForm, + MultipleMappingsWarning, +} from './components'; import { IndexSettings } from './types'; +import { extractMappingsDefinition } from './lib'; import { State } from './reducer'; -import { MappingsState, Props as MappingsStateProps } from './mappings_state'; +import { MappingsState, Props as MappingsStateProps, Types } from './mappings_state'; import { IndexSettingsProvider } from './index_settings_context'; interface Props { @@ -25,7 +31,13 @@ type TabName = 'fields' | 'advanced' | 'templates'; export const MappingsEditor = React.memo(({ onUpdate, defaultValue, indexSettings }: Props) => { const [selectedTab, selectTab] = useState('fields'); - const parsedDefaultValue = useMemo(() => { + const { parsedDefaultValue, multipleMappingsDeclared } = useMemo(() => { + const mappingsDefinition = extractMappingsDefinition(defaultValue); + + if (mappingsDefinition === null) { + return { multipleMappingsDeclared: true }; + } + const { _source = {}, _meta = {}, @@ -36,9 +48,9 @@ export const MappingsEditor = React.memo(({ onUpdate, defaultValue, indexSetting dynamic_date_formats, properties = {}, dynamic_templates, - } = defaultValue ?? {}; + } = mappingsDefinition; - return { + const parsed = { configuration: { _source, _meta, @@ -53,8 +65,21 @@ export const MappingsEditor = React.memo(({ onUpdate, defaultValue, indexSetting dynamic_templates, }, }; + + return { parsedDefaultValue: parsed, multipleMappingsDeclared: false }; }, [defaultValue]); + useEffect(() => { + if (multipleMappingsDeclared) { + // We set the data getter here as the user won't be able to make any changes + onUpdate({ + getData: () => defaultValue! as Types['Mappings'], + validate: () => Promise.resolve(true), + isValid: true, + }); + } + }, [multipleMappingsDeclared]); + const changeTab = async (tab: TabName, state: State) => { if (selectedTab === 'advanced') { // When we navigate away we need to submit the form to validate if there are any errors. @@ -63,7 +88,6 @@ export const MappingsEditor = React.memo(({ onUpdate, defaultValue, indexSetting if (!isConfigurationFormValid) { /** * Don't navigate away from the tab if there are errors in the form. - * For now there is no need to display a CallOut as the form can never be invalid. */ return; } @@ -79,51 +103,57 @@ export const MappingsEditor = React.memo(({ onUpdate, defaultValue, indexSetting }; return ( - - - {({ state }) => { - const tabToContentMap = { - fields: , - templates: , - advanced: , - }; - - return ( -
- - changeTab('fields', state)} - isSelected={selectedTab === 'fields'} - > - {i18n.translate('xpack.idxMgmt.mappingsEditor.fieldsTabLabel', { - defaultMessage: 'Mapped fields', - })} - - changeTab('templates', state)} - isSelected={selectedTab === 'templates'} - > - {i18n.translate('xpack.idxMgmt.mappingsEditor.templatesTabLabel', { - defaultMessage: 'Dynamic templates', - })} - - changeTab('advanced', state)} - isSelected={selectedTab === 'advanced'} - > - {i18n.translate('xpack.idxMgmt.mappingsEditor.advancedTabLabel', { - defaultMessage: 'Advanced options', - })} - - - - - - {tabToContentMap[selectedTab]} -
- ); - }} -
-
+
+ {multipleMappingsDeclared ? ( + + ) : ( + + + {({ state }) => { + const tabToContentMap = { + fields: , + templates: , + advanced: , + }; + + return ( +
+ + changeTab('fields', state)} + isSelected={selectedTab === 'fields'} + > + {i18n.translate('xpack.idxMgmt.mappingsEditor.fieldsTabLabel', { + defaultMessage: 'Mapped fields', + })} + + changeTab('templates', state)} + isSelected={selectedTab === 'templates'} + > + {i18n.translate('xpack.idxMgmt.mappingsEditor.templatesTabLabel', { + defaultMessage: 'Dynamic templates', + })} + + changeTab('advanced', state)} + isSelected={selectedTab === 'advanced'} + > + {i18n.translate('xpack.idxMgmt.mappingsEditor.advancedTabLabel', { + defaultMessage: 'Advanced options', + })} + + + + + + {tabToContentMap[selectedTab]} +
+ ); + }} +
+
+ )} +
); }); diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/types.ts b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/types.ts index 5d9c15caf9cd91..dbbffe5a0bd316 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/types.ts +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/types.ts @@ -287,3 +287,7 @@ export interface SearchMetadata { */ stringMatch: string | null; } + +export interface GenericObject { + [key: string]: any; +} diff --git a/x-pack/legacy/plugins/index_management/public/app/services/documentation.ts b/x-pack/legacy/plugins/index_management/public/app/services/documentation.ts index f63dc622453fe1..9bf0d983df161f 100644 --- a/x-pack/legacy/plugins/index_management/public/app/services/documentation.ts +++ b/x-pack/legacy/plugins/index_management/public/app/services/documentation.ts @@ -181,6 +181,10 @@ class DocumentationService { return `${this.esDocsBase}/index-options.html`; } + public getAlternativeToMappingTypesLink() { + return `${this.esDocsBase}/removal-of-types.html#_alternatives_to_mapping_types`; + } + public getJoinMultiLevelsPerformanceLink() { return `${this.esDocsBase}/parent-join.html#_parent_join_and_performance`; } From 02753315142249be1bc72bb146a52575ccdcddb8 Mon Sep 17 00:00:00 2001 From: Dario Gieselaar Date: Thu, 23 Jan 2020 13:44:55 +0100 Subject: [PATCH 12/72] Add @elastic/apm-ui as code owner of APM NP plugin (#55674) --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 547776c4cfe661..a45816d7eb54ba 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -45,8 +45,10 @@ # APM /x-pack/legacy/plugins/apm/ @elastic/apm-ui +/x-pack/plugins/apm/ @elastic/apm-ui /x-pack/test/functional/apps/apm/ @elastic/apm-ui /src/legacy/core_plugins/apm_oss/ @elastic/apm-ui +/src/plugins/apm_oss/ @elastic/apm-ui # Beats /x-pack/legacy/plugins/beats_management/ @elastic/beats From 2a1dc0af0c5cc7f19dc8a48f3bc090e0681daaf6 Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Thu, 23 Jan 2020 15:02:14 +0100 Subject: [PATCH 13/72] [ML] Anomaly Explorer: Fix persisting time filter refresh to URL. (#55522) Fixes persisting a custom date picker time range change to the URL in Anomaly Explorer. The code is now in line with Single Metric Viewer. --- .../application/routing/routes/explorer.tsx | 46 +++++++++++-------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/x-pack/legacy/plugins/ml/public/application/routing/routes/explorer.tsx b/x-pack/legacy/plugins/ml/public/application/routing/routes/explorer.tsx index 633efc2856dac1..adef7055f97480 100644 --- a/x-pack/legacy/plugins/ml/public/application/routing/routes/explorer.tsx +++ b/x-pack/legacy/plugins/ml/public/application/routing/routes/explorer.tsx @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import moment from 'moment'; import React, { FC, useEffect, useState } from 'react'; import useObservable from 'react-use/lib/useObservable'; @@ -70,7 +69,7 @@ interface ExplorerUrlStateManagerProps { const ExplorerUrlStateManager: FC = ({ jobsWithTimeRange }) => { const [appState, setAppState] = useUrlState('_a'); - const [globalState] = useUrlState('_g'); + const [globalState, setGlobalState] = useUrlState('_g'); const [lastRefresh, setLastRefresh] = useState(0); const { jobIds } = useJobSelection(jobsWithTimeRange, getDateFormatTz()); @@ -79,13 +78,37 @@ const ExplorerUrlStateManager: FC = ({ jobsWithTim useEffect(() => { if (refresh !== undefined) { setLastRefresh(refresh?.lastRefresh); - const activeBounds = timefilter.getActiveBounds(); - if (activeBounds !== undefined) { - explorerService.setBounds(activeBounds); + + if (refresh.timeRange !== undefined) { + const { start, end } = refresh.timeRange; + setGlobalState('time', { + from: start, + to: end, + }); } } }, [refresh?.lastRefresh]); + // We cannot simply infer bounds from the globalState's `time` attribute + // with `moment` since it can contain custom strings such as `now-15m`. + // So when globalState's `time` changes, we update the timefilter and use + // `timefilter.getBounds()` to update `bounds` in this component's state. + useEffect(() => { + if (globalState?.time !== undefined) { + timefilter.setTime({ + from: globalState.time.from, + to: globalState.time.to, + }); + + const timefilterBounds = timefilter.getBounds(); + // Only if both min/max bounds are valid moment times set the bounds. + // An invalid string restored from globalState might return `undefined`. + if (timefilterBounds?.min !== undefined && timefilterBounds?.max !== undefined) { + explorerService.setBounds(timefilterBounds); + } + } + }, [globalState?.time?.from, globalState?.time?.to]); + useEffect(() => { timefilter.enableTimeRangeSelector(); timefilter.enableAutoRefreshSelector(); @@ -101,19 +124,6 @@ const ExplorerUrlStateManager: FC = ({ jobsWithTim } }, []); - useEffect(() => { - if (globalState?.time !== undefined) { - timefilter.setTime({ - from: globalState.time.from, - to: globalState.time.to, - }); - explorerService.setBounds({ - min: moment(globalState.time.from), - max: moment(globalState.time.to), - }); - } - }, [globalState?.time?.from, globalState?.time?.to]); - useEffect(() => { if (jobIds.length > 0) { explorerService.updateJobSelection(jobIds); From bb37b0f613c573b708324bc1bfe97f28b14e9475 Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Thu, 23 Jan 2020 15:35:36 +0100 Subject: [PATCH 14/72] [Watcher] Move out of legacy (#54752) * Moved out of legacy folder * First iteration of watcher plugin that renders * Move create Timebuckets to plugin root Update route registration and fix license checking for NP * Re-enable Component integration tests * Minor fix for data deserializer in api.ts * Slight logic refactor, more defensive plugin startup * Re-add legacy folder for SCSS pipeline * Remove duplicate style sheet * Fix type issue with TimeBuckets export * Update license management routing logic (issued warning for using basepath on navigating away from license management) Remove commented out code in watcher * More defensive plugin registration * Fix i18n issues and restore registration of feature on home view * Remove watcher license error check copy * Restore license error message in watcher * Fix mock context value Co-authored-by: Elastic Machine --- .github/CODEOWNERS | 2 +- x-pack/.i18nrc.json | 2 +- x-pack/dev-tools/jest/create_jest_config.js | 1 - .../public/np_ready/application/app.js | 8 +- .../public/np_ready/application/boot.tsx | 2 +- .../license_dashboard/license_dashboard.js | 8 +- x-pack/legacy/plugins/watcher/index.ts | 19 + .../plugins/watcher/plugin_definition.ts | 32 -- .../{np_ready/application => }/index.scss | 0 .../legacy/plugins/watcher/public/legacy.ts | 147 ------- .../public/manage_angular_lifecycle.ts | 28 -- .../np_ready/application/models/index.d.ts | 39 -- .../plugins/watcher/public/np_ready/plugin.ts | 62 --- .../watcher/public/register_feature.ts | 21 - .../__tests__/license_pre_routing_factory.js | 64 --- .../license_pre_routing_factory.ts | 43 -- .../plugins/watcher/server/np_ready/plugin.ts | 50 --- .../translations/translations/ja-JP.json | 4 - .../translations/translations/zh-CN.json | 4 - x-pack/{legacy => }/plugins/watcher/README.md | 0 .../helpers/app_context.mock.tsx | 34 +- .../helpers/body_response.ts | 0 .../client_integration/helpers/constants.ts | 0 .../helpers/http_requests.ts | 0 .../client_integration/helpers/index.ts | 2 +- .../helpers/setup_environment.ts | 3 +- .../helpers/watch_create_json.helpers.ts | 8 +- .../helpers/watch_create_threshold.helpers.ts | 8 +- .../helpers/watch_edit.helpers.ts | 8 +- .../helpers/watch_list.helpers.ts | 5 +- .../helpers/watch_status.helpers.ts | 5 +- .../watch_create_json.test.ts | 2 +- .../watch_create_threshold.test.tsx | 4 +- .../client_integration/watch_edit.test.ts | 8 +- .../client_integration/watch_list.test.ts | 0 .../client_integration/watch_status.test.ts | 0 .../watcher/common/constants/action_modes.ts | 0 .../watcher/common/constants/action_states.ts | 0 .../watcher/common/constants/action_types.ts | 0 .../watcher/common/constants/agg_types.ts | 0 .../watcher/common/constants/comparators.ts | 0 .../watcher/common/constants/error_codes.ts | 0 .../common/constants/es_scroll_settings.ts | 0 .../plugins/watcher/common/constants/index.ts | 0 .../watcher/common/constants/index_names.ts | 0 .../plugins/watcher/common/constants/lists.ts | 0 .../watcher/common/constants/pagination.ts | 0 .../watcher/common/constants/plugin.ts | 2 +- .../common/constants/refresh_intervals.ts | 0 .../watcher/common/constants/routes.ts | 0 .../watcher/common/constants/sort_orders.ts | 0 .../watcher/common/constants/time_units.ts | 0 .../watcher/common/constants/watch_history.ts | 0 .../common/constants/watch_state_comments.ts | 0 .../watcher/common/constants/watch_states.ts | 0 .../watcher/common/constants/watch_types.ts | 0 .../__tests__/get_action_type.js | 2 +- .../lib/get_action_type/get_action_type.ts | 0 .../common/lib/get_action_type/index.ts | 0 .../lib/get_moment/__tests__/get_moment.js | 0 .../common/lib/get_moment/get_moment.js | 0 .../watcher/common/lib/get_moment/index.js | 0 .../common/lib/serialization/index.d.ts | 0 .../watcher/common/lib/serialization/index.js | 0 .../serialization_helpers/build_actions.js | 0 .../serialization_helpers/build_condition.js | 2 +- .../serialization_helpers/build_input.js | 0 .../serialization_helpers/build_metadata.js | 0 .../serialization_helpers/build_transform.js | 2 +- .../serialization_helpers/build_trigger.js | 0 .../serialization_helpers/index.js | 0 .../single_line_script.js | 0 .../lib/serialization/serialize_json_watch.js | 0 .../serialize_json_watch.test.js | 0 .../serialize_threshold_watch.js | 0 .../serialize_threshold_watch.test.js | 0 .../watcher/common/models/action/action.js | 4 +- .../common/models/action/action.test.js | 2 +- .../common/models/action/base_action.js | 0 .../common/models/action/email_action.js | 2 +- .../watcher/common/models/action/index.js | 0 .../common/models/action/index_action.js | 2 +- .../common/models/action/jira_action.js | 2 +- .../common/models/action/logging_action.js | 2 +- .../common/models/action/pagerduty_action.js | 2 +- .../common/models/action/slack_action.js | 2 +- .../common/models/action/unknown_action.js | 2 +- .../common/models/action/webhook_action.js | 2 +- .../watcher/common/types/action_types.ts | 0 .../watcher/common/types/license_status.ts} | 7 +- .../watcher/common/types/watch_types.ts | 0 .../{legacy => }/plugins/watcher/kibana.json | 6 +- .../watcher/public}/application/app.tsx | 21 +- .../public}/application/app_context.tsx | 4 +- .../watcher/public}/application/boot.tsx | 12 +- .../components/confirm_watches_modal.tsx | 0 .../components/delete_watches_modal.tsx | 0 .../application/components/form_errors.tsx | 0 .../public}/application/components/index.ts | 0 .../components/page_error/index.ts | 0 .../components/page_error/page_error.tsx | 0 .../page_error/page_error_forbidden.tsx | 0 .../page_error/page_error_not_exist.tsx | 0 .../application/components/section_error.tsx | 0 .../components/section_loading.tsx | 0 .../application/components/watch_status.tsx | 2 +- .../application/constants/base_path.ts | 0 .../public}/application/constants/index.ts | 0 .../watcher/public}/application/lib/api.ts | 17 +- .../public}/application/lib/breadcrumbs.ts | 0 .../public}/application/lib/format_date.ts | 0 .../application/lib/get_search_value.ts | 0 .../application/lib/get_time_unit_label.ts | 2 +- .../public}/application/lib/navigation.ts | 0 .../public}/application/lib/use_request.ts | 0 .../application/models/action/action.js | 2 +- .../application/models/action/base_action.js | 0 .../application/models/action/email_action.js | 0 .../application/models/action/index.d.ts} | 6 +- .../application/models/action/index.js | 0 .../application/models/action/index_action.js | 0 .../application/models/action/jira_action.js | 0 .../models/action/logging_action.js | 0 .../models/action/pagerduty_action.js | 0 .../application/models/action/slack_action.js | 0 .../models/action/unknown_action.js | 0 .../models/action/webhook_action.js | 0 .../models/action_status/action_status.js | 2 +- .../application/models/action_status/index.js | 0 .../models/execute_details/execute_details.js | 0 .../models/execute_details/index.d.ts | 7 + .../models/execute_details/index.js | 0 .../application/models/settings/index.d.ts | 7 + .../application/models/settings/index.js | 0 .../application/models/settings/settings.js | 0 .../models/visualize_options/index.d.ts | 7 + .../models/visualize_options/index.js | 0 .../visualize_options/visualize_options.js | 0 .../application/models/watch/agg_types.ts | 2 +- .../application/models/watch/base_watch.js | 0 .../application/models/watch/comparators.ts | 2 +- .../models/watch/default_watch.json | 0 .../models/watch/group_by_types.ts | 0 .../application/models/watch/index.d.ts | 7 + .../public}/application/models/watch/index.js | 0 .../application/models/watch/json_watch.d.ts | 7 + .../application/models/watch/json_watch.js | 2 +- .../check_action_id_collision.js | 0 .../lib/check_action_id_collision/index.js | 0 .../lib/create_action_id/create_action_id.js | 0 .../watch/lib/create_action_id/index.js | 0 .../models/watch/monitoring_watch.js | 2 +- .../models/watch/threshold_watch.d.ts | 7 + .../models/watch/threshold_watch.js | 2 +- .../public}/application/models/watch/watch.js | 2 +- .../application/models/watch_errors/index.js | 0 .../models/watch_errors/watch_errors.js | 0 .../models/watch_history_item/index.d.ts | 7 + .../models/watch_history_item/index.js | 0 .../watch_history_item/watch_history_item.js | 2 +- .../models/watch_status/index.d.ts | 7 + .../application/models/watch_status/index.js | 0 .../models/watch_status/watch_status.js | 2 +- .../components/json_watch_edit/index.ts | 0 .../json_watch_edit/json_watch_edit.tsx | 8 +- .../json_watch_edit/json_watch_edit_form.tsx | 2 +- .../json_watch_edit_simulate.tsx | 10 +- .../json_watch_edit_simulate_results.tsx | 2 +- .../components/monitoring_watch_edit/index.ts | 0 .../monitoring_watch_edit.tsx | 0 .../watch_edit/components/request_flyout.tsx | 0 .../action_fields/email_action_fields.tsx | 2 +- .../action_fields/index.ts | 0 .../action_fields/index_action_fields.tsx | 2 +- .../action_fields/jira_action_fields.tsx | 2 +- .../action_fields/logging_action_fields.tsx | 2 +- .../action_fields/pagerduty_action_fields.tsx | 2 +- .../action_fields/slack_action_fields.tsx | 2 +- .../action_fields/webhook_action_fields.tsx | 2 +- .../components/threshold_watch_edit/index.ts | 0 .../threshold_watch_action_accordion.tsx | 15 +- .../threshold_watch_action_dropdown.tsx | 5 +- .../threshold_watch_action_panel.tsx | 0 .../threshold_watch_edit.tsx | 4 +- .../watch_visualization.tsx | 21 +- .../watch_edit/components/watch_edit.tsx | 11 +- .../sections/watch_edit/watch_context.ts | 0 .../sections/watch_edit/watch_edit_actions.ts | 6 +- .../watch_list/components/watch_list.tsx | 4 +- .../watch_status/components/watch_detail.tsx | 2 +- .../watch_status/components/watch_history.tsx | 2 +- .../watch_status/components/watch_status.tsx | 6 +- .../watch_status/watch_details_context.ts | 0 .../public}/application/shared_imports.ts | 2 +- .../watcher/public}/index.ts | 0 .../public/legacy/calc_auto_interval.ts | 132 ++++++ .../watcher/public/legacy/calc_es_interval.js | 58 +++ .../plugins/watcher/public/legacy/index.d.ts | 7 + x-pack/plugins/watcher/public/legacy/index.ts | 15 + .../public/legacy/parse_es_interval/index.ts | 10 + .../invalid_es_calendar_interval_error.ts | 39 ++ .../invalid_es_interval_format_error.ts | 30 ++ .../parse_es_interval/is_valid_es_interval.ts | 25 ++ .../parse_es_interval.test.ts | 56 +++ .../parse_es_interval/parse_es_interval.ts | 62 +++ .../watcher/public/legacy/time_buckets.d.ts | 7 + .../watcher/public/legacy/time_buckets.js | 397 ++++++++++++++++++ x-pack/plugins/watcher/public/plugin.ts | 89 ++++ x-pack/plugins/watcher/public/types.ts | 19 + .../watcher/server}/index.ts | 4 +- .../server}/lib/call_with_request_factory.ts | 2 +- .../server}/lib/elasticsearch_js_plugin.ts | 0 .../__tests__/fetch_all_from_scroll.js | 0 .../fetch_all_from_scroll.ts | 2 +- .../lib/fetch_all_from_scroll/index.ts | 0 .../watcher/server}/lib/is_es_error/index.ts | 0 .../server}/lib/is_es_error/is_es_error.ts | 0 .../license_pre_routing_factory.test.js | 40 ++ .../lib/license_pre_routing_factory/index.ts | 0 .../license_pre_routing_factory.ts | 36 ++ .../lib/normalized_field_types/index.ts | 0 .../normalized_field_types.ts | 0 .../action_status/__tests__/action_status.js | 2 +- .../models/action_status/action_status.js | 4 +- .../server}/models/action_status/index.js | 0 .../__tests__/execute_details.js | 0 .../models/execute_details/execute_details.js | 0 .../server}/models/execute_details/index.js | 0 .../server}/models/fields/__tests__/fields.js | 0 .../watcher/server}/models/fields/fields.js | 0 .../watcher/server}/models/fields/index.js | 0 .../models/settings/__tests__/settings.js | 0 .../watcher/server}/models/settings/index.js | 0 .../server}/models/settings/settings.js | 2 +- .../server}/models/visualize_options/index.js | 0 .../visualize_options/visualize_options.js | 0 .../server}/models/watch/base_watch.js | 2 +- .../server}/models/watch/base_watch.test.js | 0 .../watcher/server}/models/watch/index.js | 0 .../server}/models/watch/json_watch.js | 4 +- .../server}/models/watch/json_watch.test.js | 0 .../lib/get_watch_type/get_watch_type.js | 2 +- .../models/watch/lib/get_watch_type/index.js | 0 .../server}/models/watch/monitoring_watch.js | 2 +- .../models/watch/monitoring_watch.test.js | 0 .../__tests__/format_visualize_data.js | 2 +- .../threshold_watch/build_visualize_query.js | 4 +- .../threshold_watch/data_samples/count.json | 0 .../data_samples/count.query.date.json | 0 .../data_samples/count.query.json | 0 .../data_samples/count_terms.json | 0 .../data_samples/count_terms.query.date.json | 0 .../data_samples/count_terms.query.json | 0 .../data_samples/non_count.json | 0 .../data_samples/non_count.query.date.json | 0 .../data_samples/non_count.query.json | 0 .../data_samples/non_count_terms.json | 0 .../non_count_terms.query.date.json | 0 .../data_samples/non_count_terms.query.json | 0 .../threshold_watch/format_visualize_data.js | 2 +- .../models/watch/threshold_watch/index.js | 0 .../watch/threshold_watch/threshold_watch.js | 4 +- .../threshold_watch/threshold_watch.test.js | 2 +- .../watcher/server}/models/watch/watch.js | 2 +- .../server}/models/watch/watch.test.js | 2 +- .../server}/models/watch_errors/index.js | 0 .../models/watch_errors/watch_errors.js | 0 .../models/watch_errors/watch_errors.test.js | 0 .../__tests__/watch_history_item.js | 0 .../models/watch_history_item/index.js | 0 .../watch_history_item/watch_history_item.js | 2 +- .../watch_status/__tests__/watch_status.js | 2 +- .../server}/models/watch_status/index.js | 0 .../models/watch_status/watch_status.js | 4 +- x-pack/plugins/watcher/server/plugin.ts | 72 ++++ .../server}/routes/api/indices/index.ts | 0 .../routes/api/indices/register_get_route.ts | 8 +- .../api/indices/register_indices_routes.ts | 6 +- .../server}/routes/api/license/index.ts | 0 .../api/license/register_license_routes.ts | 6 +- .../api/license/register_refresh_route.ts | 9 +- .../routes/api/register_list_fields_route.ts | 12 +- .../routes/api/register_load_history_route.ts | 12 +- .../server}/routes/api/settings/index.ts | 0 .../api/settings/register_load_route.ts | 12 +- .../api/settings/register_settings_routes.ts | 6 +- .../server}/routes/api/watch/action/index.ts | 0 .../action/register_acknowledge_route.ts | 12 +- .../watch/action/register_action_routes.ts | 6 +- .../watcher/server}/routes/api/watch/index.ts | 0 .../api/watch/register_activate_route.ts | 10 +- .../api/watch/register_deactivate_route.ts | 10 +- .../routes/api/watch/register_delete_route.ts | 8 +- .../api/watch/register_execute_route.ts | 14 +- .../api/watch/register_history_route.ts | 12 +- .../routes/api/watch/register_load_route.ts | 10 +- .../routes/api/watch/register_save_route.ts | 15 +- .../api/watch/register_visualize_route.ts | 12 +- .../routes/api/watch/register_watch_routes.ts | 22 +- .../server}/routes/api/watches/index.ts | 0 .../api/watches/register_delete_route.ts | 8 +- .../routes/api/watches/register_list_route.ts | 12 +- .../api/watches/register_watches_routes.ts | 8 +- .../watcher/server}/types.ts | 16 +- .../watcher/test/fixtures/execute_details.ts | 0 .../plugins/watcher/test/fixtures/index.ts | 0 .../plugins/watcher/test/fixtures/watch.ts | 2 +- .../watcher/test/fixtures/watch_history.ts | 2 +- 308 files changed, 1505 insertions(+), 811 deletions(-) create mode 100644 x-pack/legacy/plugins/watcher/index.ts delete mode 100644 x-pack/legacy/plugins/watcher/plugin_definition.ts rename x-pack/legacy/plugins/watcher/public/{np_ready/application => }/index.scss (100%) delete mode 100644 x-pack/legacy/plugins/watcher/public/legacy.ts delete mode 100644 x-pack/legacy/plugins/watcher/public/manage_angular_lifecycle.ts delete mode 100644 x-pack/legacy/plugins/watcher/public/np_ready/application/models/index.d.ts delete mode 100644 x-pack/legacy/plugins/watcher/public/np_ready/plugin.ts delete mode 100644 x-pack/legacy/plugins/watcher/public/register_feature.ts delete mode 100644 x-pack/legacy/plugins/watcher/server/np_ready/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.js delete mode 100644 x-pack/legacy/plugins/watcher/server/np_ready/lib/license_pre_routing_factory/license_pre_routing_factory.ts delete mode 100644 x-pack/legacy/plugins/watcher/server/np_ready/plugin.ts rename x-pack/{legacy => }/plugins/watcher/README.md (100%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx (69%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/helpers/body_response.ts (100%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/helpers/constants.ts (100%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/helpers/http_requests.ts (100%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/helpers/index.ts (96%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts (92%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts (87%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts (90%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts (81%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts (93%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts (95%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/watch_create_json.test.ts (98%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx (99%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/watch_edit.test.ts (95%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/watch_list.test.ts (100%) rename x-pack/{legacy => }/plugins/watcher/__jest__/client_integration/watch_status.test.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/action_modes.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/action_states.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/action_types.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/agg_types.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/comparators.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/error_codes.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/es_scroll_settings.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/index.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/index_names.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/lists.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/pagination.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/plugin.ts (85%) rename x-pack/{legacy => }/plugins/watcher/common/constants/refresh_intervals.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/routes.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/sort_orders.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/time_units.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/watch_history.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/watch_state_comments.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/watch_states.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/constants/watch_types.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/get_action_type/__tests__/get_action_type.js (97%) rename x-pack/{legacy => }/plugins/watcher/common/lib/get_action_type/get_action_type.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/get_action_type/index.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/get_moment/__tests__/get_moment.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/get_moment/get_moment.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/get_moment/index.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/index.d.ts (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/index.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/serialization_helpers/build_actions.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/serialization_helpers/build_condition.js (98%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/serialization_helpers/build_input.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/serialization_helpers/build_metadata.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/serialization_helpers/build_transform.js (98%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/serialization_helpers/build_trigger.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/serialization_helpers/index.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/serialization_helpers/single_line_script.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/serialize_json_watch.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/serialize_json_watch.test.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/serialize_threshold_watch.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/lib/serialization/serialize_threshold_watch.test.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/models/action/action.js (92%) rename x-pack/{legacy => }/plugins/watcher/common/models/action/action.test.js (97%) rename x-pack/{legacy => }/plugins/watcher/common/models/action/base_action.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/models/action/email_action.js (98%) rename x-pack/{legacy => }/plugins/watcher/common/models/action/index.js (100%) rename x-pack/{legacy => }/plugins/watcher/common/models/action/index_action.js (97%) rename x-pack/{legacy => }/plugins/watcher/common/models/action/jira_action.js (98%) rename x-pack/{legacy => }/plugins/watcher/common/models/action/logging_action.js (97%) rename x-pack/{legacy => }/plugins/watcher/common/models/action/pagerduty_action.js (97%) rename x-pack/{legacy => }/plugins/watcher/common/models/action/slack_action.js (97%) rename x-pack/{legacy => }/plugins/watcher/common/models/action/unknown_action.js (96%) rename x-pack/{legacy => }/plugins/watcher/common/models/action/webhook_action.js (98%) rename x-pack/{legacy => }/plugins/watcher/common/types/action_types.ts (100%) rename x-pack/{legacy/plugins/watcher/index.js => plugins/watcher/common/types/license_status.ts} (65%) rename x-pack/{legacy => }/plugins/watcher/common/types/watch_types.ts (100%) rename x-pack/{legacy => }/plugins/watcher/kibana.json (58%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/app.tsx (89%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/app_context.tsx (94%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/boot.tsx (70%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/components/confirm_watches_modal.tsx (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/components/delete_watches_modal.tsx (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/components/form_errors.tsx (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/components/index.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/components/page_error/index.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/components/page_error/page_error.tsx (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/components/page_error/page_error_forbidden.tsx (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/components/page_error/page_error_not_exist.tsx (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/components/section_error.tsx (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/components/section_loading.tsx (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/components/watch_status.tsx (95%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/constants/base_path.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/constants/index.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/lib/api.ts (88%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/lib/breadcrumbs.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/lib/format_date.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/lib/get_search_value.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/lib/get_time_unit_label.ts (95%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/lib/navigation.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/lib/use_request.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action/action.js (95%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action/base_action.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action/email_action.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready/types.ts => plugins/watcher/public/application/models/action/index.d.ts} (63%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action/index.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action/index_action.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action/jira_action.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action/logging_action.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action/pagerduty_action.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action/slack_action.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action/unknown_action.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action/webhook_action.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action_status/action_status.js (95%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/action_status/index.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/execute_details/execute_details.js (100%) create mode 100644 x-pack/plugins/watcher/public/application/models/execute_details/index.d.ts rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/execute_details/index.js (100%) create mode 100644 x-pack/plugins/watcher/public/application/models/settings/index.d.ts rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/settings/index.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/settings/settings.js (100%) create mode 100644 x-pack/plugins/watcher/public/application/models/visualize_options/index.d.ts rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/visualize_options/index.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/visualize_options/visualize_options.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/agg_types.ts (94%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/base_watch.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/comparators.ts (96%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/default_watch.json (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/group_by_types.ts (100%) create mode 100644 x-pack/plugins/watcher/public/application/models/watch/index.d.ts rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/index.js (100%) create mode 100644 x-pack/plugins/watcher/public/application/models/watch/json_watch.d.ts rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/json_watch.js (98%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/lib/check_action_id_collision/check_action_id_collision.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/lib/check_action_id_collision/index.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/lib/create_action_id/create_action_id.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/lib/create_action_id/index.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/monitoring_watch.js (92%) create mode 100644 x-pack/plugins/watcher/public/application/models/watch/threshold_watch.d.ts rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/threshold_watch.js (99%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch/watch.js (93%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch_errors/index.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch_errors/watch_errors.js (100%) create mode 100644 x-pack/plugins/watcher/public/application/models/watch_history_item/index.d.ts rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch_history_item/index.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch_history_item/watch_history_item.js (91%) create mode 100644 x-pack/plugins/watcher/public/application/models/watch_status/index.d.ts rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch_status/index.js (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/models/watch_status/watch_status.js (94%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/json_watch_edit/index.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/json_watch_edit/json_watch_edit.tsx (92%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_form.tsx (99%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate.tsx (97%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate_results.tsx (99%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/monitoring_watch_edit/index.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/monitoring_watch_edit/monitoring_watch_edit.tsx (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/request_flyout.tsx (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/action_fields/email_action_fields.tsx (97%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/action_fields/index.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/action_fields/index_action_fields.tsx (94%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/action_fields/jira_action_fields.tsx (97%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/action_fields/logging_action_fields.tsx (94%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/action_fields/pagerduty_action_fields.tsx (95%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/action_fields/slack_action_fields.tsx (96%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/action_fields/webhook_action_fields.tsx (98%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/index.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_accordion.tsx (94%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_dropdown.tsx (96%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_panel.tsx (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_edit.tsx (99%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/threshold_watch_edit/watch_visualization.tsx (93%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/components/watch_edit.tsx (94%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/watch_context.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_edit/watch_edit_actions.ts (95%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_list/components/watch_list.tsx (99%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_status/components/watch_detail.tsx (99%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_status/components/watch_history.tsx (99%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_status/components/watch_status.tsx (98%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/sections/watch_status/watch_details_context.ts (100%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/application/shared_imports.ts (79%) rename x-pack/{legacy/plugins/watcher/public/np_ready => plugins/watcher/public}/index.ts (100%) create mode 100644 x-pack/plugins/watcher/public/legacy/calc_auto_interval.ts create mode 100644 x-pack/plugins/watcher/public/legacy/calc_es_interval.js create mode 100644 x-pack/plugins/watcher/public/legacy/index.d.ts create mode 100644 x-pack/plugins/watcher/public/legacy/index.ts create mode 100644 x-pack/plugins/watcher/public/legacy/parse_es_interval/index.ts create mode 100644 x-pack/plugins/watcher/public/legacy/parse_es_interval/invalid_es_calendar_interval_error.ts create mode 100644 x-pack/plugins/watcher/public/legacy/parse_es_interval/invalid_es_interval_format_error.ts create mode 100644 x-pack/plugins/watcher/public/legacy/parse_es_interval/is_valid_es_interval.ts create mode 100644 x-pack/plugins/watcher/public/legacy/parse_es_interval/parse_es_interval.test.ts create mode 100644 x-pack/plugins/watcher/public/legacy/parse_es_interval/parse_es_interval.ts create mode 100644 x-pack/plugins/watcher/public/legacy/time_buckets.d.ts create mode 100644 x-pack/plugins/watcher/public/legacy/time_buckets.js create mode 100644 x-pack/plugins/watcher/public/plugin.ts create mode 100644 x-pack/plugins/watcher/public/types.ts rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/index.ts (81%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/lib/call_with_request_factory.ts (93%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/lib/elasticsearch_js_plugin.ts (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/lib/fetch_all_from_scroll/__tests__/fetch_all_from_scroll.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/lib/fetch_all_from_scroll/fetch_all_from_scroll.ts (92%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/lib/fetch_all_from_scroll/index.ts (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/lib/is_es_error/index.ts (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/lib/is_es_error/is_es_error.ts (100%) create mode 100644 x-pack/plugins/watcher/server/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.test.js rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/lib/license_pre_routing_factory/index.ts (100%) create mode 100644 x-pack/plugins/watcher/server/lib/license_pre_routing_factory/license_pre_routing_factory.ts rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/lib/normalized_field_types/index.ts (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/lib/normalized_field_types/normalized_field_types.ts (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/action_status/__tests__/action_status.js (99%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/action_status/action_status.js (97%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/action_status/index.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/execute_details/__tests__/execute_details.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/execute_details/execute_details.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/execute_details/index.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/fields/__tests__/fields.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/fields/fields.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/fields/index.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/settings/__tests__/settings.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/settings/index.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/settings/settings.js (97%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/visualize_options/index.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/visualize_options/visualize_options.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/base_watch.js (98%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/base_watch.test.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/index.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/json_watch.js (92%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/json_watch.test.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/lib/get_watch_type/get_watch_type.js (88%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/lib/get_watch_type/index.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/monitoring_watch.js (97%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/monitoring_watch.test.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/__tests__/format_visualize_data.js (99%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/build_visualize_query.js (95%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/data_samples/count.json (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/data_samples/count.query.date.json (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/data_samples/count.query.json (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/data_samples/count_terms.json (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/data_samples/count_terms.query.date.json (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/data_samples/count_terms.query.json (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/data_samples/non_count.json (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/data_samples/non_count.query.date.json (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/data_samples/non_count.query.json (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/data_samples/non_count_terms.json (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/data_samples/non_count_terms.query.date.json (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/data_samples/non_count_terms.query.json (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/format_visualize_data.js (97%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/index.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/threshold_watch.js (97%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/threshold_watch/threshold_watch.test.js (99%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/watch.js (97%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch/watch.test.js (98%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch_errors/index.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch_errors/watch_errors.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch_errors/watch_errors.test.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch_history_item/__tests__/watch_history_item.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch_history_item/index.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch_history_item/watch_history_item.js (97%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch_status/__tests__/watch_status.js (99%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch_status/index.js (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/models/watch_status/watch_status.js (98%) create mode 100644 x-pack/plugins/watcher/server/plugin.ts rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/indices/index.ts (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/indices/register_get_route.ts (91%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/indices/register_indices_routes.ts (62%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/license/index.ts (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/license/register_license_routes.ts (62%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/license/register_refresh_route.ts (78%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/register_list_fields_route.ts (86%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/register_load_history_route.ts (90%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/settings/index.ts (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/settings/register_load_route.ts (79%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/settings/register_settings_routes.ts (62%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/action/index.ts (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/action/register_acknowledge_route.ts (88%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/action/register_action_routes.ts (61%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/index.ts (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/register_activate_route.ts (85%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/register_deactivate_route.ts (85%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/register_delete_route.ts (86%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/register_execute_route.ts (86%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/register_history_route.ts (89%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/register_load_route.ts (86%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/register_save_route.ts (87%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/register_visualize_route.ts (86%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watch/register_watch_routes.ts (62%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watches/index.ts (100%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watches/register_delete_route.ts (87%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watches/register_list_route.ts (85%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/routes/api/watches/register_watches_routes.ts (62%) rename x-pack/{legacy/plugins/watcher/server/np_ready => plugins/watcher/server}/types.ts (60%) rename x-pack/{legacy => }/plugins/watcher/test/fixtures/execute_details.ts (100%) rename x-pack/{legacy => }/plugins/watcher/test/fixtures/index.ts (100%) rename x-pack/{legacy => }/plugins/watcher/test/fixtures/watch.ts (95%) rename x-pack/{legacy => }/plugins/watcher/test/fixtures/watch_history.ts (93%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a45816d7eb54ba..e300e1c76af0f6 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -155,4 +155,4 @@ /x-pack/legacy/plugins/rollup/ @elastic/es-ui /x-pack/plugins/searchprofiler/ @elastic/es-ui /x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui -/x-pack/legacy/plugins/watcher/ @elastic/es-ui +/x-pack/plugins/watcher/ @elastic/es-ui diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index 34ab2c878a19f2..32ff4908629ebe 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -40,7 +40,7 @@ "xpack.transform": "legacy/plugins/transform", "xpack.upgradeAssistant": "legacy/plugins/upgrade_assistant", "xpack.uptime": "legacy/plugins/uptime", - "xpack.watcher": "legacy/plugins/watcher" + "xpack.watcher": "plugins/watcher" }, "translations": [ "plugins/translations/translations/zh-CN.json", diff --git a/x-pack/dev-tools/jest/create_jest_config.js b/x-pack/dev-tools/jest/create_jest_config.js index b746f0ae258cd1..2d8a0be7a416fa 100644 --- a/x-pack/dev-tools/jest/create_jest_config.js +++ b/x-pack/dev-tools/jest/create_jest_config.js @@ -21,7 +21,6 @@ export function createJestConfig({ kibanaDirectory, xPackKibanaDirectory }) { 'uiExports/(.*)': fileMockPath, '^src/core/(.*)': `${kibanaDirectory}/src/core/$1`, '^src/legacy/(.*)': `${kibanaDirectory}/src/legacy/$1`, - '^plugins/watcher/np_ready/application/models/(.*)': `${xPackKibanaDirectory}/legacy/plugins/watcher/public/np_ready/application/models/$1`, '^plugins/([^/.]*)(.*)': `${kibanaDirectory}/src/legacy/core_plugins/$1/public$2`, '^legacy/plugins/xpack_main/(.*);': `${xPackKibanaDirectory}/legacy/plugins/xpack_main/public/$1`, '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': fileMockPath, diff --git a/x-pack/legacy/plugins/license_management/public/np_ready/application/app.js b/x-pack/legacy/plugins/license_management/public/np_ready/application/app.js index 7122e7269732a2..7c497518b9df50 100644 --- a/x-pack/legacy/plugins/license_management/public/np_ready/application/app.js +++ b/x-pack/legacy/plugins/license_management/public/np_ready/application/app.js @@ -8,7 +8,7 @@ import React, { Component } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { LicenseDashboard, UploadLicense } from './sections'; import { Switch, Route } from 'react-router-dom'; -import { APP_PERMISSION } from '../../../common/constants'; +import { APP_PERMISSION, BASE_PATH } from '../../../common/constants'; import { EuiPageBody, EuiEmptyPrompt, EuiText, EuiLoadingSpinner, EuiCallOut } from '@elastic/eui'; export class App extends Component { @@ -88,10 +88,8 @@ export class App extends Component { return ( - - - {/* Match all */} - + + ); diff --git a/x-pack/legacy/plugins/license_management/public/np_ready/application/boot.tsx b/x-pack/legacy/plugins/license_management/public/np_ready/application/boot.tsx index d0bf5deacfac10..2780b54230eba3 100644 --- a/x-pack/legacy/plugins/license_management/public/np_ready/application/boot.tsx +++ b/x-pack/legacy/plugins/license_management/public/np_ready/application/boot.tsx @@ -63,7 +63,7 @@ export const boot = (deps: AppDependencies) => { render( - + diff --git a/x-pack/legacy/plugins/license_management/public/np_ready/application/sections/license_dashboard/license_dashboard.js b/x-pack/legacy/plugins/license_management/public/np_ready/application/sections/license_dashboard/license_dashboard.js index 3dc44796fd0ef0..e14d392fe6706e 100644 --- a/x-pack/legacy/plugins/license_management/public/np_ready/application/sections/license_dashboard/license_dashboard.js +++ b/x-pack/legacy/plugins/license_management/public/np_ready/application/sections/license_dashboard/license_dashboard.js @@ -4,8 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React from 'react'; - +import React, { useEffect } from 'react'; import { LicenseStatus } from './license_status'; import { RevertToBasic } from './revert_to_basic'; import { StartTrial } from './start_trial'; @@ -14,7 +13,10 @@ import { RequestTrialExtension } from './request_trial_extension'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; export const LicenseDashboard = ({ setBreadcrumb } = { setBreadcrumb: () => {} }) => { - setBreadcrumb('dashboard'); + useEffect(() => { + setBreadcrumb('dashboard'); + }); + return (
diff --git a/x-pack/legacy/plugins/watcher/index.ts b/x-pack/legacy/plugins/watcher/index.ts new file mode 100644 index 00000000000000..fdf9ba1bad6e44 --- /dev/null +++ b/x-pack/legacy/plugins/watcher/index.ts @@ -0,0 +1,19 @@ +/* + * 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. + */ +import { resolve } from 'path'; + +const pluginDefinition = { + id: 'watcher', + configPrefix: 'xpack.watcher', + publicDir: resolve(__dirname, 'public'), + require: ['kibana'], + uiExports: { + styleSheetPaths: resolve(__dirname, 'public/index.scss'), + }, + init(server: any) {}, +}; + +export const watcher = (kibana: any) => new kibana.Plugin(pluginDefinition); diff --git a/x-pack/legacy/plugins/watcher/plugin_definition.ts b/x-pack/legacy/plugins/watcher/plugin_definition.ts deleted file mode 100644 index 2da05253fdb325..00000000000000 --- a/x-pack/legacy/plugins/watcher/plugin_definition.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ - -import { resolve } from 'path'; -import { plugin } from './server/np_ready'; -import { PLUGIN } from './common/constants'; - -export const pluginDefinition = { - id: PLUGIN.ID, - configPrefix: 'xpack.watcher', - publicDir: resolve(__dirname, 'public'), - require: ['kibana', 'elasticsearch', 'xpack_main'], - uiExports: { - styleSheetPaths: resolve(__dirname, 'public/np_ready/application/index.scss'), - managementSections: ['plugins/watcher/legacy'], - home: ['plugins/watcher/register_feature'], - }, - init(server: any) { - plugin({} as any).setup(server.newPlatform.setup.core, { - __LEGACY: { - route: server.route.bind(server), - plugins: { - watcher: server.plugins[PLUGIN.ID], - xpack_main: server.plugins.xpack_main, - }, - }, - }); - }, -}; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/index.scss b/x-pack/legacy/plugins/watcher/public/index.scss similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/index.scss rename to x-pack/legacy/plugins/watcher/public/index.scss diff --git a/x-pack/legacy/plugins/watcher/public/legacy.ts b/x-pack/legacy/plugins/watcher/public/legacy.ts deleted file mode 100644 index 21fcd718ea1b73..00000000000000 --- a/x-pack/legacy/plugins/watcher/public/legacy.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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. - */ - -import { CoreSetup, App, AppUnmount } from 'src/core/public'; -import { i18n } from '@kbn/i18n'; - -/* Legacy UI imports */ -import { npSetup, npStart } from 'ui/new_platform'; -import routes from 'ui/routes'; -import { management, MANAGEMENT_BREADCRUMB } from 'ui/management'; -import { TimeBuckets } from 'ui/time_buckets'; -// @ts-ignore -import { xpackInfo } from 'plugins/xpack_main/services/xpack_info'; -/* Legacy UI imports */ - -import { plugin } from './np_ready'; -import { PLUGIN } from '../common/constants'; -import { LICENSE_STATUS_INVALID, LICENSE_STATUS_UNAVAILABLE } from '../../../common/constants'; -import { manageAngularLifecycle } from './manage_angular_lifecycle'; - -const template = ` -
-
`; - -let elem: HTMLElement; -let mountApp: () => AppUnmount | Promise; -let unmountApp: AppUnmount | Promise; -routes.when('/management/elasticsearch/watcher/:param1?/:param2?/:param3?/:param4?', { - template, - controller: class WatcherController { - constructor($injector: any, $scope: any) { - const $route = $injector.get('$route'); - const licenseStatus = xpackInfo.get(`features.${PLUGIN.ID}`); - const shimCore: CoreSetup = { - ...npSetup.core, - application: { - ...npSetup.core.application, - register(app: App): void { - mountApp = () => - app.mount(npStart as any, { - element: elem, - appBasePath: '/management/elasticsearch/watcher/', - onAppLeave: () => undefined, - }); - }, - }, - }; - - // clean up previously rendered React app if one exists - // this happens because of React Router redirects - if (elem) { - ((unmountApp as unknown) as AppUnmount)(); - } - - $scope.$$postDigest(() => { - elem = document.getElementById('watchReactRoot')!; - const instance = plugin(); - instance.setup(shimCore, { - ...(npSetup.plugins as typeof npSetup.plugins & { eui_utils: any }), - __LEGACY: { - MANAGEMENT_BREADCRUMB, - TimeBuckets, - licenseStatus, - }, - }); - - instance.start(npStart.core, npStart.plugins); - - (mountApp() as Promise).then(fn => (unmountApp = fn)); - - manageAngularLifecycle($scope, $route, elem); - }); - } - } as any, - // @ts-ignore - controllerAs: 'watchRoute', -}); - -routes.defaults(/\/management/, { - resolve: { - watcherManagementSection: () => { - const watchesSection = management.getSection('elasticsearch/watcher'); - const licenseStatus = xpackInfo.get(`features.${PLUGIN.ID}`); - const { status } = licenseStatus; - - if (status === LICENSE_STATUS_INVALID || status === LICENSE_STATUS_UNAVAILABLE) { - return watchesSection.hide(); - } - - watchesSection.show(); - }, - }, -}); - -management.getSection('elasticsearch').register('watcher', { - display: i18n.translate('xpack.watcher.sections.watchList.managementSection.watcherDisplayName', { - defaultMessage: 'Watcher', - }), - order: 6, - url: '#/management/elasticsearch/watcher/', -} as any); - -management.getSection('elasticsearch/watcher').register('watches', { - display: i18n.translate('xpack.watcher.sections.watchList.managementSection.watchesDisplayName', { - defaultMessage: 'Watches', - }), - order: 1, -} as any); - -management.getSection('elasticsearch/watcher').register('watch', { - visible: false, -} as any); - -management.getSection('elasticsearch/watcher/watch').register('status', { - display: i18n.translate('xpack.watcher.sections.watchList.managementSection.statusDisplayName', { - defaultMessage: 'Status', - }), - order: 1, - visible: false, -} as any); - -management.getSection('elasticsearch/watcher/watch').register('edit', { - display: i18n.translate('xpack.watcher.sections.watchList.managementSection.editDisplayName', { - defaultMessage: 'Edit', - }), - order: 2, - visible: false, -} as any); - -management.getSection('elasticsearch/watcher/watch').register('new', { - display: i18n.translate( - 'xpack.watcher.sections.watchList.managementSection.newWatchDisplayName', - { - defaultMessage: 'New Watch', - } - ), - order: 1, - visible: false, -} as any); - -management.getSection('elasticsearch/watcher/watch').register('history-item', { - order: 1, - visible: false, -} as any); diff --git a/x-pack/legacy/plugins/watcher/public/manage_angular_lifecycle.ts b/x-pack/legacy/plugins/watcher/public/manage_angular_lifecycle.ts deleted file mode 100644 index efd40eaf83daad..00000000000000 --- a/x-pack/legacy/plugins/watcher/public/manage_angular_lifecycle.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ - -import { unmountComponentAtNode } from 'react-dom'; - -export const manageAngularLifecycle = ($scope: any, $route: any, elem: HTMLElement) => { - const lastRoute = $route.current; - - const deregister = $scope.$on('$locationChangeSuccess', () => { - const currentRoute = $route.current; - if (lastRoute.$$route.template === currentRoute.$$route.template) { - $route.current = lastRoute; - } - }); - - $scope.$on('$destroy', () => { - if (deregister) { - deregister(); - } - - if (elem) { - unmountComponentAtNode(elem); - } - }); -}; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/index.d.ts b/x-pack/legacy/plugins/watcher/public/np_ready/application/models/index.d.ts deleted file mode 100644 index a8ddb6ca2b76db..00000000000000 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/index.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ -declare module 'plugins/watcher/np_ready/application/models/visualize_options' { - export const VisualizeOptions: any; -} - -declare module 'plugins/watcher/np_ready/application/models/watch' { - export const Watch: any; -} - -declare module 'plugins/watcher/np_ready/application/models/watch/threshold_watch' { - export const ThresholdWatch: any; -} - -declare module 'plugins/watcher/np_ready/application/models/watch/json_watch' { - export const JsonWatch: any; -} - -declare module 'plugins/watcher/np_ready/application/models/execute_details/execute_details' { - export const ExecuteDetails: any; -} - -declare module 'plugins/watcher/np_ready/application/models/watch_history_item' { - export const WatchHistoryItem: any; -} - -declare module 'plugins/watcher/np_ready/application/models/watch_status' { - export const WatchStatus: any; -} - -declare module 'plugins/watcher/np_ready/application/models/settings' { - export const Settings: any; -} -declare module 'plugins/watcher/np_ready/application/models/action' { - export const Action: any; -} diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/plugin.ts b/x-pack/legacy/plugins/watcher/public/np_ready/plugin.ts deleted file mode 100644 index 161de9b5fc0606..00000000000000 --- a/x-pack/legacy/plugins/watcher/public/np_ready/plugin.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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. - */ - -import { Plugin, CoreSetup, CoreStart } from 'src/core/public'; - -import { LegacyDependencies } from './types'; - -interface LegacyPlugins { - __LEGACY: LegacyDependencies; -} - -export class WatcherUIPlugin implements Plugin { - /* TODO: Remove this in future. We need this at mount (setup) but it's only available on start plugins. */ - euiUtils: any = null; - - setup({ application, notifications, http, uiSettings }: CoreSetup, { __LEGACY }: LegacyPlugins) { - application.register({ - id: 'watcher', - title: 'Watcher', - mount: async ( - { - core: { - docLinks, - chrome, - // Waiting for types to be updated. - // @ts-ignore - savedObjects, - i18n: { Context: I18nContext }, - }, - }, - { element } - ) => { - const euiUtils = this.euiUtils!; - const { boot } = await import('./application/boot'); - return boot({ - element, - toasts: notifications.toasts, - http, - uiSettings, - docLinks, - chrome, - euiUtils, - savedObjects: savedObjects.client, - I18nContext, - legacy: { - ...__LEGACY, - }, - }); - }, - }); - } - - start(core: CoreStart, { eui_utils }: any) { - // eslint-disable-next-line @typescript-eslint/camelcase - this.euiUtils = eui_utils; - } - - stop() {} -} diff --git a/x-pack/legacy/plugins/watcher/public/register_feature.ts b/x-pack/legacy/plugins/watcher/public/register_feature.ts deleted file mode 100644 index 0de41e09f788e1..00000000000000 --- a/x-pack/legacy/plugins/watcher/public/register_feature.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -import { i18n } from '@kbn/i18n'; -import { npSetup } from 'ui/new_platform'; -import { FeatureCatalogueCategory } from 'ui/registry/feature_catalogue'; - -npSetup.plugins.home.featureCatalogue.register({ - id: 'watcher', - title: 'Watcher', // This is a product name so we don't translate it. - category: FeatureCatalogueCategory.ADMIN, - description: i18n.translate('xpack.watcher.watcherDescription', { - defaultMessage: 'Detect changes in your data by creating, managing, and monitoring alerts.', - }), - icon: 'watchesApp', - path: '/app/kibana#/management/elasticsearch/watcher/watches', - showOnHomePage: true, -}); diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.js b/x-pack/legacy/plugins/watcher/server/np_ready/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.js deleted file mode 100644 index 4a6ad50d6ebc57..00000000000000 --- a/x-pack/legacy/plugins/watcher/server/np_ready/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.js +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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. - */ - -import expect from '@kbn/expect'; -import { kibanaResponseFactory } from '../../../../../../../../../src/core/server'; -import { licensePreRoutingFactory } from '../license_pre_routing_factory'; -import { - LICENSE_STATUS_VALID, - LICENSE_STATUS_EXPIRED, -} from '../../../../../../../common/constants/license_status'; - -describe('license_pre_routing_factory', () => { - describe('#reportingFeaturePreRoutingFactory', () => { - let mockServer; - let mockLicenseCheckResults; - - beforeEach(() => { - mockServer = { - plugins: { - xpack_main: { - info: { - feature: () => ({ - getLicenseCheckResults: () => mockLicenseCheckResults, - }), - }, - }, - }, - }; - }); - - describe('status is not valid', () => { - beforeEach(() => { - mockLicenseCheckResults = { - status: LICENSE_STATUS_EXPIRED, - }; - }); - - it('replies with 403', () => { - const licensePreRouting = licensePreRoutingFactory(mockServer, () => {}); - const stubRequest = {}; - const response = licensePreRouting({}, stubRequest, kibanaResponseFactory); - expect(response.status).to.be(403); - }); - }); - - describe('status is valid', () => { - beforeEach(() => { - mockLicenseCheckResults = { - status: LICENSE_STATUS_VALID, - }; - }); - - it('replies with nothing', () => { - const licensePreRouting = licensePreRoutingFactory(mockServer, () => null); - const stubRequest = {}; - const response = licensePreRouting({}, stubRequest, kibanaResponseFactory); - expect(response).to.be(null); - }); - }); - }); -}); diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/lib/license_pre_routing_factory/license_pre_routing_factory.ts b/x-pack/legacy/plugins/watcher/server/np_ready/lib/license_pre_routing_factory/license_pre_routing_factory.ts deleted file mode 100644 index d2f49672461047..00000000000000 --- a/x-pack/legacy/plugins/watcher/server/np_ready/lib/license_pre_routing_factory/license_pre_routing_factory.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ - -import { - KibanaRequest, - KibanaResponseFactory, - RequestHandler, - RequestHandlerContext, -} from 'src/core/server'; -import { PLUGIN } from '../../../../common/constants'; -import { LICENSE_STATUS_VALID } from '../../../../../../common/constants/license_status'; -import { ServerShim } from '../../types'; - -export const licensePreRoutingFactory = ( - server: ServerShim, - handler: RequestHandler -): RequestHandler => { - const xpackMainPlugin = server.plugins.xpack_main; - - // License checking and enable/disable logic - return function licensePreRouting( - ctx: RequestHandlerContext, - request: KibanaRequest, - response: KibanaResponseFactory - ) { - const licenseCheckResults = xpackMainPlugin.info.feature(PLUGIN.ID).getLicenseCheckResults(); - const { status } = licenseCheckResults; - - if (status !== LICENSE_STATUS_VALID) { - return response.customError({ - body: { - message: licenseCheckResults.messsage, - }, - statusCode: 403, - }); - } - - return handler(ctx, request, response); - }; -}; diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/plugin.ts b/x-pack/legacy/plugins/watcher/server/np_ready/plugin.ts deleted file mode 100644 index a311c31082183c..00000000000000 --- a/x-pack/legacy/plugins/watcher/server/np_ready/plugin.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ -import { Plugin, CoreSetup } from 'src/core/server'; -import { i18n } from '@kbn/i18n'; -import { PLUGIN } from '../../common/constants'; -import { ServerShim, RouteDependencies } from './types'; - -import { registerLicenseChecker } from '../../../../server/lib/register_license_checker'; -import { registerSettingsRoutes } from './routes/api/settings'; -import { registerIndicesRoutes } from './routes/api/indices'; -import { registerLicenseRoutes } from './routes/api/license'; -import { registerWatchesRoutes } from './routes/api/watches'; -import { registerWatchRoutes } from './routes/api/watch'; -import { registerListFieldsRoute } from './routes/api/register_list_fields_route'; -import { registerLoadHistoryRoute } from './routes/api/register_load_history_route'; - -export class WatcherServerPlugin implements Plugin { - async setup( - { http, elasticsearch: elasticsearchService }: CoreSetup, - { __LEGACY: serverShim }: { __LEGACY: ServerShim } - ) { - const elasticsearch = await elasticsearchService.adminClient; - const router = http.createRouter(); - const routeDependencies: RouteDependencies = { - elasticsearch, - elasticsearchService, - router, - }; - // Register license checker - registerLicenseChecker( - serverShim as any, - PLUGIN.ID, - PLUGIN.getI18nName(i18n), - PLUGIN.MINIMUM_LICENSE_REQUIRED - ); - - registerListFieldsRoute(routeDependencies, serverShim); - registerLoadHistoryRoute(routeDependencies, serverShim); - registerIndicesRoutes(routeDependencies, serverShim); - registerLicenseRoutes(routeDependencies, serverShim); - registerSettingsRoutes(routeDependencies, serverShim); - registerWatchesRoutes(routeDependencies, serverShim); - registerWatchRoutes(routeDependencies, serverShim); - } - start() {} - stop() {} -} diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 4a5d2c5e9de2e5..1c0c44540781d9 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -13151,11 +13151,7 @@ "xpack.watcher.sections.watchList.errorTitle": "ウォッチの読み込み中にエラーが発生しました", "xpack.watcher.sections.watchList.header": "しきい値アラートを作成", "xpack.watcher.sections.watchList.loadingWatchesDescription": "ウォッチの読み込み中...", - "xpack.watcher.sections.watchList.managementSection.editDisplayName": "編集", - "xpack.watcher.sections.watchList.managementSection.newWatchDisplayName": "新規ウォッチ", - "xpack.watcher.sections.watchList.managementSection.statusDisplayName": "ステータス", "xpack.watcher.sections.watchList.managementSection.watcherDisplayName": "Watcher", - "xpack.watcher.sections.watchList.managementSection.watchesDisplayName": "ウォッチ", "xpack.watcher.sections.watchList.subhead": "特定のパラメーターに到達した際にメール、Slack メッセージ、ログイベントを送信します。", "xpack.watcher.sections.watchList.toggleActivatationErrorNotification.activateDescriptionText": "ウォッチを有効化できませんでした", "xpack.watcher.sections.watchList.toggleActivatationErrorNotification.deactivateDescriptionText": "ウォッチを無効化できませんでした", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 6291b5f1bb6632..9500b1ce887a6d 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -13150,11 +13150,7 @@ "xpack.watcher.sections.watchList.errorTitle": "加载监视时出错", "xpack.watcher.sections.watchList.header": "创建阈值告警", "xpack.watcher.sections.watchList.loadingWatchesDescription": "正在加载监视……", - "xpack.watcher.sections.watchList.managementSection.editDisplayName": "编辑", - "xpack.watcher.sections.watchList.managementSection.newWatchDisplayName": "新建监视", - "xpack.watcher.sections.watchList.managementSection.statusDisplayName": "状态", "xpack.watcher.sections.watchList.managementSection.watcherDisplayName": "Watcher", - "xpack.watcher.sections.watchList.managementSection.watchesDisplayName": "监视", "xpack.watcher.sections.watchList.subhead": "特定参数命中时,发出电子邮件、Slack 消息和日志事件", "xpack.watcher.sections.watchList.toggleActivatationErrorNotification.activateDescriptionText": "无法激活监视", "xpack.watcher.sections.watchList.toggleActivatationErrorNotification.deactivateDescriptionText": "无法停用监视", diff --git a/x-pack/legacy/plugins/watcher/README.md b/x-pack/plugins/watcher/README.md similarity index 100% rename from x-pack/legacy/plugins/watcher/README.md rename to x-pack/plugins/watcher/README.md diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx b/x-pack/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx similarity index 69% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx index de285ee15b59d9..3d8ae2894b3206 100644 --- a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx @@ -12,26 +12,28 @@ import { uiSettingsServiceMock, notificationServiceMock, httpServiceMock, -} from '../../../../../../../src/core/public/mocks'; -import { AppContextProvider } from '../../../public/np_ready/application/app_context'; +} from '../../../../../../src/core/public/mocks'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { AppContextProvider } from '../../../public/application/app_context'; +class MockTimeBuckets { + setBounds(_domain: any) { + return {}; + } + getInterval() { + return { + expression: {}, + }; + } +} export const mockContextValue = { + getLicenseStatus: () => ({ + valid: true, + }), docLinks: docLinksServiceMock.createStartContract(), chrome: chromeServiceMock.createStartContract(), - legacy: { - TimeBuckets: class MockTimeBuckets { - setBounds(_domain: any) { - return {}; - } - getInterval() { - return { - expression: {}, - }; - } - }, - MANAGEMENT_BREADCRUMB: { text: 'test' }, - licenseStatus: {}, - }, + MANAGEMENT_BREADCRUMB: { text: 'test' }, + createTimeBuckets: () => new MockTimeBuckets(), uiSettings: uiSettingsServiceMock.createSetupContract(), toasts: notificationServiceMock.createSetupContract().toasts, euiUtils: { diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/body_response.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/body_response.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/body_response.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/body_response.ts diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/constants.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/constants.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/constants.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/constants.ts diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/http_requests.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/http_requests.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/http_requests.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/http_requests.ts diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/index.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts similarity index 96% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/index.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts index 814028fe599ff6..7c5ec0917494ad 100644 --- a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/index.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts @@ -10,7 +10,7 @@ import { setup as watchCreateJsonSetup } from './watch_create_json.helpers'; import { setup as watchCreateThresholdSetup } from './watch_create_threshold.helpers'; import { setup as watchEditSetup } from './watch_edit.helpers'; -export { nextTick, getRandomString, findTestSubject, TestBed } from '../../../../../../test_utils'; +export { nextTick, getRandomString, findTestSubject, TestBed } from '../../../../../test_utils'; export { wrapBodyResponse, unwrapBodyResponse } from './body_response'; export { setupEnvironment } from './setup_environment'; diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts similarity index 92% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts index 7e748073c1c6b2..c084f87ea8c3ad 100644 --- a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts @@ -7,7 +7,8 @@ import axios from 'axios'; import axiosXhrAdapter from 'axios/lib/adapters/xhr'; import { init as initHttpRequests } from './http_requests'; -import { setHttpClient, setSavedObjectsClient } from '../../../public/np_ready/application/lib/api'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { setHttpClient, setSavedObjectsClient } from '../../../public/application/lib/api'; const mockHttpClient = axios.create({ adapter: axiosXhrAdapter }); mockHttpClient.interceptors.response.use( diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts similarity index 87% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts index dafcf3a7070d22..77d5a76257fd2d 100644 --- a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts @@ -4,10 +4,12 @@ * you may not use this file except in compliance with the Elastic License. */ import { withAppContext } from './app_context.mock'; -import { registerTestBed, TestBed, TestBedConfig } from '../../../../../../test_utils'; -import { WatchEdit } from '../../../public/np_ready/application/sections/watch_edit/components/watch_edit'; +import { registerTestBed, TestBed, TestBedConfig } from '../../../../../test_utils'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { WatchEdit } from '../../../public/application/sections/watch_edit/components/watch_edit'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { registerRouter } from '../../../public/application/lib/navigation'; import { ROUTES, WATCH_TYPES } from '../../../common/constants'; -import { registerRouter } from '../../../public/np_ready/application/lib/navigation'; const testBedConfig: TestBedConfig = { memoryRouter: { diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts similarity index 90% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts index 65648ae5f5a959..8262e6702be700 100644 --- a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts @@ -3,10 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { registerTestBed, TestBed, TestBedConfig } from '../../../../../../test_utils'; -import { WatchEdit } from '../../../public/np_ready/application/sections/watch_edit/components/watch_edit'; +import { registerTestBed, TestBed, TestBedConfig } from '../../../../../test_utils'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { WatchEdit } from '../../../public/application/sections/watch_edit/components/watch_edit'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { registerRouter } from '../../../public/application/lib/navigation'; import { ROUTES, WATCH_TYPES } from '../../../common/constants'; -import { registerRouter } from '../../../public/np_ready/application/lib/navigation'; import { withAppContext } from './app_context.mock'; const testBedConfig: TestBedConfig = { diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts similarity index 81% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts index 187f4dcaa0a76f..949d43e7742123 100644 --- a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts @@ -3,10 +3,12 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { registerTestBed, TestBed, TestBedConfig } from '../../../../../../test_utils'; -import { WatchEdit } from '../../../public/np_ready/application/sections/watch_edit/components/watch_edit'; +import { registerTestBed, TestBed, TestBedConfig } from '../../../../../test_utils'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { WatchEdit } from '../../../public/application/sections/watch_edit/components/watch_edit'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { registerRouter } from '../../../public/application/lib/navigation'; import { ROUTES } from '../../../common/constants'; -import { registerRouter } from '../../../public/np_ready/application/lib/navigation'; import { WATCH_ID } from './constants'; import { withAppContext } from './app_context.mock'; diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts similarity index 93% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts index e33327ea42ffe8..b5cf3df9509fc7 100644 --- a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts @@ -12,8 +12,9 @@ import { TestBed, TestBedConfig, nextTick, -} from '../../../../../../test_utils'; -import { WatchList } from '../../../public/np_ready/application/sections/watch_list/components/watch_list'; +} from '../../../../../test_utils'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { WatchList } from '../../../public/application/sections/watch_list/components/watch_list'; import { ROUTES } from '../../../common/constants'; import { withAppContext } from './app_context.mock'; diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts similarity index 95% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts rename to x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts index e7bffe8924e319..e67c98ff9e9a0c 100644 --- a/x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts @@ -12,8 +12,9 @@ import { TestBed, TestBedConfig, nextTick, -} from '../../../../../../test_utils'; -import { WatchStatus } from '../../../public/np_ready/application/sections/watch_status/components/watch_status'; +} from '../../../../../test_utils'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import { WatchStatus } from '../../../public/application/sections/watch_status/components/watch_status'; import { ROUTES } from '../../../common/constants'; import { WATCH_ID } from './constants'; import { withAppContext } from './app_context.mock'; diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_create_json.test.ts b/x-pack/plugins/watcher/__jest__/client_integration/watch_create_json.test.ts similarity index 98% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_create_json.test.ts rename to x-pack/plugins/watcher/__jest__/client_integration/watch_create_json.test.ts index 4c893978ee5cbc..26be3421b534ed 100644 --- a/x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_create_json.test.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/watch_create_json.test.ts @@ -7,7 +7,7 @@ import { act } from 'react-dom/test-utils'; import { setupEnvironment, pageHelpers, nextTick, wrapBodyResponse } from './helpers'; import { WatchCreateJsonTestBed } from './helpers/watch_create_json.helpers'; import { WATCH } from './helpers/constants'; -import defaultWatchJson from '../../public/np_ready/application/models/watch/default_watch.json'; +import defaultWatchJson from '../../public/application/models/watch/default_watch.json'; import { getExecuteDetails } from '../../test/fixtures'; const { setup } = pageHelpers.watchCreateJson; diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx b/x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx similarity index 99% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx rename to x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx index 2800b0107da240..431eb1cae0608a 100644 --- a/x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx +++ b/x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx @@ -48,8 +48,8 @@ const WATCH_VISUALIZE_DATA = { const mockHttpClient = axios.create({ adapter: axiosXhrAdapter }); -jest.mock('../../public/np_ready/application/lib/api', () => ({ - ...jest.requireActual('../../public/np_ready/application/lib/api'), +jest.mock('../../public/application/lib/api', () => ({ + ...jest.requireActual('../../public/application/lib/api'), loadIndexPatterns: async () => { const INDEX_PATTERNS = [ { attributes: { title: 'index1' } }, diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_edit.test.ts b/x-pack/plugins/watcher/__jest__/client_integration/watch_edit.test.ts similarity index 95% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_edit.test.ts rename to x-pack/plugins/watcher/__jest__/client_integration/watch_edit.test.ts index 131400a8702c46..545bfbdf7cbc28 100644 --- a/x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_edit.test.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/watch_edit.test.ts @@ -9,14 +9,14 @@ import axios from 'axios'; import { setupEnvironment, pageHelpers, nextTick, wrapBodyResponse } from './helpers'; import { WatchEditTestBed } from './helpers/watch_edit.helpers'; import { WATCH } from './helpers/constants'; -import defaultWatchJson from '../../public/np_ready/application/models/watch/default_watch.json'; +import defaultWatchJson from '../../public/application/models/watch/default_watch.json'; import { getWatch } from '../../test/fixtures'; -import { getRandomString } from '../../../../../test_utils'; +import { getRandomString } from '../../../../test_utils'; const mockHttpClient = axios.create({ adapter: axiosXhrAdapter }); -jest.mock('../../public/np_ready/application/lib/api', () => ({ - ...jest.requireActual('../../public/np_ready/application/lib/api'), +jest.mock('../../public/application/lib/api', () => ({ + ...jest.requireActual('../../public/application/lib/api'), loadIndexPatterns: async () => { const INDEX_PATTERNS = [ { attributes: { title: 'index1' } }, diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_list.test.ts b/x-pack/plugins/watcher/__jest__/client_integration/watch_list.test.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_list.test.ts rename to x-pack/plugins/watcher/__jest__/client_integration/watch_list.test.ts diff --git a/x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_status.test.ts b/x-pack/plugins/watcher/__jest__/client_integration/watch_status.test.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_status.test.ts rename to x-pack/plugins/watcher/__jest__/client_integration/watch_status.test.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/action_modes.ts b/x-pack/plugins/watcher/common/constants/action_modes.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/action_modes.ts rename to x-pack/plugins/watcher/common/constants/action_modes.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/action_states.ts b/x-pack/plugins/watcher/common/constants/action_states.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/action_states.ts rename to x-pack/plugins/watcher/common/constants/action_states.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/action_types.ts b/x-pack/plugins/watcher/common/constants/action_types.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/action_types.ts rename to x-pack/plugins/watcher/common/constants/action_types.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/agg_types.ts b/x-pack/plugins/watcher/common/constants/agg_types.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/agg_types.ts rename to x-pack/plugins/watcher/common/constants/agg_types.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/comparators.ts b/x-pack/plugins/watcher/common/constants/comparators.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/comparators.ts rename to x-pack/plugins/watcher/common/constants/comparators.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/error_codes.ts b/x-pack/plugins/watcher/common/constants/error_codes.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/error_codes.ts rename to x-pack/plugins/watcher/common/constants/error_codes.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/es_scroll_settings.ts b/x-pack/plugins/watcher/common/constants/es_scroll_settings.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/es_scroll_settings.ts rename to x-pack/plugins/watcher/common/constants/es_scroll_settings.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/index.ts b/x-pack/plugins/watcher/common/constants/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/index.ts rename to x-pack/plugins/watcher/common/constants/index.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/index_names.ts b/x-pack/plugins/watcher/common/constants/index_names.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/index_names.ts rename to x-pack/plugins/watcher/common/constants/index_names.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/lists.ts b/x-pack/plugins/watcher/common/constants/lists.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/lists.ts rename to x-pack/plugins/watcher/common/constants/lists.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/pagination.ts b/x-pack/plugins/watcher/common/constants/pagination.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/pagination.ts rename to x-pack/plugins/watcher/common/constants/pagination.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/plugin.ts b/x-pack/plugins/watcher/common/constants/plugin.ts similarity index 85% rename from x-pack/legacy/plugins/watcher/common/constants/plugin.ts rename to x-pack/plugins/watcher/common/constants/plugin.ts index a4279a0dd0c414..f89ef95e9261f5 100644 --- a/x-pack/legacy/plugins/watcher/common/constants/plugin.ts +++ b/x-pack/plugins/watcher/common/constants/plugin.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { LICENSE_TYPE_GOLD, LicenseType } from '../../../../common/constants'; +import { LICENSE_TYPE_GOLD, LicenseType } from '../../../../legacy/common/constants'; export const PLUGIN = { ID: 'watcher', diff --git a/x-pack/legacy/plugins/watcher/common/constants/refresh_intervals.ts b/x-pack/plugins/watcher/common/constants/refresh_intervals.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/refresh_intervals.ts rename to x-pack/plugins/watcher/common/constants/refresh_intervals.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/routes.ts b/x-pack/plugins/watcher/common/constants/routes.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/routes.ts rename to x-pack/plugins/watcher/common/constants/routes.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/sort_orders.ts b/x-pack/plugins/watcher/common/constants/sort_orders.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/sort_orders.ts rename to x-pack/plugins/watcher/common/constants/sort_orders.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/time_units.ts b/x-pack/plugins/watcher/common/constants/time_units.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/time_units.ts rename to x-pack/plugins/watcher/common/constants/time_units.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/watch_history.ts b/x-pack/plugins/watcher/common/constants/watch_history.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/watch_history.ts rename to x-pack/plugins/watcher/common/constants/watch_history.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/watch_state_comments.ts b/x-pack/plugins/watcher/common/constants/watch_state_comments.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/watch_state_comments.ts rename to x-pack/plugins/watcher/common/constants/watch_state_comments.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/watch_states.ts b/x-pack/plugins/watcher/common/constants/watch_states.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/watch_states.ts rename to x-pack/plugins/watcher/common/constants/watch_states.ts diff --git a/x-pack/legacy/plugins/watcher/common/constants/watch_types.ts b/x-pack/plugins/watcher/common/constants/watch_types.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/constants/watch_types.ts rename to x-pack/plugins/watcher/common/constants/watch_types.ts diff --git a/x-pack/legacy/plugins/watcher/common/lib/get_action_type/__tests__/get_action_type.js b/x-pack/plugins/watcher/common/lib/get_action_type/__tests__/get_action_type.js similarity index 97% rename from x-pack/legacy/plugins/watcher/common/lib/get_action_type/__tests__/get_action_type.js rename to x-pack/plugins/watcher/common/lib/get_action_type/__tests__/get_action_type.js index 164bbab285fce4..1410488ee64131 100644 --- a/x-pack/legacy/plugins/watcher/common/lib/get_action_type/__tests__/get_action_type.js +++ b/x-pack/plugins/watcher/common/lib/get_action_type/__tests__/get_action_type.js @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; import { getActionType } from '../get_action_type'; -import { ACTION_TYPES } from '../../../../common/constants'; +import { ACTION_TYPES } from '../../../constants'; describe('get_action_type', () => { describe('getActionType', () => { diff --git a/x-pack/legacy/plugins/watcher/common/lib/get_action_type/get_action_type.ts b/x-pack/plugins/watcher/common/lib/get_action_type/get_action_type.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/get_action_type/get_action_type.ts rename to x-pack/plugins/watcher/common/lib/get_action_type/get_action_type.ts diff --git a/x-pack/legacy/plugins/watcher/common/lib/get_action_type/index.ts b/x-pack/plugins/watcher/common/lib/get_action_type/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/get_action_type/index.ts rename to x-pack/plugins/watcher/common/lib/get_action_type/index.ts diff --git a/x-pack/legacy/plugins/watcher/common/lib/get_moment/__tests__/get_moment.js b/x-pack/plugins/watcher/common/lib/get_moment/__tests__/get_moment.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/get_moment/__tests__/get_moment.js rename to x-pack/plugins/watcher/common/lib/get_moment/__tests__/get_moment.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/get_moment/get_moment.js b/x-pack/plugins/watcher/common/lib/get_moment/get_moment.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/get_moment/get_moment.js rename to x-pack/plugins/watcher/common/lib/get_moment/get_moment.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/get_moment/index.js b/x-pack/plugins/watcher/common/lib/get_moment/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/get_moment/index.js rename to x-pack/plugins/watcher/common/lib/get_moment/index.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/index.d.ts b/x-pack/plugins/watcher/common/lib/serialization/index.d.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/index.d.ts rename to x-pack/plugins/watcher/common/lib/serialization/index.d.ts diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/index.js b/x-pack/plugins/watcher/common/lib/serialization/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/index.js rename to x-pack/plugins/watcher/common/lib/serialization/index.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_actions.js b/x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_actions.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_actions.js rename to x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_actions.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_condition.js b/x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_condition.js similarity index 98% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_condition.js rename to x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_condition.js index 472349b87fbc19..620859608bc267 100644 --- a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_condition.js +++ b/x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_condition.js @@ -5,7 +5,7 @@ */ import { singleLineScript } from './single_line_script'; -import { COMPARATORS } from '../../../../common/constants'; +import { COMPARATORS } from '../../../constants'; const { BETWEEN } = COMPARATORS; /* watch.condition.script.inline diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_input.js b/x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_input.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_input.js rename to x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_input.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_metadata.js b/x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_metadata.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_metadata.js rename to x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_metadata.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_transform.js b/x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_transform.js similarity index 98% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_transform.js rename to x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_transform.js index 1ac4adb8218040..1fcbd75aeaeea6 100644 --- a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_transform.js +++ b/x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_transform.js @@ -5,7 +5,7 @@ */ import { singleLineScript } from './single_line_script'; -import { COMPARATORS } from '../../../../common/constants'; +import { COMPARATORS } from '../../../constants'; const { BETWEEN } = COMPARATORS; /* watch.transform.script.inline diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_trigger.js b/x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_trigger.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/build_trigger.js rename to x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/build_trigger.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/index.js b/x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/index.js rename to x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/index.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/single_line_script.js b/x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/single_line_script.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/serialization_helpers/single_line_script.js rename to x-pack/plugins/watcher/common/lib/serialization/serialization_helpers/single_line_script.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialize_json_watch.js b/x-pack/plugins/watcher/common/lib/serialization/serialize_json_watch.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/serialize_json_watch.js rename to x-pack/plugins/watcher/common/lib/serialization/serialize_json_watch.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialize_json_watch.test.js b/x-pack/plugins/watcher/common/lib/serialization/serialize_json_watch.test.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/serialize_json_watch.test.js rename to x-pack/plugins/watcher/common/lib/serialization/serialize_json_watch.test.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialize_threshold_watch.js b/x-pack/plugins/watcher/common/lib/serialization/serialize_threshold_watch.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/serialize_threshold_watch.js rename to x-pack/plugins/watcher/common/lib/serialization/serialize_threshold_watch.js diff --git a/x-pack/legacy/plugins/watcher/common/lib/serialization/serialize_threshold_watch.test.js b/x-pack/plugins/watcher/common/lib/serialization/serialize_threshold_watch.test.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/lib/serialization/serialize_threshold_watch.test.js rename to x-pack/plugins/watcher/common/lib/serialization/serialize_threshold_watch.test.js diff --git a/x-pack/legacy/plugins/watcher/common/models/action/action.js b/x-pack/plugins/watcher/common/models/action/action.js similarity index 92% rename from x-pack/legacy/plugins/watcher/common/models/action/action.js rename to x-pack/plugins/watcher/common/models/action/action.js index e66a63eaed1862..0375b6ebf5d475 100644 --- a/x-pack/legacy/plugins/watcher/common/models/action/action.js +++ b/x-pack/plugins/watcher/common/models/action/action.js @@ -5,8 +5,8 @@ */ import { set } from 'lodash'; -import { getActionType } from '../../../common/lib/get_action_type'; -import { ACTION_TYPES } from '../../../common/constants'; +import { getActionType } from '../../lib/get_action_type'; +import { ACTION_TYPES } from '../../constants'; import { LoggingAction } from './logging_action'; import { EmailAction } from './email_action'; import { SlackAction } from './slack_action'; diff --git a/x-pack/legacy/plugins/watcher/common/models/action/action.test.js b/x-pack/plugins/watcher/common/models/action/action.test.js similarity index 97% rename from x-pack/legacy/plugins/watcher/common/models/action/action.test.js rename to x-pack/plugins/watcher/common/models/action/action.test.js index ee1265cd2edeec..8a5f47fe0e5caf 100644 --- a/x-pack/legacy/plugins/watcher/common/models/action/action.test.js +++ b/x-pack/plugins/watcher/common/models/action/action.test.js @@ -5,7 +5,7 @@ */ import { Action } from './action'; -import { ACTION_TYPES } from '../../../common/constants'; +import { ACTION_TYPES } from '../../constants'; jest.mock('./logging_action', () => ({ LoggingAction: { diff --git a/x-pack/legacy/plugins/watcher/common/models/action/base_action.js b/x-pack/plugins/watcher/common/models/action/base_action.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/models/action/base_action.js rename to x-pack/plugins/watcher/common/models/action/base_action.js diff --git a/x-pack/legacy/plugins/watcher/common/models/action/email_action.js b/x-pack/plugins/watcher/common/models/action/email_action.js similarity index 98% rename from x-pack/legacy/plugins/watcher/common/models/action/email_action.js rename to x-pack/plugins/watcher/common/models/action/email_action.js index de948100951ad1..918a2d125c09a1 100644 --- a/x-pack/legacy/plugins/watcher/common/models/action/email_action.js +++ b/x-pack/plugins/watcher/common/models/action/email_action.js @@ -5,7 +5,7 @@ */ import { BaseAction } from './base_action'; -import { ACTION_TYPES, ERROR_CODES } from '../../../common/constants'; +import { ACTION_TYPES, ERROR_CODES } from '../../constants'; import { i18n } from '@kbn/i18n'; export class EmailAction extends BaseAction { diff --git a/x-pack/legacy/plugins/watcher/common/models/action/index.js b/x-pack/plugins/watcher/common/models/action/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/common/models/action/index.js rename to x-pack/plugins/watcher/common/models/action/index.js diff --git a/x-pack/legacy/plugins/watcher/common/models/action/index_action.js b/x-pack/plugins/watcher/common/models/action/index_action.js similarity index 97% rename from x-pack/legacy/plugins/watcher/common/models/action/index_action.js rename to x-pack/plugins/watcher/common/models/action/index_action.js index 73932079977fd6..3db4e4f9b0dabd 100644 --- a/x-pack/legacy/plugins/watcher/common/models/action/index_action.js +++ b/x-pack/plugins/watcher/common/models/action/index_action.js @@ -5,7 +5,7 @@ */ import { BaseAction } from './base_action'; -import { ACTION_TYPES, ERROR_CODES } from '../../../common/constants'; +import { ACTION_TYPES, ERROR_CODES } from '../../constants'; import { i18n } from '@kbn/i18n'; export class IndexAction extends BaseAction { diff --git a/x-pack/legacy/plugins/watcher/common/models/action/jira_action.js b/x-pack/plugins/watcher/common/models/action/jira_action.js similarity index 98% rename from x-pack/legacy/plugins/watcher/common/models/action/jira_action.js rename to x-pack/plugins/watcher/common/models/action/jira_action.js index 75fa60986c49a3..87bca6c480229f 100644 --- a/x-pack/legacy/plugins/watcher/common/models/action/jira_action.js +++ b/x-pack/plugins/watcher/common/models/action/jira_action.js @@ -5,7 +5,7 @@ */ import { BaseAction } from './base_action'; -import { ACTION_TYPES, ERROR_CODES } from '../../../common/constants'; +import { ACTION_TYPES, ERROR_CODES } from '../../constants'; import { i18n } from '@kbn/i18n'; import { get } from 'lodash'; diff --git a/x-pack/legacy/plugins/watcher/common/models/action/logging_action.js b/x-pack/plugins/watcher/common/models/action/logging_action.js similarity index 97% rename from x-pack/legacy/plugins/watcher/common/models/action/logging_action.js rename to x-pack/plugins/watcher/common/models/action/logging_action.js index c3754b7ace2384..e9dd0b3d7ddfb5 100644 --- a/x-pack/legacy/plugins/watcher/common/models/action/logging_action.js +++ b/x-pack/plugins/watcher/common/models/action/logging_action.js @@ -5,7 +5,7 @@ */ import { BaseAction } from './base_action'; -import { ACTION_TYPES, ERROR_CODES } from '../../../common/constants'; +import { ACTION_TYPES, ERROR_CODES } from '../../constants'; import { i18n } from '@kbn/i18n'; export class LoggingAction extends BaseAction { diff --git a/x-pack/legacy/plugins/watcher/common/models/action/pagerduty_action.js b/x-pack/plugins/watcher/common/models/action/pagerduty_action.js similarity index 97% rename from x-pack/legacy/plugins/watcher/common/models/action/pagerduty_action.js rename to x-pack/plugins/watcher/common/models/action/pagerduty_action.js index cc15d10f7c6225..b92fbf55bda16c 100644 --- a/x-pack/legacy/plugins/watcher/common/models/action/pagerduty_action.js +++ b/x-pack/plugins/watcher/common/models/action/pagerduty_action.js @@ -5,7 +5,7 @@ */ import { BaseAction } from './base_action'; -import { ACTION_TYPES, ERROR_CODES } from '../../../common/constants'; +import { ACTION_TYPES, ERROR_CODES } from '../../constants'; import { i18n } from '@kbn/i18n'; export class PagerDutyAction extends BaseAction { diff --git a/x-pack/legacy/plugins/watcher/common/models/action/slack_action.js b/x-pack/plugins/watcher/common/models/action/slack_action.js similarity index 97% rename from x-pack/legacy/plugins/watcher/common/models/action/slack_action.js rename to x-pack/plugins/watcher/common/models/action/slack_action.js index a1986977c4633e..24caa9ccfd5816 100644 --- a/x-pack/legacy/plugins/watcher/common/models/action/slack_action.js +++ b/x-pack/plugins/watcher/common/models/action/slack_action.js @@ -5,7 +5,7 @@ */ import { BaseAction } from './base_action'; -import { ACTION_TYPES, ERROR_CODES } from '../../../common/constants'; +import { ACTION_TYPES, ERROR_CODES } from '../../constants'; import { i18n } from '@kbn/i18n'; export class SlackAction extends BaseAction { diff --git a/x-pack/legacy/plugins/watcher/common/models/action/unknown_action.js b/x-pack/plugins/watcher/common/models/action/unknown_action.js similarity index 96% rename from x-pack/legacy/plugins/watcher/common/models/action/unknown_action.js rename to x-pack/plugins/watcher/common/models/action/unknown_action.js index 95ed542e66fa55..4f304be2d58b6d 100644 --- a/x-pack/legacy/plugins/watcher/common/models/action/unknown_action.js +++ b/x-pack/plugins/watcher/common/models/action/unknown_action.js @@ -5,7 +5,7 @@ */ import { BaseAction } from './base_action'; -import { ACTION_TYPES, ERROR_CODES } from '../../../common/constants'; +import { ACTION_TYPES, ERROR_CODES } from '../../constants'; import { i18n } from '@kbn/i18n'; export class UnknownAction extends BaseAction { diff --git a/x-pack/legacy/plugins/watcher/common/models/action/webhook_action.js b/x-pack/plugins/watcher/common/models/action/webhook_action.js similarity index 98% rename from x-pack/legacy/plugins/watcher/common/models/action/webhook_action.js rename to x-pack/plugins/watcher/common/models/action/webhook_action.js index d6f921a75a9ea3..f0e9fc9fc44df5 100644 --- a/x-pack/legacy/plugins/watcher/common/models/action/webhook_action.js +++ b/x-pack/plugins/watcher/common/models/action/webhook_action.js @@ -5,7 +5,7 @@ */ import { BaseAction } from './base_action'; -import { ACTION_TYPES, ERROR_CODES } from '../../../common/constants'; +import { ACTION_TYPES, ERROR_CODES } from '../../constants'; import { i18n } from '@kbn/i18n'; export class WebhookAction extends BaseAction { diff --git a/x-pack/legacy/plugins/watcher/common/types/action_types.ts b/x-pack/plugins/watcher/common/types/action_types.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/types/action_types.ts rename to x-pack/plugins/watcher/common/types/action_types.ts diff --git a/x-pack/legacy/plugins/watcher/index.js b/x-pack/plugins/watcher/common/types/license_status.ts similarity index 65% rename from x-pack/legacy/plugins/watcher/index.js rename to x-pack/plugins/watcher/common/types/license_status.ts index 64237b532ea8d5..3872559fc00662 100644 --- a/x-pack/legacy/plugins/watcher/index.js +++ b/x-pack/plugins/watcher/common/types/license_status.ts @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { pluginDefinition } from './plugin_definition'; - -export const watcher = kibana => new kibana.Plugin(pluginDefinition); +export interface LicenseStatus { + valid: boolean; + message?: string; +} diff --git a/x-pack/legacy/plugins/watcher/common/types/watch_types.ts b/x-pack/plugins/watcher/common/types/watch_types.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/common/types/watch_types.ts rename to x-pack/plugins/watcher/common/types/watch_types.ts diff --git a/x-pack/legacy/plugins/watcher/kibana.json b/x-pack/plugins/watcher/kibana.json similarity index 58% rename from x-pack/legacy/plugins/watcher/kibana.json rename to x-pack/plugins/watcher/kibana.json index ccec8a1b776836..93a28f8f59ed5a 100644 --- a/x-pack/legacy/plugins/watcher/kibana.json +++ b/x-pack/plugins/watcher/kibana.json @@ -2,7 +2,11 @@ "id": "watcher", "version": "kibana", "requiredPlugins": [ - "home" + "home", + "licensing", + "management", + "eui_utils", + "data" ], "server": true, "ui": true diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/app.tsx b/x-pack/plugins/watcher/public/application/app.tsx similarity index 89% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/app.tsx rename to x-pack/plugins/watcher/public/application/app.tsx index 36fa1cce9d6ddc..83501eca1429b1 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/app.tsx +++ b/x-pack/plugins/watcher/public/application/app.tsx @@ -11,9 +11,8 @@ import { HttpSetup, ToastsSetup, IUiSettingsClient, -} from 'src/core/public'; +} from 'kibana/public'; -import { EuiCallOut, EuiLink } from '@elastic/eui'; import { HashRouter, Switch, @@ -22,15 +21,18 @@ import { withRouter, RouteComponentProps, } from 'react-router-dom'; + +import { EuiCallOut, EuiLink } from '@elastic/eui'; + import { FormattedMessage } from '@kbn/i18n/react'; + +import { LicenseStatus } from '../../common/types/license_status'; import { WatchStatus } from './sections/watch_status/components/watch_status'; import { WatchEdit } from './sections/watch_edit/components/watch_edit'; import { WatchList } from './sections/watch_list/components/watch_list'; import { registerRouter } from './lib/navigation'; import { BASE_PATH } from './constants'; -import { LICENSE_STATUS_VALID } from '../../../../../common/constants'; import { AppContextProvider } from './app_context'; -import { LegacyDependencies } from '../types'; const ShareRouter = withRouter(({ children, history }: RouteComponentProps & { children: any }) => { registerRouter({ history }); @@ -43,14 +45,16 @@ export interface AppDeps { toasts: ToastsSetup; http: HttpSetup; uiSettings: IUiSettingsClient; - legacy: LegacyDependencies; euiUtils: any; + createTimeBuckets: () => any; + getLicenseStatus: () => LicenseStatus; + MANAGEMENT_BREADCRUMB: any; } export const App = (deps: AppDeps) => { - const { status, message } = deps.legacy.licenseStatus; + const { valid, message } = deps.getLicenseStatus(); - if (status !== LICENSE_STATUS_VALID) { + if (!valid) { return ( { defaultMessage="License error" /> } - color="warning" + color="danger" iconType="help" > {message}{' '} @@ -72,7 +76,6 @@ export const App = (deps: AppDeps) => { ); } - return ( diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/app_context.tsx b/x-pack/plugins/watcher/public/application/app_context.tsx similarity index 94% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/app_context.tsx rename to x-pack/plugins/watcher/public/application/app_context.tsx index 5696ab3cb91ba1..e5cf4c33b477ac 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/app_context.tsx +++ b/x-pack/plugins/watcher/public/application/app_context.tsx @@ -5,8 +5,8 @@ */ import React, { createContext, useContext } from 'react'; -import { DocLinksStart } from 'src/core/public'; -import { ACTION_TYPES } from '../../../common/constants'; +import { DocLinksStart } from 'kibana/public'; +import { ACTION_TYPES } from '../../common/constants'; import { AppDeps } from './app'; interface ContextValue extends Omit { diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/boot.tsx b/x-pack/plugins/watcher/public/application/boot.tsx similarity index 70% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/boot.tsx rename to x-pack/plugins/watcher/public/application/boot.tsx index 3f2a10f0046495..8461bd65bbd5e5 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/boot.tsx +++ b/x-pack/plugins/watcher/public/application/boot.tsx @@ -6,30 +6,30 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; -import { SavedObjectsClientContract } from 'src/core/public'; +import { SavedObjectsClientContract } from 'kibana/public'; import { App, AppDeps } from './app'; import { setHttpClient, setSavedObjectsClient } from './lib/api'; -import { LegacyDependencies } from '../types'; interface BootDeps extends AppDeps { element: HTMLElement; savedObjects: SavedObjectsClientContract; I18nContext: any; - legacy: LegacyDependencies; } export const boot = (bootDeps: BootDeps) => { - const { I18nContext, element, legacy, savedObjects, ...appDeps } = bootDeps; + const { I18nContext, element, savedObjects, ...appDeps } = bootDeps; setHttpClient(appDeps.http); setSavedObjectsClient(savedObjects); render( - + , element ); - return () => unmountComponentAtNode(element); + return () => { + unmountComponentAtNode(element); + }; }; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/components/confirm_watches_modal.tsx b/x-pack/plugins/watcher/public/application/components/confirm_watches_modal.tsx similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/components/confirm_watches_modal.tsx rename to x-pack/plugins/watcher/public/application/components/confirm_watches_modal.tsx diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/components/delete_watches_modal.tsx b/x-pack/plugins/watcher/public/application/components/delete_watches_modal.tsx similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/components/delete_watches_modal.tsx rename to x-pack/plugins/watcher/public/application/components/delete_watches_modal.tsx diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/components/form_errors.tsx b/x-pack/plugins/watcher/public/application/components/form_errors.tsx similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/components/form_errors.tsx rename to x-pack/plugins/watcher/public/application/components/form_errors.tsx diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/components/index.ts b/x-pack/plugins/watcher/public/application/components/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/components/index.ts rename to x-pack/plugins/watcher/public/application/components/index.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/components/page_error/index.ts b/x-pack/plugins/watcher/public/application/components/page_error/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/components/page_error/index.ts rename to x-pack/plugins/watcher/public/application/components/page_error/index.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/components/page_error/page_error.tsx b/x-pack/plugins/watcher/public/application/components/page_error/page_error.tsx similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/components/page_error/page_error.tsx rename to x-pack/plugins/watcher/public/application/components/page_error/page_error.tsx diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/components/page_error/page_error_forbidden.tsx b/x-pack/plugins/watcher/public/application/components/page_error/page_error_forbidden.tsx similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/components/page_error/page_error_forbidden.tsx rename to x-pack/plugins/watcher/public/application/components/page_error/page_error_forbidden.tsx diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/components/page_error/page_error_not_exist.tsx b/x-pack/plugins/watcher/public/application/components/page_error/page_error_not_exist.tsx similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/components/page_error/page_error_not_exist.tsx rename to x-pack/plugins/watcher/public/application/components/page_error/page_error_not_exist.tsx diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/components/section_error.tsx b/x-pack/plugins/watcher/public/application/components/section_error.tsx similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/components/section_error.tsx rename to x-pack/plugins/watcher/public/application/components/section_error.tsx diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/components/section_loading.tsx b/x-pack/plugins/watcher/public/application/components/section_loading.tsx similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/components/section_loading.tsx rename to x-pack/plugins/watcher/public/application/components/section_loading.tsx diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/components/watch_status.tsx b/x-pack/plugins/watcher/public/application/components/watch_status.tsx similarity index 95% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/components/watch_status.tsx rename to x-pack/plugins/watcher/public/application/components/watch_status.tsx index a254f43723877a..088f476dfb4cf3 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/components/watch_status.tsx +++ b/x-pack/plugins/watcher/public/application/components/watch_status.tsx @@ -6,7 +6,7 @@ import React from 'react'; import { EuiIcon, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; -import { ACTION_STATES, WATCH_STATES } from '../../../../common/constants'; +import { ACTION_STATES, WATCH_STATES } from '../../../common/constants'; function StatusIcon({ status }: { status: string }) { switch (status) { diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/constants/base_path.ts b/x-pack/plugins/watcher/public/application/constants/base_path.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/constants/base_path.ts rename to x-pack/plugins/watcher/public/application/constants/base_path.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/constants/index.ts b/x-pack/plugins/watcher/public/application/constants/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/constants/index.ts rename to x-pack/plugins/watcher/public/application/constants/index.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/lib/api.ts b/x-pack/plugins/watcher/public/application/lib/api.ts similarity index 88% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/lib/api.ts rename to x-pack/plugins/watcher/public/application/lib/api.ts index c08545904e3516..82ec2925ba6dca 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/lib/api.ts +++ b/x-pack/plugins/watcher/public/application/lib/api.ts @@ -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 { HttpSetup, SavedObjectsClientContract } from 'src/core/public'; -import { Settings } from 'plugins/watcher/np_ready/application/models/settings'; -import { Watch } from 'plugins/watcher/np_ready/application/models/watch'; -import { WatchHistoryItem } from 'plugins/watcher/np_ready/application/models/watch_history_item'; -import { WatchStatus } from 'plugins/watcher/np_ready/application/models/watch_status'; +import { HttpSetup, SavedObjectsClientContract } from 'kibana/public'; -import { BaseWatch, ExecutedWatchDetails } from '../../../../common/types/watch_types'; +import { Settings } from '../models/settings'; +import { Watch } from '../models/watch'; +import { WatchHistoryItem } from '../models/watch_history_item'; +import { WatchStatus } from '../models/watch_status'; + +import { BaseWatch, ExecutedWatchDetails } from '../../../common/types/watch_types'; import { useRequest, sendRequest } from './use_request'; -import { ROUTES } from '../../../../common/constants'; +import { ROUTES } from '../../../common/constants'; let httpClient: HttpSetup; @@ -155,7 +156,7 @@ export const useGetWatchVisualizationData = (watchModel: BaseWatch, visualizeOpt watch: watchModel.upstreamJson, options: visualizeOptions.upstreamJson, }), - deserializer: ({ visualizeData }: { visualizeData: any }) => visualizeData, + deserializer: (data: { visualizeData: any }) => data?.visualizeData, }); }; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/lib/breadcrumbs.ts b/x-pack/plugins/watcher/public/application/lib/breadcrumbs.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/lib/breadcrumbs.ts rename to x-pack/plugins/watcher/public/application/lib/breadcrumbs.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/lib/format_date.ts b/x-pack/plugins/watcher/public/application/lib/format_date.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/lib/format_date.ts rename to x-pack/plugins/watcher/public/application/lib/format_date.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/lib/get_search_value.ts b/x-pack/plugins/watcher/public/application/lib/get_search_value.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/lib/get_search_value.ts rename to x-pack/plugins/watcher/public/application/lib/get_search_value.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/lib/get_time_unit_label.ts b/x-pack/plugins/watcher/public/application/lib/get_time_unit_label.ts similarity index 95% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/lib/get_time_unit_label.ts rename to x-pack/plugins/watcher/public/application/lib/get_time_unit_label.ts index ce3b96ac17def3..5cb78b61488b73 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/lib/get_time_unit_label.ts +++ b/x-pack/plugins/watcher/public/application/lib/get_time_unit_label.ts @@ -5,7 +5,7 @@ */ import { i18n } from '@kbn/i18n'; -import { TIME_UNITS } from '../../../../common/constants'; +import { TIME_UNITS } from '../../../common/constants'; export function getTimeUnitLabel(timeUnit = TIME_UNITS.SECOND, timeValue = '0') { switch (timeUnit) { diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/lib/navigation.ts b/x-pack/plugins/watcher/public/application/lib/navigation.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/lib/navigation.ts rename to x-pack/plugins/watcher/public/application/lib/navigation.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/lib/use_request.ts b/x-pack/plugins/watcher/public/application/lib/use_request.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/lib/use_request.ts rename to x-pack/plugins/watcher/public/application/lib/use_request.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/action.js b/x-pack/plugins/watcher/public/application/models/action/action.js similarity index 95% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/action.js rename to x-pack/plugins/watcher/public/application/models/action/action.js index 5d5c44d7ae5341..43874c9ee1dd1a 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/action.js +++ b/x-pack/plugins/watcher/public/application/models/action/action.js @@ -5,7 +5,7 @@ */ import { get, set } from 'lodash'; -import { ACTION_TYPES } from '../../../../../common/constants'; +import { ACTION_TYPES } from '../../../../common/constants'; import { EmailAction } from './email_action'; import { LoggingAction } from './logging_action'; import { SlackAction } from './slack_action'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/base_action.js b/x-pack/plugins/watcher/public/application/models/action/base_action.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/base_action.js rename to x-pack/plugins/watcher/public/application/models/action/base_action.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/email_action.js b/x-pack/plugins/watcher/public/application/models/action/email_action.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/email_action.js rename to x-pack/plugins/watcher/public/application/models/action/email_action.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/types.ts b/x-pack/plugins/watcher/public/application/models/action/index.d.ts similarity index 63% rename from x-pack/legacy/plugins/watcher/public/np_ready/types.ts rename to x-pack/plugins/watcher/public/application/models/action/index.d.ts index 22109f99c2c48b..5415194b729583 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/types.ts +++ b/x-pack/plugins/watcher/public/application/models/action/index.d.ts @@ -4,8 +4,4 @@ * you may not use this file except in compliance with the Elastic License. */ -export interface LegacyDependencies { - MANAGEMENT_BREADCRUMB: { text: string; href?: string }; - TimeBuckets: any; - licenseStatus: any; -} +export const Action: any; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/index.js b/x-pack/plugins/watcher/public/application/models/action/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/index.js rename to x-pack/plugins/watcher/public/application/models/action/index.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/index_action.js b/x-pack/plugins/watcher/public/application/models/action/index_action.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/index_action.js rename to x-pack/plugins/watcher/public/application/models/action/index_action.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/jira_action.js b/x-pack/plugins/watcher/public/application/models/action/jira_action.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/jira_action.js rename to x-pack/plugins/watcher/public/application/models/action/jira_action.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/logging_action.js b/x-pack/plugins/watcher/public/application/models/action/logging_action.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/logging_action.js rename to x-pack/plugins/watcher/public/application/models/action/logging_action.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/pagerduty_action.js b/x-pack/plugins/watcher/public/application/models/action/pagerduty_action.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/pagerduty_action.js rename to x-pack/plugins/watcher/public/application/models/action/pagerduty_action.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/slack_action.js b/x-pack/plugins/watcher/public/application/models/action/slack_action.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/slack_action.js rename to x-pack/plugins/watcher/public/application/models/action/slack_action.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/unknown_action.js b/x-pack/plugins/watcher/public/application/models/action/unknown_action.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/unknown_action.js rename to x-pack/plugins/watcher/public/application/models/action/unknown_action.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/webhook_action.js b/x-pack/plugins/watcher/public/application/models/action/webhook_action.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action/webhook_action.js rename to x-pack/plugins/watcher/public/application/models/action/webhook_action.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action_status/action_status.js b/x-pack/plugins/watcher/public/application/models/action_status/action_status.js similarity index 95% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action_status/action_status.js rename to x-pack/plugins/watcher/public/application/models/action_status/action_status.js index b177eb5bb22914..f38fa23b68f5a8 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action_status/action_status.js +++ b/x-pack/plugins/watcher/public/application/models/action_status/action_status.js @@ -5,7 +5,7 @@ */ import { get } from 'lodash'; -import { getMoment } from '../../../../../common/lib/get_moment'; +import { getMoment } from '../../../../common/lib/get_moment'; export class ActionStatus { constructor(props = {}) { diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/action_status/index.js b/x-pack/plugins/watcher/public/application/models/action_status/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/action_status/index.js rename to x-pack/plugins/watcher/public/application/models/action_status/index.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/execute_details/execute_details.js b/x-pack/plugins/watcher/public/application/models/execute_details/execute_details.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/execute_details/execute_details.js rename to x-pack/plugins/watcher/public/application/models/execute_details/execute_details.js diff --git a/x-pack/plugins/watcher/public/application/models/execute_details/index.d.ts b/x-pack/plugins/watcher/public/application/models/execute_details/index.d.ts new file mode 100644 index 00000000000000..417c073cf05681 --- /dev/null +++ b/x-pack/plugins/watcher/public/application/models/execute_details/index.d.ts @@ -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 ExecuteDetails: any; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/execute_details/index.js b/x-pack/plugins/watcher/public/application/models/execute_details/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/execute_details/index.js rename to x-pack/plugins/watcher/public/application/models/execute_details/index.js diff --git a/x-pack/plugins/watcher/public/application/models/settings/index.d.ts b/x-pack/plugins/watcher/public/application/models/settings/index.d.ts new file mode 100644 index 00000000000000..92a5de1df413ce --- /dev/null +++ b/x-pack/plugins/watcher/public/application/models/settings/index.d.ts @@ -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 Settings: any; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/settings/index.js b/x-pack/plugins/watcher/public/application/models/settings/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/settings/index.js rename to x-pack/plugins/watcher/public/application/models/settings/index.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/settings/settings.js b/x-pack/plugins/watcher/public/application/models/settings/settings.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/settings/settings.js rename to x-pack/plugins/watcher/public/application/models/settings/settings.js diff --git a/x-pack/plugins/watcher/public/application/models/visualize_options/index.d.ts b/x-pack/plugins/watcher/public/application/models/visualize_options/index.d.ts new file mode 100644 index 00000000000000..cea10ff1e10460 --- /dev/null +++ b/x-pack/plugins/watcher/public/application/models/visualize_options/index.d.ts @@ -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 VisualizeOptions: any; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/visualize_options/index.js b/x-pack/plugins/watcher/public/application/models/visualize_options/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/visualize_options/index.js rename to x-pack/plugins/watcher/public/application/models/visualize_options/index.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/visualize_options/visualize_options.js b/x-pack/plugins/watcher/public/application/models/visualize_options/visualize_options.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/visualize_options/visualize_options.js rename to x-pack/plugins/watcher/public/application/models/visualize_options/visualize_options.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/agg_types.ts b/x-pack/plugins/watcher/public/application/models/watch/agg_types.ts similarity index 94% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/agg_types.ts rename to x-pack/plugins/watcher/public/application/models/watch/agg_types.ts index cefaaa3b1abd3a..d2b1ddebf12a27 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/agg_types.ts +++ b/x-pack/plugins/watcher/public/application/models/watch/agg_types.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AGG_TYPES } from '../../../../../common/constants'; +import { AGG_TYPES } from '../../../../common/constants'; export interface AggType { text: string; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/base_watch.js b/x-pack/plugins/watcher/public/application/models/watch/base_watch.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/base_watch.js rename to x-pack/plugins/watcher/public/application/models/watch/base_watch.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/comparators.ts b/x-pack/plugins/watcher/public/application/models/watch/comparators.ts similarity index 96% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/comparators.ts rename to x-pack/plugins/watcher/public/application/models/watch/comparators.ts index edc3a03c252271..96904719098a0c 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/comparators.ts +++ b/x-pack/plugins/watcher/public/application/models/watch/comparators.ts @@ -6,7 +6,7 @@ import { i18n } from '@kbn/i18n'; -import { COMPARATORS } from '../../../../../common/constants'; +import { COMPARATORS } from '../../../../common/constants'; export interface Comparator { text: string; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/default_watch.json b/x-pack/plugins/watcher/public/application/models/watch/default_watch.json similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/default_watch.json rename to x-pack/plugins/watcher/public/application/models/watch/default_watch.json diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/group_by_types.ts b/x-pack/plugins/watcher/public/application/models/watch/group_by_types.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/group_by_types.ts rename to x-pack/plugins/watcher/public/application/models/watch/group_by_types.ts diff --git a/x-pack/plugins/watcher/public/application/models/watch/index.d.ts b/x-pack/plugins/watcher/public/application/models/watch/index.d.ts new file mode 100644 index 00000000000000..73ee2279d3912f --- /dev/null +++ b/x-pack/plugins/watcher/public/application/models/watch/index.d.ts @@ -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 Watch: any; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/index.js b/x-pack/plugins/watcher/public/application/models/watch/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/index.js rename to x-pack/plugins/watcher/public/application/models/watch/index.js diff --git a/x-pack/plugins/watcher/public/application/models/watch/json_watch.d.ts b/x-pack/plugins/watcher/public/application/models/watch/json_watch.d.ts new file mode 100644 index 00000000000000..cef21880e63466 --- /dev/null +++ b/x-pack/plugins/watcher/public/application/models/watch/json_watch.d.ts @@ -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 JsonWatch: any; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/json_watch.js b/x-pack/plugins/watcher/public/application/models/watch/json_watch.js similarity index 98% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/json_watch.js rename to x-pack/plugins/watcher/public/application/models/watch/json_watch.js index 2d18c233ed5b45..19d016fcc48eb5 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/json_watch.js +++ b/x-pack/plugins/watcher/public/application/models/watch/json_watch.js @@ -7,7 +7,7 @@ import uuid from 'uuid'; import { get } from 'lodash'; import { BaseWatch } from './base_watch'; -import { ACTION_TYPES, WATCH_TYPES } from '../../../../../common/constants'; +import { ACTION_TYPES, WATCH_TYPES } from '../../../../common/constants'; import defaultWatchJson from './default_watch.json'; import { i18n } from '@kbn/i18n'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/lib/check_action_id_collision/check_action_id_collision.js b/x-pack/plugins/watcher/public/application/models/watch/lib/check_action_id_collision/check_action_id_collision.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/lib/check_action_id_collision/check_action_id_collision.js rename to x-pack/plugins/watcher/public/application/models/watch/lib/check_action_id_collision/check_action_id_collision.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/lib/check_action_id_collision/index.js b/x-pack/plugins/watcher/public/application/models/watch/lib/check_action_id_collision/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/lib/check_action_id_collision/index.js rename to x-pack/plugins/watcher/public/application/models/watch/lib/check_action_id_collision/index.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/lib/create_action_id/create_action_id.js b/x-pack/plugins/watcher/public/application/models/watch/lib/create_action_id/create_action_id.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/lib/create_action_id/create_action_id.js rename to x-pack/plugins/watcher/public/application/models/watch/lib/create_action_id/create_action_id.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/lib/create_action_id/index.js b/x-pack/plugins/watcher/public/application/models/watch/lib/create_action_id/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/lib/create_action_id/index.js rename to x-pack/plugins/watcher/public/application/models/watch/lib/create_action_id/index.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/monitoring_watch.js b/x-pack/plugins/watcher/public/application/models/watch/monitoring_watch.js similarity index 92% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/monitoring_watch.js rename to x-pack/plugins/watcher/public/application/models/watch/monitoring_watch.js index 850953ebd963e7..82cdffc79edc42 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/monitoring_watch.js +++ b/x-pack/plugins/watcher/public/application/models/watch/monitoring_watch.js @@ -5,7 +5,7 @@ */ import { BaseWatch } from './base_watch'; -import { WATCH_TYPES } from '../../../../../common/constants'; +import { WATCH_TYPES } from '../../../../common/constants'; /** * {@code MonitoringWatch} system defined watches created by the Monitoring plugin. diff --git a/x-pack/plugins/watcher/public/application/models/watch/threshold_watch.d.ts b/x-pack/plugins/watcher/public/application/models/watch/threshold_watch.d.ts new file mode 100644 index 00000000000000..ae85ae01304d6e --- /dev/null +++ b/x-pack/plugins/watcher/public/application/models/watch/threshold_watch.d.ts @@ -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 ThresholdWatch: any; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/threshold_watch.js b/x-pack/plugins/watcher/public/application/models/watch/threshold_watch.js similarity index 99% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/threshold_watch.js rename to x-pack/plugins/watcher/public/application/models/watch/threshold_watch.js index 2383388dd89bf2..c9db4237942b00 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/threshold_watch.js +++ b/x-pack/plugins/watcher/public/application/models/watch/threshold_watch.js @@ -6,7 +6,7 @@ import { BaseWatch } from './base_watch'; import uuid from 'uuid'; -import { WATCH_TYPES, SORT_ORDERS, COMPARATORS } from '../../../../../common/constants'; +import { WATCH_TYPES, SORT_ORDERS, COMPARATORS } from '../../../../common/constants'; import { getTimeUnitLabel } from '../../lib/get_time_unit_label'; import { i18n } from '@kbn/i18n'; import { aggTypes } from './agg_types'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/watch.js b/x-pack/plugins/watcher/public/application/models/watch/watch.js similarity index 93% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/watch.js rename to x-pack/plugins/watcher/public/application/models/watch/watch.js index fc33fab56d07c2..934d1e338ed0c6 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch/watch.js +++ b/x-pack/plugins/watcher/public/application/models/watch/watch.js @@ -5,7 +5,7 @@ */ import { get, set } from 'lodash'; -import { WATCH_TYPES } from '../../../../../common/constants'; +import { WATCH_TYPES } from '../../../../common/constants'; import { JsonWatch } from './json_watch'; import { ThresholdWatch } from './threshold_watch'; import { MonitoringWatch } from './monitoring_watch'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_errors/index.js b/x-pack/plugins/watcher/public/application/models/watch_errors/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_errors/index.js rename to x-pack/plugins/watcher/public/application/models/watch_errors/index.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_errors/watch_errors.js b/x-pack/plugins/watcher/public/application/models/watch_errors/watch_errors.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_errors/watch_errors.js rename to x-pack/plugins/watcher/public/application/models/watch_errors/watch_errors.js diff --git a/x-pack/plugins/watcher/public/application/models/watch_history_item/index.d.ts b/x-pack/plugins/watcher/public/application/models/watch_history_item/index.d.ts new file mode 100644 index 00000000000000..48fe71e2c55c03 --- /dev/null +++ b/x-pack/plugins/watcher/public/application/models/watch_history_item/index.d.ts @@ -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 WatchHistoryItem: any; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_history_item/index.js b/x-pack/plugins/watcher/public/application/models/watch_history_item/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_history_item/index.js rename to x-pack/plugins/watcher/public/application/models/watch_history_item/index.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_history_item/watch_history_item.js b/x-pack/plugins/watcher/public/application/models/watch_history_item/watch_history_item.js similarity index 91% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_history_item/watch_history_item.js rename to x-pack/plugins/watcher/public/application/models/watch_history_item/watch_history_item.js index 785f9d19b23dd9..36fa9fa5aefe27 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_history_item/watch_history_item.js +++ b/x-pack/plugins/watcher/public/application/models/watch_history_item/watch_history_item.js @@ -6,7 +6,7 @@ import 'moment-duration-format'; import { get } from 'lodash'; -import { getMoment } from '../../../../../common/lib/get_moment'; +import { getMoment } from '../../../../common/lib/get_moment'; import { WatchStatus } from '../watch_status'; export class WatchHistoryItem { diff --git a/x-pack/plugins/watcher/public/application/models/watch_status/index.d.ts b/x-pack/plugins/watcher/public/application/models/watch_status/index.d.ts new file mode 100644 index 00000000000000..f8ff6889612992 --- /dev/null +++ b/x-pack/plugins/watcher/public/application/models/watch_status/index.d.ts @@ -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 WatchStatus: any; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_status/index.js b/x-pack/plugins/watcher/public/application/models/watch_status/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_status/index.js rename to x-pack/plugins/watcher/public/application/models/watch_status/index.js diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_status/watch_status.js b/x-pack/plugins/watcher/public/application/models/watch_status/watch_status.js similarity index 94% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_status/watch_status.js rename to x-pack/plugins/watcher/public/application/models/watch_status/watch_status.js index 7b35493ebdfa22..8cbdc1b5b30cc8 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/models/watch_status/watch_status.js +++ b/x-pack/plugins/watcher/public/application/models/watch_status/watch_status.js @@ -5,7 +5,7 @@ */ import { get } from 'lodash'; -import { getMoment } from '../../../../../common/lib/get_moment'; +import { getMoment } from '../../../../common/lib/get_moment'; import { ActionStatus } from '../action_status'; export class WatchStatus { diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/index.ts b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/index.ts rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/index.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/json_watch_edit.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/json_watch_edit.tsx similarity index 92% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/json_watch_edit.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/json_watch_edit.tsx index 010e430c0719a1..b87fc355c3eade 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/json_watch_edit.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/json_watch_edit.tsx @@ -16,10 +16,10 @@ import { EuiTitle, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { ExecuteDetails } from 'plugins/watcher/np_ready/application/models/execute_details/execute_details'; -import { getActionType } from '../../../../../../../common/lib/get_action_type'; -import { BaseWatch, ExecutedWatchDetails } from '../../../../../../../common/types/watch_types'; -import { ACTION_MODES, TIME_UNITS } from '../../../../../../../common/constants'; +import { ExecuteDetails } from '../../../../models/execute_details'; +import { getActionType } from '../../../../../../common/lib/get_action_type'; +import { BaseWatch, ExecutedWatchDetails } from '../../../../../../common/types/watch_types'; +import { ACTION_MODES, TIME_UNITS } from '../../../../../../common/constants'; import { JsonWatchEditForm } from './json_watch_edit_form'; import { JsonWatchEditSimulate } from './json_watch_edit_simulate'; import { WatchContext } from '../../watch_context'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_form.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_form.tsx similarity index 99% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_form.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_form.tsx index 376aeb205b855c..91185ac604b345 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_form.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_form.tsx @@ -20,7 +20,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { serializeJsonWatch } from '../../../../../../../common/lib/serialization'; +import { serializeJsonWatch } from '../../../../../../common/lib/serialization'; import { ErrableFormRow, SectionError, Error as ServerError } from '../../../../components'; import { onWatchSave } from '../../watch_edit_actions'; import { WatchContext } from '../../watch_context'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate.tsx similarity index 97% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate.tsx index 9ea2b3bcd1e9a4..8bb1770d2f44da 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate.tsx @@ -24,13 +24,15 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { ExecuteDetails } from 'plugins/watcher/np_ready/application/models/execute_details/execute_details'; -import { WatchHistoryItem } from 'plugins/watcher/np_ready/application/models/watch_history_item'; -import { ACTION_MODES, TIME_UNITS } from '../../../../../../../common/constants'; + +import { WatchHistoryItem } from '../../../../models/watch_history_item'; + +import { ACTION_MODES, TIME_UNITS } from '../../../../../../common/constants'; +import { ExecuteDetails } from '../../../../models/execute_details'; import { ExecutedWatchDetails, ExecutedWatchResults, -} from '../../../../../../../common/types/watch_types'; +} from '../../../../../../common/types/watch_types'; import { ErrableFormRow } from '../../../../components/form_errors'; import { executeWatch } from '../../../../lib/api'; import { WatchContext } from '../../watch_context'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate_results.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate_results.tsx similarity index 99% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate_results.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate_results.tsx index c3f11c6c3fa465..0a61e4401fdf12 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate_results.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/json_watch_edit/json_watch_edit_simulate_results.tsx @@ -21,7 +21,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { ExecutedWatchDetails, ExecutedWatchResults, -} from '../../../../../../../common/types/watch_types'; +} from '../../../../../../common/types/watch_types'; import { getTypeFromAction } from '../../watch_edit_actions'; import { WatchContext } from '../../watch_context'; import { WatchStatus, SectionError } from '../../../../components'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/monitoring_watch_edit/index.ts b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/monitoring_watch_edit/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/monitoring_watch_edit/index.ts rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/monitoring_watch_edit/index.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/monitoring_watch_edit/monitoring_watch_edit.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/monitoring_watch_edit/monitoring_watch_edit.tsx similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/monitoring_watch_edit/monitoring_watch_edit.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/monitoring_watch_edit/monitoring_watch_edit.tsx diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/request_flyout.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/request_flyout.tsx similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/request_flyout.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/request_flyout.tsx diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/email_action_fields.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/email_action_fields.tsx similarity index 97% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/email_action_fields.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/email_action_fields.tsx index 3e70e49f423504..a94055271ff5b8 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/email_action_fields.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/email_action_fields.tsx @@ -8,7 +8,7 @@ import React, { Fragment } from 'react'; import { EuiComboBox, EuiFieldText, EuiFormRow, EuiTextArea } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { ErrableFormRow } from '../../../../../components/form_errors'; -import { EmailAction } from '../../../../../../../../common/types/action_types'; +import { EmailAction } from '../../../../../../../common/types/action_types'; interface Props { action: EmailAction; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/index.ts b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/index.ts rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/index.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/index_action_fields.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/index_action_fields.tsx similarity index 94% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/index_action_fields.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/index_action_fields.tsx index b7ab76d9890bcf..f1d36bce415d3e 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/index_action_fields.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/index_action_fields.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EuiFieldText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { ErrableFormRow } from '../../../../../components/form_errors'; -import { IndexAction } from '../../../../../../../../common/types/action_types'; +import { IndexAction } from '../../../../../../../common/types/action_types'; interface Props { action: IndexAction; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/jira_action_fields.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/jira_action_fields.tsx similarity index 97% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/jira_action_fields.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/jira_action_fields.tsx index c09b3c44fde65c..2bfc4f2eb1b5d3 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/jira_action_fields.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/jira_action_fields.tsx @@ -8,7 +8,7 @@ import React, { Fragment } from 'react'; import { EuiFieldText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { ErrableFormRow } from '../../../../../components/form_errors'; -import { JiraAction } from '../../../../../../../../common/types/action_types'; +import { JiraAction } from '../../../../../../../common/types/action_types'; interface Props { action: JiraAction; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/logging_action_fields.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/logging_action_fields.tsx similarity index 94% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/logging_action_fields.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/logging_action_fields.tsx index 7da2a22ecd6c45..17c69a7b05bb3c 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/logging_action_fields.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/logging_action_fields.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EuiFieldText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { ErrableFormRow } from '../../../../../components/form_errors'; -import { LoggingAction } from '../../../../../../../../common/types/action_types'; +import { LoggingAction } from '../../../../../../../common/types/action_types'; interface Props { action: LoggingAction; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/pagerduty_action_fields.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/pagerduty_action_fields.tsx similarity index 95% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/pagerduty_action_fields.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/pagerduty_action_fields.tsx index 3287bdefa08aa5..95215e8eac763d 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/pagerduty_action_fields.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/pagerduty_action_fields.tsx @@ -7,7 +7,7 @@ import React, { Fragment } from 'react'; import { EuiFieldText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { ErrableFormRow } from '../../../../../components/form_errors'; -import { PagerDutyAction } from '../../../../../../../../common/types/action_types'; +import { PagerDutyAction } from '../../../../../../../common/types/action_types'; interface Props { action: PagerDutyAction; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/slack_action_fields.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/slack_action_fields.tsx similarity index 96% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/slack_action_fields.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/slack_action_fields.tsx index a72cf232d8d093..5e8aaf8415898a 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/slack_action_fields.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/slack_action_fields.tsx @@ -6,7 +6,7 @@ import React, { Fragment } from 'react'; import { EuiComboBox, EuiTextArea, EuiFormRow } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { SlackAction } from '../../../../../../../../common/types/action_types'; +import { SlackAction } from '../../../../../../../common/types/action_types'; interface Props { action: SlackAction; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/webhook_action_fields.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/webhook_action_fields.tsx similarity index 98% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/webhook_action_fields.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/webhook_action_fields.tsx index be0b551f4a39c8..c1ebcdc2628637 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/action_fields/webhook_action_fields.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/action_fields/webhook_action_fields.tsx @@ -18,7 +18,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { ErrableFormRow } from '../../../../../components/form_errors'; -import { WebhookAction } from '../../../../../../../../common/types/action_types'; +import { WebhookAction } from '../../../../../../../common/types/action_types'; interface Props { action: WebhookAction; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/index.ts b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/index.ts rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/index.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_accordion.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_accordion.tsx similarity index 94% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_accordion.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_accordion.tsx index 4fca772a182175..36ca706ed1be2c 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_accordion.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_accordion.tsx @@ -21,13 +21,16 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { ExecuteDetails } from 'plugins/watcher/np_ready/application/models/execute_details/execute_details'; -import { Action } from 'plugins/watcher/np_ready/application/models/action'; -import { WatchHistoryItem } from 'plugins/watcher/np_ready/application/models/watch_history_item'; -import { ThresholdWatch } from 'plugins/watcher/np_ready/application/models/watch/threshold_watch'; -import { ActionType } from '../../../../../../../common/types/action_types'; -import { ACTION_TYPES, ACTION_MODES } from '../../../../../../../common/constants'; + +import { Action } from '../../../../models/action'; +import { WatchHistoryItem } from '../../../../models/watch_history_item'; +import { ThresholdWatch } from '../../../../models/watch/threshold_watch'; +import { ExecuteDetails } from '../../../../models/execute_details'; + +import { ActionType } from '../../../../../../common/types/action_types'; +import { ACTION_TYPES, ACTION_MODES } from '../../../../../../common/constants'; import { WatchContext } from '../../watch_context'; + import { WebhookActionFields, LoggingActionFields, diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_dropdown.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_dropdown.tsx similarity index 96% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_dropdown.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_dropdown.tsx index d92cccfa00f148..7a760ee58acbc9 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_dropdown.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_dropdown.tsx @@ -16,9 +16,10 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useContext, useState } from 'react'; -import { Action } from 'plugins/watcher/np_ready/application/models/action'; import { FormattedMessage } from '@kbn/i18n/react'; -import { ACTION_TYPES } from '../../../../../../../common/constants'; + +import { Action } from '../../../../models/action'; +import { ACTION_TYPES } from '../../../../../../common/constants'; import { WatchContext } from '../../watch_context'; const disabledMessage = i18n.translate( diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_panel.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_panel.tsx similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_panel.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_action_panel.tsx diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_edit.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_edit.tsx similarity index 99% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_edit.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_edit.tsx index f1b5d2c9eab7b8..e3d729c33fddff 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_edit.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/threshold_watch_edit.tsx @@ -26,8 +26,8 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; -import { TIME_UNITS } from '../../../../../../../common/constants'; -import { serializeThresholdWatch } from '../../../../../../../common/lib/serialization'; +import { TIME_UNITS } from '../../../../../../common/constants'; +import { serializeThresholdWatch } from '../../../../../../common/lib/serialization'; import { ErrableFormRow, SectionError, Error as ServerError } from '../../../../components'; import { fetchFields, getMatchingIndices, loadIndexPatterns } from '../../../../lib/api'; import { aggTypes } from '../../../../models/watch/agg_types'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/watch_visualization.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/watch_visualization.tsx similarity index 93% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/watch_visualization.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/watch_visualization.tsx index 3901f84f506ef6..35d9efd36ad0fe 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/threshold_watch_edit/watch_visualization.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/threshold_watch_edit/watch_visualization.tsx @@ -17,11 +17,12 @@ import { } from '@elastic/charts'; import dateMath from '@elastic/datemath'; import moment from 'moment-timezone'; -import { IUiSettingsClient } from 'src/core/public'; +import { IUiSettingsClient } from 'kibana/public'; import { EuiCallOut, EuiLoadingChart, EuiSpacer, EuiEmptyPrompt, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; -import { VisualizeOptions } from 'plugins/watcher/np_ready/application/models/visualize_options'; -import { ThresholdWatch } from 'plugins/watcher/np_ready/application/models/watch/threshold_watch'; + +import { VisualizeOptions } from '../../../../models/visualize_options'; +import { ThresholdWatch } from '../../../../models/watch/threshold_watch'; import { useGetWatchVisualizationData } from '../../../../lib/api'; import { WatchContext } from '../../watch_context'; @@ -85,11 +86,7 @@ const getTimeBuckets = (watch: any, timeBuckets: any) => { }; export const WatchVisualization = () => { - const { - legacy: { TimeBuckets }, - euiUtils, - uiSettings, - } = useAppContext(); + const { createTimeBuckets, euiUtils, uiSettings } = useAppContext(); const { watch } = useContext(WatchContext); const chartsTheme = euiUtils.useChartsTheme(); const { @@ -109,7 +106,7 @@ export const WatchVisualization = () => { } = watch; const domain = getDomain(watch); - const timeBuckets = new TimeBuckets(); + const timeBuckets = createTimeBuckets(); timeBuckets.setBounds(domain); const interval = timeBuckets.getInterval().expression; const visualizeOptions = new VisualizeOptions({ @@ -196,8 +193,8 @@ export const WatchVisualization = () => { const actualThreshold = getThreshold(watch); let maxY = actualThreshold[actualThreshold.length - 1]; - (Object.values(watchVisualizationData) as number[][][]).forEach(data => { - data.forEach(([, y]) => { + (Object.values(watchVisualizationData) as number[][][]).forEach(watchData => { + watchData.forEach(([, y]) => { if (y > maxY) { maxY = y; } @@ -206,7 +203,7 @@ export const WatchVisualization = () => { const dateFormatter = (d: number) => { return moment(d) .tz(timezone) - .format(getTimeBuckets(watch, new TimeBuckets()).getScaledDateFormat()); + .format(getTimeBuckets(watch, createTimeBuckets()).getScaledDateFormat()); }; const aggLabel = aggTypes[watch.aggType].text; return ( diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/watch_edit.tsx b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/watch_edit.tsx similarity index 94% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/watch_edit.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_edit/components/watch_edit.tsx index 9f252d3e542e0e..59a6079d74b428 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/components/watch_edit.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/components/watch_edit.tsx @@ -10,10 +10,10 @@ import { isEqual } from 'lodash'; import { EuiPageContent } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { Watch } from 'plugins/watcher/np_ready/application/models/watch'; import { FormattedMessage } from '@kbn/i18n/react'; -import { WATCH_TYPES } from '../../../../../../common/constants'; -import { BaseWatch } from '../../../../../../common/types/watch_types'; +import { Watch } from '../../../models/watch'; +import { WATCH_TYPES } from '../../../../../common/constants'; +import { BaseWatch } from '../../../../../common/types/watch_types'; import { getPageErrorCode, PageError, SectionLoading, SectionError } from '../../../components'; import { loadWatch } from '../../../lib/api'; import { listBreadcrumb, editBreadcrumb, createBreadcrumb } from '../../../lib/breadcrumbs'; @@ -96,10 +96,7 @@ export const WatchEdit = ({ }; }) => { // hooks - const { - legacy: { MANAGEMENT_BREADCRUMB }, - chrome, - } = useAppContext(); + const { MANAGEMENT_BREADCRUMB, chrome } = useAppContext(); const [{ watch, loadError }, dispatch] = useReducer(watchReducer, { watch: null }); const setWatchProperty = (property: string, value: any) => { diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/watch_context.ts b/x-pack/plugins/watcher/public/application/sections/watch_edit/watch_context.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/watch_context.ts rename to x-pack/plugins/watcher/public/application/sections/watch_edit/watch_context.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/watch_edit_actions.ts b/x-pack/plugins/watcher/public/application/sections/watch_edit/watch_edit_actions.ts similarity index 95% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/watch_edit_actions.ts rename to x-pack/plugins/watcher/public/application/sections/watch_edit/watch_edit_actions.ts index b93c2c510047db..ba2a3a7ce84e50 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_edit/watch_edit_actions.ts +++ b/x-pack/plugins/watcher/public/application/sections/watch_edit/watch_edit_actions.ts @@ -4,11 +4,11 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ToastsSetup } from 'src/core/public'; +import { ToastsSetup } from 'kibana/public'; import { i18n } from '@kbn/i18n'; import { get } from 'lodash'; -import { ACTION_TYPES, WATCH_TYPES } from '../../../../../common/constants'; -import { BaseWatch } from '../../../../../common/types/watch_types'; +import { ACTION_TYPES, WATCH_TYPES } from '../../../../common/constants'; +import { BaseWatch } from '../../../../common/types/watch_types'; import { createWatch } from '../../lib/api'; import { goToWatchList } from '../../lib/navigation'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_list/components/watch_list.tsx b/x-pack/plugins/watcher/public/application/sections/watch_list/components/watch_list.tsx similarity index 99% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_list/components/watch_list.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_list/components/watch_list.tsx index 5165915aa84065..9f6a8ddbc843e8 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_list/components/watch_list.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_list/components/watch_list.tsx @@ -28,7 +28,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { Moment } from 'moment'; -import { REFRESH_INTERVALS, PAGINATION, WATCH_TYPES } from '../../../../../../common/constants'; +import { REFRESH_INTERVALS, PAGINATION, WATCH_TYPES } from '../../../../../common/constants'; import { listBreadcrumb } from '../../../lib/breadcrumbs'; import { getPageErrorCode, @@ -47,7 +47,7 @@ export const WatchList = () => { // hooks const { chrome, - legacy: { MANAGEMENT_BREADCRUMB }, + MANAGEMENT_BREADCRUMB, links: { watcherGettingStartedUrl }, } = useAppContext(); const [selection, setSelection] = useState([]); diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_status/components/watch_detail.tsx b/x-pack/plugins/watcher/public/application/sections/watch_status/components/watch_detail.tsx similarity index 99% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_status/components/watch_detail.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_status/components/watch_detail.tsx index 197342bba4180c..ce52114fd5fdfd 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_status/components/watch_detail.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_status/components/watch_detail.tsx @@ -20,7 +20,7 @@ import { } from '@elastic/eui'; import { ackWatchAction } from '../../../lib/api'; import { WatchStatus } from '../../../components'; -import { PAGINATION } from '../../../../../../common/constants'; +import { PAGINATION } from '../../../../../common/constants'; import { WatchDetailsContext } from '../watch_details_context'; import { useAppContext } from '../../../app_context'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_status/components/watch_history.tsx b/x-pack/plugins/watcher/public/application/sections/watch_status/components/watch_history.tsx similarity index 99% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_status/components/watch_history.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_status/components/watch_history.tsx index 16897d74665ef7..b78a2e4230171f 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_status/components/watch_history.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_status/components/watch_history.tsx @@ -23,7 +23,7 @@ import { EuiTitle, } from '@elastic/eui'; -import { PAGINATION } from '../../../../../../common/constants'; +import { PAGINATION } from '../../../../../common/constants'; import { WatchStatus, SectionError, Error } from '../../../components'; import { useLoadWatchHistory, useLoadWatchHistoryDetail } from '../../../lib/api'; import { WatchDetailsContext } from '../watch_details_context'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_status/components/watch_status.tsx b/x-pack/plugins/watcher/public/application/sections/watch_status/components/watch_status.tsx similarity index 98% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_status/components/watch_status.tsx rename to x-pack/plugins/watcher/public/application/sections/watch_status/components/watch_status.tsx index 53817c23e72eb7..b15c047d06f67c 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_status/components/watch_status.tsx +++ b/x-pack/plugins/watcher/public/application/sections/watch_status/components/watch_status.tsx @@ -67,11 +67,7 @@ export const WatchStatus = ({ }; }; }) => { - const { - chrome, - legacy: { MANAGEMENT_BREADCRUMB }, - toasts, - } = useAppContext(); + const { chrome, MANAGEMENT_BREADCRUMB, toasts } = useAppContext(); const { error: watchDetailError, data: watchDetail, diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_status/watch_details_context.ts b/x-pack/plugins/watcher/public/application/sections/watch_status/watch_details_context.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/sections/watch_status/watch_details_context.ts rename to x-pack/plugins/watcher/public/application/sections/watch_status/watch_details_context.ts diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/application/shared_imports.ts b/x-pack/plugins/watcher/public/application/shared_imports.ts similarity index 79% rename from x-pack/legacy/plugins/watcher/public/np_ready/application/shared_imports.ts rename to x-pack/plugins/watcher/public/application/shared_imports.ts index 60445b00c09858..cbc4dde7448ff0 100644 --- a/x-pack/legacy/plugins/watcher/public/np_ready/application/shared_imports.ts +++ b/x-pack/plugins/watcher/public/application/shared_imports.ts @@ -10,4 +10,4 @@ export { UseRequestConfig, sendRequest, useRequest, -} from '../../../../../../../src/plugins/es_ui_shared/public/request/np_ready_request'; +} from '../../../../../src/plugins/es_ui_shared/public/request/np_ready_request'; diff --git a/x-pack/legacy/plugins/watcher/public/np_ready/index.ts b/x-pack/plugins/watcher/public/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/public/np_ready/index.ts rename to x-pack/plugins/watcher/public/index.ts diff --git a/x-pack/plugins/watcher/public/legacy/calc_auto_interval.ts b/x-pack/plugins/watcher/public/legacy/calc_auto_interval.ts new file mode 100644 index 00000000000000..c910f1e6752d4a --- /dev/null +++ b/x-pack/plugins/watcher/public/legacy/calc_auto_interval.ts @@ -0,0 +1,132 @@ +/* + * 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. + */ + +import moment from 'moment'; + +const boundsDescending = [ + { + bound: Infinity, + interval: Number(moment.duration(1, 'year')), + }, + { + bound: Number(moment.duration(1, 'year')), + interval: Number(moment.duration(1, 'month')), + }, + { + bound: Number(moment.duration(3, 'week')), + interval: Number(moment.duration(1, 'week')), + }, + { + bound: Number(moment.duration(1, 'week')), + interval: Number(moment.duration(1, 'd')), + }, + { + bound: Number(moment.duration(24, 'hour')), + interval: Number(moment.duration(12, 'hour')), + }, + { + bound: Number(moment.duration(6, 'hour')), + interval: Number(moment.duration(3, 'hour')), + }, + { + bound: Number(moment.duration(2, 'hour')), + interval: Number(moment.duration(1, 'hour')), + }, + { + bound: Number(moment.duration(45, 'minute')), + interval: Number(moment.duration(30, 'minute')), + }, + { + bound: Number(moment.duration(20, 'minute')), + interval: Number(moment.duration(10, 'minute')), + }, + { + bound: Number(moment.duration(9, 'minute')), + interval: Number(moment.duration(5, 'minute')), + }, + { + bound: Number(moment.duration(3, 'minute')), + interval: Number(moment.duration(1, 'minute')), + }, + { + bound: Number(moment.duration(45, 'second')), + interval: Number(moment.duration(30, 'second')), + }, + { + bound: Number(moment.duration(15, 'second')), + interval: Number(moment.duration(10, 'second')), + }, + { + bound: Number(moment.duration(7.5, 'second')), + interval: Number(moment.duration(5, 'second')), + }, + { + bound: Number(moment.duration(5, 'second')), + interval: Number(moment.duration(1, 'second')), + }, + { + bound: Number(moment.duration(500, 'ms')), + interval: Number(moment.duration(100, 'ms')), + }, +]; + +function getPerBucketMs(count: number, duration: number) { + const ms = duration / count; + return isFinite(ms) ? ms : NaN; +} + +function normalizeMinimumInterval(targetMs: number) { + const value = isNaN(targetMs) ? 0 : Math.max(Math.floor(targetMs), 1); + return moment.duration(value); +} + +/** + * Using some simple rules we pick a "pretty" interval that will + * produce around the number of buckets desired given a time range. + * + * @param targetBucketCount desired number of buckets + * @param duration time range the agg covers + */ +export function calcAutoIntervalNear(targetBucketCount: number, duration: number) { + const targetPerBucketMs = getPerBucketMs(targetBucketCount, duration); + + // Find the first bound which is smaller than our target. + const lowerBoundIndex = boundsDescending.findIndex(({ bound }) => { + const boundMs = Number(bound); + return boundMs <= targetPerBucketMs; + }); + + // The bound immediately preceeding that lower bound contains the + // interval most closely matching our target. + if (lowerBoundIndex !== -1) { + const nearestInterval = boundsDescending[lowerBoundIndex - 1].interval; + return moment.duration(nearestInterval); + } + + // If the target is smaller than any of our bounds, then we'll use it for the interval as-is. + return normalizeMinimumInterval(targetPerBucketMs); +} + +/** + * Pick a "pretty" interval that produces no more than the maxBucketCount + * for the given time range. + * + * @param maxBucketCount maximum number of buckets to create + * @param duration amount of time covered by the agg + */ +export function calcAutoIntervalLessThan(maxBucketCount: number, duration: number) { + const maxPerBucketMs = getPerBucketMs(maxBucketCount, duration); + + for (const { interval } of boundsDescending) { + // Find the highest interval which meets our per bucket limitation. + if (interval <= maxPerBucketMs) { + return moment.duration(interval); + } + } + + // If the max is smaller than any of our intervals, then we'll use it for the interval as-is. + return normalizeMinimumInterval(maxPerBucketMs); +} diff --git a/x-pack/plugins/watcher/public/legacy/calc_es_interval.js b/x-pack/plugins/watcher/public/legacy/calc_es_interval.js new file mode 100644 index 00000000000000..234fb67772fef8 --- /dev/null +++ b/x-pack/plugins/watcher/public/legacy/calc_es_interval.js @@ -0,0 +1,58 @@ +/* + * 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. + */ + +import dateMath from '@elastic/datemath'; + +import { parseEsInterval } from './index'; + +const unitsDesc = dateMath.unitsDesc; +const largeMax = unitsDesc.indexOf('M'); + +/** + * Convert a moment.duration into an es + * compatible expression, and provide + * associated metadata + * + * @param {moment.duration} duration + * @return {object} + */ +export function convertDurationToNormalizedEsInterval(duration) { + for (let i = 0; i < unitsDesc.length; i++) { + const unit = unitsDesc[i]; + const val = duration.as(unit); + // find a unit that rounds neatly + if (val >= 1 && Math.floor(val) === val) { + // if the unit is "large", like years, but + // isn't set to 1 ES will puke. So keep going until + // we get out of the "large" units + if (i <= largeMax && val !== 1) { + continue; + } + + return { + value: val, + unit: unit, + expression: val + unit, + }; + } + } + + const ms = duration.as('ms'); + return { + value: ms, + unit: 'ms', + expression: ms + 'ms', + }; +} + +export function convertIntervalToEsInterval(interval) { + const { value, unit } = parseEsInterval(interval); + return { + value, + unit, + expression: interval, + }; +} diff --git a/x-pack/plugins/watcher/public/legacy/index.d.ts b/x-pack/plugins/watcher/public/legacy/index.d.ts new file mode 100644 index 00000000000000..307e365040fb7d --- /dev/null +++ b/x-pack/plugins/watcher/public/legacy/index.d.ts @@ -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 declare const MANAGEMENT_BREADCRUMB: { text: string; href?: string }; diff --git a/x-pack/plugins/watcher/public/legacy/index.ts b/x-pack/plugins/watcher/public/legacy/index.ts new file mode 100644 index 00000000000000..d14081a667acc4 --- /dev/null +++ b/x-pack/plugins/watcher/public/legacy/index.ts @@ -0,0 +1,15 @@ +/* + * 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. + */ +import { i18n } from '@kbn/i18n'; + +export { TimeBuckets } from './time_buckets'; + +export const MANAGEMENT_BREADCRUMB = Object.freeze({ + text: i18n.translate('xpack.watcher.management.breadcrumb', { + defaultMessage: 'Management', + }), + href: '#/management', +}); diff --git a/x-pack/plugins/watcher/public/legacy/parse_es_interval/index.ts b/x-pack/plugins/watcher/public/legacy/parse_es_interval/index.ts new file mode 100644 index 00000000000000..6c8e29211078c5 --- /dev/null +++ b/x-pack/plugins/watcher/public/legacy/parse_es_interval/index.ts @@ -0,0 +1,10 @@ +/* + * 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 { parseEsInterval, ParsedInterval } from './parse_es_interval'; +export { InvalidEsCalendarIntervalError } from './invalid_es_calendar_interval_error'; +export { InvalidEsIntervalFormatError } from './invalid_es_interval_format_error'; +export { isValidEsInterval } from './is_valid_es_interval'; diff --git a/x-pack/plugins/watcher/public/legacy/parse_es_interval/invalid_es_calendar_interval_error.ts b/x-pack/plugins/watcher/public/legacy/parse_es_interval/invalid_es_calendar_interval_error.ts new file mode 100644 index 00000000000000..62864c91756c48 --- /dev/null +++ b/x-pack/plugins/watcher/public/legacy/parse_es_interval/invalid_es_calendar_interval_error.ts @@ -0,0 +1,39 @@ +/* + * 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. + */ + +import { Unit } from '@elastic/datemath'; +import { i18n } from '@kbn/i18n'; + +export class InvalidEsCalendarIntervalError extends Error { + constructor( + public readonly interval: string, + public readonly value: number, + public readonly unit: Unit, + public readonly type: string + ) { + super( + i18n.translate('xpack.watcher.data.parseEsInterval.invalidEsCalendarIntervalErrorMessage', { + defaultMessage: 'Invalid calendar interval: {interval}, value must be 1', + values: { interval }, + }) + ); + + this.name = 'InvalidEsCalendarIntervalError'; + this.value = value; + this.unit = unit; + this.type = type; + + // captureStackTrace is only available in the V8 engine, so any browser using + // a different JS engine won't have access to this method. + if (Error.captureStackTrace) { + Error.captureStackTrace(this, InvalidEsCalendarIntervalError); + } + + // Babel doesn't support traditional `extends` syntax for built-in classes. + // https://babeljs.io/docs/en/caveats/#classes + Object.setPrototypeOf(this, InvalidEsCalendarIntervalError.prototype); + } +} diff --git a/x-pack/plugins/watcher/public/legacy/parse_es_interval/invalid_es_interval_format_error.ts b/x-pack/plugins/watcher/public/legacy/parse_es_interval/invalid_es_interval_format_error.ts new file mode 100644 index 00000000000000..894a4fd5d69224 --- /dev/null +++ b/x-pack/plugins/watcher/public/legacy/parse_es_interval/invalid_es_interval_format_error.ts @@ -0,0 +1,30 @@ +/* + * 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. + */ + +import { i18n } from '@kbn/i18n'; + +export class InvalidEsIntervalFormatError extends Error { + constructor(public readonly interval: string) { + super( + i18n.translate('xpack.watcher.data.parseEsInterval.invalidEsIntervalFormatErrorMessage', { + defaultMessage: 'Invalid interval format: {interval}', + values: { interval }, + }) + ); + + this.name = 'InvalidEsIntervalFormatError'; + + // captureStackTrace is only available in the V8 engine, so any browser using + // a different JS engine won't have access to this method. + if (Error.captureStackTrace) { + Error.captureStackTrace(this, InvalidEsIntervalFormatError); + } + + // Babel doesn't support traditional `extends` syntax for built-in classes. + // https://babeljs.io/docs/en/caveats/#classes + Object.setPrototypeOf(this, InvalidEsIntervalFormatError.prototype); + } +} diff --git a/x-pack/plugins/watcher/public/legacy/parse_es_interval/is_valid_es_interval.ts b/x-pack/plugins/watcher/public/legacy/parse_es_interval/is_valid_es_interval.ts new file mode 100644 index 00000000000000..1bdb65740409a2 --- /dev/null +++ b/x-pack/plugins/watcher/public/legacy/parse_es_interval/is_valid_es_interval.ts @@ -0,0 +1,25 @@ +/* + * 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. + */ + +import { parseEsInterval } from './parse_es_interval'; + +/** + * Checks whether a given interval string (e.g. 1w, 24h, ...) is a valid Elasticsearch interval. + * Will return false if the interval is not valid in Elasticsearch, otherwise true. + * Invalid intervals might be: 2f, since there is no unit 'f'; 2w, since weeks and month intervals + * are only allowed with a value of 1, etc. + * + * @param interval The interval string like 1w, 24h + * @returns True if the interval is valid for Elasticsearch + */ +export function isValidEsInterval(interval: string): boolean { + try { + parseEsInterval(interval); + return true; + } catch { + return false; + } +} diff --git a/x-pack/plugins/watcher/public/legacy/parse_es_interval/parse_es_interval.test.ts b/x-pack/plugins/watcher/public/legacy/parse_es_interval/parse_es_interval.test.ts new file mode 100644 index 00000000000000..76de807101559b --- /dev/null +++ b/x-pack/plugins/watcher/public/legacy/parse_es_interval/parse_es_interval.test.ts @@ -0,0 +1,56 @@ +/* + * 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. + */ + +import { InvalidEsCalendarIntervalError } from './invalid_es_calendar_interval_error'; +import { InvalidEsIntervalFormatError } from './invalid_es_interval_format_error'; +import { parseEsInterval } from './parse_es_interval'; + +describe('parseEsInterval', () => { + it('should correctly parse an interval containing unit and single value', () => { + expect(parseEsInterval('1ms')).toEqual({ value: 1, unit: 'ms', type: 'fixed' }); + expect(parseEsInterval('1s')).toEqual({ value: 1, unit: 's', type: 'fixed' }); + expect(parseEsInterval('1m')).toEqual({ value: 1, unit: 'm', type: 'calendar' }); + expect(parseEsInterval('1h')).toEqual({ value: 1, unit: 'h', type: 'calendar' }); + expect(parseEsInterval('1d')).toEqual({ value: 1, unit: 'd', type: 'calendar' }); + expect(parseEsInterval('1w')).toEqual({ value: 1, unit: 'w', type: 'calendar' }); + expect(parseEsInterval('1M')).toEqual({ value: 1, unit: 'M', type: 'calendar' }); + expect(parseEsInterval('1y')).toEqual({ value: 1, unit: 'y', type: 'calendar' }); + }); + + it('should correctly parse an interval containing unit and multiple value', () => { + expect(parseEsInterval('250ms')).toEqual({ value: 250, unit: 'ms', type: 'fixed' }); + expect(parseEsInterval('90s')).toEqual({ value: 90, unit: 's', type: 'fixed' }); + expect(parseEsInterval('60m')).toEqual({ value: 60, unit: 'm', type: 'fixed' }); + expect(parseEsInterval('12h')).toEqual({ value: 12, unit: 'h', type: 'fixed' }); + expect(parseEsInterval('7d')).toEqual({ value: 7, unit: 'd', type: 'fixed' }); + }); + + it('should throw a InvalidEsCalendarIntervalError for intervals containing calendar unit and multiple value', () => { + const intervals = ['4w', '12M', '10y']; + expect.assertions(intervals.length); + + intervals.forEach(interval => { + try { + parseEsInterval(interval); + } catch (error) { + expect(error instanceof InvalidEsCalendarIntervalError).toBe(true); + } + }); + }); + + it('should throw a InvalidEsIntervalFormatError for invalid interval formats', () => { + const intervals = ['1', 'h', '0m', '0.5h']; + expect.assertions(intervals.length); + + intervals.forEach(interval => { + try { + parseEsInterval(interval); + } catch (error) { + expect(error instanceof InvalidEsIntervalFormatError).toBe(true); + } + }); + }); +}); diff --git a/x-pack/plugins/watcher/public/legacy/parse_es_interval/parse_es_interval.ts b/x-pack/plugins/watcher/public/legacy/parse_es_interval/parse_es_interval.ts new file mode 100644 index 00000000000000..19ac03da034111 --- /dev/null +++ b/x-pack/plugins/watcher/public/legacy/parse_es_interval/parse_es_interval.ts @@ -0,0 +1,62 @@ +/* + * 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. + */ + +import dateMath, { Unit } from '@elastic/datemath'; + +import { InvalidEsCalendarIntervalError } from './invalid_es_calendar_interval_error'; +import { InvalidEsIntervalFormatError } from './invalid_es_interval_format_error'; + +const ES_INTERVAL_STRING_REGEX = new RegExp( + '^([1-9][0-9]*)\\s*(' + dateMath.units.join('|') + ')$' +); + +export type ParsedInterval = ReturnType; + +/** + * Extracts interval properties from an ES interval string. Disallows unrecognized interval formats + * and fractional values. Converts some intervals from "calendar" to "fixed" when the number of + * units is larger than 1, and throws an error for others. + * + * Conversion rules: + * + * | Interval | Single unit type | Multiple units type | + * | -------- | ---------------- | ------------------- | + * | ms | fixed | fixed | + * | s | fixed | fixed | + * | m | calendar | fixed | + * | h | calendar | fixed | + * | d | calendar | fixed | + * | w | calendar | N/A - disallowed | + * | M | calendar | N/A - disallowed | + * | y | calendar | N/A - disallowed | + * + */ +export function parseEsInterval(interval: string) { + const matches = String(interval) + .trim() + .match(ES_INTERVAL_STRING_REGEX); + + if (!matches) { + throw new InvalidEsIntervalFormatError(interval); + } + + const value = parseFloat(matches[1]); + const unit = matches[2] as Unit; + const type = dateMath.unitsMap[unit].type; + + if (type === 'calendar' && value !== 1) { + throw new InvalidEsCalendarIntervalError(interval, value, unit, type); + } + + return { + value, + unit, + type: + (type === 'mixed' && value === 1) || type === 'calendar' + ? ('calendar' as 'calendar') + : ('fixed' as 'fixed'), + }; +} diff --git a/x-pack/plugins/watcher/public/legacy/time_buckets.d.ts b/x-pack/plugins/watcher/public/legacy/time_buckets.d.ts new file mode 100644 index 00000000000000..e84051b0863443 --- /dev/null +++ b/x-pack/plugins/watcher/public/legacy/time_buckets.d.ts @@ -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 declare const TimeBuckets: any; diff --git a/x-pack/plugins/watcher/public/legacy/time_buckets.js b/x-pack/plugins/watcher/public/legacy/time_buckets.js new file mode 100644 index 00000000000000..8b7e4be784fe72 --- /dev/null +++ b/x-pack/plugins/watcher/public/legacy/time_buckets.js @@ -0,0 +1,397 @@ +/* + * 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. + */ + +import _ from 'lodash'; +import moment from 'moment'; +import { parseInterval, FIELD_FORMAT_IDS } from '../../../../../src/plugins/data/public'; +import { calcAutoIntervalLessThan, calcAutoIntervalNear } from './calc_auto_interval'; +import { + convertDurationToNormalizedEsInterval, + convertIntervalToEsInterval, +} from './calc_es_interval'; + +function isValidMoment(m) { + return m && 'isValid' in m && m.isValid(); +} + +/** + * Helper class for wrapping the concept of an "Interval", + * which describes a timespan that will separate moments. + * + * @param {state} object - one of "" + * @param {[type]} display [description] + */ +function TimeBuckets(uiSettings, data) { + this.data = data; + this.getConfig = (...args) => uiSettings.get(...args); + return TimeBuckets.__cached__(this); +} + +/**** + * PUBLIC API + ****/ + +/** + * Set the bounds that these buckets are expected to cover. + * This is required to support interval "auto" as well + * as interval scaling. + * + * @param {object} input - an object with properties min and max, + * representing the edges for the time span + * we should cover + * + * @returns {undefined} + */ +TimeBuckets.prototype.setBounds = function(input) { + if (!input) return this.clearBounds(); + + let bounds; + if (_.isPlainObject(input)) { + // accept the response from timefilter.getActiveBounds() + bounds = [input.min, input.max]; + } else { + bounds = Array.isArray(input) ? input : []; + } + + const moments = _(bounds) + .map(_.ary(moment, 1)) + .sortBy(Number); + + const valid = moments.size() === 2 && moments.every(isValidMoment); + if (!valid) { + this.clearBounds(); + throw new Error('invalid bounds set: ' + input); + } + + this._lb = moments.shift(); + this._ub = moments.pop(); + if (this.getDuration().asSeconds() < 0) { + throw new TypeError('Intervals must be positive'); + } +}; + +/** + * Clear the stored bounds + * + * @return {undefined} + */ +TimeBuckets.prototype.clearBounds = function() { + this._lb = this._ub = null; +}; + +/** + * Check to see if we have received bounds yet + * + * @return {Boolean} + */ +TimeBuckets.prototype.hasBounds = function() { + return isValidMoment(this._ub) && isValidMoment(this._lb); +}; + +/** + * Return the current bounds, if we have any. + * + * THIS DOES NOT CLONE THE BOUNDS, so editing them + * may have unexpected side-effects. Always + * call bounds.min.clone() before editing + * + * @return {object|undefined} - If bounds are not defined, this + * returns undefined, else it returns the bounds + * for these buckets. This object has two props, + * min and max. Each property will be a moment() + * object + * + */ +TimeBuckets.prototype.getBounds = function() { + if (!this.hasBounds()) return; + return { + min: this._lb, + max: this._ub, + }; +}; + +/** + * Get a moment duration object representing + * the distance between the bounds, if the bounds + * are set. + * + * @return {moment.duration|undefined} + */ +TimeBuckets.prototype.getDuration = function() { + if (!this.hasBounds()) return; + return moment.duration(this._ub - this._lb, 'ms'); +}; + +/** + * Update the interval at which buckets should be + * generated. + * + * Input can be one of the following: + * - Any object from src/legacy/ui/agg_types/buckets/_interval_options.js + * - "auto" + * - Pass a valid moment unit + * - a moment.duration object. + * + * @param {object|string|moment.duration} input - see desc + */ +TimeBuckets.prototype.setInterval = function(input) { + // Preserve the original units because they're lost when the interval is converted to a + // moment duration object. + this.originalInterval = input; + + let interval = input; + + // selection object -> val + if (_.isObject(input)) { + interval = input.val; + } + + if (!interval || interval === 'auto') { + this._i = 'auto'; + return; + } + + if (_.isString(interval)) { + input = interval; + interval = parseInterval(interval); + if (+interval === 0) { + interval = null; + } + } + + // if the value wasn't converted to a duration, and isn't + // already a duration, we have a problem + if (!moment.isDuration(interval)) { + throw new TypeError('"' + input + '" is not a valid interval.'); + } + + this._i = interval; +}; + +/** + * Get the interval for the buckets. If the + * number of buckets created by the interval set + * is larger than config:histogram:maxBars then the + * interval will be scaled up. If the number of buckets + * created is less than one, the interval is scaled back. + * + * The interval object returned is a moment.duration + * object that has been decorated with the following + * properties. + * + * interval.description: a text description of the interval. + * designed to be used list "field per {{ desc }}". + * - "minute" + * - "10 days" + * - "3 years" + * + * interval.expr: the elasticsearch expression that creates this + * interval. If the interval does not properly form an elasticsearch + * expression it will be forced into one. + * + * interval.scaled: the interval was adjusted to + * accommodate the maxBars setting. + * + * interval.scale: the number that y-values should be + * multiplied by + * + * interval.scaleDescription: a description that reflects + * the values which will be produced by using the + * interval.scale. + * + * + * @return {[type]} [description] + */ +TimeBuckets.prototype.getInterval = function(useNormalizedEsInterval = true) { + const self = this; + const duration = self.getDuration(); + const parsedInterval = readInterval(); + + if (useNormalizedEsInterval) { + return decorateInterval(maybeScaleInterval(parsedInterval)); + } else { + return decorateInterval(parsedInterval); + } + + // either pull the interval from state or calculate the auto-interval + function readInterval() { + const interval = self._i; + if (moment.isDuration(interval)) return interval; + return calcAutoIntervalNear(self.getConfig('histogram:barTarget'), Number(duration)); + } + + // check to see if the interval should be scaled, and scale it if so + function maybeScaleInterval(interval) { + if (!self.hasBounds()) return interval; + + const maxLength = self.getConfig('histogram:maxBars'); + const approxLen = duration / interval; + let scaled; + + if (approxLen > maxLength) { + scaled = calcAutoIntervalLessThan(maxLength, Number(duration)); + } else { + return interval; + } + + if (+scaled === +interval) return interval; + + decorateInterval(interval); + return _.assign(scaled, { + preScaled: interval, + scale: interval / scaled, + scaled: true, + }); + } + + // append some TimeBuckets specific props to the interval + function decorateInterval(interval) { + const esInterval = useNormalizedEsInterval + ? convertDurationToNormalizedEsInterval(interval) + : convertIntervalToEsInterval(self.originalInterval); + interval.esValue = esInterval.value; + interval.esUnit = esInterval.unit; + interval.expression = esInterval.expression; + interval.overflow = duration > interval ? moment.duration(interval - duration) : false; + + const prettyUnits = moment.normalizeUnits(esInterval.unit); + if (esInterval.value === 1) { + interval.description = prettyUnits; + } else { + interval.description = esInterval.value + ' ' + prettyUnits + 's'; + } + + return interval; + } +}; + +/** + * Get a date format string that will represent dates that + * progress at our interval. + * + * Since our interval can be as small as 1ms, the default + * date format is usually way too much. with `dateFormat:scaled` + * users can modify how dates are formatted within series + * produced by TimeBuckets + * + * @return {string} + */ +TimeBuckets.prototype.getScaledDateFormat = function() { + const interval = this.getInterval(); + const rules = this.getConfig('dateFormat:scaled'); + + for (let i = rules.length - 1; i >= 0; i--) { + const rule = rules[i]; + if (!rule[0] || interval >= moment.duration(rule[0])) { + return rule[1]; + } + } + + return this.getConfig('dateFormat'); +}; + +TimeBuckets.prototype.getScaledDateFormatter = function() { + const fieldFormats = this.data.fieldFormats; + const DateFieldFormat = fieldFormats.getType(FIELD_FORMAT_IDS.DATE); + + return new DateFieldFormat( + { + pattern: this.getScaledDateFormat(), + }, + this.getConfig.bind(this) + ); +}; + +TimeBuckets.__cached__ = function(self) { + let cache = {}; + const sameMoment = same(moment.isMoment); + const sameDuration = same(moment.isDuration); + + const desc = { + __cached__: { + value: self, + }, + }; + + const breakers = { + setBounds: 'bounds', + clearBounds: 'bounds', + setInterval: 'interval', + }; + + const resources = { + bounds: { + setup: function() { + return [self._lb, self._ub]; + }, + changes: function(prev) { + return !sameMoment(prev[0], self._lb) || !sameMoment(prev[1], self._ub); + }, + }, + interval: { + setup: function() { + return self._i; + }, + changes: function(prev) { + return !sameDuration(prev, this._i); + }, + }, + }; + + function cachedGetter(prop) { + return { + value: function cachedGetter(...rest) { + if (cache.hasOwnProperty(prop)) { + return cache[prop]; + } + + return (cache[prop] = self[prop](...rest)); + }, + }; + } + + function cacheBreaker(prop) { + const resource = resources[breakers[prop]]; + const setup = resource.setup; + const changes = resource.changes; + const fn = self[prop]; + + return { + value: function cacheBreaker() { + const prev = setup.call(self); + const ret = fn.apply(self, arguments); + + if (changes.call(self, prev)) { + cache = {}; + } + + return ret; + }, + }; + } + + function same(checkType) { + return function(a, b) { + if (a === b) return true; + if (checkType(a) === checkType(b)) return +a === +b; + return false; + }; + } + + _.forOwn(TimeBuckets.prototype, function(fn, prop) { + if (prop[0] === '_') return; + + if (breakers.hasOwnProperty(prop)) { + desc[prop] = cacheBreaker(prop); + } else { + desc[prop] = cachedGetter(prop); + } + }); + + return Object.create(self, desc); +}; + +export { TimeBuckets }; diff --git a/x-pack/plugins/watcher/public/plugin.ts b/x-pack/plugins/watcher/public/plugin.ts new file mode 100644 index 00000000000000..d59041b41253d6 --- /dev/null +++ b/x-pack/plugins/watcher/public/plugin.ts @@ -0,0 +1,89 @@ +/* + * 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. + */ +import { i18n } from '@kbn/i18n'; +import { CoreSetup, Plugin, CoreStart } from 'kibana/public'; + +import { FeatureCatalogueCategory } from '../../../../src/plugins/home/public'; + +import { LicenseStatus } from '../common/types/license_status'; + +import { LICENSE_CHECK_STATE } from '../../licensing/public'; +import { TimeBuckets, MANAGEMENT_BREADCRUMB } from './legacy'; +import { PLUGIN } from '../common/constants'; +import { Dependencies } from './types'; + +export class WatcherUIPlugin implements Plugin { + // Reference for when `mount` gets called, we don't want to render if + // we don't have a valid license. Under certain conditions the Watcher app link + // may still be present so this is a final guard. + private licenseStatus: LicenseStatus = { valid: false }; + private hasRegisteredESManagementSection = false; + + setup( + { application, notifications, http, uiSettings, getStartServices }: CoreSetup, + { licensing, management, data, home }: Dependencies + ) { + licensing.license$.subscribe(license => { + const { state, message } = license.check(PLUGIN.ID, PLUGIN.MINIMUM_LICENSE_REQUIRED); + this.licenseStatus = { + valid: state === LICENSE_CHECK_STATE.Valid && license.getFeature(PLUGIN.ID).isAvailable, + message, + }; + if (this.licenseStatus.valid) { + const esSection = management.sections.getSection('elasticsearch'); + if (esSection && !this.hasRegisteredESManagementSection) { + esSection.registerApp({ + id: 'watcher', + title: i18n.translate( + 'xpack.watcher.sections.watchList.managementSection.watcherDisplayName', + { defaultMessage: 'Watcher' } + ), + mount: async ({ element }) => { + const [core, plugins] = await getStartServices(); + const { chrome, i18n: i18nDep, docLinks, savedObjects } = core; + const { eui_utils } = plugins as any; + const { boot } = await import('./application/boot'); + + return boot({ + getLicenseStatus: () => this.licenseStatus, + element, + toasts: notifications.toasts, + http, + uiSettings, + docLinks, + chrome, + euiUtils: eui_utils, + savedObjects: savedObjects.client, + I18nContext: i18nDep.Context, + createTimeBuckets: () => new TimeBuckets(uiSettings, data), + MANAGEMENT_BREADCRUMB, + }); + }, + }); + + home.featureCatalogue.register({ + id: 'watcher', + title: 'Watcher', // This is a product name so we don't translate it. + category: FeatureCatalogueCategory.ADMIN, + description: i18n.translate('xpack.watcher.watcherDescription', { + defaultMessage: + 'Detect changes in your data by creating, managing, and monitoring alerts.', + }), + icon: 'watchesApp', + path: '/app/kibana#/management/elasticsearch/watcher/watches', + showOnHomePage: true, + }); + + this.hasRegisteredESManagementSection = true; + } + } + }); + } + + start(core: CoreStart) {} + + stop() {} +} diff --git a/x-pack/plugins/watcher/public/types.ts b/x-pack/plugins/watcher/public/types.ts new file mode 100644 index 00000000000000..930185051514a9 --- /dev/null +++ b/x-pack/plugins/watcher/public/types.ts @@ -0,0 +1,19 @@ +/* + * 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. + */ + +import { ManagementSetup } from 'src/plugins/management/public'; +import { EuiUtilsStart } from 'src/plugins/eui_utils/public'; +import { LicensingPluginSetup } from '../../licensing/public'; +import { DataPublicPluginSetup } from '../../../../src/plugins/data/public'; +import { HomePublicPluginSetup } from '../../../../src/plugins/home/public'; + +export interface Dependencies { + home: HomePublicPluginSetup; + management: ManagementSetup; + licensing: LicensingPluginSetup; + eui_utils: EuiUtilsStart; + data: DataPublicPluginSetup; +} diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/index.ts b/x-pack/plugins/watcher/server/index.ts similarity index 81% rename from x-pack/legacy/plugins/watcher/server/np_ready/index.ts rename to x-pack/plugins/watcher/server/index.ts index 3f5e1a91209ead..51eb7bfa543fe1 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/index.ts +++ b/x-pack/plugins/watcher/server/index.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { PluginInitializerContext } from 'src/core/server'; +import { PluginInitializerContext } from 'kibana/server'; import { WatcherServerPlugin } from './plugin'; -export const plugin = (ctx: PluginInitializerContext) => new WatcherServerPlugin(); +export const plugin = (ctx: PluginInitializerContext) => new WatcherServerPlugin(ctx); diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/lib/call_with_request_factory.ts b/x-pack/plugins/watcher/server/lib/call_with_request_factory.ts similarity index 93% rename from x-pack/legacy/plugins/watcher/server/np_ready/lib/call_with_request_factory.ts rename to x-pack/plugins/watcher/server/lib/call_with_request_factory.ts index eaec9cd91b23cd..4884c75436c246 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/lib/call_with_request_factory.ts +++ b/x-pack/plugins/watcher/server/lib/call_with_request_factory.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ElasticsearchServiceSetup } from 'src/core/server'; +import { ElasticsearchServiceSetup } from 'kibana/server'; import { once } from 'lodash'; import { elasticsearchJsPlugin } from './elasticsearch_js_plugin'; diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/lib/elasticsearch_js_plugin.ts b/x-pack/plugins/watcher/server/lib/elasticsearch_js_plugin.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/lib/elasticsearch_js_plugin.ts rename to x-pack/plugins/watcher/server/lib/elasticsearch_js_plugin.ts diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/lib/fetch_all_from_scroll/__tests__/fetch_all_from_scroll.js b/x-pack/plugins/watcher/server/lib/fetch_all_from_scroll/__tests__/fetch_all_from_scroll.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/lib/fetch_all_from_scroll/__tests__/fetch_all_from_scroll.js rename to x-pack/plugins/watcher/server/lib/fetch_all_from_scroll/__tests__/fetch_all_from_scroll.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/lib/fetch_all_from_scroll/fetch_all_from_scroll.ts b/x-pack/plugins/watcher/server/lib/fetch_all_from_scroll/fetch_all_from_scroll.ts similarity index 92% rename from x-pack/legacy/plugins/watcher/server/np_ready/lib/fetch_all_from_scroll/fetch_all_from_scroll.ts rename to x-pack/plugins/watcher/server/lib/fetch_all_from_scroll/fetch_all_from_scroll.ts index d762b05f01d79e..de01bd59655040 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/lib/fetch_all_from_scroll/fetch_all_from_scroll.ts +++ b/x-pack/plugins/watcher/server/lib/fetch_all_from_scroll/fetch_all_from_scroll.ts @@ -5,7 +5,7 @@ */ import { get } from 'lodash'; -import { ES_SCROLL_SETTINGS } from '../../../../common/constants'; +import { ES_SCROLL_SETTINGS } from '../../../common/constants'; export function fetchAllFromScroll(response: any, callWithRequest: any, hits: any[] = []) { const newHits = get(response, 'hits.hits', []); diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/lib/fetch_all_from_scroll/index.ts b/x-pack/plugins/watcher/server/lib/fetch_all_from_scroll/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/lib/fetch_all_from_scroll/index.ts rename to x-pack/plugins/watcher/server/lib/fetch_all_from_scroll/index.ts diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/lib/is_es_error/index.ts b/x-pack/plugins/watcher/server/lib/is_es_error/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/lib/is_es_error/index.ts rename to x-pack/plugins/watcher/server/lib/is_es_error/index.ts diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/lib/is_es_error/is_es_error.ts b/x-pack/plugins/watcher/server/lib/is_es_error/is_es_error.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/lib/is_es_error/is_es_error.ts rename to x-pack/plugins/watcher/server/lib/is_es_error/is_es_error.ts diff --git a/x-pack/plugins/watcher/server/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.test.js b/x-pack/plugins/watcher/server/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.test.js new file mode 100644 index 00000000000000..be6873a61e902d --- /dev/null +++ b/x-pack/plugins/watcher/server/lib/license_pre_routing_factory/__tests__/license_pre_routing_factory.test.js @@ -0,0 +1,40 @@ +/* + * 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. + */ + +import expect from '@kbn/expect'; +import { kibanaResponseFactory } from '../../../../../../../src/core/server'; +import { licensePreRoutingFactory } from '../license_pre_routing_factory'; + +describe('license_pre_routing_factory', () => { + describe('#reportingFeaturePreRoutingFactory', () => { + let mockDeps; + let licenseStatus; + + beforeEach(() => { + mockDeps = { getLicenseStatus: () => licenseStatus }; + }); + + describe('status is not valid', () => { + it('replies with 403', () => { + licenseStatus = { hasRequired: false }; + const routeWithLicenseCheck = licensePreRoutingFactory(mockDeps, () => {}); + const stubRequest = {}; + const response = routeWithLicenseCheck({}, stubRequest, kibanaResponseFactory); + expect(response.status).to.be(403); + }); + }); + + describe('status is valid', () => { + it('replies with nothing', () => { + licenseStatus = { hasRequired: true }; + const routeWithLicenseCheck = licensePreRoutingFactory(mockDeps, () => null); + const stubRequest = {}; + const response = routeWithLicenseCheck({}, stubRequest, kibanaResponseFactory); + expect(response).to.be(null); + }); + }); + }); +}); diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/lib/license_pre_routing_factory/index.ts b/x-pack/plugins/watcher/server/lib/license_pre_routing_factory/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/lib/license_pre_routing_factory/index.ts rename to x-pack/plugins/watcher/server/lib/license_pre_routing_factory/index.ts diff --git a/x-pack/plugins/watcher/server/lib/license_pre_routing_factory/license_pre_routing_factory.ts b/x-pack/plugins/watcher/server/lib/license_pre_routing_factory/license_pre_routing_factory.ts new file mode 100644 index 00000000000000..d010a239527254 --- /dev/null +++ b/x-pack/plugins/watcher/server/lib/license_pre_routing_factory/license_pre_routing_factory.ts @@ -0,0 +1,36 @@ +/* + * 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. + */ + +import { + KibanaRequest, + KibanaResponseFactory, + RequestHandler, + RequestHandlerContext, +} from 'kibana/server'; +import { RouteDependencies } from '../../types'; + +export const licensePreRoutingFactory = ( + { getLicenseStatus }: RouteDependencies, + handler: RequestHandler +) => { + return function licenseCheck( + ctx: RequestHandlerContext, + request: KibanaRequest, + response: KibanaResponseFactory + ) { + const licenseStatus = getLicenseStatus(); + if (!licenseStatus.hasRequired) { + return response.customError({ + body: { + message: licenseStatus.message || '', + }, + statusCode: 403, + }); + } + + return handler(ctx, request, response); + }; +}; diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/lib/normalized_field_types/index.ts b/x-pack/plugins/watcher/server/lib/normalized_field_types/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/lib/normalized_field_types/index.ts rename to x-pack/plugins/watcher/server/lib/normalized_field_types/index.ts diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/lib/normalized_field_types/normalized_field_types.ts b/x-pack/plugins/watcher/server/lib/normalized_field_types/normalized_field_types.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/lib/normalized_field_types/normalized_field_types.ts rename to x-pack/plugins/watcher/server/lib/normalized_field_types/normalized_field_types.ts diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/action_status/__tests__/action_status.js b/x-pack/plugins/watcher/server/models/action_status/__tests__/action_status.js similarity index 99% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/action_status/__tests__/action_status.js rename to x-pack/plugins/watcher/server/models/action_status/__tests__/action_status.js index 7b55ff16926033..cc5f11da1b5d2c 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/action_status/__tests__/action_status.js +++ b/x-pack/plugins/watcher/server/models/action_status/__tests__/action_status.js @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; import { ActionStatus } from '../action_status'; -import { ACTION_STATES } from '../../../../../common/constants'; +import { ACTION_STATES } from '../../../../common/constants'; import moment from 'moment'; describe('action_status', () => { diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/action_status/action_status.js b/x-pack/plugins/watcher/server/models/action_status/action_status.js similarity index 97% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/action_status/action_status.js rename to x-pack/plugins/watcher/server/models/action_status/action_status.js index 9f6b7da1e3a699..01ec9a436675db 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/action_status/action_status.js +++ b/x-pack/plugins/watcher/server/models/action_status/action_status.js @@ -6,8 +6,8 @@ import { get } from 'lodash'; import { badRequest } from 'boom'; -import { getMoment } from '../../../../common/lib/get_moment'; -import { ACTION_STATES } from '../../../../common/constants'; +import { getMoment } from '../../../common/lib/get_moment'; +import { ACTION_STATES } from '../../../common/constants'; import { i18n } from '@kbn/i18n'; export class ActionStatus { diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/action_status/index.js b/x-pack/plugins/watcher/server/models/action_status/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/action_status/index.js rename to x-pack/plugins/watcher/server/models/action_status/index.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/execute_details/__tests__/execute_details.js b/x-pack/plugins/watcher/server/models/execute_details/__tests__/execute_details.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/execute_details/__tests__/execute_details.js rename to x-pack/plugins/watcher/server/models/execute_details/__tests__/execute_details.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/execute_details/execute_details.js b/x-pack/plugins/watcher/server/models/execute_details/execute_details.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/execute_details/execute_details.js rename to x-pack/plugins/watcher/server/models/execute_details/execute_details.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/execute_details/index.js b/x-pack/plugins/watcher/server/models/execute_details/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/execute_details/index.js rename to x-pack/plugins/watcher/server/models/execute_details/index.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/fields/__tests__/fields.js b/x-pack/plugins/watcher/server/models/fields/__tests__/fields.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/fields/__tests__/fields.js rename to x-pack/plugins/watcher/server/models/fields/__tests__/fields.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/fields/fields.js b/x-pack/plugins/watcher/server/models/fields/fields.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/fields/fields.js rename to x-pack/plugins/watcher/server/models/fields/fields.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/fields/index.js b/x-pack/plugins/watcher/server/models/fields/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/fields/index.js rename to x-pack/plugins/watcher/server/models/fields/index.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/settings/__tests__/settings.js b/x-pack/plugins/watcher/server/models/settings/__tests__/settings.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/settings/__tests__/settings.js rename to x-pack/plugins/watcher/server/models/settings/__tests__/settings.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/settings/index.js b/x-pack/plugins/watcher/server/models/settings/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/settings/index.js rename to x-pack/plugins/watcher/server/models/settings/index.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/settings/settings.js b/x-pack/plugins/watcher/server/models/settings/settings.js similarity index 97% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/settings/settings.js rename to x-pack/plugins/watcher/server/models/settings/settings.js index 4aa524731d88da..42fbda9cbe91de 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/settings/settings.js +++ b/x-pack/plugins/watcher/server/models/settings/settings.js @@ -5,7 +5,7 @@ */ import { merge } from 'lodash'; -import { ACTION_TYPES } from '../../../../common/constants'; +import { ACTION_TYPES } from '../../../common/constants'; function isEnabledByDefault(actionType) { switch (actionType) { diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/visualize_options/index.js b/x-pack/plugins/watcher/server/models/visualize_options/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/visualize_options/index.js rename to x-pack/plugins/watcher/server/models/visualize_options/index.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/visualize_options/visualize_options.js b/x-pack/plugins/watcher/server/models/visualize_options/visualize_options.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/visualize_options/visualize_options.js rename to x-pack/plugins/watcher/server/models/visualize_options/visualize_options.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/base_watch.js b/x-pack/plugins/watcher/server/models/watch/base_watch.js similarity index 98% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/base_watch.js rename to x-pack/plugins/watcher/server/models/watch/base_watch.js index d77e6d6caa2fa8..ea09fac6f85236 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/base_watch.js +++ b/x-pack/plugins/watcher/server/models/watch/base_watch.js @@ -6,7 +6,7 @@ import { get, map, pick } from 'lodash'; import { badRequest } from 'boom'; -import { Action } from '../../../../common/models/action'; +import { Action } from '../../../common/models/action'; import { WatchStatus } from '../watch_status'; import { i18n } from '@kbn/i18n'; import { WatchErrors } from '../watch_errors'; diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/base_watch.test.js b/x-pack/plugins/watcher/server/models/watch/base_watch.test.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/base_watch.test.js rename to x-pack/plugins/watcher/server/models/watch/base_watch.test.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/index.js b/x-pack/plugins/watcher/server/models/watch/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/index.js rename to x-pack/plugins/watcher/server/models/watch/index.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/json_watch.js b/x-pack/plugins/watcher/server/models/watch/json_watch.js similarity index 92% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/json_watch.js rename to x-pack/plugins/watcher/server/models/watch/json_watch.js index 2440d4ef338816..dbb34e971f94ac 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/json_watch.js +++ b/x-pack/plugins/watcher/server/models/watch/json_watch.js @@ -6,8 +6,8 @@ import { isEmpty, cloneDeep, has, merge } from 'lodash'; import { BaseWatch } from './base_watch'; -import { WATCH_TYPES } from '../../../../common/constants'; -import { serializeJsonWatch } from '../../../../common/lib/serialization'; +import { WATCH_TYPES } from '../../../common/constants'; +import { serializeJsonWatch } from '../../../common/lib/serialization'; export class JsonWatch extends BaseWatch { // This constructor should not be used directly. diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/json_watch.test.js b/x-pack/plugins/watcher/server/models/watch/json_watch.test.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/json_watch.test.js rename to x-pack/plugins/watcher/server/models/watch/json_watch.test.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/lib/get_watch_type/get_watch_type.js b/x-pack/plugins/watcher/server/models/watch/lib/get_watch_type/get_watch_type.js similarity index 88% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/lib/get_watch_type/get_watch_type.js rename to x-pack/plugins/watcher/server/models/watch/lib/get_watch_type/get_watch_type.js index 72c725eda2bd18..2bdd03e23c6dcd 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/lib/get_watch_type/get_watch_type.js +++ b/x-pack/plugins/watcher/server/models/watch/lib/get_watch_type/get_watch_type.js @@ -5,7 +5,7 @@ */ import { get, contains, values } from 'lodash'; -import { WATCH_TYPES } from '../../../../../../common/constants'; +import { WATCH_TYPES } from '../../../../../common/constants'; export function getWatchType(watchJson) { const type = get(watchJson, 'metadata.xpack.type'); diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/lib/get_watch_type/index.js b/x-pack/plugins/watcher/server/models/watch/lib/get_watch_type/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/lib/get_watch_type/index.js rename to x-pack/plugins/watcher/server/models/watch/lib/get_watch_type/index.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/monitoring_watch.js b/x-pack/plugins/watcher/server/models/watch/monitoring_watch.js similarity index 97% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/monitoring_watch.js rename to x-pack/plugins/watcher/server/models/watch/monitoring_watch.js index 4aced5d0092d96..8f32621bfbb867 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/monitoring_watch.js +++ b/x-pack/plugins/watcher/server/models/watch/monitoring_watch.js @@ -7,7 +7,7 @@ import { merge } from 'lodash'; import { badRequest } from 'boom'; import { BaseWatch } from './base_watch'; -import { WATCH_TYPES } from '../../../../common/constants'; +import { WATCH_TYPES } from '../../../common/constants'; import { i18n } from '@kbn/i18n'; export class MonitoringWatch extends BaseWatch { diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/monitoring_watch.test.js b/x-pack/plugins/watcher/server/models/watch/monitoring_watch.test.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/monitoring_watch.test.js rename to x-pack/plugins/watcher/server/models/watch/monitoring_watch.test.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/__tests__/format_visualize_data.js b/x-pack/plugins/watcher/server/models/watch/threshold_watch/__tests__/format_visualize_data.js similarity index 99% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/__tests__/format_visualize_data.js rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/__tests__/format_visualize_data.js index 14aa8f7873e18f..99e88c3628ea8e 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/__tests__/format_visualize_data.js +++ b/x-pack/plugins/watcher/server/models/watch/threshold_watch/__tests__/format_visualize_data.js @@ -5,7 +5,7 @@ */ import expect from '@kbn/expect'; -import { AGG_TYPES } from '../../../../../../common/constants'; +import { AGG_TYPES } from '../../../../../common/constants'; import { formatVisualizeData } from '../format_visualize_data'; describe('watch', () => { diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/build_visualize_query.js b/x-pack/plugins/watcher/server/models/watch/threshold_watch/build_visualize_query.js similarity index 95% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/build_visualize_query.js rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/build_visualize_query.js index cc79aec682400d..84bdae6ad95fdf 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/build_visualize_query.js +++ b/x-pack/plugins/watcher/server/models/watch/threshold_watch/build_visualize_query.js @@ -5,8 +5,8 @@ */ import { cloneDeep } from 'lodash'; -import { buildInput } from '../../../../../common/lib/serialization'; -import { AGG_TYPES } from '../../../../../common/constants'; +import { buildInput } from '../../../../common/lib/serialization'; +import { AGG_TYPES } from '../../../../common/constants'; /* input.search.request.body.query.bool.filter.range diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/count.json b/x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/count.json similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/count.json rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/count.json diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/count.query.date.json b/x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/count.query.date.json similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/count.query.date.json rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/count.query.date.json diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/count.query.json b/x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/count.query.json similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/count.query.json rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/count.query.json diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/count_terms.json b/x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/count_terms.json similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/count_terms.json rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/count_terms.json diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/count_terms.query.date.json b/x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/count_terms.query.date.json similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/count_terms.query.date.json rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/count_terms.query.date.json diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/count_terms.query.json b/x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/count_terms.query.json similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/count_terms.query.json rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/count_terms.query.json diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/non_count.json b/x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/non_count.json similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/non_count.json rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/non_count.json diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/non_count.query.date.json b/x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/non_count.query.date.json similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/non_count.query.date.json rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/non_count.query.date.json diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/non_count.query.json b/x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/non_count.query.json similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/non_count.query.json rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/non_count.query.json diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/non_count_terms.json b/x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/non_count_terms.json similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/non_count_terms.json rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/non_count_terms.json diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/non_count_terms.query.date.json b/x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/non_count_terms.query.date.json similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/non_count_terms.query.date.json rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/non_count_terms.query.date.json diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/non_count_terms.query.json b/x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/non_count_terms.query.json similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/data_samples/non_count_terms.query.json rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/data_samples/non_count_terms.query.json diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/format_visualize_data.js b/x-pack/plugins/watcher/server/models/watch/threshold_watch/format_visualize_data.js similarity index 97% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/format_visualize_data.js rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/format_visualize_data.js index c8a6ac08df2c15..c93add71bfe38f 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/format_visualize_data.js +++ b/x-pack/plugins/watcher/server/models/watch/threshold_watch/format_visualize_data.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { AGG_TYPES } from '../../../../../common/constants'; +import { AGG_TYPES } from '../../../../common/constants'; export function formatVisualizeData({ aggType, termField }, results) { if (aggType === AGG_TYPES.COUNT && !Boolean(termField)) { diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/index.js b/x-pack/plugins/watcher/server/models/watch/threshold_watch/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/index.js rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/index.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/threshold_watch.js b/x-pack/plugins/watcher/server/models/watch/threshold_watch/threshold_watch.js similarity index 97% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/threshold_watch.js rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/threshold_watch.js index e5410588ab566c..ebef741200e003 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/threshold_watch.js +++ b/x-pack/plugins/watcher/server/models/watch/threshold_watch/threshold_watch.js @@ -6,8 +6,8 @@ import { merge } from 'lodash'; import { BaseWatch } from '../base_watch'; -import { WATCH_TYPES, COMPARATORS, SORT_ORDERS } from '../../../../../common/constants'; -import { serializeThresholdWatch } from '../../../../../common/lib/serialization'; +import { WATCH_TYPES, COMPARATORS, SORT_ORDERS } from '../../../../common/constants'; +import { serializeThresholdWatch } from '../../../../common/lib/serialization'; import { buildVisualizeQuery } from './build_visualize_query'; import { formatVisualizeData } from './format_visualize_data'; diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/threshold_watch.test.js b/x-pack/plugins/watcher/server/models/watch/threshold_watch/threshold_watch.test.js similarity index 99% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/threshold_watch.test.js rename to x-pack/plugins/watcher/server/models/watch/threshold_watch/threshold_watch.test.js index e65342708c9d5a..af4aae54fbfeac 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/threshold_watch/threshold_watch.test.js +++ b/x-pack/plugins/watcher/server/models/watch/threshold_watch/threshold_watch.test.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { COMPARATORS, SORT_ORDERS } from '../../../../../common/constants'; +import { COMPARATORS, SORT_ORDERS } from '../../../../common/constants'; import { WatchErrors } from '../../watch_errors'; import { ThresholdWatch } from './threshold_watch'; diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/watch.js b/x-pack/plugins/watcher/server/models/watch/watch.js similarity index 97% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/watch.js rename to x-pack/plugins/watcher/server/models/watch/watch.js index cc92741de73ae0..febf9c20b07a65 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/watch.js +++ b/x-pack/plugins/watcher/server/models/watch/watch.js @@ -6,7 +6,7 @@ import { set } from 'lodash'; import { badRequest } from 'boom'; -import { WATCH_TYPES } from '../../../../common/constants'; +import { WATCH_TYPES } from '../../../common/constants'; import { JsonWatch } from './json_watch'; import { MonitoringWatch } from './monitoring_watch'; import { ThresholdWatch } from './threshold_watch'; diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/watch.test.js b/x-pack/plugins/watcher/server/models/watch/watch.test.js similarity index 98% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch/watch.test.js rename to x-pack/plugins/watcher/server/models/watch/watch.test.js index d6e23e727d5750..51eeb6a8c05386 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch/watch.test.js +++ b/x-pack/plugins/watcher/server/models/watch/watch.test.js @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { WATCH_TYPES } from '../../../../common/constants'; +import { WATCH_TYPES } from '../../../common/constants'; import { Watch } from './watch'; import { JsonWatch } from './json_watch'; import { MonitoringWatch } from './monitoring_watch'; diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch_errors/index.js b/x-pack/plugins/watcher/server/models/watch_errors/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch_errors/index.js rename to x-pack/plugins/watcher/server/models/watch_errors/index.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch_errors/watch_errors.js b/x-pack/plugins/watcher/server/models/watch_errors/watch_errors.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch_errors/watch_errors.js rename to x-pack/plugins/watcher/server/models/watch_errors/watch_errors.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch_errors/watch_errors.test.js b/x-pack/plugins/watcher/server/models/watch_errors/watch_errors.test.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch_errors/watch_errors.test.js rename to x-pack/plugins/watcher/server/models/watch_errors/watch_errors.test.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch_history_item/__tests__/watch_history_item.js b/x-pack/plugins/watcher/server/models/watch_history_item/__tests__/watch_history_item.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch_history_item/__tests__/watch_history_item.js rename to x-pack/plugins/watcher/server/models/watch_history_item/__tests__/watch_history_item.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch_history_item/index.js b/x-pack/plugins/watcher/server/models/watch_history_item/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch_history_item/index.js rename to x-pack/plugins/watcher/server/models/watch_history_item/index.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch_history_item/watch_history_item.js b/x-pack/plugins/watcher/server/models/watch_history_item/watch_history_item.js similarity index 97% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch_history_item/watch_history_item.js rename to x-pack/plugins/watcher/server/models/watch_history_item/watch_history_item.js index 391c68debfbd9f..134b201628195e 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch_history_item/watch_history_item.js +++ b/x-pack/plugins/watcher/server/models/watch_history_item/watch_history_item.js @@ -5,7 +5,7 @@ */ import { badRequest } from 'boom'; -import { getMoment } from '../../../../common/lib/get_moment'; +import { getMoment } from '../../../common/lib/get_moment'; import { get, cloneDeep } from 'lodash'; import { WatchStatus } from '../watch_status'; import { i18n } from '@kbn/i18n'; diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch_status/__tests__/watch_status.js b/x-pack/plugins/watcher/server/models/watch_status/__tests__/watch_status.js similarity index 99% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch_status/__tests__/watch_status.js rename to x-pack/plugins/watcher/server/models/watch_status/__tests__/watch_status.js index 505e1733e03cd1..0d6731b90abe65 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch_status/__tests__/watch_status.js +++ b/x-pack/plugins/watcher/server/models/watch_status/__tests__/watch_status.js @@ -6,7 +6,7 @@ import expect from '@kbn/expect'; import { WatchStatus } from '../watch_status'; -import { ACTION_STATES, WATCH_STATES, WATCH_STATE_COMMENTS } from '../../../../../common/constants'; +import { ACTION_STATES, WATCH_STATES, WATCH_STATE_COMMENTS } from '../../../../common/constants'; import moment from 'moment'; describe('watch_status', () => { diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch_status/index.js b/x-pack/plugins/watcher/server/models/watch_status/index.js similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch_status/index.js rename to x-pack/plugins/watcher/server/models/watch_status/index.js diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch_status/watch_status.js b/x-pack/plugins/watcher/server/models/watch_status/watch_status.js similarity index 98% rename from x-pack/legacy/plugins/watcher/server/np_ready/models/watch_status/watch_status.js rename to x-pack/plugins/watcher/server/models/watch_status/watch_status.js index 3cdc1d8eb62e70..a346885965a166 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/models/watch_status/watch_status.js +++ b/x-pack/plugins/watcher/server/models/watch_status/watch_status.js @@ -6,9 +6,9 @@ import { get, map, forEach, max } from 'lodash'; import { badRequest } from 'boom'; -import { getMoment } from '../../../../common/lib/get_moment'; +import { getMoment } from '../../../common/lib/get_moment'; import { ActionStatus } from '../action_status'; -import { ACTION_STATES, WATCH_STATES, WATCH_STATE_COMMENTS } from '../../../../common/constants'; +import { ACTION_STATES, WATCH_STATES, WATCH_STATE_COMMENTS } from '../../../common/constants'; import { i18n } from '@kbn/i18n'; function getActionStatusTotals(watchStatus) { diff --git a/x-pack/plugins/watcher/server/plugin.ts b/x-pack/plugins/watcher/server/plugin.ts new file mode 100644 index 00000000000000..1f7b3823609eca --- /dev/null +++ b/x-pack/plugins/watcher/server/plugin.ts @@ -0,0 +1,72 @@ +/* + * 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. + */ +import { CoreSetup, Logger, Plugin, PluginInitializerContext } from 'kibana/server'; +import { PLUGIN } from '../common/constants'; +import { Dependencies, LicenseStatus, RouteDependencies } from './types'; +import { LICENSE_CHECK_STATE } from '../../licensing/server'; + +import { registerSettingsRoutes } from './routes/api/settings'; +import { registerIndicesRoutes } from './routes/api/indices'; +import { registerLicenseRoutes } from './routes/api/license'; +import { registerWatchesRoutes } from './routes/api/watches'; +import { registerWatchRoutes } from './routes/api/watch'; +import { registerListFieldsRoute } from './routes/api/register_list_fields_route'; +import { registerLoadHistoryRoute } from './routes/api/register_load_history_route'; + +export class WatcherServerPlugin implements Plugin { + log: Logger; + + private licenseStatus: LicenseStatus = { + hasRequired: false, + }; + + constructor(ctx: PluginInitializerContext) { + this.log = ctx.logger.get(); + } + + async setup( + { http, elasticsearch: elasticsearchService }: CoreSetup, + { licensing }: Dependencies + ) { + const elasticsearch = await elasticsearchService.adminClient; + const router = http.createRouter(); + const routeDependencies: RouteDependencies = { + elasticsearch, + elasticsearchService, + router, + getLicenseStatus: () => this.licenseStatus, + }; + + registerListFieldsRoute(routeDependencies); + registerLoadHistoryRoute(routeDependencies); + registerIndicesRoutes(routeDependencies); + registerLicenseRoutes(routeDependencies); + registerSettingsRoutes(routeDependencies); + registerWatchesRoutes(routeDependencies); + registerWatchRoutes(routeDependencies); + + licensing.license$.subscribe(async license => { + const { state, message } = license.check(PLUGIN.ID, PLUGIN.MINIMUM_LICENSE_REQUIRED); + const hasMinimumLicense = state === LICENSE_CHECK_STATE.Valid; + if (hasMinimumLicense && license.getFeature(PLUGIN.ID)) { + this.log.info('Enabling Watcher plugin.'); + this.licenseStatus = { + hasRequired: true, + }; + } else { + if (message) { + this.log.info(message); + } + this.licenseStatus = { + hasRequired: false, + message, + }; + } + }); + } + start() {} + stop() {} +} diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/indices/index.ts b/x-pack/plugins/watcher/server/routes/api/indices/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/indices/index.ts rename to x-pack/plugins/watcher/server/routes/api/indices/index.ts diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/indices/register_get_route.ts b/x-pack/plugins/watcher/server/routes/api/indices/register_get_route.ts similarity index 91% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/indices/register_get_route.ts rename to x-pack/plugins/watcher/server/routes/api/indices/register_get_route.ts index 6b6b643dc4adf1..30607b82e32950 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/indices/register_get_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/indices/register_get_route.ts @@ -5,12 +5,12 @@ */ import { schema } from '@kbn/config-schema'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { reduce, size } from 'lodash'; import { callWithRequestFactory } from '../../../lib/call_with_request_factory'; import { isEsError } from '../../../lib/is_es_error'; +import { RouteDependencies } from '../../../types'; import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; -import { RouteDependencies, ServerShim } from '../../../types'; function getIndexNamesFromAliasesResponse(json: Record) { return reduce( @@ -61,7 +61,7 @@ function getIndices(callWithRequest: any, pattern: string, limit = 10) { }); } -export function registerGetRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerGetRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); const { pattern } = request.body; @@ -87,6 +87,6 @@ export function registerGetRoute(deps: RouteDependencies, legacy: ServerShim) { body: schema.object({}, { allowUnknowns: true }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/indices/register_indices_routes.ts b/x-pack/plugins/watcher/server/routes/api/indices/register_indices_routes.ts similarity index 62% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/indices/register_indices_routes.ts rename to x-pack/plugins/watcher/server/routes/api/indices/register_indices_routes.ts index 647a85c311532b..db8dbdc8618d45 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/indices/register_indices_routes.ts +++ b/x-pack/plugins/watcher/server/routes/api/indices/register_indices_routes.ts @@ -5,8 +5,8 @@ */ import { registerGetRoute } from './register_get_route'; -import { RouteDependencies, ServerShim } from '../../../types'; +import { RouteDependencies } from '../../../types'; -export function registerIndicesRoutes(deps: RouteDependencies, legacy: ServerShim) { - registerGetRoute(deps, legacy); +export function registerIndicesRoutes(deps: RouteDependencies) { + registerGetRoute(deps); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/license/index.ts b/x-pack/plugins/watcher/server/routes/api/license/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/license/index.ts rename to x-pack/plugins/watcher/server/routes/api/license/index.ts diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/license/register_license_routes.ts b/x-pack/plugins/watcher/server/routes/api/license/register_license_routes.ts similarity index 62% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/license/register_license_routes.ts rename to x-pack/plugins/watcher/server/routes/api/license/register_license_routes.ts index c5965d9315b01e..9b7f6272442bd9 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/license/register_license_routes.ts +++ b/x-pack/plugins/watcher/server/routes/api/license/register_license_routes.ts @@ -5,8 +5,8 @@ */ import { registerRefreshRoute } from './register_refresh_route'; -import { RouteDependencies, ServerShim } from '../../../types'; +import { RouteDependencies } from '../../../types'; -export function registerLicenseRoutes(deps: RouteDependencies, legacy: ServerShim) { - registerRefreshRoute(deps, legacy); +export function registerLicenseRoutes(deps: RouteDependencies) { + registerRefreshRoute(deps); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/license/register_refresh_route.ts b/x-pack/plugins/watcher/server/routes/api/license/register_refresh_route.ts similarity index 78% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/license/register_refresh_route.ts rename to x-pack/plugins/watcher/server/routes/api/license/register_refresh_route.ts index 08f1f26a84a4fb..a61fd16e8be4ad 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/license/register_refresh_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/license/register_refresh_route.ts @@ -4,17 +4,16 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; +import { RouteDependencies } from '../../../types'; import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; -import { RouteDependencies, ServerShim } from '../../../types'; - /* In order for the client to have the most up-to-date snapshot of the current license, it needs to make a round-trip to the kibana server. This refresh endpoint is provided for when the client needs to check the license, but doesn't need to pull data from the server for any reason, i.e., when adding a new watch. */ -export function registerRefreshRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerRefreshRoute(deps: RouteDependencies) { const handler: RequestHandler = (ctx, request, response) => { return response.ok({ body: { success: true } }); }; @@ -24,6 +23,6 @@ export function registerRefreshRoute(deps: RouteDependencies, legacy: ServerShim path: '/api/watcher/license/refresh', validate: false, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/register_list_fields_route.ts b/x-pack/plugins/watcher/server/routes/api/register_list_fields_route.ts similarity index 86% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/register_list_fields_route.ts rename to x-pack/plugins/watcher/server/routes/api/register_list_fields_route.ts index f3222d24f0adf9..7c47379b875892 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/register_list_fields_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/register_list_fields_route.ts @@ -5,13 +5,13 @@ */ import { schema } from '@kbn/config-schema'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { callWithRequestFactory } from '../../lib/call_with_request_factory'; import { isEsError } from '../../lib/is_es_error'; -import { licensePreRoutingFactory } from '../../lib/license_pre_routing_factory'; // @ts-ignore -import { Fields } from '../../models/fields'; -import { RouteDependencies, ServerShim } from '../../types'; +import { Fields } from '../../models/fields/index'; +import { licensePreRoutingFactory } from '../../lib/license_pre_routing_factory'; +import { RouteDependencies } from '../../types'; function fetchFields(callWithRequest: any, indexes: string[]) { const params = { @@ -25,7 +25,7 @@ function fetchFields(callWithRequest: any, indexes: string[]) { return callWithRequest('fieldCaps', params); } -export function registerListFieldsRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerListFieldsRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); const { indexes } = request.body; @@ -60,6 +60,6 @@ export function registerListFieldsRoute(deps: RouteDependencies, legacy: ServerS }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/register_load_history_route.ts b/x-pack/plugins/watcher/server/routes/api/register_load_history_route.ts similarity index 90% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/register_load_history_route.ts rename to x-pack/plugins/watcher/server/routes/api/register_load_history_route.ts index d62e4f48c56296..1be8477df79bc7 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/register_load_history_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/register_load_history_route.ts @@ -6,14 +6,14 @@ import { schema } from '@kbn/config-schema'; import { get } from 'lodash'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { callWithRequestFactory } from '../../lib/call_with_request_factory'; import { isEsError } from '../../lib/is_es_error'; -import { INDEX_NAMES } from '../../../../common/constants'; +import { INDEX_NAMES } from '../../../common/constants'; +import { RouteDependencies } from '../../types'; import { licensePreRoutingFactory } from '../../lib/license_pre_routing_factory'; -import { RouteDependencies, ServerShim } from '../../types'; // @ts-ignore -import { WatchHistoryItem } from '../../models/watch_history_item'; +import { WatchHistoryItem } from '../../models/watch_history_item/index'; function fetchHistoryItem(callWithRequest: any, watchHistoryItemId: string) { return callWithRequest('search', { @@ -28,7 +28,7 @@ function fetchHistoryItem(callWithRequest: any, watchHistoryItemId: string) { }); } -export function registerLoadHistoryRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerLoadHistoryRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); const id = request.params.id; @@ -72,6 +72,6 @@ export function registerLoadHistoryRoute(deps: RouteDependencies, legacy: Server }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/settings/index.ts b/x-pack/plugins/watcher/server/routes/api/settings/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/settings/index.ts rename to x-pack/plugins/watcher/server/routes/api/settings/index.ts diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/settings/register_load_route.ts b/x-pack/plugins/watcher/server/routes/api/settings/register_load_route.ts similarity index 79% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/settings/register_load_route.ts rename to x-pack/plugins/watcher/server/routes/api/settings/register_load_route.ts index 710d079d810da8..6c70c2d0d07b6a 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/settings/register_load_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/settings/register_load_route.ts @@ -4,12 +4,12 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IClusterClient, RequestHandler } from 'src/core/server'; +import { IClusterClient, RequestHandler } from 'kibana/server'; import { isEsError } from '../../../lib/is_es_error'; -import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; // @ts-ignore -import { Settings } from '../../../models/settings'; -import { RouteDependencies, ServerShim } from '../../../types'; +import { Settings } from '../../../models/settings/index'; +import { RouteDependencies } from '../../../types'; +import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; function fetchClusterSettings(client: IClusterClient) { return client.callAsInternalUser('cluster.getSettings', { @@ -18,7 +18,7 @@ function fetchClusterSettings(client: IClusterClient) { }); } -export function registerLoadRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerLoadRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { try { const settings = await fetchClusterSettings(deps.elasticsearch); @@ -38,6 +38,6 @@ export function registerLoadRoute(deps: RouteDependencies, legacy: ServerShim) { path: '/api/watcher/settings', validate: false, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/settings/register_settings_routes.ts b/x-pack/plugins/watcher/server/routes/api/settings/register_settings_routes.ts similarity index 62% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/settings/register_settings_routes.ts rename to x-pack/plugins/watcher/server/routes/api/settings/register_settings_routes.ts index 0b24ec0e90bd42..ea4aa6ea4381d9 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/settings/register_settings_routes.ts +++ b/x-pack/plugins/watcher/server/routes/api/settings/register_settings_routes.ts @@ -5,8 +5,8 @@ */ import { registerLoadRoute } from './register_load_route'; -import { RouteDependencies, ServerShim } from '../../../types'; +import { RouteDependencies } from '../../../types'; -export function registerSettingsRoutes(deps: RouteDependencies, legacy: ServerShim) { - registerLoadRoute(deps, legacy); +export function registerSettingsRoutes(deps: RouteDependencies) { + registerLoadRoute(deps); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/action/index.ts b/x-pack/plugins/watcher/server/routes/api/watch/action/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/action/index.ts rename to x-pack/plugins/watcher/server/routes/api/watch/action/index.ts diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/action/register_acknowledge_route.ts b/x-pack/plugins/watcher/server/routes/api/watch/action/register_acknowledge_route.ts similarity index 88% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/action/register_acknowledge_route.ts rename to x-pack/plugins/watcher/server/routes/api/watch/action/register_acknowledge_route.ts index d0cc0a27e87ff1..08eec7456e3a57 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/action/register_acknowledge_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/watch/action/register_acknowledge_route.ts @@ -6,13 +6,13 @@ import { schema } from '@kbn/config-schema'; import { get } from 'lodash'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { callWithRequestFactory } from '../../../../lib/call_with_request_factory'; import { isEsError } from '../../../../lib/is_es_error'; -import { licensePreRoutingFactory } from '../../../../lib/license_pre_routing_factory'; // @ts-ignore -import { WatchStatus } from '../../../../models/watch_status'; -import { RouteDependencies, ServerShim } from '../../../../types'; +import { WatchStatus } from '../../../../models/watch_status/index'; +import { RouteDependencies } from '../../../../types'; +import { licensePreRoutingFactory } from '../../../../lib/license_pre_routing_factory'; function acknowledgeAction(callWithRequest: any, watchId: string, actionId: string) { return callWithRequest('watcher.ackWatch', { @@ -21,7 +21,7 @@ function acknowledgeAction(callWithRequest: any, watchId: string, actionId: stri }); } -export function registerAcknowledgeRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerAcknowledgeRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); const { watchId, actionId } = request.params; @@ -60,6 +60,6 @@ export function registerAcknowledgeRoute(deps: RouteDependencies, legacy: Server }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/action/register_action_routes.ts b/x-pack/plugins/watcher/server/routes/api/watch/action/register_action_routes.ts similarity index 61% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/action/register_action_routes.ts rename to x-pack/plugins/watcher/server/routes/api/watch/action/register_action_routes.ts index 022c844867938b..c3109e1d091c10 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/action/register_action_routes.ts +++ b/x-pack/plugins/watcher/server/routes/api/watch/action/register_action_routes.ts @@ -5,8 +5,8 @@ */ import { registerAcknowledgeRoute } from './register_acknowledge_route'; -import { RouteDependencies, ServerShim } from '../../../../types'; +import { RouteDependencies } from '../../../../types'; -export function registerActionRoutes(server: RouteDependencies, legacy: ServerShim) { - registerAcknowledgeRoute(server, legacy); +export function registerActionRoutes(deps: RouteDependencies) { + registerAcknowledgeRoute(deps); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/index.ts b/x-pack/plugins/watcher/server/routes/api/watch/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/index.ts rename to x-pack/plugins/watcher/server/routes/api/watch/index.ts diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_activate_route.ts b/x-pack/plugins/watcher/server/routes/api/watch/register_activate_route.ts similarity index 85% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_activate_route.ts rename to x-pack/plugins/watcher/server/routes/api/watch/register_activate_route.ts index 28c482124aaee0..fdc20854ed8c22 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_activate_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_activate_route.ts @@ -5,14 +5,14 @@ */ import { schema } from '@kbn/config-schema'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { get } from 'lodash'; import { callWithRequestFactory } from '../../../lib/call_with_request_factory'; import { isEsError } from '../../../lib/is_es_error'; +import { RouteDependencies } from '../../../types'; import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; -import { RouteDependencies, ServerShim } from '../../../types'; // @ts-ignore -import { WatchStatus } from '../../../models/watch_status'; +import { WatchStatus } from '../../../models/watch_status/index'; function activateWatch(callWithRequest: any, watchId: string) { return callWithRequest('watcher.activateWatch', { @@ -20,7 +20,7 @@ function activateWatch(callWithRequest: any, watchId: string) { }); } -export function registerActivateRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerActivateRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); @@ -61,6 +61,6 @@ export function registerActivateRoute(deps: RouteDependencies, legacy: ServerShi }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_deactivate_route.ts b/x-pack/plugins/watcher/server/routes/api/watch/register_deactivate_route.ts similarity index 85% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_deactivate_route.ts rename to x-pack/plugins/watcher/server/routes/api/watch/register_deactivate_route.ts index ac87066379a20c..08d99f42df0540 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_deactivate_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_deactivate_route.ts @@ -4,14 +4,14 @@ * you may not use this file except in compliance with the Elastic License. */ import { schema } from '@kbn/config-schema'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { get } from 'lodash'; import { callWithRequestFactory } from '../../../lib/call_with_request_factory'; import { isEsError } from '../../../lib/is_es_error'; +import { RouteDependencies } from '../../../types'; import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; -import { RouteDependencies, ServerShim } from '../../../types'; // @ts-ignore -import { WatchStatus } from '../../../models/watch_status'; +import { WatchStatus } from '../../../models/watch_status/index'; function deactivateWatch(callWithRequest: any, watchId: string) { return callWithRequest('watcher.deactivateWatch', { @@ -19,7 +19,7 @@ function deactivateWatch(callWithRequest: any, watchId: string) { }); } -export function registerDeactivateRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerDeactivateRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); @@ -60,6 +60,6 @@ export function registerDeactivateRoute(deps: RouteDependencies, legacy: ServerS }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_delete_route.ts b/x-pack/plugins/watcher/server/routes/api/watch/register_delete_route.ts similarity index 86% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_delete_route.ts rename to x-pack/plugins/watcher/server/routes/api/watch/register_delete_route.ts index 26b6f96f6cb8cc..6e95cf959bc9ca 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_delete_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_delete_route.ts @@ -5,11 +5,11 @@ */ import { schema } from '@kbn/config-schema'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { callWithRequestFactory } from '../../../lib/call_with_request_factory'; import { isEsError } from '../../../lib/is_es_error'; +import { RouteDependencies } from '../../../types'; import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; -import { RouteDependencies, ServerShim } from '../../../types'; function deleteWatch(callWithRequest: any, watchId: string) { return callWithRequest('watcher.deleteWatch', { @@ -17,7 +17,7 @@ function deleteWatch(callWithRequest: any, watchId: string) { }); } -export function registerDeleteRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerDeleteRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); @@ -48,6 +48,6 @@ export function registerDeleteRoute(deps: RouteDependencies, legacy: ServerShim) }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_execute_route.ts b/x-pack/plugins/watcher/server/routes/api/watch/register_execute_route.ts similarity index 86% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_execute_route.ts rename to x-pack/plugins/watcher/server/routes/api/watch/register_execute_route.ts index f3bce228653fe5..fef6d07317da5c 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_execute_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_execute_route.ts @@ -5,19 +5,19 @@ */ import { schema } from '@kbn/config-schema'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { get } from 'lodash'; import { callWithRequestFactory } from '../../../lib/call_with_request_factory'; import { isEsError } from '../../../lib/is_es_error'; import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; -import { RouteDependencies, ServerShim } from '../../../types'; +import { RouteDependencies } from '../../../types'; // @ts-ignore -import { ExecuteDetails } from '../../../models/execute_details'; +import { ExecuteDetails } from '../../../models/execute_details/index'; // @ts-ignore -import { Watch } from '../../../models/watch'; +import { Watch } from '../../../models/watch/index'; // @ts-ignore -import { WatchHistoryItem } from '../../../models/watch_history_item'; +import { WatchHistoryItem } from '../../../models/watch_history_item/index'; function executeWatch(callWithRequest: any, executeDetails: any, watchJson: any) { const body = executeDetails; @@ -28,7 +28,7 @@ function executeWatch(callWithRequest: any, executeDetails: any, watchJson: any) }); } -export function registerExecuteRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerExecuteRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); const executeDetails = ExecuteDetails.fromDownstreamJson(request.body.executeDetails); @@ -73,6 +73,6 @@ export function registerExecuteRoute(deps: RouteDependencies, legacy: ServerShim }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_history_route.ts b/x-pack/plugins/watcher/server/routes/api/watch/register_history_route.ts similarity index 89% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_history_route.ts rename to x-pack/plugins/watcher/server/routes/api/watch/register_history_route.ts index e236d7dd642a39..7f0f1ac8d66a31 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_history_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_history_route.ts @@ -5,16 +5,16 @@ */ import { schema } from '@kbn/config-schema'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { get } from 'lodash'; import { callWithRequestFactory } from '../../../lib/call_with_request_factory'; import { fetchAllFromScroll } from '../../../lib/fetch_all_from_scroll'; -import { INDEX_NAMES, ES_SCROLL_SETTINGS } from '../../../../../common/constants'; +import { INDEX_NAMES, ES_SCROLL_SETTINGS } from '../../../../common/constants'; import { isEsError } from '../../../lib/is_es_error'; +import { RouteDependencies } from '../../../types'; import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; -import { RouteDependencies, ServerShim } from '../../../types'; // @ts-ignore -import { WatchHistoryItem } from '../../../models/watch_history_item'; +import { WatchHistoryItem } from '../../../models/watch_history_item/index'; function fetchHistoryItems(callWithRequest: any, watchId: any, startTime: any) { const params: any = { @@ -42,7 +42,7 @@ function fetchHistoryItems(callWithRequest: any, watchId: any, startTime: any) { ); } -export function registerHistoryRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerHistoryRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); const { watchId } = request.params; @@ -92,6 +92,6 @@ export function registerHistoryRoute(deps: RouteDependencies, legacy: ServerShim }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_load_route.ts b/x-pack/plugins/watcher/server/routes/api/watch/register_load_route.ts similarity index 86% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_load_route.ts rename to x-pack/plugins/watcher/server/routes/api/watch/register_load_route.ts index 7311ad08f73a60..91d71cd737121f 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_load_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_load_route.ts @@ -5,14 +5,14 @@ */ import { schema } from '@kbn/config-schema'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { get } from 'lodash'; import { callWithRequestFactory } from '../../../lib/call_with_request_factory'; import { isEsError } from '../../../lib/is_es_error'; import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; // @ts-ignore -import { Watch } from '../../../models/watch'; -import { RouteDependencies, ServerShim } from '../../../types'; +import { Watch } from '../../../models/watch/index'; +import { RouteDependencies } from '../../../types'; function fetchWatch(callWithRequest: any, watchId: string) { return callWithRequest('watcher.getWatch', { @@ -20,7 +20,7 @@ function fetchWatch(callWithRequest: any, watchId: string) { }); } -export function registerLoadRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerLoadRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); @@ -64,6 +64,6 @@ export function registerLoadRoute(deps: RouteDependencies, legacy: ServerShim) { }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_save_route.ts b/x-pack/plugins/watcher/server/routes/api/watch/register_save_route.ts similarity index 87% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_save_route.ts rename to x-pack/plugins/watcher/server/routes/api/watch/register_save_route.ts index df4117dee2bfda..7986424e6229a7 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_save_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_save_route.ts @@ -5,17 +5,14 @@ */ import { schema } from '@kbn/config-schema'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { i18n } from '@kbn/i18n'; -import { WATCH_TYPES } from '../../../../../common/constants'; -import { - serializeJsonWatch, - serializeThresholdWatch, -} from '../../../../../common/lib/serialization'; +import { WATCH_TYPES } from '../../../../common/constants'; +import { serializeJsonWatch, serializeThresholdWatch } from '../../../../common/lib/serialization'; import { callWithRequestFactory } from '../../../lib/call_with_request_factory'; import { isEsError } from '../../../lib/is_es_error'; +import { RouteDependencies } from '../../../types'; import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; -import { RouteDependencies, ServerShim } from '../../../types'; function fetchWatch(callWithRequest: any, watchId: string) { return callWithRequest('watcher.getWatch', { @@ -30,7 +27,7 @@ function saveWatch(callWithRequest: any, id: string, body: any) { }); } -export function registerSaveRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerSaveRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); const { id } = request.params; @@ -100,6 +97,6 @@ export function registerSaveRoute(deps: RouteDependencies, legacy: ServerShim) { body: schema.object({}, { allowUnknowns: true }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_visualize_route.ts b/x-pack/plugins/watcher/server/routes/api/watch/register_visualize_route.ts similarity index 86% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_visualize_route.ts rename to x-pack/plugins/watcher/server/routes/api/watch/register_visualize_route.ts index d07a264b0b2b1f..f2110bcc0ebdbc 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_visualize_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_visualize_route.ts @@ -5,16 +5,16 @@ */ import { schema } from '@kbn/config-schema'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { callWithRequestFactory } from '../../../lib/call_with_request_factory'; import { isEsError } from '../../../lib/is_es_error'; +import { RouteDependencies } from '../../../types'; import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; -import { RouteDependencies, ServerShim } from '../../../types'; // @ts-ignore -import { Watch } from '../../../models/watch'; +import { Watch } from '../../../models/watch/index'; // @ts-ignore -import { VisualizeOptions } from '../../../models/visualize_options'; +import { VisualizeOptions } from '../../../models/visualize_options/index'; function fetchVisualizeData(callWithRequest: any, index: any, body: any) { const params = { @@ -28,7 +28,7 @@ function fetchVisualizeData(callWithRequest: any, index: any, body: any) { return callWithRequest('search', params); } -export function registerVisualizeRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerVisualizeRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); const watch = Watch.fromDownstreamJson(request.body.watch); @@ -65,6 +65,6 @@ export function registerVisualizeRoute(deps: RouteDependencies, legacy: ServerSh }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_watch_routes.ts b/x-pack/plugins/watcher/server/routes/api/watch/register_watch_routes.ts similarity index 62% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_watch_routes.ts rename to x-pack/plugins/watcher/server/routes/api/watch/register_watch_routes.ts index 5ecbf3e0d2b46f..fd295ff81782c2 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watch/register_watch_routes.ts +++ b/x-pack/plugins/watcher/server/routes/api/watch/register_watch_routes.ts @@ -13,16 +13,16 @@ import { registerActivateRoute } from './register_activate_route'; import { registerDeactivateRoute } from './register_deactivate_route'; import { registerVisualizeRoute } from './register_visualize_route'; import { registerActionRoutes } from './action'; -import { RouteDependencies, ServerShim } from '../../../types'; +import { RouteDependencies } from '../../../types'; -export function registerWatchRoutes(deps: RouteDependencies, legacy: ServerShim) { - registerDeleteRoute(deps, legacy); - registerExecuteRoute(deps, legacy); - registerLoadRoute(deps, legacy); - registerSaveRoute(deps, legacy); - registerHistoryRoute(deps, legacy); - registerActivateRoute(deps, legacy); - registerDeactivateRoute(deps, legacy); - registerActionRoutes(deps, legacy); - registerVisualizeRoute(deps, legacy); +export function registerWatchRoutes(deps: RouteDependencies) { + registerDeleteRoute(deps); + registerExecuteRoute(deps); + registerLoadRoute(deps); + registerSaveRoute(deps); + registerHistoryRoute(deps); + registerActivateRoute(deps); + registerDeactivateRoute(deps); + registerActionRoutes(deps); + registerVisualizeRoute(deps); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watches/index.ts b/x-pack/plugins/watcher/server/routes/api/watches/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watches/index.ts rename to x-pack/plugins/watcher/server/routes/api/watches/index.ts diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watches/register_delete_route.ts b/x-pack/plugins/watcher/server/routes/api/watches/register_delete_route.ts similarity index 87% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watches/register_delete_route.ts rename to x-pack/plugins/watcher/server/routes/api/watches/register_delete_route.ts index 29c539a0de138a..2ac824529f9a6d 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watches/register_delete_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/watches/register_delete_route.ts @@ -5,10 +5,10 @@ */ import { schema } from '@kbn/config-schema'; -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { callWithRequestFactory } from '../../../lib/call_with_request_factory'; +import { RouteDependencies } from '../../../types'; import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; -import { RouteDependencies, ServerShim } from '../../../types'; function deleteWatches(callWithRequest: any, watchIds: string[]) { const deletePromises = watchIds.map(watchId => { @@ -37,7 +37,7 @@ function deleteWatches(callWithRequest: any, watchIds: string[]) { }); } -export function registerDeleteRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerDeleteRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); @@ -58,6 +58,6 @@ export function registerDeleteRoute(deps: RouteDependencies, legacy: ServerShim) }), }, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watches/register_list_route.ts b/x-pack/plugins/watcher/server/routes/api/watches/register_list_route.ts similarity index 85% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watches/register_list_route.ts rename to x-pack/plugins/watcher/server/routes/api/watches/register_list_route.ts index b94c29e0f98926..fcbdf688a2ab40 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watches/register_list_route.ts +++ b/x-pack/plugins/watcher/server/routes/api/watches/register_list_route.ts @@ -4,16 +4,16 @@ * you may not use this file except in compliance with the Elastic License. */ -import { RequestHandler } from 'src/core/server'; +import { RequestHandler } from 'kibana/server'; import { get } from 'lodash'; import { callWithRequestFactory } from '../../../lib/call_with_request_factory'; import { fetchAllFromScroll } from '../../../lib/fetch_all_from_scroll'; -import { INDEX_NAMES, ES_SCROLL_SETTINGS } from '../../../../../common/constants'; +import { INDEX_NAMES, ES_SCROLL_SETTINGS } from '../../../../common/constants'; import { isEsError } from '../../../lib/is_es_error'; +import { RouteDependencies } from '../../../types'; import { licensePreRoutingFactory } from '../../../lib/license_pre_routing_factory'; -import { RouteDependencies, ServerShim } from '../../../types'; // @ts-ignore -import { Watch } from '../../../models/watch'; +import { Watch } from '../../../models/watch/index'; function fetchWatches(callWithRequest: any) { const params = { @@ -30,7 +30,7 @@ function fetchWatches(callWithRequest: any) { ); } -export function registerListRoute(deps: RouteDependencies, legacy: ServerShim) { +export function registerListRoute(deps: RouteDependencies) { const handler: RequestHandler = async (ctx, request, response) => { const callWithRequest = callWithRequestFactory(deps.elasticsearchService, request); @@ -81,6 +81,6 @@ export function registerListRoute(deps: RouteDependencies, legacy: ServerShim) { path: '/api/watcher/watches', validate: false, }, - licensePreRoutingFactory(legacy, handler) + licensePreRoutingFactory(deps, handler) ); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watches/register_watches_routes.ts b/x-pack/plugins/watcher/server/routes/api/watches/register_watches_routes.ts similarity index 62% rename from x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watches/register_watches_routes.ts rename to x-pack/plugins/watcher/server/routes/api/watches/register_watches_routes.ts index dd5f55078e5913..b515b6264a544a 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/routes/api/watches/register_watches_routes.ts +++ b/x-pack/plugins/watcher/server/routes/api/watches/register_watches_routes.ts @@ -6,9 +6,9 @@ import { registerListRoute } from './register_list_route'; import { registerDeleteRoute } from './register_delete_route'; -import { RouteDependencies, ServerShim } from '../../../types'; +import { RouteDependencies } from '../../../types'; -export function registerWatchesRoutes(deps: RouteDependencies, legacy: ServerShim) { - registerListRoute(deps, legacy); - registerDeleteRoute(deps, legacy); +export function registerWatchesRoutes(deps: RouteDependencies) { + registerListRoute(deps); + registerDeleteRoute(deps); } diff --git a/x-pack/legacy/plugins/watcher/server/np_ready/types.ts b/x-pack/plugins/watcher/server/types.ts similarity index 60% rename from x-pack/legacy/plugins/watcher/server/np_ready/types.ts rename to x-pack/plugins/watcher/server/types.ts index 3d4454aa2a8b77..d9f2d3c3b1e7a6 100644 --- a/x-pack/legacy/plugins/watcher/server/np_ready/types.ts +++ b/x-pack/plugins/watcher/server/types.ts @@ -4,8 +4,14 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IRouter, ElasticsearchServiceSetup, IClusterClient } from 'src/core/server'; -import { XPackMainPlugin } from '../../../xpack_main/server/xpack_main'; +import { IRouter, ElasticsearchServiceSetup, IClusterClient } from 'kibana/server'; +import { LicensingPluginSetup } from '../../licensing/server'; + +import { XPackMainPlugin } from '../../../legacy/plugins/xpack_main/server/xpack_main'; + +export interface Dependencies { + licensing: LicensingPluginSetup; +} export interface ServerShim { route: any; @@ -17,6 +23,12 @@ export interface ServerShim { export interface RouteDependencies { router: IRouter; + getLicenseStatus: () => LicenseStatus; elasticsearchService: ElasticsearchServiceSetup; elasticsearch: IClusterClient; } + +export interface LicenseStatus { + hasRequired: boolean; + message?: string; +} diff --git a/x-pack/legacy/plugins/watcher/test/fixtures/execute_details.ts b/x-pack/plugins/watcher/test/fixtures/execute_details.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/test/fixtures/execute_details.ts rename to x-pack/plugins/watcher/test/fixtures/execute_details.ts diff --git a/x-pack/legacy/plugins/watcher/test/fixtures/index.ts b/x-pack/plugins/watcher/test/fixtures/index.ts similarity index 100% rename from x-pack/legacy/plugins/watcher/test/fixtures/index.ts rename to x-pack/plugins/watcher/test/fixtures/index.ts diff --git a/x-pack/legacy/plugins/watcher/test/fixtures/watch.ts b/x-pack/plugins/watcher/test/fixtures/watch.ts similarity index 95% rename from x-pack/legacy/plugins/watcher/test/fixtures/watch.ts rename to x-pack/plugins/watcher/test/fixtures/watch.ts index d948fddeefd588..3342ebc1497702 100644 --- a/x-pack/legacy/plugins/watcher/test/fixtures/watch.ts +++ b/x-pack/plugins/watcher/test/fixtures/watch.ts @@ -5,7 +5,7 @@ */ import { Moment } from 'moment'; -import { getRandomString } from '../../../../../test_utils'; +import { getRandomString } from '../../../../test_utils'; interface Watch { id: string; diff --git a/x-pack/legacy/plugins/watcher/test/fixtures/watch_history.ts b/x-pack/plugins/watcher/test/fixtures/watch_history.ts similarity index 93% rename from x-pack/legacy/plugins/watcher/test/fixtures/watch_history.ts rename to x-pack/plugins/watcher/test/fixtures/watch_history.ts index 70275e6e8869eb..b8f725aa84a18e 100644 --- a/x-pack/legacy/plugins/watcher/test/fixtures/watch_history.ts +++ b/x-pack/plugins/watcher/test/fixtures/watch_history.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { getRandomString } from '../../../../../test_utils'; +import { getRandomString } from '../../../../test_utils'; interface WatchHistory { startTime: string; From 841afe32fcc548e2217d278cd6f8f59d963d7dda Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Thu, 23 Jan 2020 15:39:43 +0100 Subject: [PATCH 15/72] exclude tutorials from code ownership (#55705) --- .github/CODEOWNERS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e300e1c76af0f6..82568b47a78098 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -16,7 +16,10 @@ /src/legacy/core_plugins/kibana/public/dev_tools/ @elastic/kibana-app /src/legacy/core_plugins/metrics/ @elastic/kibana-app /src/legacy/core_plugins/vis_type_vislib/ @elastic/kibana-app -/src/plugins/home/ @elastic/kibana-app +# Exclude tutorials folder for now because they are not owned by Kibana app and most will move out soon +/src/plugins/home/public @elastic/kibana-app +/src/plugins/home/server/*.ts @elastic/kibana-app +/src/plugins/home/server/services/ @elastic/kibana-app /src/plugins/kibana_legacy/ @elastic/kibana-app /src/plugins/timelion/ @elastic/kibana-app /src/plugins/dev_tools/ @elastic/kibana-app From a895977acaa7957af7a6191a495ea49bb9724259 Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Thu, 23 Jan 2020 15:49:54 +0100 Subject: [PATCH 16/72] [ML] fix chartTooltip$ observable usage (#55694) --- .../application/components/chart_tooltip/chart_tooltip.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/x-pack/legacy/plugins/ml/public/application/components/chart_tooltip/chart_tooltip.tsx b/x-pack/legacy/plugins/ml/public/application/components/chart_tooltip/chart_tooltip.tsx index a28dc41fa1790f..db42c90d49ebbf 100644 --- a/x-pack/legacy/plugins/ml/public/application/components/chart_tooltip/chart_tooltip.tsx +++ b/x-pack/legacy/plugins/ml/public/application/components/chart_tooltip/chart_tooltip.tsx @@ -9,12 +9,11 @@ import React, { useRef, FC } from 'react'; import { TooltipValueFormatter } from '@elastic/charts'; import useObservable from 'react-use/lib/useObservable'; -import { chartTooltip$, ChartTooltipValue } from './chart_tooltip_service'; +import { chartTooltip$, ChartTooltipState, ChartTooltipValue } from './chart_tooltip_service'; type RefValue = HTMLElement | null; -function useRefWithCallback() { - const chartTooltipState = useObservable(chartTooltip$); +function useRefWithCallback(chartTooltipState?: ChartTooltipState) { const ref = useRef(null); return (node: RefValue) => { @@ -66,7 +65,7 @@ const renderHeader = (headerData?: ChartTooltipValue, formatter?: TooltipValueFo export const ChartTooltip: FC = () => { const chartTooltipState = useObservable(chartTooltip$); - const chartTooltipElement = useRefWithCallback(); + const chartTooltipElement = useRefWithCallback(chartTooltipState); if (chartTooltipState === undefined || !chartTooltipState.isTooltipVisible) { return
; From fe5e470aae25c6f5b66a2435d5a10d7b9999c9e5 Mon Sep 17 00:00:00 2001 From: Eli Perelman Date: Thu, 23 Jan 2020 09:08:13 -0600 Subject: [PATCH 17/72] Explicitly test custom appRoutes (#55405) * Explicitly test custom appRoutes * Extract common navigation function --- .../integration_tests/router.test.tsx | 95 +++++++++++-- .../application/integration_tests/utils.tsx | 6 +- src/core/public/application/test_types.ts | 17 +-- test/functional/services/browser.ts | 12 ++ .../core_plugin_chromeless/public/plugin.tsx | 6 - .../rendering_plugin/public/plugin.tsx | 13 +- .../test_suites/core_plugins/rendering.ts | 134 +++++++++++++----- 7 files changed, 220 insertions(+), 63 deletions(-) diff --git a/src/core/public/application/integration_tests/router.test.tsx b/src/core/public/application/integration_tests/router.test.tsx index 4d83ab67810afa..0c5f5a138d58f5 100644 --- a/src/core/public/application/integration_tests/router.test.tsx +++ b/src/core/public/application/integration_tests/router.test.tsx @@ -23,7 +23,7 @@ import { createMemoryHistory, History, createHashHistory } from 'history'; import { AppRouter, AppNotFound } from '../ui'; import { EitherApp, MockedMounterMap, MockedMounterTuple } from '../test_types'; -import { createRenderer, createAppMounter, createLegacyAppMounter } from './utils'; +import { createRenderer, createAppMounter, createLegacyAppMounter, getUnmounter } from './utils'; import { AppStatus } from '../types'; describe('AppContainer', () => { @@ -36,7 +36,6 @@ describe('AppContainer', () => { history.push(path); return update(); }; - const mockMountersToMounters = () => new Map([...mounters].map(([appId, { mounter }]) => [appId, mounter])); const setAppLeaveHandlerMock = () => undefined; @@ -58,7 +57,8 @@ describe('AppContainer', () => { createLegacyAppMounter('legacyApp1', jest.fn()), createAppMounter('app2', '
App 2
'), createLegacyAppMounter('baseApp:legacyApp2', jest.fn()), - createAppMounter('app3', '
App 3
', '/custom/path'), + createAppMounter('app3', '
Chromeless A
', '/chromeless-a/path'), + createAppMounter('app4', '
Chromeless B
', '/chromeless-b/path'), createAppMounter('disabledApp', '
Disabled app
'), createLegacyAppMounter('disabledLegacyApp', jest.fn()), ] as Array>); @@ -75,23 +75,24 @@ describe('AppContainer', () => { }); it('calls mount handler and returned unmount function when navigating between apps', async () => { - const dom1 = await navigate('/app/app1'); const app1 = mounters.get('app1')!; + const app2 = mounters.get('app2')!; + let dom = await navigate('/app/app1'); expect(app1.mounter.mount).toHaveBeenCalled(); - expect(dom1?.html()).toMatchInlineSnapshot(` + expect(dom?.html()).toMatchInlineSnapshot(` "
basename: /app/app1 html: App 1
" `); - const app1Unmount = await app1.mounter.mount.mock.results[0].value; - const dom2 = await navigate('/app/app2'); + const app1Unmount = await getUnmounter(app1); + dom = await navigate('/app/app2'); expect(app1Unmount).toHaveBeenCalled(); - expect(mounters.get('app2')!.mounter.mount).toHaveBeenCalled(); - expect(dom2?.html()).toMatchInlineSnapshot(` + expect(app2.mounter.mount).toHaveBeenCalled(); + expect(dom?.html()).toMatchInlineSnapshot(` "
basename: /app/app2 html:
App 2
@@ -99,6 +100,82 @@ describe('AppContainer', () => { `); }); + it('can navigate between standard application and one with custom appRoute', async () => { + const standardApp = mounters.get('app1')!; + const chromelessApp = mounters.get('app3')!; + let dom = await navigate('/app/app1'); + + expect(standardApp.mounter.mount).toHaveBeenCalled(); + expect(dom?.html()).toMatchInlineSnapshot(` + "
+ basename: /app/app1 + html: App 1 +
" + `); + + const standardAppUnmount = await getUnmounter(standardApp); + dom = await navigate('/chromeless-a/path'); + + expect(standardAppUnmount).toHaveBeenCalled(); + expect(chromelessApp.mounter.mount).toHaveBeenCalled(); + expect(dom?.html()).toMatchInlineSnapshot(` + "
+ basename: /chromeless-a/path + html:
Chromeless A
+
" + `); + + const chromelessAppUnmount = await getUnmounter(standardApp); + dom = await navigate('/app/app1'); + + expect(chromelessAppUnmount).toHaveBeenCalled(); + expect(standardApp.mounter.mount).toHaveBeenCalledTimes(2); + expect(dom?.html()).toMatchInlineSnapshot(` + "
+ basename: /app/app1 + html: App 1 +
" + `); + }); + + it('can navigate between two applications with custom appRoutes', async () => { + const chromelessAppA = mounters.get('app3')!; + const chromelessAppB = mounters.get('app4')!; + let dom = await navigate('/chromeless-a/path'); + + expect(chromelessAppA.mounter.mount).toHaveBeenCalled(); + expect(dom?.html()).toMatchInlineSnapshot(` + "
+ basename: /chromeless-a/path + html:
Chromeless A
+
" + `); + + const chromelessAppAUnmount = await getUnmounter(chromelessAppA); + dom = await navigate('/chromeless-b/path'); + + expect(chromelessAppAUnmount).toHaveBeenCalled(); + expect(chromelessAppB.mounter.mount).toHaveBeenCalled(); + expect(dom?.html()).toMatchInlineSnapshot(` + "
+ basename: /chromeless-b/path + html:
Chromeless B
+
" + `); + + const chromelessAppBUnmount = await getUnmounter(chromelessAppB); + dom = await navigate('/chromeless-a/path'); + + expect(chromelessAppBUnmount).toHaveBeenCalled(); + expect(chromelessAppA.mounter.mount).toHaveBeenCalledTimes(2); + expect(dom?.html()).toMatchInlineSnapshot(` + "
+ basename: /chromeless-a/path + html:
Chromeless A
+
" + `); + }); + it('should not mount when partial route path matches', async () => { mounters.set(...createAppMounter('spaces', '
Custom Space
', '/spaces/fake-login')); mounters.set(...createAppMounter('login', '
Login Page
', '/fake-login')); diff --git a/src/core/public/application/integration_tests/utils.tsx b/src/core/public/application/integration_tests/utils.tsx index 6367d1fa12697e..4f34438fc822a3 100644 --- a/src/core/public/application/integration_tests/utils.tsx +++ b/src/core/public/application/integration_tests/utils.tsx @@ -23,7 +23,7 @@ import { mount } from 'enzyme'; import { I18nProvider } from '@kbn/i18n/react'; import { App, LegacyApp, AppMountParameters } from '../types'; -import { MockedMounter, MockedMounterTuple } from '../test_types'; +import { EitherApp, MockedMounter, MockedMounterTuple, Mountable } from '../test_types'; type Dom = ReturnType | null; type Renderer = () => Dom | Promise; @@ -80,3 +80,7 @@ export const createLegacyAppMounter = ( unmount: jest.fn(), }, ]; + +export function getUnmounter(app: Mountable) { + return app.mounter.mount.mock.results[0].value; +} diff --git a/src/core/public/application/test_types.ts b/src/core/public/application/test_types.ts index 3d992cb950eb42..b822597e510cb9 100644 --- a/src/core/public/application/test_types.ts +++ b/src/core/public/application/test_types.ts @@ -26,18 +26,19 @@ export type ApplicationServiceContract = PublicMethodsOf; export type EitherApp = App | LegacyApp; /** @internal */ export type MockedUnmount = jest.Mocked; + +/** @internal */ +export interface Mountable { + mounter: MockedMounter; + unmount: MockedUnmount; +} + /** @internal */ export type MockedMounter = jest.Mocked>>; /** @internal */ -export type MockedMounterTuple = [ - string, - { mounter: MockedMounter; unmount: MockedUnmount } -]; +export type MockedMounterTuple = [string, Mountable]; /** @internal */ -export type MockedMounterMap = Map< - string, - { mounter: MockedMounter; unmount: MockedUnmount } ->; +export type MockedMounterMap = Map>; /** @internal */ export type MockLifecycle< T extends keyof ApplicationService, diff --git a/test/functional/services/browser.ts b/test/functional/services/browser.ts index 2d799b7daca732..02349b4e6cca2c 100644 --- a/test/functional/services/browser.ts +++ b/test/functional/services/browser.ts @@ -313,11 +313,23 @@ export async function BrowserProvider({ getService }: FtrProviderContext) { /** * Moves forwards in the browser history. * https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/lib/webdriver_exports_Navigation.html#forward + * + * @return {Promise} */ public async goForward() { await driver.navigate().forward(); } + /** + * Navigates to a URL via the browser history. + * https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/lib/webdriver_exports_Navigation.html#to + * + * @return {Promise} + */ + public async navigateTo(url: string) { + await driver.navigate().to(url); + } + /** * Sends a sequance of keyboard keys. For each key, this will record a pair of keyDown and keyUp actions * https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/lib/input_exports_Actions.html#sendKeys diff --git a/test/plugin_functional/plugins/core_plugin_chromeless/public/plugin.tsx b/test/plugin_functional/plugins/core_plugin_chromeless/public/plugin.tsx index 03870410fb3342..7ce348fa2111e1 100644 --- a/test/plugin_functional/plugins/core_plugin_chromeless/public/plugin.tsx +++ b/test/plugin_functional/plugins/core_plugin_chromeless/public/plugin.tsx @@ -31,12 +31,6 @@ export class CorePluginChromelessPlugin return renderApp(context, params); }, }); - - return { - getGreeting() { - return 'Hello from Plugin Chromeless!'; - }, - }; } public start() {} diff --git a/test/plugin_functional/plugins/rendering_plugin/public/plugin.tsx b/test/plugin_functional/plugins/rendering_plugin/public/plugin.tsx index 6e80b56953ca07..a4925cdb8f8dfd 100644 --- a/test/plugin_functional/plugins/rendering_plugin/public/plugin.tsx +++ b/test/plugin_functional/plugins/rendering_plugin/public/plugin.tsx @@ -26,13 +26,24 @@ export class RenderingPlugin implements Plugin { core.application.register({ id: 'rendering', title: 'Rendering', - appRoute: '/render', + appRoute: '/render/core', async mount(context, { element }) { render(

rendering service

, element); return () => unmountComponentAtNode(element); }, }); + + core.application.register({ + id: 'custom-app-route', + title: 'Custom App Route', + appRoute: '/custom/appRoute', + async mount(context, { element }) { + render(

Custom App Route

, element); + + return () => unmountComponentAtNode(element); + }, + }); } public start() {} diff --git a/test/plugin_functional/test_suites/core_plugins/rendering.ts b/test/plugin_functional/test_suites/core_plugins/rendering.ts index d0025c82a7ba50..e30d81eedd985b 100644 --- a/test/plugin_functional/test_suites/core_plugins/rendering.ts +++ b/test/plugin_functional/test_suites/core_plugins/rendering.ts @@ -22,43 +22,55 @@ import expect from '@kbn/expect'; import '../../plugins/core_provider_plugin/types'; import { PluginFunctionalProviderContext } from '../../services'; +declare global { + interface Window { + /** + * We use this global variable to track page history changes to ensure that + * navigation is done without causing a full page reload. + */ + __RENDERING_SESSION__: string[]; + } +} + // eslint-disable-next-line import/no-default-export export default function({ getService, getPageObjects }: PluginFunctionalProviderContext) { const PageObjects = getPageObjects(['common']); + const appsMenu = getService('appsMenu'); const browser = getService('browser'); const find = getService('find'); const testSubjects = getService('testSubjects'); - function navigate(path: string) { - return browser.get(`${PageObjects.common.getHostPort()}${path}`); - } - - function getLegacyMode() { + const navigateTo = (path: string) => + browser.navigateTo(`${PageObjects.common.getHostPort()}${path}`); + const navigateToApp = async (title: string) => { + await appsMenu.clickLink(title); return browser.execute(() => { + if (!('__RENDERING_SESSION__' in window)) { + window.__RENDERING_SESSION__ = []; + } + + window.__RENDERING_SESSION__.push(window.location.pathname); + }); + }; + const getLegacyMode = () => + browser.execute(() => { return JSON.parse(document.querySelector('kbn-injected-metadata')!.getAttribute('data')!) .legacyMode; }); - } - - function getUserSettings() { - return browser.execute(() => { + const getUserSettings = () => + browser.execute(() => { return JSON.parse(document.querySelector('kbn-injected-metadata')!.getAttribute('data')!) .legacyMetadata.uiSettings.user; }); - } - - async function init() { - const loading = await testSubjects.find('kbnLoadingMessage', 5000); - - return () => find.waitForElementStale(loading); - } + const exists = (selector: string) => testSubjects.exists(selector, { timeout: 2000 }); + const findLoadingMessage = () => testSubjects.find('kbnLoadingMessage', 5000); describe('rendering service', () => { it('renders "core" application', async () => { - await navigate('/render/core'); + await navigateTo('/render/core'); - const [loaded, legacyMode, userSettings] = await Promise.all([ - init(), + const [loadingMessage, legacyMode, userSettings] = await Promise.all([ + findLoadingMessage(), getLegacyMode(), getUserSettings(), ]); @@ -66,16 +78,16 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider expect(legacyMode).to.be(false); expect(userSettings).to.not.be.empty(); - await loaded(); + await find.waitForElementStale(loadingMessage); - expect(await testSubjects.exists('renderingHeader')).to.be(true); + expect(await exists('renderingHeader')).to.be(true); }); it('renders "core" application without user settings', async () => { - await navigate('/render/core?includeUserSettings=false'); + await navigateTo('/render/core?includeUserSettings=false'); - const [loaded, legacyMode, userSettings] = await Promise.all([ - init(), + const [loadingMessage, legacyMode, userSettings] = await Promise.all([ + findLoadingMessage(), getLegacyMode(), getUserSettings(), ]); @@ -83,16 +95,16 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider expect(legacyMode).to.be(false); expect(userSettings).to.be.empty(); - await loaded(); + await find.waitForElementStale(loadingMessage); - expect(await testSubjects.exists('renderingHeader')).to.be(true); + expect(await exists('renderingHeader')).to.be(true); }); it('renders "legacy" application', async () => { - await navigate('/render/core_plugin_legacy'); + await navigateTo('/render/core_plugin_legacy'); - const [loaded, legacyMode, userSettings] = await Promise.all([ - init(), + const [loadingMessage, legacyMode, userSettings] = await Promise.all([ + findLoadingMessage(), getLegacyMode(), getUserSettings(), ]); @@ -100,17 +112,17 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider expect(legacyMode).to.be(true); expect(userSettings).to.not.be.empty(); - await loaded(); + await find.waitForElementStale(loadingMessage); - expect(await testSubjects.exists('coreLegacyCompatH1')).to.be(true); - expect(await testSubjects.exists('renderingHeader')).to.be(false); + expect(await exists('coreLegacyCompatH1')).to.be(true); + expect(await exists('renderingHeader')).to.be(false); }); it('renders "legacy" application without user settings', async () => { - await navigate('/render/core_plugin_legacy?includeUserSettings=false'); + await navigateTo('/render/core_plugin_legacy?includeUserSettings=false'); - const [loaded, legacyMode, userSettings] = await Promise.all([ - init(), + const [loadingMessage, legacyMode, userSettings] = await Promise.all([ + findLoadingMessage(), getLegacyMode(), getUserSettings(), ]); @@ -118,10 +130,56 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider expect(legacyMode).to.be(true); expect(userSettings).to.be.empty(); - await loaded(); + await find.waitForElementStale(loadingMessage); + + expect(await exists('coreLegacyCompatH1')).to.be(true); + expect(await exists('renderingHeader')).to.be(false); + }); + + it('navigates between standard application and one with custom appRoute', async () => { + await navigateTo('/'); + await find.waitForElementStale(await findLoadingMessage()); + + await navigateToApp('App Status'); + expect(await exists('appStatusApp')).to.be(true); + expect(await exists('renderingHeader')).to.be(false); + + await navigateToApp('Rendering'); + expect(await exists('appStatusApp')).to.be(false); + expect(await exists('renderingHeader')).to.be(true); + + await navigateToApp('App Status'); + expect(await exists('appStatusApp')).to.be(true); + expect(await exists('renderingHeader')).to.be(false); + + expect( + await browser.execute(() => { + return window.__RENDERING_SESSION__; + }) + ).to.eql(['/app/app_status', '/render/core', '/app/app_status']); + }); + + it('navigates between applications with custom appRoutes', async () => { + await navigateTo('/'); + await find.waitForElementStale(await findLoadingMessage()); + + await navigateToApp('Rendering'); + expect(await exists('renderingHeader')).to.be(true); + expect(await exists('customAppRouteHeader')).to.be(false); + + await navigateToApp('Custom App Route'); + expect(await exists('renderingHeader')).to.be(false); + expect(await exists('customAppRouteHeader')).to.be(true); + + await navigateToApp('Rendering'); + expect(await exists('renderingHeader')).to.be(true); + expect(await exists('customAppRouteHeader')).to.be(false); - expect(await testSubjects.exists('coreLegacyCompatH1')).to.be(true); - expect(await testSubjects.exists('renderingHeader')).to.be(false); + expect( + await browser.execute(() => { + return window.__RENDERING_SESSION__; + }) + ).to.eql(['/render/core', '/custom/appRoute', '/render/core']); }); }); } From 63d3cbc9411fdeee799f9513723cbc99072c7f08 Mon Sep 17 00:00:00 2001 From: Chris Mark Date: Thu, 23 Jan 2020 17:09:36 +0200 Subject: [PATCH 18/72] Add Kibana tutorial for Statsd Metricbeat module (#55700) --- .../home/tutorial_resources/logos/statsd.svg | 41 +++++++++++++ src/plugins/home/server/tutorials/register.ts | 2 + .../server/tutorials/statsd_metrics/index.ts | 61 +++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/statsd.svg create mode 100644 src/plugins/home/server/tutorials/statsd_metrics/index.ts diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/statsd.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/statsd.svg new file mode 100644 index 00000000000000..f4458439fceb4b --- /dev/null +++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/statsd.svg @@ -0,0 +1,41 @@ + + + + + + + + + + diff --git a/src/plugins/home/server/tutorials/register.ts b/src/plugins/home/server/tutorials/register.ts index ae84f1e7ee1d56..ab5788865bd8ea 100644 --- a/src/plugins/home/server/tutorials/register.ts +++ b/src/plugins/home/server/tutorials/register.ts @@ -85,6 +85,7 @@ import { ibmmqLogsSpecProvider } from './ibmmq_logs'; import { stanMetricsSpecProvider } from './stan_metrics'; import { envoyproxyMetricsSpecProvider } from './envoyproxy_metrics'; import { ibmmqMetricsSpecProvider } from './ibmmq_metrics'; +import { statsdMetricsSpecProvider } from './statsd_metrics'; export const builtInTutorials = [ systemLogsSpecProvider, @@ -156,4 +157,5 @@ export const builtInTutorials = [ ibmmqMetricsSpecProvider, stanMetricsSpecProvider, envoyproxyMetricsSpecProvider, + statsdMetricsSpecProvider, ]; diff --git a/src/plugins/home/server/tutorials/statsd_metrics/index.ts b/src/plugins/home/server/tutorials/statsd_metrics/index.ts new file mode 100644 index 00000000000000..c1d4a354e94967 --- /dev/null +++ b/src/plugins/home/server/tutorials/statsd_metrics/index.ts @@ -0,0 +1,61 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { i18n } from '@kbn/i18n'; +import { TutorialsCategory, TutorialSchema } from '../../services/tutorials'; +import { + onPremInstructions, + cloudInstructions, + onPremCloudInstructions, +} from '../instructions/metricbeat_instructions'; +import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types'; + +export function statsdMetricsSpecProvider(context: TutorialContext): TutorialSchema { + const moduleName = 'statsd'; + return { + id: 'statsdMetrics', + name: i18n.translate('home.tutorials.statsdMetrics.nameTitle', { + defaultMessage: 'Statsd metrics', + }), + category: TutorialsCategory.METRICS, + shortDescription: i18n.translate('home.tutorials.statsdMetrics.shortDescription', { + defaultMessage: 'Fetch monitoring metrics from statsd.', + }), + longDescription: i18n.translate('home.tutorials.statsdMetrics.longDescription', { + defaultMessage: + 'The `statsd` Metricbeat module fetches monitoring metrics from statsd. \ +[Learn more]({learnMoreLink}).', + values: { + learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-statsd.html', + }, + }), + euiIconType: '/plugins/kibana/home/tutorial_resources/logos/statsd.svg', + artifacts: { + dashboards: [], + exportedFields: { + documentationUrl: '{config.docs.beats.metricbeat}/exported-fields-statsd.html', + }, + }, + completionTimeMinutes: 10, + // previewImagePath: '', + onPrem: onPremInstructions(moduleName, context), + elasticCloud: cloudInstructions(moduleName), + onPremElasticCloud: onPremCloudInstructions(moduleName), + }; +} From 3d59414038122ae77de649e268f08729b9fa959f Mon Sep 17 00:00:00 2001 From: Jimmy Kuang Date: Thu, 23 Jan 2020 07:14:35 -0800 Subject: [PATCH 19/72] [ILM] Index Lifecycle Policies show wrong unit in Kibana UI (#55228) * Added timing and byte size units to hot, cold, warm, and delete phase --- .../components/hot_phase/hot_phase.js | 63 +++++++++++++++++++ .../edit_policy/components/min_age_input.js | 58 +++++++++++++++++ 2 files changed, 121 insertions(+) diff --git a/x-pack/legacy/plugins/index_lifecycle_management/public/sections/edit_policy/components/hot_phase/hot_phase.js b/x-pack/legacy/plugins/index_lifecycle_management/public/sections/edit_policy/components/hot_phase/hot_phase.js index d57bf759ad7219..475d26bb2e3c04 100644 --- a/x-pack/legacy/plugins/index_lifecycle_management/public/sections/edit_policy/components/hot_phase/hot_phase.js +++ b/x-pack/legacy/plugins/index_lifecycle_management/public/sections/edit_policy/components/hot_phase/hot_phase.js @@ -169,6 +169,30 @@ export class HotPhase extends PureComponent { defaultMessage: 'megabytes', }), }, + { + value: 'b', + text: i18n.translate('xpack.indexLifecycleMgmt.hotPhase.bytesLabel', { + defaultMessage: 'bytes', + }), + }, + { + value: 'kb', + text: i18n.translate('xpack.indexLifecycleMgmt.hotPhase.kilobytesLabel', { + defaultMessage: 'kilobytes', + }), + }, + { + value: 'tb', + text: i18n.translate('xpack.indexLifecycleMgmt.hotPhase.terabytesLabel', { + defaultMessage: 'terabytes', + }), + }, + { + value: 'pb', + text: i18n.translate('xpack.indexLifecycleMgmt.hotPhase.petabytesLabel', { + defaultMessage: 'petabytes', + }), + }, ]} /> @@ -254,6 +278,45 @@ export class HotPhase extends PureComponent { defaultMessage: 'hours', }), }, + { + value: 'm', + text: i18n.translate('xpack.indexLifecycleMgmt.hotPhase.minutesLabel', { + defaultMessage: 'minutes', + }), + }, + { + value: 's', + text: i18n.translate('xpack.indexLifecycleMgmt.hotPhase.secondsLabel', { + defaultMessage: 'seconds', + }), + }, + { + value: 'ms', + text: i18n.translate( + 'xpack.indexLifecycleMgmt.hotPhase.millisecondsLabel', + { + defaultMessage: 'milliseconds', + } + ), + }, + { + value: 'micros', + text: i18n.translate( + 'xpack.indexLifecycleMgmt.hotPhase.microsecondsLabel', + { + defaultMessage: 'microseconds', + } + ), + }, + { + value: 'nanos', + text: i18n.translate( + 'xpack.indexLifecycleMgmt.hotPhase.nanosecondsLabel', + { + defaultMessage: 'nanoseconds', + } + ), + }, ]} /> diff --git a/x-pack/legacy/plugins/index_lifecycle_management/public/sections/edit_policy/components/min_age_input.js b/x-pack/legacy/plugins/index_lifecycle_management/public/sections/edit_policy/components/min_age_input.js index b4c9f4e958cd22..23009798513296 100644 --- a/x-pack/legacy/plugins/index_lifecycle_management/public/sections/edit_policy/components/min_age_input.js +++ b/x-pack/legacy/plugins/index_lifecycle_management/public/sections/edit_policy/components/min_age_input.js @@ -73,6 +73,11 @@ export const MinAgeInput = props => { let daysOptionLabel; let hoursOptionLabel; + let minutesOptionLabel; + let secondsOptionLabel; + let millisecondsOptionLabel; + let microsecondsOptionLabel; + let nanosecondsOptionLabel; if (rolloverEnabled) { daysOptionLabel = i18n.translate( @@ -88,6 +93,39 @@ export const MinAgeInput = props => { defaultMessage: 'hours from rollover', } ); + minutesOptionLabel = i18n.translate( + 'xpack.indexLifecycleMgmt.editPolicy.rolloverMinutesOptionLabel', + { + defaultMessage: 'minutes from rollover', + } + ); + + secondsOptionLabel = i18n.translate( + 'xpack.indexLifecycleMgmt.editPolicy.rolloverSecondsOptionLabel', + { + defaultMessage: 'seconds from rollover', + } + ); + millisecondsOptionLabel = i18n.translate( + 'xpack.indexLifecycleMgmt.editPolicy.rolloverMilliSecondsOptionLabel', + { + defaultMessage: 'milliseconds from rollover', + } + ); + + microsecondsOptionLabel = i18n.translate( + 'xpack.indexLifecycleMgmt.editPolicy.rolloverMicroSecondsOptionLabel', + { + defaultMessage: 'microseconds from rollover', + } + ); + + nanosecondsOptionLabel = i18n.translate( + 'xpack.indexLifecycleMgmt.editPolicy.rolloverNanoSecondsOptionLabel', + { + defaultMessage: 'nanoseconds from rollover', + } + ); } else { daysOptionLabel = i18n.translate( 'xpack.indexLifecycleMgmt.editPolicy.creationDaysOptionLabel', @@ -150,6 +188,26 @@ export const MinAgeInput = props => { value: 'h', text: hoursOptionLabel, }, + { + value: 'm', + text: minutesOptionLabel, + }, + { + value: 's', + text: secondsOptionLabel, + }, + { + value: 'ms', + text: millisecondsOptionLabel, + }, + { + value: 'micros', + text: microsecondsOptionLabel, + }, + { + value: 'nanos', + text: nanosecondsOptionLabel, + }, ]} /> From 0c25cb53b2615f2bef29479379301ba9a323bb60 Mon Sep 17 00:00:00 2001 From: Matthew Kime Date: Thu, 23 Jan 2020 09:21:46 -0600 Subject: [PATCH 20/72] Advanced Settings management => typescript (#54477) * advanced settings => typescript --- ...ibana-plugin-public.doclinksstart.links.md | 1 + .../kibana-plugin-public.doclinksstart.md | 2 +- ...a-plugin-public.imagevalidation.maxsize.md | 14 + .../kibana-plugin-public.imagevalidation.md | 19 + .../core/public/kibana-plugin-public.md | 7 + .../kibana-plugin-public.stringvalidation.md | 13 + ...ana-plugin-public.stringvalidationregex.md | 21 + ...in-public.stringvalidationregex.message.md | 11 + ...ugin-public.stringvalidationregex.regex.md | 11 + ...ugin-public.stringvalidationregexstring.md | 21 + ...lic.stringvalidationregexstring.message.md | 11 + ...stringvalidationregexstring.regexstring.md | 11 + ...plugin-public.uisettingsparams.category.md | 13 + ...gin-public.uisettingsparams.deprecation.md | 13 + ...gin-public.uisettingsparams.description.md | 13 + .../kibana-plugin-public.uisettingsparams.md | 30 + ...ana-plugin-public.uisettingsparams.name.md | 13 + ...in-public.uisettingsparams.optionlabels.md | 13 + ...-plugin-public.uisettingsparams.options.md | 13 + ...plugin-public.uisettingsparams.readonly.md | 13 + ...lic.uisettingsparams.requirespagereload.md | 13 + ...ana-plugin-public.uisettingsparams.type.md | 13 + ...ugin-public.uisettingsparams.validation.md | 11 + ...na-plugin-public.uisettingsparams.value.md | 13 + .../kibana-plugin-public.uisettingstype.md | 13 + ...-public.userprovidedvalues.isoverridden.md | 11 + ...kibana-plugin-public.userprovidedvalues.md | 21 + ...gin-public.userprovidedvalues.uservalue.md | 11 + .../kibana-plugin-server.imagevalidation.md | 1 + .../core/server/kibana-plugin-server.md | 226 ---- .../kibana-plugin-server.stringvalidation.md | 14 +- ...-plugin-server.stringvalidation.message.md | 11 - ...gin-server.stringvalidation.regexstring.md | 11 - ...ana-plugin-server.stringvalidationregex.md | 21 + ...in-server.stringvalidationregex.message.md | 11 + ...ugin-server.stringvalidationregex.regex.md | 11 + ...ugin-server.stringvalidationregexstring.md | 21 + ...ver.stringvalidationregexstring.message.md | 11 + ...stringvalidationregexstring.regexstring.md | 11 + .../kibana-plugin-server.uisettingstype.md | 2 +- .../public/doc_links/doc_links_service.ts | 1 + src/core/public/index.ts | 11 +- src/core/public/public.api.md | 57 + src/core/public/types.ts | 8 + src/core/server/index.ts | 2 + src/core/server/saved_objects/types.ts | 37 +- src/core/server/server.api.md | 21 +- src/core/server/ui_settings/index.ts | 2 + src/core/server/ui_settings/types.ts | 84 +- src/core/types/index.ts | 2 + src/core/types/saved_objects.ts | 48 + src/core/types/ui_settings.ts | 121 ++ .../advanced_settings.test.js.snap | 1022 ----------------- .../advanced_settings.test.tsx.snap | 367 ++++++ .../settings/advanced_settings.test.js | 173 --- .../settings/advanced_settings.test.tsx | 237 ++++ ...nced_settings.js => advanced_settings.tsx} | 109 +- .../{breadcrumbs.js => breadcrumbs.ts} | 0 ....snap => component_registry.test.tsx.snap} | 0 ...settings_voice_announcement.test.tsx.snap} | 4 +- ...nced_settings_voice_announcement.test.tsx} | 40 +- ... advanced_settings_voice_announcement.tsx} | 12 +- .../{index.js => index.ts} | 0 ...s.test.js.snap => call_outs.test.tsx.snap} | 0 .../{call_outs.test.js => call_outs.test.tsx} | 0 .../call_outs/{call_outs.js => call_outs.tsx} | 0 .../call_outs/{index.js => index.ts} | 0 ...ry.test.js => component_registry.test.tsx} | 38 +- ...nent_registry.js => component_registry.ts} | 18 +- ...js => default_component_registry.test.tsx} | 3 +- ...istry.js => default_component_registry.ts} | 0 ...field.test.js.snap => field.test.tsx.snap} | 4 - .../field/{field.test.js => field.test.tsx} | 84 +- .../components/field/{field.js => field.tsx} | 196 ++-- .../components/field/{index.js => index.ts} | 0 .../{form.test.js.snap => form.test.tsx.snap} | 70 +- .../form/{form.test.js => form.test.tsx} | 20 +- .../components/form/{form.js => form.tsx} | 36 +- .../components/form/{index.js => index.ts} | 0 ...test.js.snap => page_footer.test.tsx.snap} | 0 .../page_footer/{index.js => index.ts} | 0 ...ge_footer.test.js => page_footer.test.tsx} | 0 .../{page_footer.js => page_footer.ts} | 0 ...st.js.snap => page_subtitle.test.tsx.snap} | 0 .../page_subtitle/{index.js => index.ts} | 0 ...ubtitle.test.js => page_subtitle.test.tsx} | 0 .../{page_subtitle.js => page_subtitle.ts} | 0 ....test.js.snap => page_title.test.tsx.snap} | 0 .../page_title/{index.js => index.ts} | 0 ...page_title.test.js => page_title.test.tsx} | 0 .../{page_title.js => page_title.tsx} | 0 ...arch.test.js.snap => search.test.tsx.snap} | 0 .../components/search/{index.js => index.ts} | 0 .../{search.test.js => search.test.tsx} | 3 +- .../search/{search.js => search.tsx} | 27 +- .../management/sections/settings/index.html | 2 +- .../management/sections/settings/index.js | 51 +- .../lib/__tests__/get_category_name.test.js | 52 - ...efault_category.js => default_category.ts} | 0 ...ria_name.test.js => get_aria_name.test.ts} | 7 +- .../{get_aria_name.js => get_aria_name.ts} | 4 +- ...gory.test.js => get_category_name.test.ts} | 13 +- ..._category_name.js => get_category_name.ts} | 6 +- ..._val_type.test.js => get_val_type.test.ts} | 6 +- .../lib/{get_val_type.js => get_val_type.ts} | 20 +- .../settings/lib/{index.js => index.ts} | 0 ...value.test.js => is_default_value.test.ts} | 19 +- ...s_default_value.js => is_default_value.ts} | 3 +- ...fig.test.js => to_editable_config.test.ts} | 46 +- ...itable_config.js => to_editable_config.ts} | 29 +- .../management/sections/settings/types.ts | 54 + .../kibana/ui_setting_defaults.js | 1 + 112 files changed, 1945 insertions(+), 1945 deletions(-) create mode 100644 docs/development/core/public/kibana-plugin-public.imagevalidation.maxsize.md create mode 100644 docs/development/core/public/kibana-plugin-public.imagevalidation.md create mode 100644 docs/development/core/public/kibana-plugin-public.stringvalidation.md create mode 100644 docs/development/core/public/kibana-plugin-public.stringvalidationregex.md create mode 100644 docs/development/core/public/kibana-plugin-public.stringvalidationregex.message.md create mode 100644 docs/development/core/public/kibana-plugin-public.stringvalidationregex.regex.md create mode 100644 docs/development/core/public/kibana-plugin-public.stringvalidationregexstring.md create mode 100644 docs/development/core/public/kibana-plugin-public.stringvalidationregexstring.message.md create mode 100644 docs/development/core/public/kibana-plugin-public.stringvalidationregexstring.regexstring.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsparams.category.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsparams.deprecation.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsparams.description.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsparams.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsparams.name.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsparams.optionlabels.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsparams.options.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsparams.readonly.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsparams.requirespagereload.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsparams.type.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsparams.validation.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsparams.value.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingstype.md create mode 100644 docs/development/core/public/kibana-plugin-public.userprovidedvalues.isoverridden.md create mode 100644 docs/development/core/public/kibana-plugin-public.userprovidedvalues.md create mode 100644 docs/development/core/public/kibana-plugin-public.userprovidedvalues.uservalue.md delete mode 100644 docs/development/core/server/kibana-plugin-server.md delete mode 100644 docs/development/core/server/kibana-plugin-server.stringvalidation.message.md delete mode 100644 docs/development/core/server/kibana-plugin-server.stringvalidation.regexstring.md create mode 100644 docs/development/core/server/kibana-plugin-server.stringvalidationregex.md create mode 100644 docs/development/core/server/kibana-plugin-server.stringvalidationregex.message.md create mode 100644 docs/development/core/server/kibana-plugin-server.stringvalidationregex.regex.md create mode 100644 docs/development/core/server/kibana-plugin-server.stringvalidationregexstring.md create mode 100644 docs/development/core/server/kibana-plugin-server.stringvalidationregexstring.message.md create mode 100644 docs/development/core/server/kibana-plugin-server.stringvalidationregexstring.regexstring.md create mode 100644 src/core/types/saved_objects.ts create mode 100644 src/core/types/ui_settings.ts delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/settings/__snapshots__/advanced_settings.test.js.snap create mode 100644 src/legacy/core_plugins/kibana/public/management/sections/settings/__snapshots__/advanced_settings.test.tsx.snap delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.test.js create mode 100644 src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.test.tsx rename src/legacy/core_plugins/kibana/public/management/sections/settings/{advanced_settings.js => advanced_settings.tsx} (62%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/{breadcrumbs.js => breadcrumbs.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/__snapshots__/{component_registry.test.js.snap => component_registry.test.tsx.snap} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/__snapshots__/{advanced_settings_voice_announcement.test.js.snap => advanced_settings_voice_announcement.test.tsx.snap} (95%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/{advanced_settings_voice_announcement.test.js => advanced_settings_voice_announcement.test.tsx} (66%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/{advanced_settings_voice_announcement.js => advanced_settings_voice_announcement.tsx} (92%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/{index.js => index.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/__snapshots__/{call_outs.test.js.snap => call_outs.test.tsx.snap} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/{call_outs.test.js => call_outs.test.tsx} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/{call_outs.js => call_outs.tsx} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/{index.js => index.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/{component_registry.test.js => component_registry.test.tsx} (74%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/{component_registry.js => component_registry.ts} (81%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/{default_component_registry.test.js => default_component_registry.test.tsx} (96%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/{default_component_registry.js => default_component_registry.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/__snapshots__/{field.test.js.snap => field.test.tsx.snap} (99%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/{field.test.js => field.test.tsx} (84%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/{field.js => field.tsx} (81%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/{index.js => index.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/__snapshots__/{form.test.js.snap => form.test.tsx.snap} (79%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/{form.test.js => form.test.tsx} (88%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/{form.js => form.tsx} (84%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/{index.js => index.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/__snapshots__/{page_footer.test.js.snap => page_footer.test.tsx.snap} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/{index.js => index.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/{page_footer.test.js => page_footer.test.tsx} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/{page_footer.js => page_footer.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/__snapshots__/{page_subtitle.test.js.snap => page_subtitle.test.tsx.snap} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/{index.js => index.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/{page_subtitle.test.js => page_subtitle.test.tsx} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/{page_subtitle.js => page_subtitle.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/__snapshots__/{page_title.test.js.snap => page_title.test.tsx.snap} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/{index.js => index.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/{page_title.test.js => page_title.test.tsx} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/{page_title.js => page_title.tsx} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/__snapshots__/{search.test.js.snap => search.test.tsx.snap} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/{index.js => index.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/{search.test.js => search.test.tsx} (97%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/{search.js => search.tsx} (84%) delete mode 100644 src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/get_category_name.test.js rename src/legacy/core_plugins/kibana/public/management/sections/settings/lib/{default_category.js => default_category.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/lib/{__tests__/get_aria_name.test.js => get_aria_name.test.ts} (88%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/lib/{get_aria_name.js => get_aria_name.ts} (93%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/lib/{__tests__/default_category.test.js => get_category_name.test.ts} (69%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/lib/{get_category_name.js => get_category_name.ts} (92%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/lib/{__tests__/get_val_type.test.js => get_val_type.test.ts} (93%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/lib/{get_val_type.js => get_val_type.ts} (67%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/lib/{index.js => index.ts} (100%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/lib/{__tests__/is_default_value.test.js => is_default_value.test.ts} (84%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/lib/{is_default_value.js => is_default_value.ts} (90%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/lib/{__tests__/to_editable_config.test.js => to_editable_config.test.ts} (75%) rename src/legacy/core_plugins/kibana/public/management/sections/settings/lib/{to_editable_config.js => to_editable_config.ts} (74%) create mode 100644 src/legacy/core_plugins/kibana/public/management/sections/settings/types.ts diff --git a/docs/development/core/public/kibana-plugin-public.doclinksstart.links.md b/docs/development/core/public/kibana-plugin-public.doclinksstart.links.md index 9e662c543eb56d..2a21f00c57461a 100644 --- a/docs/development/core/public/kibana-plugin-public.doclinksstart.links.md +++ b/docs/development/core/public/kibana-plugin-public.doclinksstart.links.md @@ -91,5 +91,6 @@ readonly links: { readonly date: { readonly dateMath: string; }; + readonly management: Record; }; ``` diff --git a/docs/development/core/public/kibana-plugin-public.doclinksstart.md b/docs/development/core/public/kibana-plugin-public.doclinksstart.md index cefac180d88c5b..13c701a8b47dbd 100644 --- a/docs/development/core/public/kibana-plugin-public.doclinksstart.md +++ b/docs/development/core/public/kibana-plugin-public.doclinksstart.md @@ -17,5 +17,5 @@ export interface DocLinksStart | --- | --- | --- | | [DOC\_LINK\_VERSION](./kibana-plugin-public.doclinksstart.doc_link_version.md) | string | | | [ELASTIC\_WEBSITE\_URL](./kibana-plugin-public.doclinksstart.elastic_website_url.md) | string | | -| [links](./kibana-plugin-public.doclinksstart.links.md) | {
readonly filebeat: {
readonly base: string;
readonly installation: string;
readonly configuration: string;
readonly elasticsearchOutput: string;
readonly startup: string;
readonly exportedFields: string;
};
readonly auditbeat: {
readonly base: string;
};
readonly metricbeat: {
readonly base: string;
};
readonly heartbeat: {
readonly base: string;
};
readonly logstash: {
readonly base: string;
};
readonly functionbeat: {
readonly base: string;
};
readonly winlogbeat: {
readonly base: string;
};
readonly aggs: {
readonly date_histogram: string;
readonly date_range: string;
readonly filter: string;
readonly filters: string;
readonly geohash_grid: string;
readonly histogram: string;
readonly ip_range: string;
readonly range: string;
readonly significant_terms: string;
readonly terms: string;
readonly avg: string;
readonly avg_bucket: string;
readonly max_bucket: string;
readonly min_bucket: string;
readonly sum_bucket: string;
readonly cardinality: string;
readonly count: string;
readonly cumulative_sum: string;
readonly derivative: string;
readonly geo_bounds: string;
readonly geo_centroid: string;
readonly max: string;
readonly median: string;
readonly min: string;
readonly moving_avg: string;
readonly percentile_ranks: string;
readonly serial_diff: string;
readonly std_dev: string;
readonly sum: string;
readonly top_hits: string;
};
readonly scriptedFields: {
readonly scriptFields: string;
readonly scriptAggs: string;
readonly painless: string;
readonly painlessApi: string;
readonly painlessSyntax: string;
readonly luceneExpressions: string;
};
readonly indexPatterns: {
readonly loadingData: string;
readonly introduction: string;
};
readonly kibana: string;
readonly siem: {
readonly guide: string;
readonly gettingStarted: string;
};
readonly query: {
readonly luceneQuerySyntax: string;
readonly queryDsl: string;
readonly kueryQuerySyntax: string;
};
readonly date: {
readonly dateMath: string;
};
} | | +| [links](./kibana-plugin-public.doclinksstart.links.md) | {
readonly filebeat: {
readonly base: string;
readonly installation: string;
readonly configuration: string;
readonly elasticsearchOutput: string;
readonly startup: string;
readonly exportedFields: string;
};
readonly auditbeat: {
readonly base: string;
};
readonly metricbeat: {
readonly base: string;
};
readonly heartbeat: {
readonly base: string;
};
readonly logstash: {
readonly base: string;
};
readonly functionbeat: {
readonly base: string;
};
readonly winlogbeat: {
readonly base: string;
};
readonly aggs: {
readonly date_histogram: string;
readonly date_range: string;
readonly filter: string;
readonly filters: string;
readonly geohash_grid: string;
readonly histogram: string;
readonly ip_range: string;
readonly range: string;
readonly significant_terms: string;
readonly terms: string;
readonly avg: string;
readonly avg_bucket: string;
readonly max_bucket: string;
readonly min_bucket: string;
readonly sum_bucket: string;
readonly cardinality: string;
readonly count: string;
readonly cumulative_sum: string;
readonly derivative: string;
readonly geo_bounds: string;
readonly geo_centroid: string;
readonly max: string;
readonly median: string;
readonly min: string;
readonly moving_avg: string;
readonly percentile_ranks: string;
readonly serial_diff: string;
readonly std_dev: string;
readonly sum: string;
readonly top_hits: string;
};
readonly scriptedFields: {
readonly scriptFields: string;
readonly scriptAggs: string;
readonly painless: string;
readonly painlessApi: string;
readonly painlessSyntax: string;
readonly luceneExpressions: string;
};
readonly indexPatterns: {
readonly loadingData: string;
readonly introduction: string;
};
readonly kibana: string;
readonly siem: {
readonly guide: string;
readonly gettingStarted: string;
};
readonly query: {
readonly luceneQuerySyntax: string;
readonly queryDsl: string;
readonly kueryQuerySyntax: string;
};
readonly date: {
readonly dateMath: string;
};
readonly management: Record<string, string>;
} | | diff --git a/docs/development/core/public/kibana-plugin-public.imagevalidation.maxsize.md b/docs/development/core/public/kibana-plugin-public.imagevalidation.maxsize.md new file mode 100644 index 00000000000000..07c4588ff2c8e0 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.imagevalidation.maxsize.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [ImageValidation](./kibana-plugin-public.imagevalidation.md) > [maxSize](./kibana-plugin-public.imagevalidation.maxsize.md) + +## ImageValidation.maxSize property + +Signature: + +```typescript +maxSize: { + length: number; + description: string; + }; +``` diff --git a/docs/development/core/public/kibana-plugin-public.imagevalidation.md b/docs/development/core/public/kibana-plugin-public.imagevalidation.md new file mode 100644 index 00000000000000..783f417d0fb4d0 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.imagevalidation.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [ImageValidation](./kibana-plugin-public.imagevalidation.md) + +## ImageValidation interface + + +Signature: + +```typescript +export interface ImageValidation +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [maxSize](./kibana-plugin-public.imagevalidation.maxsize.md) | {
length: number;
description: string;
} | | + diff --git a/docs/development/core/public/kibana-plugin-public.md b/docs/development/core/public/kibana-plugin-public.md index 52aca7501e64dd..ad23bfce4f78c2 100644 --- a/docs/development/core/public/kibana-plugin-public.md +++ b/docs/development/core/public/kibana-plugin-public.md @@ -76,6 +76,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | [IHttpInterceptController](./kibana-plugin-public.ihttpinterceptcontroller.md) | Used to halt a request Promise chain in a [HttpInterceptor](./kibana-plugin-public.httpinterceptor.md). | | [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) | | | [IHttpResponseInterceptorOverrides](./kibana-plugin-public.ihttpresponseinterceptoroverrides.md) | Properties that can be returned by HttpInterceptor.request to override the response. | +| [ImageValidation](./kibana-plugin-public.imagevalidation.md) | | | [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) | Client-side client that provides access to the advanced settings stored in elasticsearch. The settings provide control over the behavior of the Kibana application. For example, a user can specify how to display numeric or date fields. Users can adjust the settings via Management UI. [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) | | [LegacyCoreSetup](./kibana-plugin-public.legacycoresetup.md) | Setup interface exposed to the legacy platform via the ui/new_platform module. | | [LegacyCoreStart](./kibana-plugin-public.legacycorestart.md) | Start interface exposed to the legacy platform via the ui/new_platform module. | @@ -110,7 +111,11 @@ The plugin integrates with the core system via lifecycle events: `setup` | [SavedObjectsMigrationVersion](./kibana-plugin-public.savedobjectsmigrationversion.md) | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | | [SavedObjectsStart](./kibana-plugin-public.savedobjectsstart.md) | | | [SavedObjectsUpdateOptions](./kibana-plugin-public.savedobjectsupdateoptions.md) | | +| [StringValidationRegex](./kibana-plugin-public.stringvalidationregex.md) | StringValidation with regex object | +| [StringValidationRegexString](./kibana-plugin-public.stringvalidationregexstring.md) | StringValidation as regex string | +| [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) | UiSettings parameters defined by the plugins. | | [UiSettingsState](./kibana-plugin-public.uisettingsstate.md) | | +| [UserProvidedValues](./kibana-plugin-public.userprovidedvalues.md) | Describes the values explicitly set by user. | ## Type Aliases @@ -144,10 +149,12 @@ The plugin integrates with the core system via lifecycle events: `setup` | [SavedObjectAttribute](./kibana-plugin-public.savedobjectattribute.md) | Type definition for a Saved Object attribute value | | [SavedObjectAttributeSingle](./kibana-plugin-public.savedobjectattributesingle.md) | Don't use this type, it's simply a helper type for [SavedObjectAttribute](./kibana-plugin-public.savedobjectattribute.md) | | [SavedObjectsClientContract](./kibana-plugin-public.savedobjectsclientcontract.md) | SavedObjectsClientContract as implemented by the [SavedObjectsClient](./kibana-plugin-public.savedobjectsclient.md) | +| [StringValidation](./kibana-plugin-public.stringvalidation.md) | Allows regex objects or a regex string | | [Toast](./kibana-plugin-public.toast.md) | | | [ToastInput](./kibana-plugin-public.toastinput.md) | Inputs for [IToasts](./kibana-plugin-public.itoasts.md) APIs. | | [ToastInputFields](./kibana-plugin-public.toastinputfields.md) | Allowed fields for [ToastInput](./kibana-plugin-public.toastinput.md). | | [ToastsSetup](./kibana-plugin-public.toastssetup.md) | [IToasts](./kibana-plugin-public.itoasts.md) | | [ToastsStart](./kibana-plugin-public.toastsstart.md) | [IToasts](./kibana-plugin-public.itoasts.md) | +| [UiSettingsType](./kibana-plugin-public.uisettingstype.md) | UI element type to represent the settings. | | [UnmountCallback](./kibana-plugin-public.unmountcallback.md) | A function that will unmount the element previously mounted by the associated [MountPoint](./kibana-plugin-public.mountpoint.md) | diff --git a/docs/development/core/public/kibana-plugin-public.stringvalidation.md b/docs/development/core/public/kibana-plugin-public.stringvalidation.md new file mode 100644 index 00000000000000..bf01e857d262ae --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.stringvalidation.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [StringValidation](./kibana-plugin-public.stringvalidation.md) + +## StringValidation type + +Allows regex objects or a regex string + +Signature: + +```typescript +export declare type StringValidation = StringValidationRegex | StringValidationRegexString; +``` diff --git a/docs/development/core/public/kibana-plugin-public.stringvalidationregex.md b/docs/development/core/public/kibana-plugin-public.stringvalidationregex.md new file mode 100644 index 00000000000000..a60a7bbf742c85 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.stringvalidationregex.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [StringValidationRegex](./kibana-plugin-public.stringvalidationregex.md) + +## StringValidationRegex interface + +StringValidation with regex object + +Signature: + +```typescript +export interface StringValidationRegex +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [message](./kibana-plugin-public.stringvalidationregex.message.md) | string | | +| [regex](./kibana-plugin-public.stringvalidationregex.regex.md) | RegExp | | + diff --git a/docs/development/core/public/kibana-plugin-public.stringvalidationregex.message.md b/docs/development/core/public/kibana-plugin-public.stringvalidationregex.message.md new file mode 100644 index 00000000000000..dae94ae08bde5d --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.stringvalidationregex.message.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [StringValidationRegex](./kibana-plugin-public.stringvalidationregex.md) > [message](./kibana-plugin-public.stringvalidationregex.message.md) + +## StringValidationRegex.message property + +Signature: + +```typescript +message: string; +``` diff --git a/docs/development/core/public/kibana-plugin-public.stringvalidationregex.regex.md b/docs/development/core/public/kibana-plugin-public.stringvalidationregex.regex.md new file mode 100644 index 00000000000000..db7a1fca75aae2 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.stringvalidationregex.regex.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [StringValidationRegex](./kibana-plugin-public.stringvalidationregex.md) > [regex](./kibana-plugin-public.stringvalidationregex.regex.md) + +## StringValidationRegex.regex property + +Signature: + +```typescript +regex: RegExp; +``` diff --git a/docs/development/core/public/kibana-plugin-public.stringvalidationregexstring.md b/docs/development/core/public/kibana-plugin-public.stringvalidationregexstring.md new file mode 100644 index 00000000000000..f64e65122d9d15 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.stringvalidationregexstring.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [StringValidationRegexString](./kibana-plugin-public.stringvalidationregexstring.md) + +## StringValidationRegexString interface + +StringValidation as regex string + +Signature: + +```typescript +export interface StringValidationRegexString +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [message](./kibana-plugin-public.stringvalidationregexstring.message.md) | string | | +| [regexString](./kibana-plugin-public.stringvalidationregexstring.regexstring.md) | string | | + diff --git a/docs/development/core/public/kibana-plugin-public.stringvalidationregexstring.message.md b/docs/development/core/public/kibana-plugin-public.stringvalidationregexstring.message.md new file mode 100644 index 00000000000000..6d844e8dd970ff --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.stringvalidationregexstring.message.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [StringValidationRegexString](./kibana-plugin-public.stringvalidationregexstring.md) > [message](./kibana-plugin-public.stringvalidationregexstring.message.md) + +## StringValidationRegexString.message property + +Signature: + +```typescript +message: string; +``` diff --git a/docs/development/core/public/kibana-plugin-public.stringvalidationregexstring.regexstring.md b/docs/development/core/public/kibana-plugin-public.stringvalidationregexstring.regexstring.md new file mode 100644 index 00000000000000..b779f113f3bbc4 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.stringvalidationregexstring.regexstring.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [StringValidationRegexString](./kibana-plugin-public.stringvalidationregexstring.md) > [regexString](./kibana-plugin-public.stringvalidationregexstring.regexstring.md) + +## StringValidationRegexString.regexString property + +Signature: + +```typescript +regexString: string; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsparams.category.md b/docs/development/core/public/kibana-plugin-public.uisettingsparams.category.md new file mode 100644 index 00000000000000..859b25cab4be8a --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsparams.category.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) > [category](./kibana-plugin-public.uisettingsparams.category.md) + +## UiSettingsParams.category property + +used to group the configured setting in the UI + +Signature: + +```typescript +category?: string[]; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsparams.deprecation.md b/docs/development/core/public/kibana-plugin-public.uisettingsparams.deprecation.md new file mode 100644 index 00000000000000..2364d34bdb8a31 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsparams.deprecation.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) > [deprecation](./kibana-plugin-public.uisettingsparams.deprecation.md) + +## UiSettingsParams.deprecation property + +optional deprecation information. Used to generate a deprecation warning. + +Signature: + +```typescript +deprecation?: DeprecationSettings; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsparams.description.md b/docs/development/core/public/kibana-plugin-public.uisettingsparams.description.md new file mode 100644 index 00000000000000..2707c0a456d961 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsparams.description.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) > [description](./kibana-plugin-public.uisettingsparams.description.md) + +## UiSettingsParams.description property + +description provided to a user in UI + +Signature: + +```typescript +description?: string; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsparams.md b/docs/development/core/public/kibana-plugin-public.uisettingsparams.md new file mode 100644 index 00000000000000..d8a966d3e69bfa --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsparams.md @@ -0,0 +1,30 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) + +## UiSettingsParams interface + +UiSettings parameters defined by the plugins. + +Signature: + +```typescript +export interface UiSettingsParams +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [category](./kibana-plugin-public.uisettingsparams.category.md) | string[] | used to group the configured setting in the UI | +| [deprecation](./kibana-plugin-public.uisettingsparams.deprecation.md) | DeprecationSettings | optional deprecation information. Used to generate a deprecation warning. | +| [description](./kibana-plugin-public.uisettingsparams.description.md) | string | description provided to a user in UI | +| [name](./kibana-plugin-public.uisettingsparams.name.md) | string | title in the UI | +| [optionLabels](./kibana-plugin-public.uisettingsparams.optionlabels.md) | Record<string, string> | text labels for 'select' type UI element | +| [options](./kibana-plugin-public.uisettingsparams.options.md) | string[] | array of permitted values for this setting | +| [readonly](./kibana-plugin-public.uisettingsparams.readonly.md) | boolean | a flag indicating that value cannot be changed | +| [requiresPageReload](./kibana-plugin-public.uisettingsparams.requirespagereload.md) | boolean | a flag indicating whether new value applying requires page reloading | +| [type](./kibana-plugin-public.uisettingsparams.type.md) | UiSettingsType | defines a type of UI element [UiSettingsType](./kibana-plugin-public.uisettingstype.md) | +| [validation](./kibana-plugin-public.uisettingsparams.validation.md) | ImageValidation | StringValidation | | +| [value](./kibana-plugin-public.uisettingsparams.value.md) | SavedObjectAttribute | default value to fall back to if a user doesn't provide any | + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsparams.name.md b/docs/development/core/public/kibana-plugin-public.uisettingsparams.name.md new file mode 100644 index 00000000000000..4397c06c02c3d2 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsparams.name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) > [name](./kibana-plugin-public.uisettingsparams.name.md) + +## UiSettingsParams.name property + +title in the UI + +Signature: + +```typescript +name?: string; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsparams.optionlabels.md b/docs/development/core/public/kibana-plugin-public.uisettingsparams.optionlabels.md new file mode 100644 index 00000000000000..e6e320ae8b09f6 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsparams.optionlabels.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) > [optionLabels](./kibana-plugin-public.uisettingsparams.optionlabels.md) + +## UiSettingsParams.optionLabels property + +text labels for 'select' type UI element + +Signature: + +```typescript +optionLabels?: Record; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsparams.options.md b/docs/development/core/public/kibana-plugin-public.uisettingsparams.options.md new file mode 100644 index 00000000000000..e1a637281b44ec --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsparams.options.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) > [options](./kibana-plugin-public.uisettingsparams.options.md) + +## UiSettingsParams.options property + +array of permitted values for this setting + +Signature: + +```typescript +options?: string[]; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsparams.readonly.md b/docs/development/core/public/kibana-plugin-public.uisettingsparams.readonly.md new file mode 100644 index 00000000000000..92fcb5eae5232d --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsparams.readonly.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) > [readonly](./kibana-plugin-public.uisettingsparams.readonly.md) + +## UiSettingsParams.readonly property + +a flag indicating that value cannot be changed + +Signature: + +```typescript +readonly?: boolean; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsparams.requirespagereload.md b/docs/development/core/public/kibana-plugin-public.uisettingsparams.requirespagereload.md new file mode 100644 index 00000000000000..7d4994208ff1f4 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsparams.requirespagereload.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) > [requiresPageReload](./kibana-plugin-public.uisettingsparams.requirespagereload.md) + +## UiSettingsParams.requiresPageReload property + +a flag indicating whether new value applying requires page reloading + +Signature: + +```typescript +requiresPageReload?: boolean; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsparams.type.md b/docs/development/core/public/kibana-plugin-public.uisettingsparams.type.md new file mode 100644 index 00000000000000..e75dbce413ecef --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsparams.type.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) > [type](./kibana-plugin-public.uisettingsparams.type.md) + +## UiSettingsParams.type property + +defines a type of UI element [UiSettingsType](./kibana-plugin-public.uisettingstype.md) + +Signature: + +```typescript +type?: UiSettingsType; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsparams.validation.md b/docs/development/core/public/kibana-plugin-public.uisettingsparams.validation.md new file mode 100644 index 00000000000000..21b1de399a332d --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsparams.validation.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) > [validation](./kibana-plugin-public.uisettingsparams.validation.md) + +## UiSettingsParams.validation property + +Signature: + +```typescript +validation?: ImageValidation | StringValidation; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsparams.value.md b/docs/development/core/public/kibana-plugin-public.uisettingsparams.value.md new file mode 100644 index 00000000000000..d489b4567ded0a --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsparams.value.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsParams](./kibana-plugin-public.uisettingsparams.md) > [value](./kibana-plugin-public.uisettingsparams.value.md) + +## UiSettingsParams.value property + +default value to fall back to if a user doesn't provide any + +Signature: + +```typescript +value?: SavedObjectAttribute; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingstype.md b/docs/development/core/public/kibana-plugin-public.uisettingstype.md new file mode 100644 index 00000000000000..cb58152bd093e1 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingstype.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsType](./kibana-plugin-public.uisettingstype.md) + +## UiSettingsType type + +UI element type to represent the settings. + +Signature: + +```typescript +export declare type UiSettingsType = 'undefined' | 'json' | 'markdown' | 'number' | 'select' | 'boolean' | 'string' | 'array' | 'image'; +``` diff --git a/docs/development/core/public/kibana-plugin-public.userprovidedvalues.isoverridden.md b/docs/development/core/public/kibana-plugin-public.userprovidedvalues.isoverridden.md new file mode 100644 index 00000000000000..f62ca61ba91429 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.userprovidedvalues.isoverridden.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UserProvidedValues](./kibana-plugin-public.userprovidedvalues.md) > [isOverridden](./kibana-plugin-public.userprovidedvalues.isoverridden.md) + +## UserProvidedValues.isOverridden property + +Signature: + +```typescript +isOverridden?: boolean; +``` diff --git a/docs/development/core/public/kibana-plugin-public.userprovidedvalues.md b/docs/development/core/public/kibana-plugin-public.userprovidedvalues.md new file mode 100644 index 00000000000000..481bd36dd0ea69 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.userprovidedvalues.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UserProvidedValues](./kibana-plugin-public.userprovidedvalues.md) + +## UserProvidedValues interface + +Describes the values explicitly set by user. + +Signature: + +```typescript +export interface UserProvidedValues +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [isOverridden](./kibana-plugin-public.userprovidedvalues.isoverridden.md) | boolean | | +| [userValue](./kibana-plugin-public.userprovidedvalues.uservalue.md) | T | | + diff --git a/docs/development/core/public/kibana-plugin-public.userprovidedvalues.uservalue.md b/docs/development/core/public/kibana-plugin-public.userprovidedvalues.uservalue.md new file mode 100644 index 00000000000000..132409ad989b1a --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.userprovidedvalues.uservalue.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [UserProvidedValues](./kibana-plugin-public.userprovidedvalues.md) > [userValue](./kibana-plugin-public.userprovidedvalues.uservalue.md) + +## UserProvidedValues.userValue property + +Signature: + +```typescript +userValue?: T; +``` diff --git a/docs/development/core/server/kibana-plugin-server.imagevalidation.md b/docs/development/core/server/kibana-plugin-server.imagevalidation.md index 8d81a7eae19156..0c3e59cc783f95 100644 --- a/docs/development/core/server/kibana-plugin-server.imagevalidation.md +++ b/docs/development/core/server/kibana-plugin-server.imagevalidation.md @@ -4,6 +4,7 @@ ## ImageValidation interface + Signature: ```typescript diff --git a/docs/development/core/server/kibana-plugin-server.md b/docs/development/core/server/kibana-plugin-server.md deleted file mode 100644 index 15f5329d494c22..00000000000000 --- a/docs/development/core/server/kibana-plugin-server.md +++ /dev/null @@ -1,226 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) - -## kibana-plugin-server package - -The Kibana Core APIs for server-side plugins. - -A plugin requires a `kibana.json` file at it's root directory that follows [the manfiest schema](./kibana-plugin-server.pluginmanifest.md) to define static plugin information required to load the plugin. - -A plugin's `server/index` file must contain a named import, `plugin`, that implements [PluginInitializer](./kibana-plugin-server.plugininitializer.md) which returns an object that implements [Plugin](./kibana-plugin-server.plugin.md). - -The plugin integrates with the core system via lifecycle events: `setup`, `start`, and `stop`. In each lifecycle method, the plugin will receive the corresponding core services available (either [CoreSetup](./kibana-plugin-server.coresetup.md) or [CoreStart](./kibana-plugin-server.corestart.md)) and any interfaces returned by dependency plugins' lifecycle method. Anything returned by the plugin's lifecycle method will be exposed to downstream dependencies when their corresponding lifecycle methods are invoked. - -## Classes - -| Class | Description | -| --- | --- | -| [BasePath](./kibana-plugin-server.basepath.md) | Access or manipulate the Kibana base path | -| [ClusterClient](./kibana-plugin-server.clusterclient.md) | Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via asScoped(...)).See [ClusterClient](./kibana-plugin-server.clusterclient.md). | -| [CspConfig](./kibana-plugin-server.cspconfig.md) | CSP configuration for use in Kibana. | -| [ElasticsearchErrorHelpers](./kibana-plugin-server.elasticsearcherrorhelpers.md) | Helpers for working with errors returned from the Elasticsearch service.Since the internal data of errors are subject to change, consumers of the Elasticsearch service should always use these helpers to classify errors instead of checking error internals such as body.error.header[WWW-Authenticate] | -| [KibanaRequest](./kibana-plugin-server.kibanarequest.md) | Kibana specific abstraction for an incoming request. | -| [RouteValidationError](./kibana-plugin-server.routevalidationerror.md) | Error to return when the validation is not successful. | -| [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) | | -| [SavedObjectsErrorHelpers](./kibana-plugin-server.savedobjectserrorhelpers.md) | | -| [SavedObjectsRepository](./kibana-plugin-server.savedobjectsrepository.md) | | -| [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md) | Serves the same purpose as "normal" ClusterClient but exposes additional callAsCurrentUser method that doesn't use credentials of the Kibana internal user (as callAsInternalUser does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API.See [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md). | - -## Enumerations - -| Enumeration | Description | -| --- | --- | -| [AuthResultType](./kibana-plugin-server.authresulttype.md) | | -| [AuthStatus](./kibana-plugin-server.authstatus.md) | Status indicating an outcome of the authentication. | - -## Interfaces - -| Interface | Description | -| --- | --- | -| [APICaller](./kibana-plugin-server.apicaller.md) | | -| [AssistanceAPIResponse](./kibana-plugin-server.assistanceapiresponse.md) | | -| [AssistantAPIClientParams](./kibana-plugin-server.assistantapiclientparams.md) | | -| [Authenticated](./kibana-plugin-server.authenticated.md) | | -| [AuthResultParams](./kibana-plugin-server.authresultparams.md) | Result of an incoming request authentication. | -| [AuthToolkit](./kibana-plugin-server.authtoolkit.md) | A tool set defining an outcome of Auth interceptor for incoming request. | -| [CallAPIOptions](./kibana-plugin-server.callapioptions.md) | The set of options that defines how API call should be made and result be processed. | -| [Capabilities](./kibana-plugin-server.capabilities.md) | The read-only set of capabilities available for the current UI session. Capabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID, and the boolean is a flag indicating if the capability is enabled or disabled. | -| [CapabilitiesSetup](./kibana-plugin-server.capabilitiessetup.md) | APIs to manage the [Capabilities](./kibana-plugin-server.capabilities.md) that will be used by the application.Plugins relying on capabilities to toggle some of their features should register them during the setup phase using the registerProvider method.Plugins having the responsibility to restrict capabilities depending on a given context should register their capabilities switcher using the registerSwitcher method.Refers to the methods documentation for complete description and examples. | -| [CapabilitiesStart](./kibana-plugin-server.capabilitiesstart.md) | APIs to access the application [Capabilities](./kibana-plugin-server.capabilities.md). | -| [ConfigDeprecationFactory](./kibana-plugin-server.configdeprecationfactory.md) | Provides helpers to generates the most commonly used [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md) when invoking a [ConfigDeprecationProvider](./kibana-plugin-server.configdeprecationprovider.md).See methods documentation for more detailed examples. | -| [ContextSetup](./kibana-plugin-server.contextsetup.md) | An object that handles registration of context providers and configuring handlers with context. | -| [CoreSetup](./kibana-plugin-server.coresetup.md) | Context passed to the plugins setup method. | -| [CoreStart](./kibana-plugin-server.corestart.md) | Context passed to the plugins start method. | -| [CustomHttpResponseOptions](./kibana-plugin-server.customhttpresponseoptions.md) | HTTP response parameters for a response with adjustable status code. | -| [DeprecationAPIClientParams](./kibana-plugin-server.deprecationapiclientparams.md) | | -| [DeprecationAPIResponse](./kibana-plugin-server.deprecationapiresponse.md) | | -| [DeprecationInfo](./kibana-plugin-server.deprecationinfo.md) | | -| [DeprecationSettings](./kibana-plugin-server.deprecationsettings.md) | UiSettings deprecation field options. | -| [DiscoveredPlugin](./kibana-plugin-server.discoveredplugin.md) | Small container object used to expose information about discovered plugins that may or may not have been started. | -| [ElasticsearchError](./kibana-plugin-server.elasticsearcherror.md) | | -| [ElasticsearchServiceSetup](./kibana-plugin-server.elasticsearchservicesetup.md) | | -| [EnvironmentMode](./kibana-plugin-server.environmentmode.md) | | -| [ErrorHttpResponseOptions](./kibana-plugin-server.errorhttpresponseoptions.md) | HTTP response parameters | -| [FakeRequest](./kibana-plugin-server.fakerequest.md) | Fake request object created manually by Kibana plugins. | -| [HttpResponseOptions](./kibana-plugin-server.httpresponseoptions.md) | HTTP response parameters | -| [HttpServiceSetup](./kibana-plugin-server.httpservicesetup.md) | Kibana HTTP Service provides own abstraction for work with HTTP stack. Plugins don't have direct access to hapi server and its primitives anymore. Moreover, plugins shouldn't rely on the fact that HTTP Service uses one or another library under the hood. This gives the platform flexibility to upgrade or changing our internal HTTP stack without breaking plugins. If the HTTP Service lacks functionality you need, we are happy to discuss and support your needs. | -| [HttpServiceStart](./kibana-plugin-server.httpservicestart.md) | | -| [IContextContainer](./kibana-plugin-server.icontextcontainer.md) | An object that handles registration of context providers and configuring handlers with context. | -| [ICspConfig](./kibana-plugin-server.icspconfig.md) | CSP configuration for use in Kibana. | -| [IKibanaResponse](./kibana-plugin-server.ikibanaresponse.md) | A response data object, expected to returned as a result of [RequestHandler](./kibana-plugin-server.requesthandler.md) execution | -| [IKibanaSocket](./kibana-plugin-server.ikibanasocket.md) | A tiny abstraction for TCP socket. | -| [ImageValidation](./kibana-plugin-server.imagevalidation.md) | | -| [IndexSettingsDeprecationInfo](./kibana-plugin-server.indexsettingsdeprecationinfo.md) | | -| [IRenderOptions](./kibana-plugin-server.irenderoptions.md) | | -| [IRouter](./kibana-plugin-server.irouter.md) | Registers route handlers for specified resource path and method. See [RouteConfig](./kibana-plugin-server.routeconfig.md) and [RequestHandler](./kibana-plugin-server.requesthandler.md) for more information about arguments to route registrations. | -| [IScopedRenderingClient](./kibana-plugin-server.iscopedrenderingclient.md) | | -| [IUiSettingsClient](./kibana-plugin-server.iuisettingsclient.md) | Server-side client that provides access to the advanced settings stored in elasticsearch. The settings provide control over the behavior of the Kibana application. For example, a user can specify how to display numeric or date fields. Users can adjust the settings via Management UI. | -| [KibanaRequestEvents](./kibana-plugin-server.kibanarequestevents.md) | Request events. | -| [KibanaRequestRoute](./kibana-plugin-server.kibanarequestroute.md) | Request specific route information exposed to a handler. | -| [LegacyRequest](./kibana-plugin-server.legacyrequest.md) | | -| [LegacyServiceSetupDeps](./kibana-plugin-server.legacyservicesetupdeps.md) | | -| [LegacyServiceStartDeps](./kibana-plugin-server.legacyservicestartdeps.md) | | -| [Logger](./kibana-plugin-server.logger.md) | Logger exposes all the necessary methods to log any type of information and this is the interface used by the logging consumers including plugins. | -| [LoggerFactory](./kibana-plugin-server.loggerfactory.md) | The single purpose of LoggerFactory interface is to define a way to retrieve a context-based logger instance. | -| [LogMeta](./kibana-plugin-server.logmeta.md) | Contextual metadata | -| [OnPostAuthToolkit](./kibana-plugin-server.onpostauthtoolkit.md) | A tool set defining an outcome of OnPostAuth interceptor for incoming request. | -| [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. | -| [OnPreResponseExtensions](./kibana-plugin-server.onpreresponseextensions.md) | Additional data to extend a response. | -| [OnPreResponseInfo](./kibana-plugin-server.onpreresponseinfo.md) | Response status code. | -| [OnPreResponseToolkit](./kibana-plugin-server.onpreresponsetoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. | -| [PackageInfo](./kibana-plugin-server.packageinfo.md) | | -| [Plugin](./kibana-plugin-server.plugin.md) | The interface that should be returned by a PluginInitializer. | -| [PluginConfigDescriptor](./kibana-plugin-server.pluginconfigdescriptor.md) | Describes a plugin configuration properties. | -| [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md) | Context that's available to plugins during initialization stage. | -| [PluginManifest](./kibana-plugin-server.pluginmanifest.md) | Describes the set of required and optional properties plugin can define in its mandatory JSON manifest file. | -| [PluginsServiceSetup](./kibana-plugin-server.pluginsservicesetup.md) | | -| [PluginsServiceStart](./kibana-plugin-server.pluginsservicestart.md) | | -| [RequestHandlerContext](./kibana-plugin-server.requesthandlercontext.md) | Plugin specific context passed to a route handler.Provides the following clients: - [rendering](./kibana-plugin-server.iscopedrenderingclient.md) - Rendering client which uses the data of the incoming request - [savedObjects.client](./kibana-plugin-server.savedobjectsclient.md) - Saved Objects client which uses the credentials of the incoming request - [elasticsearch.dataClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch data client which uses the credentials of the incoming request - [elasticsearch.adminClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch admin client which uses the credentials of the incoming request - [uiSettings.client](./kibana-plugin-server.iuisettingsclient.md) - uiSettings client which uses the credentials of the incoming request | -| [RouteConfig](./kibana-plugin-server.routeconfig.md) | Route specific configuration. | -| [RouteConfigOptions](./kibana-plugin-server.routeconfigoptions.md) | Additional route options. | -| [RouteConfigOptionsBody](./kibana-plugin-server.routeconfigoptionsbody.md) | Additional body options for a route | -| [RouteValidationResultFactory](./kibana-plugin-server.routevalidationresultfactory.md) | Validation result factory to be used in the custom validation function to return the valid data or validation errorsSee [RouteValidationFunction](./kibana-plugin-server.routevalidationfunction.md). | -| [RouteValidatorConfig](./kibana-plugin-server.routevalidatorconfig.md) | The configuration object to the RouteValidator class. Set params, query and/or body to specify the validation logic to follow for that property. | -| [RouteValidatorOptions](./kibana-plugin-server.routevalidatoroptions.md) | Additional options for the RouteValidator class to modify its default behaviour. | -| [SavedObject](./kibana-plugin-server.savedobject.md) | | -| [SavedObjectAttributes](./kibana-plugin-server.savedobjectattributes.md) | The data for a Saved Object is stored as an object in the attributes property. | -| [SavedObjectReference](./kibana-plugin-server.savedobjectreference.md) | A reference to another saved object. | -| [SavedObjectsBaseOptions](./kibana-plugin-server.savedobjectsbaseoptions.md) | | -| [SavedObjectsBulkCreateObject](./kibana-plugin-server.savedobjectsbulkcreateobject.md) | | -| [SavedObjectsBulkGetObject](./kibana-plugin-server.savedobjectsbulkgetobject.md) | | -| [SavedObjectsBulkResponse](./kibana-plugin-server.savedobjectsbulkresponse.md) | | -| [SavedObjectsBulkUpdateObject](./kibana-plugin-server.savedobjectsbulkupdateobject.md) | | -| [SavedObjectsBulkUpdateOptions](./kibana-plugin-server.savedobjectsbulkupdateoptions.md) | | -| [SavedObjectsBulkUpdateResponse](./kibana-plugin-server.savedobjectsbulkupdateresponse.md) | | -| [SavedObjectsClientProviderOptions](./kibana-plugin-server.savedobjectsclientprovideroptions.md) | Options to control the creation of the Saved Objects Client. | -| [SavedObjectsClientWrapperOptions](./kibana-plugin-server.savedobjectsclientwrapperoptions.md) | Options passed to each SavedObjectsClientWrapperFactory to aid in creating the wrapper instance. | -| [SavedObjectsCreateOptions](./kibana-plugin-server.savedobjectscreateoptions.md) | | -| [SavedObjectsDeleteByNamespaceOptions](./kibana-plugin-server.savedobjectsdeletebynamespaceoptions.md) | | -| [SavedObjectsDeleteOptions](./kibana-plugin-server.savedobjectsdeleteoptions.md) | | -| [SavedObjectsExportOptions](./kibana-plugin-server.savedobjectsexportoptions.md) | Options controlling the export operation. | -| [SavedObjectsExportResultDetails](./kibana-plugin-server.savedobjectsexportresultdetails.md) | Structure of the export result details entry | -| [SavedObjectsFindOptions](./kibana-plugin-server.savedobjectsfindoptions.md) | | -| [SavedObjectsFindResponse](./kibana-plugin-server.savedobjectsfindresponse.md) | Return type of the Saved Objects find() method.\*Note\*: this type is different between the Public and Server Saved Objects clients. | -| [SavedObjectsImportConflictError](./kibana-plugin-server.savedobjectsimportconflicterror.md) | Represents a failure to import due to a conflict. | -| [SavedObjectsImportError](./kibana-plugin-server.savedobjectsimporterror.md) | Represents a failure to import. | -| [SavedObjectsImportMissingReferencesError](./kibana-plugin-server.savedobjectsimportmissingreferenceserror.md) | Represents a failure to import due to missing references. | -| [SavedObjectsImportOptions](./kibana-plugin-server.savedobjectsimportoptions.md) | Options to control the import operation. | -| [SavedObjectsImportResponse](./kibana-plugin-server.savedobjectsimportresponse.md) | The response describing the result of an import. | -| [SavedObjectsImportRetry](./kibana-plugin-server.savedobjectsimportretry.md) | Describes a retry operation for importing a saved object. | -| [SavedObjectsImportUnknownError](./kibana-plugin-server.savedobjectsimportunknownerror.md) | Represents a failure to import due to an unknown reason. | -| [SavedObjectsImportUnsupportedTypeError](./kibana-plugin-server.savedobjectsimportunsupportedtypeerror.md) | Represents a failure to import due to having an unsupported saved object type. | -| [SavedObjectsIncrementCounterOptions](./kibana-plugin-server.savedobjectsincrementcounteroptions.md) | | -| [SavedObjectsMigrationLogger](./kibana-plugin-server.savedobjectsmigrationlogger.md) | | -| [SavedObjectsMigrationVersion](./kibana-plugin-server.savedobjectsmigrationversion.md) | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. | -| [SavedObjectsRawDoc](./kibana-plugin-server.savedobjectsrawdoc.md) | A raw document as represented directly in the saved object index. | -| [SavedObjectsRepositoryFactory](./kibana-plugin-server.savedobjectsrepositoryfactory.md) | Factory provided when invoking a [client factory provider](./kibana-plugin-server.savedobjectsclientfactoryprovider.md) See [SavedObjectsServiceSetup.setClientFactoryProvider](./kibana-plugin-server.savedobjectsservicesetup.setclientfactoryprovider.md) | -| [SavedObjectsResolveImportErrorsOptions](./kibana-plugin-server.savedobjectsresolveimporterrorsoptions.md) | Options to control the "resolve import" operation. | -| [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) | Saved Objects is Kibana's data persistence mechanism allowing plugins to use Elasticsearch for storing and querying state. The SavedObjectsServiceSetup API exposes methods for creating and registering Saved Object client wrappers. | -| [SavedObjectsServiceStart](./kibana-plugin-server.savedobjectsservicestart.md) | Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing and querying state. The SavedObjectsServiceStart API provides a scoped Saved Objects client for interacting with Saved Objects. | -| [SavedObjectsUpdateOptions](./kibana-plugin-server.savedobjectsupdateoptions.md) | | -| [SavedObjectsUpdateResponse](./kibana-plugin-server.savedobjectsupdateresponse.md) | | -| [SessionCookieValidationResult](./kibana-plugin-server.sessioncookievalidationresult.md) | Return type from a function to validate cookie contents. | -| [SessionStorage](./kibana-plugin-server.sessionstorage.md) | Provides an interface to store and retrieve data across requests. | -| [SessionStorageCookieOptions](./kibana-plugin-server.sessionstoragecookieoptions.md) | Configuration used to create HTTP session storage based on top of cookie mechanism. | -| [SessionStorageFactory](./kibana-plugin-server.sessionstoragefactory.md) | SessionStorage factory to bind one to an incoming request | -| [StringValidation](./kibana-plugin-server.stringvalidation.md) | | -| [UiSettingsParams](./kibana-plugin-server.uisettingsparams.md) | UiSettings parameters defined by the plugins. | -| [UiSettingsServiceSetup](./kibana-plugin-server.uisettingsservicesetup.md) | | -| [UiSettingsServiceStart](./kibana-plugin-server.uisettingsservicestart.md) | | -| [UserProvidedValues](./kibana-plugin-server.userprovidedvalues.md) | Describes the values explicitly set by user. | -| [UuidServiceSetup](./kibana-plugin-server.uuidservicesetup.md) | APIs to access the application's instance uuid. | - -## Variables - -| Variable | Description | -| --- | --- | -| [kibanaResponseFactory](./kibana-plugin-server.kibanaresponsefactory.md) | Set of helpers used to create KibanaResponse to form HTTP response on an incoming request. Should be returned as a result of [RequestHandler](./kibana-plugin-server.requesthandler.md) execution. | -| [validBodyOutput](./kibana-plugin-server.validbodyoutput.md) | The set of valid body.output | - -## Type Aliases - -| Type Alias | Description | -| --- | --- | -| [AuthenticationHandler](./kibana-plugin-server.authenticationhandler.md) | See [AuthToolkit](./kibana-plugin-server.authtoolkit.md). | -| [AuthHeaders](./kibana-plugin-server.authheaders.md) | Auth Headers map | -| [AuthResult](./kibana-plugin-server.authresult.md) | | -| [CapabilitiesProvider](./kibana-plugin-server.capabilitiesprovider.md) | See [CapabilitiesSetup](./kibana-plugin-server.capabilitiessetup.md) | -| [CapabilitiesSwitcher](./kibana-plugin-server.capabilitiesswitcher.md) | See [CapabilitiesSetup](./kibana-plugin-server.capabilitiessetup.md) | -| [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md) | Configuration deprecation returned from [ConfigDeprecationProvider](./kibana-plugin-server.configdeprecationprovider.md) that handles a single deprecation from the configuration. | -| [ConfigDeprecationLogger](./kibana-plugin-server.configdeprecationlogger.md) | Logger interface used when invoking a [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md) | -| [ConfigDeprecationProvider](./kibana-plugin-server.configdeprecationprovider.md) | A provider that should returns a list of [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md).See [ConfigDeprecationFactory](./kibana-plugin-server.configdeprecationfactory.md) for more usage examples. | -| [ConfigPath](./kibana-plugin-server.configpath.md) | | -| [ElasticsearchClientConfig](./kibana-plugin-server.elasticsearchclientconfig.md) | | -| [GetAuthHeaders](./kibana-plugin-server.getauthheaders.md) | Get headers to authenticate a user against Elasticsearch. | -| [GetAuthState](./kibana-plugin-server.getauthstate.md) | Get authentication state for a request. Returned by auth interceptor. | -| [HandlerContextType](./kibana-plugin-server.handlercontexttype.md) | Extracts the type of the first argument of a [HandlerFunction](./kibana-plugin-server.handlerfunction.md) to represent the type of the context. | -| [HandlerFunction](./kibana-plugin-server.handlerfunction.md) | A function that accepts a context object and an optional number of additional arguments. Used for the generic types in [IContextContainer](./kibana-plugin-server.icontextcontainer.md) | -| [HandlerParameters](./kibana-plugin-server.handlerparameters.md) | Extracts the types of the additional arguments of a [HandlerFunction](./kibana-plugin-server.handlerfunction.md), excluding the [HandlerContextType](./kibana-plugin-server.handlercontexttype.md). | -| [Headers](./kibana-plugin-server.headers.md) | Http request headers to read. | -| [HttpResponsePayload](./kibana-plugin-server.httpresponsepayload.md) | Data send to the client as a response payload. | -| [IBasePath](./kibana-plugin-server.ibasepath.md) | Access or manipulate the Kibana base path[BasePath](./kibana-plugin-server.basepath.md) | -| [IClusterClient](./kibana-plugin-server.iclusterclient.md) | Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via asScoped(...)).See [ClusterClient](./kibana-plugin-server.clusterclient.md). | -| [IContextProvider](./kibana-plugin-server.icontextprovider.md) | A function that returns a context value for a specific key of given context type. | -| [ICustomClusterClient](./kibana-plugin-server.icustomclusterclient.md) | Represents an Elasticsearch cluster API client created by a plugin. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via asScoped(...)).See [ClusterClient](./kibana-plugin-server.clusterclient.md). | -| [IsAuthenticated](./kibana-plugin-server.isauthenticated.md) | Return authentication status for a request. | -| [ISavedObjectsRepository](./kibana-plugin-server.isavedobjectsrepository.md) | See [SavedObjectsRepository](./kibana-plugin-server.savedobjectsrepository.md) | -| [IScopedClusterClient](./kibana-plugin-server.iscopedclusterclient.md) | Serves the same purpose as "normal" ClusterClient but exposes additional callAsCurrentUser method that doesn't use credentials of the Kibana internal user (as callAsInternalUser does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API.See [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md). | -| [KibanaRequestRouteOptions](./kibana-plugin-server.kibanarequestrouteoptions.md) | Route options: If 'GET' or 'OPTIONS' method, body options won't be returned. | -| [KibanaResponseFactory](./kibana-plugin-server.kibanaresponsefactory.md) | Creates an object containing request response payload, HTTP headers, error details, and other data transmitted to the client. | -| [KnownHeaders](./kibana-plugin-server.knownheaders.md) | Set of well-known HTTP headers. | -| [LifecycleResponseFactory](./kibana-plugin-server.lifecycleresponsefactory.md) | Creates an object containing redirection or error response with error details, HTTP headers, and other data transmitted to the client. | -| [MIGRATION\_ASSISTANCE\_INDEX\_ACTION](./kibana-plugin-server.migration_assistance_index_action.md) | | -| [MIGRATION\_DEPRECATION\_LEVEL](./kibana-plugin-server.migration_deprecation_level.md) | | -| [MutatingOperationRefreshSetting](./kibana-plugin-server.mutatingoperationrefreshsetting.md) | Elasticsearch Refresh setting for mutating operation | -| [OnPostAuthHandler](./kibana-plugin-server.onpostauthhandler.md) | See [OnPostAuthToolkit](./kibana-plugin-server.onpostauthtoolkit.md). | -| [OnPreAuthHandler](./kibana-plugin-server.onpreauthhandler.md) | See [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md). | -| [OnPreResponseHandler](./kibana-plugin-server.onpreresponsehandler.md) | See [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md). | -| [PluginConfigSchema](./kibana-plugin-server.pluginconfigschema.md) | Dedicated type for plugin configuration schema. | -| [PluginInitializer](./kibana-plugin-server.plugininitializer.md) | The plugin export at the root of a plugin's server directory should conform to this interface. | -| [PluginName](./kibana-plugin-server.pluginname.md) | Dedicated type for plugin name/id that is supposed to make Map/Set/Arrays that use it as a key or value more obvious. | -| [PluginOpaqueId](./kibana-plugin-server.pluginopaqueid.md) | | -| [RecursiveReadonly](./kibana-plugin-server.recursivereadonly.md) | | -| [RedirectResponseOptions](./kibana-plugin-server.redirectresponseoptions.md) | HTTP response parameters for redirection response | -| [RequestHandler](./kibana-plugin-server.requesthandler.md) | A function executed when route path matched requested resource path. Request handler is expected to return a result of one of [KibanaResponseFactory](./kibana-plugin-server.kibanaresponsefactory.md) functions. | -| [RequestHandlerContextContainer](./kibana-plugin-server.requesthandlercontextcontainer.md) | An object that handles registration of http request context providers. | -| [RequestHandlerContextProvider](./kibana-plugin-server.requesthandlercontextprovider.md) | Context provider for request handler. Extends request context object with provided functionality or data. | -| [ResponseError](./kibana-plugin-server.responseerror.md) | Error message and optional data send to the client in case of error. | -| [ResponseErrorAttributes](./kibana-plugin-server.responseerrorattributes.md) | Additional data to provide error details. | -| [ResponseHeaders](./kibana-plugin-server.responseheaders.md) | Http response headers to set. | -| [RouteContentType](./kibana-plugin-server.routecontenttype.md) | The set of supported parseable Content-Types | -| [RouteMethod](./kibana-plugin-server.routemethod.md) | The set of common HTTP methods supported by Kibana routing. | -| [RouteRegistrar](./kibana-plugin-server.routeregistrar.md) | Route handler common definition | -| [RouteValidationFunction](./kibana-plugin-server.routevalidationfunction.md) | The custom validation function if @kbn/config-schema is not a valid solution for your specific plugin requirements. | -| [RouteValidationSpec](./kibana-plugin-server.routevalidationspec.md) | Allowed property validation options: either @kbn/config-schema validations or custom validation functionsSee [RouteValidationFunction](./kibana-plugin-server.routevalidationfunction.md) for custom validation. | -| [RouteValidatorFullConfig](./kibana-plugin-server.routevalidatorfullconfig.md) | Route validations config and options merged into one object | -| [SavedObjectAttribute](./kibana-plugin-server.savedobjectattribute.md) | Type definition for a Saved Object attribute value | -| [SavedObjectAttributeSingle](./kibana-plugin-server.savedobjectattributesingle.md) | Don't use this type, it's simply a helper type for [SavedObjectAttribute](./kibana-plugin-server.savedobjectattribute.md) | -| [SavedObjectsClientContract](./kibana-plugin-server.savedobjectsclientcontract.md) | Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing plugin state.\#\# SavedObjectsClient errorsSince the SavedObjectsClient has its hands in everything we are a little paranoid about the way we present errors back to to application code. Ideally, all errors will be either:1. Caused by bad implementation (ie. undefined is not a function) and as such unpredictable 2. An error that has been classified and decorated appropriately by the decorators in [SavedObjectsErrorHelpers](./kibana-plugin-server.savedobjectserrorhelpers.md)Type 1 errors are inevitable, but since all expected/handle-able errors should be Type 2 the isXYZError() helpers exposed at SavedObjectsErrorHelpers should be used to understand and manage error responses from the SavedObjectsClient.Type 2 errors are decorated versions of the source error, so if the elasticsearch client threw an error it will be decorated based on its type. That means that rather than looking for error.body.error.type or doing substring checks on error.body.error.reason, just use the helpers to understand the meaning of the error:\`\`\`js if (SavedObjectsErrorHelpers.isNotFoundError(error)) { // handle 404 }if (SavedObjectsErrorHelpers.isNotAuthorizedError(error)) { // 401 handling should be automatic, but in case you wanted to know }// always rethrow the error unless you handle it throw error; \`\`\`\#\#\# 404s from missing indexFrom the perspective of application code and APIs the SavedObjectsClient is a black box that persists objects. One of the internal details that users have no control over is that we use an elasticsearch index for persistance and that index might be missing.At the time of writing we are in the process of transitioning away from the operating assumption that the SavedObjects index is always available. Part of this transition is handling errors resulting from an index missing. These used to trigger a 500 error in most cases, and in others cause 404s with different error messages.From my (Spencer) perspective, a 404 from the SavedObjectsApi is a 404; The object the request/call was targeting could not be found. This is why \#14141 takes special care to ensure that 404 errors are generic and don't distinguish between index missing or document missing.\#\#\# 503s from missing indexUnlike all other methods, create requests are supposed to succeed even when the Kibana index does not exist because it will be automatically created by elasticsearch. When that is not the case it is because Elasticsearch's action.auto_create_index setting prevents it from being created automatically so we throw a special 503 with the intention of informing the user that their Elasticsearch settings need to be updated.See [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) See [SavedObjectsErrorHelpers](./kibana-plugin-server.savedobjectserrorhelpers.md) | -| [SavedObjectsClientFactory](./kibana-plugin-server.savedobjectsclientfactory.md) | Describes the factory used to create instances of the Saved Objects Client. | -| [SavedObjectsClientFactoryProvider](./kibana-plugin-server.savedobjectsclientfactoryprovider.md) | Provider to invoke to retrieve a [SavedObjectsClientFactory](./kibana-plugin-server.savedobjectsclientfactory.md). | -| [SavedObjectsClientWrapperFactory](./kibana-plugin-server.savedobjectsclientwrapperfactory.md) | Describes the factory used to create instances of Saved Objects Client Wrappers. | -| [ScopeableRequest](./kibana-plugin-server.scopeablerequest.md) | A user credentials container. It accommodates the necessary auth credentials to impersonate the current user.See [KibanaRequest](./kibana-plugin-server.kibanarequest.md). | -| [SharedGlobalConfig](./kibana-plugin-server.sharedglobalconfig.md) | | -| [UiSettingsType](./kibana-plugin-server.uisettingstype.md) | UI element type to represent the settings. | - diff --git a/docs/development/core/server/kibana-plugin-server.stringvalidation.md b/docs/development/core/server/kibana-plugin-server.stringvalidation.md index cc52c853ce2489..0e396f2972c44f 100644 --- a/docs/development/core/server/kibana-plugin-server.stringvalidation.md +++ b/docs/development/core/server/kibana-plugin-server.stringvalidation.md @@ -2,18 +2,12 @@ [Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [StringValidation](./kibana-plugin-server.stringvalidation.md) -## StringValidation interface +## StringValidation type + +Allows regex objects or a regex string Signature: ```typescript -export interface StringValidation +export declare type StringValidation = StringValidationRegex | StringValidationRegexString; ``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [message](./kibana-plugin-server.stringvalidation.message.md) | string | | -| [regexString](./kibana-plugin-server.stringvalidation.regexstring.md) | string | | - diff --git a/docs/development/core/server/kibana-plugin-server.stringvalidation.message.md b/docs/development/core/server/kibana-plugin-server.stringvalidation.message.md deleted file mode 100644 index a15fe8b9314039..00000000000000 --- a/docs/development/core/server/kibana-plugin-server.stringvalidation.message.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [StringValidation](./kibana-plugin-server.stringvalidation.md) > [message](./kibana-plugin-server.stringvalidation.message.md) - -## StringValidation.message property - -Signature: - -```typescript -message: string; -``` diff --git a/docs/development/core/server/kibana-plugin-server.stringvalidation.regexstring.md b/docs/development/core/server/kibana-plugin-server.stringvalidation.regexstring.md deleted file mode 100644 index e19560237f77de..00000000000000 --- a/docs/development/core/server/kibana-plugin-server.stringvalidation.regexstring.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [StringValidation](./kibana-plugin-server.stringvalidation.md) > [regexString](./kibana-plugin-server.stringvalidation.regexstring.md) - -## StringValidation.regexString property - -Signature: - -```typescript -regexString: string; -``` diff --git a/docs/development/core/server/kibana-plugin-server.stringvalidationregex.md b/docs/development/core/server/kibana-plugin-server.stringvalidationregex.md new file mode 100644 index 00000000000000..46d196ea8e03fe --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.stringvalidationregex.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [StringValidationRegex](./kibana-plugin-server.stringvalidationregex.md) + +## StringValidationRegex interface + +StringValidation with regex object + +Signature: + +```typescript +export interface StringValidationRegex +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [message](./kibana-plugin-server.stringvalidationregex.message.md) | string | | +| [regex](./kibana-plugin-server.stringvalidationregex.regex.md) | RegExp | | + diff --git a/docs/development/core/server/kibana-plugin-server.stringvalidationregex.message.md b/docs/development/core/server/kibana-plugin-server.stringvalidationregex.message.md new file mode 100644 index 00000000000000..383b1f6d8873c2 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.stringvalidationregex.message.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [StringValidationRegex](./kibana-plugin-server.stringvalidationregex.md) > [message](./kibana-plugin-server.stringvalidationregex.message.md) + +## StringValidationRegex.message property + +Signature: + +```typescript +message: string; +``` diff --git a/docs/development/core/server/kibana-plugin-server.stringvalidationregex.regex.md b/docs/development/core/server/kibana-plugin-server.stringvalidationregex.regex.md new file mode 100644 index 00000000000000..69a96a04895039 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.stringvalidationregex.regex.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [StringValidationRegex](./kibana-plugin-server.stringvalidationregex.md) > [regex](./kibana-plugin-server.stringvalidationregex.regex.md) + +## StringValidationRegex.regex property + +Signature: + +```typescript +regex: RegExp; +``` diff --git a/docs/development/core/server/kibana-plugin-server.stringvalidationregexstring.md b/docs/development/core/server/kibana-plugin-server.stringvalidationregexstring.md new file mode 100644 index 00000000000000..d76cb94fdd1a1c --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.stringvalidationregexstring.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [StringValidationRegexString](./kibana-plugin-server.stringvalidationregexstring.md) + +## StringValidationRegexString interface + +StringValidation as regex string + +Signature: + +```typescript +export interface StringValidationRegexString +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [message](./kibana-plugin-server.stringvalidationregexstring.message.md) | string | | +| [regexString](./kibana-plugin-server.stringvalidationregexstring.regexstring.md) | string | | + diff --git a/docs/development/core/server/kibana-plugin-server.stringvalidationregexstring.message.md b/docs/development/core/server/kibana-plugin-server.stringvalidationregexstring.message.md new file mode 100644 index 00000000000000..361dfe788b852e --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.stringvalidationregexstring.message.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [StringValidationRegexString](./kibana-plugin-server.stringvalidationregexstring.md) > [message](./kibana-plugin-server.stringvalidationregexstring.message.md) + +## StringValidationRegexString.message property + +Signature: + +```typescript +message: string; +``` diff --git a/docs/development/core/server/kibana-plugin-server.stringvalidationregexstring.regexstring.md b/docs/development/core/server/kibana-plugin-server.stringvalidationregexstring.regexstring.md new file mode 100644 index 00000000000000..203cc7e7a0aadd --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.stringvalidationregexstring.regexstring.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [StringValidationRegexString](./kibana-plugin-server.stringvalidationregexstring.md) > [regexString](./kibana-plugin-server.stringvalidationregexstring.regexstring.md) + +## StringValidationRegexString.regexString property + +Signature: + +```typescript +regexString: string; +``` diff --git a/docs/development/core/server/kibana-plugin-server.uisettingstype.md b/docs/development/core/server/kibana-plugin-server.uisettingstype.md index 789d4d5788468e..b78932aecc7245 100644 --- a/docs/development/core/server/kibana-plugin-server.uisettingstype.md +++ b/docs/development/core/server/kibana-plugin-server.uisettingstype.md @@ -9,5 +9,5 @@ UI element type to represent the settings. Signature: ```typescript -export declare type UiSettingsType = 'json' | 'markdown' | 'number' | 'select' | 'boolean' | 'string'; +export declare type UiSettingsType = 'undefined' | 'json' | 'markdown' | 'number' | 'select' | 'boolean' | 'string' | 'array' | 'image'; ``` diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index 1046f7a17dc518..3521d7ef9c66eb 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -214,5 +214,6 @@ export interface DocLinksStart { readonly date: { readonly dateMath: string; }; + readonly management: Record; }; } diff --git a/src/core/public/index.ts b/src/core/public/index.ts index bf8cab9a3c7787..c57d35343087ae 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -78,7 +78,16 @@ import { export { CoreContext, CoreSystem } from './core_system'; export { RecursiveReadonly, DEFAULT_APP_CATEGORIES } from '../utils'; -export { AppCategory } from '../types'; +export { + AppCategory, + UiSettingsParams, + UserProvidedValues, + UiSettingsType, + ImageValidation, + StringValidation, + StringValidationRegex, + StringValidationRegexString, +} from '../types'; export { ApplicationSetup, diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index 0da6e0d422f2d7..a9cea7ae97998d 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -531,6 +531,7 @@ export interface DocLinksStart { readonly date: { readonly dateMath: string; }; + readonly management: Record; }; } @@ -730,6 +731,15 @@ export interface IHttpResponseInterceptorOverrides { readonly response?: Readonly; } +// @public (undocumented) +export interface ImageValidation { + // (undocumented) + maxSize: { + length: number; + description: string; + }; +} + // @public export type IToasts = Pick; @@ -1166,6 +1176,25 @@ export class SimpleSavedObject { _version?: SavedObject['version']; } +// @public +export type StringValidation = StringValidationRegex | StringValidationRegexString; + +// @public +export interface StringValidationRegex { + // (undocumented) + message: string; + // (undocumented) + regex: RegExp; +} + +// @public +export interface StringValidationRegexString { + // (undocumented) + message: string; + // (undocumented) + regexString: string; +} + // Warning: (ae-missing-release-tag) "Toast" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -1207,14 +1236,42 @@ export type ToastsSetup = IToasts; // @public (undocumented) export type ToastsStart = IToasts; +// @public +export interface UiSettingsParams { + category?: string[]; + // Warning: (ae-forgotten-export) The symbol "DeprecationSettings" needs to be exported by the entry point index.d.ts + deprecation?: DeprecationSettings; + description?: string; + name?: string; + optionLabels?: Record; + options?: string[]; + readonly?: boolean; + requiresPageReload?: boolean; + type?: UiSettingsType; + // (undocumented) + validation?: ImageValidation | StringValidation; + value?: SavedObjectAttribute; +} + // @public (undocumented) export interface UiSettingsState { // (undocumented) [key: string]: UiSettingsParams_2 & UserProvidedValues_2; } +// @public +export type UiSettingsType = 'undefined' | 'json' | 'markdown' | 'number' | 'select' | 'boolean' | 'string' | 'array' | 'image'; + // @public export type UnmountCallback = () => void; +// @public +export interface UserProvidedValues { + // (undocumented) + isOverridden?: boolean; + // (undocumented) + userValue?: T; +} + ``` diff --git a/src/core/public/types.ts b/src/core/public/types.ts index 5abbb3c55813ac..267a9e9f7e0145 100644 --- a/src/core/public/types.ts +++ b/src/core/public/types.ts @@ -17,6 +17,14 @@ * under the License. */ +export { + UiSettingsParams, + UserProvidedValues, + UiSettingsType, + ImageValidation, + StringValidationRegex, +} from '../../core/types'; + /** * A function that should mount DOM content inside the provided container element * and return a handler to unmount it. diff --git a/src/core/server/index.ts b/src/core/server/index.ts index cdc2ec91134ed1..91f38c9f2ddbe9 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -222,6 +222,8 @@ export { ImageValidation, DeprecationSettings, StringValidation, + StringValidationRegex, + StringValidationRegexString, } from './ui_settings'; export { RecursiveReadonly } from '../utils'; diff --git a/src/core/server/saved_objects/types.ts b/src/core/server/saved_objects/types.ts index dfce4a4c8ab189..a3fe2b937635bf 100644 --- a/src/core/server/saved_objects/types.ts +++ b/src/core/server/saved_objects/types.ts @@ -33,6 +33,13 @@ export { SavedObjectsImportRetry, } from './import/types'; +import { SavedObjectAttributes } from '../../types'; +export { + SavedObjectAttributes, + SavedObjectAttribute, + SavedObjectAttributeSingle, +} from '../../types'; + /** * Information about the migrations that have been applied to this SavedObject. * When Kibana starts up, KibanaMigrator detects outdated documents and @@ -52,36 +59,6 @@ export interface SavedObjectsMigrationVersion { [pluginName: string]: string; } -/** - * Don't use this type, it's simply a helper type for {@link SavedObjectAttribute} - * - * @public - */ -export type SavedObjectAttributeSingle = - | string - | number - | boolean - | null - | undefined - | SavedObjectAttributes; - -/** - * Type definition for a Saved Object attribute value - * - * @public - */ -export type SavedObjectAttribute = SavedObjectAttributeSingle | SavedObjectAttributeSingle[]; - -/** - * The data for a Saved Object is stored as an object in the `attributes` - * property. - * - * @public - */ -export interface SavedObjectAttributes { - [key: string]: SavedObjectAttribute; -} - /** * * @public diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index 060587448642fd..629e6a881199be 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -803,8 +803,6 @@ export interface IKibanaSocket { getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate | null; } -// Warning: (ae-missing-release-tag) "ImageValidation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ImageValidation { // (undocumented) @@ -1957,10 +1955,19 @@ export type SharedGlobalConfig = RecursiveReadonly_2<{ path: Pick; }>; -// Warning: (ae-missing-release-tag) "StringValidation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export interface StringValidation { +// @public +export type StringValidation = StringValidationRegex | StringValidationRegexString; + +// @public +export interface StringValidationRegex { + // (undocumented) + message: string; + // (undocumented) + regex: RegExp; +} + +// @public +export interface StringValidationRegexString { // (undocumented) message: string; // (undocumented) @@ -1994,7 +2001,7 @@ export interface UiSettingsServiceStart { } // @public -export type UiSettingsType = 'json' | 'markdown' | 'number' | 'select' | 'boolean' | 'string'; +export type UiSettingsType = 'undefined' | 'json' | 'markdown' | 'number' | 'select' | 'boolean' | 'string' | 'array' | 'image'; // @public export interface UserProvidedValues { diff --git a/src/core/server/ui_settings/index.ts b/src/core/server/ui_settings/index.ts index 39eb0046010b38..ddb66df3ffcbe1 100644 --- a/src/core/server/ui_settings/index.ts +++ b/src/core/server/ui_settings/index.ts @@ -34,4 +34,6 @@ export { ImageValidation, DeprecationSettings, StringValidation, + StringValidationRegex, + StringValidationRegexString, } from './types'; diff --git a/src/core/server/ui_settings/types.ts b/src/core/server/ui_settings/types.ts index a74a31bbbd671a..f3eb1f5a6859cc 100644 --- a/src/core/server/ui_settings/types.ts +++ b/src/core/server/ui_settings/types.ts @@ -16,7 +16,19 @@ * specific language governing permissions and limitations * under the License. */ -import { SavedObjectsClientContract, SavedObjectAttribute } from '../saved_objects/types'; +import { SavedObjectsClientContract } from '../saved_objects/types'; +import { UiSettingsParams, UserProvidedValues } from '../../types'; +export { + UiSettingsParams, + StringValidationRegexString, + StringValidationRegex, + StringValidation, + DeprecationSettings, + ImageValidation, + UiSettingsType, + UserProvidedValues, +} from '../../types'; + /** * Server-side client that provides access to the advanced settings stored in elasticsearch. * The settings provide control over the behavior of the Kibana application. @@ -64,76 +76,6 @@ export interface IUiSettingsClient { isOverridden: (key: string) => boolean; } -/** - * Describes the values explicitly set by user. - * @public - * */ -export interface UserProvidedValues { - userValue?: T; - isOverridden?: boolean; -} - -/** - * UiSettings deprecation field options. - * @public - * */ -export interface DeprecationSettings { - /** Deprecation message */ - message: string; - /** Key to documentation links */ - docLinksKey: string; -} - -/** - * UI element type to represent the settings. - * @public - * */ -export type UiSettingsType = 'json' | 'markdown' | 'number' | 'select' | 'boolean' | 'string'; - -/** - * UiSettings parameters defined by the plugins. - * @public - * */ -export interface UiSettingsParams { - /** title in the UI */ - name?: string; - /** default value to fall back to if a user doesn't provide any */ - value?: SavedObjectAttribute; - /** description provided to a user in UI */ - description?: string; - /** used to group the configured setting in the UI */ - category?: string[]; - /** array of permitted values for this setting */ - options?: string[]; - /** text labels for 'select' type UI element */ - optionLabels?: Record; - /** a flag indicating whether new value applying requires page reloading */ - requiresPageReload?: boolean; - /** a flag indicating that value cannot be changed */ - readonly?: boolean; - /** defines a type of UI element {@link UiSettingsType} */ - type?: UiSettingsType; - /** optional deprecation information. Used to generate a deprecation warning. */ - deprecation?: DeprecationSettings; - /* - * Allows defining a custom validation applicable to value change on the client. - * @deprecated - */ - validation?: ImageValidation | StringValidation; -} - -export interface StringValidation { - regexString: string; - message: string; -} - -export interface ImageValidation { - maxSize: { - length: number; - description: string; - }; -} - /** @internal */ export interface InternalUiSettingsServiceSetup { /** diff --git a/src/core/types/index.ts b/src/core/types/index.ts index 7ddb6b0d8dfbbc..346b4cfce70c1a 100644 --- a/src/core/types/index.ts +++ b/src/core/types/index.ts @@ -24,3 +24,5 @@ export * from './core_service'; export * from './capabilities'; export * from './app_category'; +export * from './ui_settings'; +export * from './saved_objects'; diff --git a/src/core/types/saved_objects.ts b/src/core/types/saved_objects.ts new file mode 100644 index 00000000000000..73eb2db11d62fb --- /dev/null +++ b/src/core/types/saved_objects.ts @@ -0,0 +1,48 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * Don't use this type, it's simply a helper type for {@link SavedObjectAttribute} + * + * @public + */ +export type SavedObjectAttributeSingle = + | string + | number + | boolean + | null + | undefined + | SavedObjectAttributes; + +/** + * Type definition for a Saved Object attribute value + * + * @public + */ +export type SavedObjectAttribute = SavedObjectAttributeSingle | SavedObjectAttributeSingle[]; + +/** + * The data for a Saved Object is stored as an object in the `attributes` + * property. + * + * @public + */ +export interface SavedObjectAttributes { + [key: string]: SavedObjectAttribute; +} diff --git a/src/core/types/ui_settings.ts b/src/core/types/ui_settings.ts new file mode 100644 index 00000000000000..eccd3f9616af07 --- /dev/null +++ b/src/core/types/ui_settings.ts @@ -0,0 +1,121 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { SavedObjectAttribute } from './saved_objects'; + +/** + * UI element type to represent the settings. + * @public + * */ +export type UiSettingsType = + | 'undefined' // I don't know why malformed UiSettings objects exist + | 'json' + | 'markdown' + | 'number' + | 'select' + | 'boolean' + | 'string' + | 'array' + | 'image'; + +/** + * UiSettings deprecation field options. + * @public + * */ +export interface DeprecationSettings { + /** Deprecation message */ + message: string; + /** Key to documentation links */ + docLinksKey: string; +} + +/** + * UiSettings parameters defined by the plugins. + * @public + * */ +export interface UiSettingsParams { + /** title in the UI */ + name?: string; + /** default value to fall back to if a user doesn't provide any */ + value?: SavedObjectAttribute; + /** description provided to a user in UI */ + description?: string; + /** used to group the configured setting in the UI */ + category?: string[]; + /** array of permitted values for this setting */ + options?: string[]; + /** text labels for 'select' type UI element */ + optionLabels?: Record; + /** a flag indicating whether new value applying requires page reloading */ + requiresPageReload?: boolean; + /** a flag indicating that value cannot be changed */ + readonly?: boolean; + /** defines a type of UI element {@link UiSettingsType} */ + type?: UiSettingsType; + /** optional deprecation information. Used to generate a deprecation warning. */ + deprecation?: DeprecationSettings; + /* + * Allows defining a custom validation applicable to value change on the client. + * @deprecated + */ + validation?: ImageValidation | StringValidation; +} + +/** + * Allows regex objects or a regex string + * @public + * */ +export type StringValidation = StringValidationRegex | StringValidationRegexString; + +/** + * StringValidation with regex object + * @public + * */ +export interface StringValidationRegex { + regex: RegExp; + message: string; +} + +/** + * StringValidation as regex string + * @public + * */ +export interface StringValidationRegexString { + regexString: string; + message: string; +} + +/** + * @public + * */ +export interface ImageValidation { + maxSize: { + length: number; + description: string; + }; +} + +/** + * Describes the values explicitly set by user. + * @public + * */ +export interface UserProvidedValues { + userValue?: T; + isOverridden?: boolean; +} diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/__snapshots__/advanced_settings.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/settings/__snapshots__/advanced_settings.test.js.snap deleted file mode 100644 index eef8f3fc93d90f..00000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/__snapshots__/advanced_settings.test.js.snap +++ /dev/null @@ -1,1022 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`AdvancedSettings should render normally 1`] = ` -
- - - - - - - - - - - - - -
- -
-`; - -exports[`AdvancedSettings should render read-only when saving is disabled 1`] = ` -
- - - - - - - - - - - - - - - -
-`; - -exports[`AdvancedSettings should render specific setting if given setting key 1`] = ` -
- - - - - - - - - - - - - - - -
-`; diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/__snapshots__/advanced_settings.test.tsx.snap b/src/legacy/core_plugins/kibana/public/management/sections/settings/__snapshots__/advanced_settings.test.tsx.snap new file mode 100644 index 00000000000000..4814432c832e2f --- /dev/null +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/__snapshots__/advanced_settings.test.tsx.snap @@ -0,0 +1,367 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AdvancedSettings should render read-only when saving is disabled 1`] = ` +
+ + + + + + + + + + + + + + + +
+`; + +exports[`AdvancedSettings should render specific setting if given setting key 1`] = ` +
+ + + + + + + + + + + + + + + +
+`; diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.test.js deleted file mode 100644 index 94128dc5271de1..00000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.test.js +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; -import { shallow } from 'enzyme'; -import dedent from 'dedent'; - -import { AdvancedSettings } from './advanced_settings'; - -jest.mock('./components/field', () => ({ - Field: () => { - return 'field'; - }, -})); - -jest.mock('./components/call_outs', () => ({ - CallOuts: () => { - return 'callOuts'; - }, -})); - -jest.mock('./components/search', () => ({ - Search: () => { - return 'search'; - }, -})); - -const config = { - set: () => {}, - remove: () => {}, - isCustom: setting => setting.isCustom, - isOverridden: key => Boolean(config.getAll()[key].isOverridden), - getAll: () => { - return { - 'test:array:setting': { - value: ['default_value'], - name: 'Test array setting', - description: 'Description for Test array setting', - category: ['elasticsearch'], - }, - 'test:boolean:setting': { - value: true, - name: 'Test boolean setting', - description: 'Description for Test boolean setting', - category: ['elasticsearch'], - }, - 'test:image:setting': { - value: null, - name: 'Test image setting', - description: 'Description for Test image setting', - type: 'image', - }, - 'test:json:setting': { - value: '{"foo": "bar"}', - name: 'Test json setting', - description: 'Description for Test json setting', - type: 'json', - }, - 'test:markdown:setting': { - value: '', - name: 'Test markdown setting', - description: 'Description for Test markdown setting', - type: 'markdown', - }, - 'test:number:setting': { - value: 5, - name: 'Test number setting', - description: 'Description for Test number setting', - }, - 'test:select:setting': { - value: 'orange', - name: 'Test select setting', - description: 'Description for Test select setting', - type: 'select', - options: ['apple', 'orange', 'banana'], - }, - 'test:string:setting': { - value: null, - name: 'Test string setting', - description: 'Description for Test string setting', - type: 'string', - isCustom: true, - }, - 'test:readonlystring:setting': { - value: null, - name: 'Test readonly string setting', - description: 'Description for Test readonly string setting', - type: 'string', - readonly: true, - }, - 'test:customstring:setting': { - value: null, - name: 'Test custom string setting', - description: 'Description for Test custom string setting', - type: 'string', - isCustom: true, - }, - 'test:isOverridden:string': { - isOverridden: true, - value: 'foo', - name: 'An overridden string', - description: 'Description for overridden string', - type: 'string', - }, - 'test:isOverridden:number': { - isOverridden: true, - value: 1234, - name: 'An overridden number', - description: 'Description for overridden number', - type: 'number', - }, - 'test:isOverridden:json': { - isOverridden: true, - value: dedent` - { - "foo": "bar" - } - `, - name: 'An overridden json', - description: 'Description for overridden json', - type: 'json', - }, - 'test:isOverridden:select': { - isOverridden: true, - value: 'orange', - name: 'Test overridden select setting', - description: 'Description for overridden select setting', - type: 'select', - options: ['apple', 'orange', 'banana'], - }, - }; - }, -}; - -describe('AdvancedSettings', () => { - it('should render normally', async () => { - const component = shallow(); - - expect(component).toMatchSnapshot(); - }); - - it('should render specific setting if given setting key', async () => { - const component = shallow( - - ); - - expect(component).toMatchSnapshot(); - }); - - it('should render read-only when saving is disabled', async () => { - const component = shallow( - - ); - - expect(component).toMatchSnapshot(); - }); -}); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.test.tsx b/src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.test.tsx new file mode 100644 index 00000000000000..2a75c98b721bca --- /dev/null +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.test.tsx @@ -0,0 +1,237 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import React from 'react'; +import { Observable } from 'rxjs'; +import { shallow } from 'enzyme'; +import dedent from 'dedent'; +import { + UiSettingsParams, + UserProvidedValues, + UiSettingsType, +} from '../../../../../../../core/public'; +import { FieldSetting } from './types'; +import { AdvancedSettings } from './advanced_settings'; + +jest.mock('ui/new_platform', () => ({ + npStart: mockConfig(), +})); + +jest.mock('./components/field', () => ({ + Field: () => { + return 'field'; + }, +})); + +jest.mock('./components/call_outs', () => ({ + CallOuts: () => { + return 'callOuts'; + }, +})); + +jest.mock('./components/search', () => ({ + Search: () => { + return 'search'; + }, +})); + +function mockConfig() { + const defaultConfig: Partial = { + displayName: 'defaultName', + requiresPageReload: false, + isOverridden: false, + ariaName: 'ariaName', + readOnly: false, + isCustom: false, + defVal: 'defVal', + type: 'string' as UiSettingsType, + category: ['category'], + }; + + const config = { + set: (key: string, value: any) => Promise.resolve(true), + remove: (key: string) => Promise.resolve(true), + isCustom: (key: string) => false, + isOverridden: (key: string) => Boolean(config.getAll()[key].isOverridden), + getRegistered: () => ({} as Readonly>), + overrideLocalDefault: (key: string, value: any) => {}, + getUpdate$: () => + new Observable<{ + key: string; + newValue: any; + oldValue: any; + }>(), + isDeclared: (key: string) => true, + isDefault: (key: string) => true, + + getSaved$: () => + new Observable<{ + key: string; + newValue: any; + oldValue: any; + }>(), + + getUpdateErrors$: () => new Observable(), + get: (key: string, defaultOverride?: any): any => config.getAll()[key] || defaultOverride, + get$: (key: string) => new Observable(config.get(key)), + getAll: (): Readonly> => { + return { + 'test:array:setting': { + ...defaultConfig, + value: ['default_value'], + name: 'Test array setting', + description: 'Description for Test array setting', + category: ['elasticsearch'], + }, + 'test:boolean:setting': { + ...defaultConfig, + value: true, + name: 'Test boolean setting', + description: 'Description for Test boolean setting', + category: ['elasticsearch'], + }, + 'test:image:setting': { + ...defaultConfig, + value: null, + name: 'Test image setting', + description: 'Description for Test image setting', + type: 'image', + }, + 'test:json:setting': { + ...defaultConfig, + value: '{"foo": "bar"}', + name: 'Test json setting', + description: 'Description for Test json setting', + type: 'json', + }, + 'test:markdown:setting': { + ...defaultConfig, + value: '', + name: 'Test markdown setting', + description: 'Description for Test markdown setting', + type: 'markdown', + }, + 'test:number:setting': { + ...defaultConfig, + value: 5, + name: 'Test number setting', + description: 'Description for Test number setting', + }, + 'test:select:setting': { + ...defaultConfig, + value: 'orange', + name: 'Test select setting', + description: 'Description for Test select setting', + type: 'select', + options: ['apple', 'orange', 'banana'], + }, + 'test:string:setting': { + ...defaultConfig, + ...{ + value: null, + name: 'Test string setting', + description: 'Description for Test string setting', + type: 'string', + isCustom: true, + }, + }, + 'test:readonlystring:setting': { + ...defaultConfig, + ...{ + value: null, + name: 'Test readonly string setting', + description: 'Description for Test readonly string setting', + type: 'string', + readOnly: true, + }, + }, + 'test:customstring:setting': { + ...defaultConfig, + ...{ + value: null, + name: 'Test custom string setting', + description: 'Description for Test custom string setting', + type: 'string', + isCustom: true, + }, + }, + 'test:isOverridden:string': { + ...defaultConfig, + isOverridden: true, + value: 'foo', + name: 'An overridden string', + description: 'Description for overridden string', + type: 'string', + }, + 'test:isOverridden:number': { + ...defaultConfig, + isOverridden: true, + value: 1234, + name: 'An overridden number', + description: 'Description for overridden number', + type: 'number', + }, + 'test:isOverridden:json': { + ...defaultConfig, + isOverridden: true, + value: dedent` + { + "foo": "bar" + } + `, + name: 'An overridden json', + description: 'Description for overridden json', + type: 'json', + }, + 'test:isOverridden:select': { + ...defaultConfig, + isOverridden: true, + value: 'orange', + name: 'Test overridden select setting', + description: 'Description for overridden select setting', + type: 'select', + options: ['apple', 'orange', 'banana'], + }, + }; + }, + }; + return { + core: { + uiSettings: config, + }, + }; +} + +describe('AdvancedSettings', () => { + it('should render specific setting if given setting key', async () => { + const component = shallow( + + ); + + expect(component).toMatchSnapshot(); + }); + + it('should render read-only when saving is disabled', async () => { + const component = shallow( + + ); + + expect(component).toMatchSnapshot(); + }); +}); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.tsx similarity index 62% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.tsx index 508e05bbf9bb40..569ef73f2b4536 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/advanced_settings.tsx @@ -18,17 +18,19 @@ */ import React, { Component } from 'react'; -import PropTypes from 'prop-types'; - import { Comparators, EuiFlexGroup, EuiFlexItem, EuiSpacer, Query } from '@elastic/eui'; +import { npStart } from 'ui/new_platform'; import { CallOuts } from './components/call_outs'; import { Search } from './components/search'; import { Form } from './components/form'; import { AdvancedSettingsVoiceAnnouncement } from './components/advanced_settings_voice_announcement'; +import { IUiSettingsClient } from '../../../../../../../core/public/'; import { getAriaName, toEditableConfig, DEFAULT_CATEGORY } from './lib'; +import { FieldSetting, IQuery } from './types'; + import { registerDefaultComponents, PAGE_TITLE_COMPONENT, @@ -37,18 +39,37 @@ import { } from './components/default_component_registry'; import { getSettingsComponent } from './components/component_registry'; -export class AdvancedSettings extends Component { - static propTypes = { - config: PropTypes.object.isRequired, - query: PropTypes.string, - enableSaving: PropTypes.bool.isRequired, - }; +interface AdvancedSettingsProps { + queryText: string; + enableSaving: boolean; +} + +interface AdvancedSettingsState { + footerQueryMatched: boolean; + query: IQuery; + filteredSettings: Record; +} - constructor(props) { +type GroupedSettings = Record; + +export class AdvancedSettings extends Component { + private config: IUiSettingsClient; + private settings: FieldSetting[]; + private groupedSettings: GroupedSettings; + private categoryCounts: Record; + private categories: string[] = []; + + constructor(props: AdvancedSettingsProps) { super(props); - const { config, query } = this.props; - const parsedQuery = Query.parse(query ? `ariaName:"${getAriaName(query)}"` : ''); - this.init(config); + const { queryText } = this.props; + const parsedQuery = Query.parse(queryText ? `ariaName:"${getAriaName(queryText)}"` : ''); + + this.config = npStart.core.uiSettings; + this.settings = this.initSettings(this.config); + this.groupedSettings = this.initGroupedSettings(this.settings); + this.categories = this.initCategories(this.groupedSettings); + this.categoryCounts = this.initCategoryCounts(this.groupedSettings); + this.state = { query: parsedQuery, footerQueryMatched: false, @@ -58,34 +79,44 @@ export class AdvancedSettings extends Component { registerDefaultComponents(); } - init(config) { - this.settings = this.mapConfig(config); - this.groupedSettings = this.mapSettings(this.settings); + init(config: IUiSettingsClient) { + this.settings = this.initSettings(config); + this.groupedSettings = this.initGroupedSettings(this.settings); + this.categories = this.initCategories(this.groupedSettings); + this.categoryCounts = this.initCategoryCounts(this.groupedSettings); + } - this.categories = Object.keys(this.groupedSettings).sort((a, b) => { + initSettings = this.mapConfig; + initGroupedSettings = this.mapSettings; + initCategories(groupedSettings: GroupedSettings) { + return Object.keys(groupedSettings).sort((a, b) => { if (a === DEFAULT_CATEGORY) return -1; if (b === DEFAULT_CATEGORY) return 1; if (a > b) return 1; return a === b ? 0 : -1; }); - - this.categoryCounts = Object.keys(this.groupedSettings).reduce((counts, category) => { - counts[category] = this.groupedSettings[category].length; - return counts; - }, {}); + } + initCategoryCounts(groupedSettings: GroupedSettings) { + return Object.keys(groupedSettings).reduce( + (counts: Record, category: string) => { + counts[category] = groupedSettings[category].length; + return counts; + }, + {} + ); } - UNSAFE_componentWillReceiveProps(nextProps) { - const { config } = nextProps; - const { query } = this.state; - - this.init(config); - this.setState({ - filteredSettings: this.mapSettings(Query.execute(query, this.settings)), + componentDidMount() { + this.config.getUpdate$().subscribe(() => { + const { query } = this.state; + this.init(this.config); + this.setState({ + filteredSettings: this.mapSettings(Query.execute(query, this.settings)), + }); }); } - mapConfig(config) { + mapConfig(config: IUiSettingsClient) { const all = config.getAll(); return Object.entries(all) .map(setting => { @@ -101,9 +132,9 @@ export class AdvancedSettings extends Component { .sort(Comparators.property('name', Comparators.default('asc'))); } - mapSettings(settings) { + mapSettings(settings: FieldSetting[]) { // Group settings by category - return settings.reduce((groupedSettings, setting) => { + return settings.reduce((groupedSettings: GroupedSettings, setting) => { // We will want to change this logic when we put each category on its // own page aka allowing a setting to be included in multiple categories. const category = setting.category[0]; @@ -112,15 +143,7 @@ export class AdvancedSettings extends Component { }, {}); } - saveConfig = (name, value) => { - return this.props.config.set(name, value); - }; - - clearConfig = name => { - return this.props.config.remove(name); - }; - - onQueryChange = ({ query }) => { + onQueryChange = ({ query }: { query: IQuery }) => { this.setState({ query, filteredSettings: this.mapSettings(Query.execute(query, this.settings)), @@ -135,7 +158,7 @@ export class AdvancedSettings extends Component { }); }; - onFooterQueryMatchChange = matched => { + onFooterQueryMatchChange = (matched: boolean) => { this.setState({ footerQueryMatched: matched, }); @@ -170,8 +193,8 @@ export class AdvancedSettings extends Component { categories={this.categories} categoryCounts={this.categoryCounts} clearQuery={this.clearQuery} - save={this.saveConfig} - clear={this.clearConfig} + save={this.config.set.bind(this.config)} + clear={this.config.remove.bind(this.config)} showNoResultsMessage={!footerQueryMatched} enableSaving={this.props.enableSaving} /> diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/breadcrumbs.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/breadcrumbs.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/breadcrumbs.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/breadcrumbs.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/__snapshots__/component_registry.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/__snapshots__/component_registry.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/__snapshots__/component_registry.test.js.snap rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/__snapshots__/component_registry.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/__snapshots__/advanced_settings_voice_announcement.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/__snapshots__/advanced_settings_voice_announcement.test.tsx.snap similarity index 95% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/__snapshots__/advanced_settings_voice_announcement.test.js.snap rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/__snapshots__/advanced_settings_voice_announcement.test.tsx.snap index 049e4530b795f9..e8c8184cf7e57c 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/__snapshots__/advanced_settings_voice_announcement.test.js.snap +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/__snapshots__/advanced_settings_voice_announcement.test.tsx.snap @@ -15,7 +15,7 @@ exports[`Advanced Settings: Voice Announcement should render announcement 1`] = values={ Object { "optionLenght": 1, - "query": undefined, + "query": "dark theme", "sectionLenght": 1, } } @@ -40,7 +40,7 @@ exports[`Advanced Settings: Voice Announcement should render nothing 1`] = ` values={ Object { "optionLenght": 1, - "query": undefined, + "query": "", "sectionLenght": 1, } } diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/advanced_settings_voice_announcement.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/advanced_settings_voice_announcement.test.tsx similarity index 66% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/advanced_settings_voice_announcement.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/advanced_settings_voice_announcement.test.tsx index 41b16c5cbda711..66f2d4e784630f 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/advanced_settings_voice_announcement.test.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/advanced_settings_voice_announcement.test.tsx @@ -19,28 +19,44 @@ import React from 'react'; import { shallow } from 'enzyme'; +import { UiSettingsType } from '../../../../../../../../../core/public'; import { AdvancedSettingsVoiceAnnouncement } from './advanced_settings_voice_announcement'; +const settingPartial = { + name: 'name', + isOverridden: false, + type: 'string' as UiSettingsType, + value: 'value', + defVal: 'defVal', + optionLabels: { label: 'label' }, + description: 'description', + displayName: 'displayName', + isCustom: false, + requiresPageReload: false, + options: [], + validation: { regex: /a/, message: 'message' }, + category: ['category'], + readOnly: false, +}; + const testProps = { nothing: { query: '', filteredSettings: [ - [ - { - ariaName: 'General', - }, - ], + { + ariaName: 'General', + ...settingPartial, + }, ], }, searchResult: { query: 'dark theme', filteredSettings: [ - [ - { - ariaName: 'General', - }, - ], + { + ariaName: 'General', + ...settingPartial, + }, ], }, }; @@ -50,7 +66,7 @@ describe('Advanced Settings: Voice Announcement', () => { const { query, filteredSettings } = testProps.nothing; const component = shallow( - + ); expect(component).toMatchSnapshot(); @@ -60,7 +76,7 @@ describe('Advanced Settings: Voice Announcement', () => { const { query, filteredSettings } = testProps.searchResult; const component = shallow( - + ); expect(component).toMatchSnapshot(); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/advanced_settings_voice_announcement.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/advanced_settings_voice_announcement.tsx similarity index 92% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/advanced_settings_voice_announcement.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/advanced_settings_voice_announcement.tsx index 34625e1ce5114f..01f1388ba1eef5 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/advanced_settings_voice_announcement.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/advanced_settings_voice_announcement.tsx @@ -40,9 +40,15 @@ import React, { Component } from 'react'; import { FormattedMessage } from '@kbn/i18n/react'; import { EuiScreenReaderOnly, EuiDelayRender } from '@elastic/eui'; +import { FieldSetting } from '../../types'; -export class AdvancedSettingsVoiceAnnouncement extends Component { - shouldComponentUpdate = nextProps => { +interface Props { + queryText: string; + settings: Record; +} + +export class AdvancedSettingsVoiceAnnouncement extends Component { + shouldComponentUpdate = (nextProps: Props) => { /* If a user typed smth new, we should clear the previous timer and start another one + block component rendering. @@ -57,7 +63,7 @@ export class AdvancedSettingsVoiceAnnouncement extends Component { const filteredSections = Object.values(this.props.settings).map(setting => setting.map(option => option.ariaName) ); - const filteredOptions = [].concat(...filteredSections); + const filteredOptions = [...filteredSections]; return (
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/index.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/index.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/advanced_settings_voice_announcement/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/__snapshots__/call_outs.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/__snapshots__/call_outs.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/__snapshots__/call_outs.test.js.snap rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/__snapshots__/call_outs.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/call_outs.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/call_outs.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/call_outs.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/call_outs.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/call_outs.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/call_outs.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/call_outs.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/call_outs.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/index.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/index.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/call_outs/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry.test.tsx similarity index 74% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry.test.tsx index fb3365a102fde6..24e9e5dd3809c8 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry.test.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry.test.tsx @@ -17,6 +17,7 @@ * under the License. */ +import React, { FunctionComponent } from 'react'; import { tryRegisterSettingsComponent, registerSettingsComponent, @@ -25,15 +26,15 @@ import { describe('tryRegisterSettingsComponent', () => { it('should allow a component to be registered', () => { - const component = {}; + const component = () =>
; expect(tryRegisterSettingsComponent('tryTest1', component)).toEqual(true); }); it('should return false if the component is already registered, and not allow an override', () => { - const component = {}; + const component = () =>
; expect(tryRegisterSettingsComponent('tryTest2', component)).toEqual(true); - const updatedComponent = { updated: 'yay' }; + const updatedComponent = () =>
; expect(tryRegisterSettingsComponent('tryTest2', updatedComponent)).toEqual(false); expect(getSettingsComponent('tryTest2')).toBe(component); }); @@ -41,49 +42,36 @@ describe('tryRegisterSettingsComponent', () => { describe('registerSettingsComponent', () => { it('should allow a component to be registered', () => { - const component = {}; + const component = () =>
; registerSettingsComponent('test', component); }); it('should disallow registering a component with a duplicate id', () => { - const component = {}; + const component = () =>
; registerSettingsComponent('test2', component); - expect(() => - registerSettingsComponent('test2', 'some other component') - ).toThrowErrorMatchingSnapshot(); + expect(() => registerSettingsComponent('test2', () => )).toThrowErrorMatchingSnapshot(); }); it('should allow a component to be overriden', () => { - const component = {}; + const component = () =>
; registerSettingsComponent('test3', component); - const anotherComponent = { anotherComponent: 'ok' }; + const anotherComponent = () => ; registerSettingsComponent('test3', anotherComponent, true); expect(getSettingsComponent('test3')).toBe(anotherComponent); }); - it('should set a displayName for the component if one does not exist', () => { - const component = {}; + it('should set a displayName for the component', () => { + const component = () =>
; registerSettingsComponent('display_name_component', component); - - expect(component.displayName).toEqual('display_name_component'); - }); - - it('should not set a displayName for the component if one already exists', () => { - const component = { - displayName: '', - }; - - registerSettingsComponent('another_display_name_component', component); - - expect(component.displayName).toEqual(''); + expect((component as FunctionComponent).displayName).toEqual('display_name_component'); }); }); describe('getSettingsComponent', () => { it('should allow a component to be retrieved', () => { - const component = {}; + const component = () =>
; registerSettingsComponent('test4', component); expect(getSettingsComponent('test4')).toBe(component); }); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry.ts similarity index 81% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry.ts index 4b81b74d20aa48..b58180c498edfe 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/component_registry.ts @@ -17,7 +17,10 @@ * under the License. */ -const registry = {}; +import { ComponentType } from 'react'; + +type Id = string; +const registry: Record | undefined>> = {}; /** * Attempts to register the provided component. @@ -26,7 +29,10 @@ const registry = {}; * @param {*} id the id of the component to register * @param {*} component the component */ -export function tryRegisterSettingsComponent(id, component) { +export function tryRegisterSettingsComponent( + id: Id, + component: ComponentType | undefined> +) { if (id in registry) { return false; } @@ -45,7 +51,11 @@ export function tryRegisterSettingsComponent(id, component) { * @param {*} component the component * @param {*} allowOverride (default: false) - optional flag to allow this component to override a previously registered component */ -export function registerSettingsComponent(id, component, allowOverride = false) { +export function registerSettingsComponent( + id: Id, + component: ComponentType | undefined>, + allowOverride = false +) { if (!allowOverride && id in registry) { throw new Error(`Component with id ${id} is already registered.`); } @@ -65,7 +75,7 @@ export function registerSettingsComponent(id, component, allowOverride = false) * * @param {*} id the ID of the component to retrieve */ -export function getSettingsComponent(id) { +export function getSettingsComponent(id: Id): ComponentType | undefined> { if (!(id in registry)) { throw new Error(`Component not found with id ${id}`); } diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/default_component_registry.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/default_component_registry.test.tsx similarity index 96% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/default_component_registry.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/default_component_registry.test.tsx index 4fc6dc710f8669..ff3f75b79baefc 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/default_component_registry.test.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/default_component_registry.test.tsx @@ -17,6 +17,7 @@ * under the License. */ +import React from 'react'; import { registerDefaultComponents, PAGE_TITLE_COMPONENT } from './default_component_registry'; import { getSettingsComponent, registerSettingsComponent } from './component_registry'; import { PageTitle } from './page_title'; @@ -34,7 +35,7 @@ describe('default_component_registry', () => { }); it('should not override components if they are already registered', () => { - const newComponent = {}; + const newComponent = () =>
; registerSettingsComponent(PAGE_TITLE_COMPONENT, newComponent, true); registerDefaultComponents(); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/default_component_registry.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/default_component_registry.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/default_component_registry.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/default_component_registry.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/__snapshots__/field.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/__snapshots__/field.test.tsx.snap similarity index 99% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/__snapshots__/field.test.js.snap rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/__snapshots__/field.test.tsx.snap index f4d20b45658802..915ee021e9b607 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/__snapshots__/field.test.js.snap +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/__snapshots__/field.test.tsx.snap @@ -1309,7 +1309,6 @@ exports[`Field for json setting should render as read only if saving is disabled Object { "value": {} @@ -1420,7 +1419,6 @@ exports[`Field for json setting should render as read only with help text if ove Object { "value": {} @@ -1637,7 +1635,6 @@ exports[`Field for json setting should render default value if there is no user Object { "value": {} @@ -1765,7 +1762,6 @@ exports[`Field for json setting should render user value if there is user value Object { "value": {} diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/field.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/field.test.tsx similarity index 84% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/field.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/field.test.tsx index 07ce6f84d2bb64..bd2ba8ac0ebcc6 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/field.test.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/field.test.tsx @@ -21,7 +21,10 @@ import React from 'react'; import { I18nProvider } from '@kbn/i18n/react'; import { shallowWithI18nProvider, mountWithI18nProvider } from 'test_utils/enzyme_helpers'; import { mount } from 'enzyme'; +import { FieldSetting } from '../../types'; +import { UiSettingsType, StringValidation } from '../../../../../../../../../core/public'; +// @ts-ignore import { findTestSubject } from '@elastic/eui/lib/test'; import { Field } from './field'; @@ -37,7 +40,13 @@ import { toastNotifications } from 'ui/notify'; jest.mock('brace/theme/textmate', () => 'brace/theme/textmate'); jest.mock('brace/mode/markdown', () => 'brace/mode/markdown'); -const settings = { +const defaults = { + requiresPageReload: false, + readOnly: false, + category: ['category'], +}; + +const settings: Record = { array: { name: 'array:test:setting', ariaName: 'array test setting', @@ -48,7 +57,7 @@ const settings = { defVal: ['default_value'], isCustom: false, isOverridden: false, - options: null, + ...defaults, }, boolean: { name: 'boolean:test:setting', @@ -60,7 +69,7 @@ const settings = { defVal: true, isCustom: false, isOverridden: false, - options: null, + ...defaults, }, image: { name: 'image:test:setting', @@ -78,6 +87,7 @@ const settings = { description: 'Description for 1 kB', }, }, + ...defaults, }, json: { name: 'json:test:setting', @@ -89,7 +99,7 @@ const settings = { defVal: '{}', isCustom: false, isOverridden: false, - options: null, + ...defaults, }, markdown: { name: 'markdown:test:setting', @@ -101,7 +111,7 @@ const settings = { defVal: '', isCustom: false, isOverridden: false, - options: null, + ...defaults, }, number: { name: 'number:test:setting', @@ -113,7 +123,7 @@ const settings = { defVal: 5, isCustom: false, isOverridden: false, - options: null, + ...defaults, }, select: { name: 'select:test:setting', @@ -131,6 +141,7 @@ const settings = { orange: 'Orange', // Deliberately left out `banana` to test if it also works with missing labels }, + ...defaults, }, string: { name: 'string:test:setting', @@ -142,7 +153,7 @@ const settings = { defVal: null, isCustom: false, isOverridden: false, - options: null, + ...defaults, }, stringWithValidation: { name: 'string:test-validation:setting', @@ -158,7 +169,7 @@ const settings = { defVal: 'foo-default', isCustom: false, isOverridden: false, - options: null, + ...defaults, }, }; const userValues = { @@ -175,8 +186,8 @@ const userValues = { const invalidUserValues = { stringWithValidation: 'invalidUserValue', }; -const save = jest.fn(() => Promise.resolve()); -const clear = jest.fn(() => Promise.resolve()); +const save = jest.fn(() => Promise.resolve(true)); +const clear = jest.fn(() => Promise.resolve(true)); describe('Field', () => { Object.keys(settings).forEach(type => { @@ -196,6 +207,7 @@ describe('Field', () => { { { /> ); const select = findTestSubject(component, `advancedSetting-editField-${setting.name}`); + // @ts-ignore const labels = select.find('option').map(option => option.prop('value')); expect(labels).toEqual(['apple', 'orange', 'banana']); }); @@ -280,13 +294,14 @@ describe('Field', () => { /> ); const select = findTestSubject(component, `advancedSetting-editField-${setting.name}`); + // @ts-ignore const labels = select.find('option').map(option => option.text()); expect(labels).toEqual(['Apple', 'Orange', 'banana']); }); } const setup = () => { - const Wrapper = props => ( + const Wrapper = (props: Record) => ( @@ -304,21 +319,22 @@ describe('Field', () => { describe(`for changing ${type} setting`, () => { const { wrapper, component } = setup(); const userValue = userValues[type]; - component.instance().getImageAsBase64 = file => Promise.resolve(file); + (component.instance() as Field).getImageAsBase64 = ({}: Blob) => Promise.resolve(''); it('should be able to change value from no value and cancel', async () => { - await component.instance().onImageChange([userValue]); + await (component.instance() as Field).onImageChange([userValue]); const updated = wrapper.update(); findTestSubject(updated, `advancedSetting-cancelEditField-${setting.name}`).simulate( 'click' ); expect( - component.instance().state.unsavedValue === component.instance().state.savedValue + (component.instance() as Field).state.unsavedValue === + (component.instance() as Field).state.savedValue ).toBe(true); }); it('should be able to change value and save', async () => { - await component.instance().onImageChange([userValue]); + await (component.instance() as Field).onImageChange([userValue]); const updated = wrapper.update(); findTestSubject(updated, `advancedSetting-saveEditField-${setting.name}`).simulate( 'click' @@ -327,12 +343,12 @@ describe('Field', () => { component.setState({ savedValue: userValue }); await wrapper.setProps({ setting: { - ...component.instance().props.setting, + ...(component.instance() as Field).props.setting, value: userValue, }, }); - await component.instance().cancelChangeImage(); + await (component.instance() as Field).cancelChangeImage(); wrapper.update(); }); @@ -341,7 +357,7 @@ describe('Field', () => { findTestSubject(updated, `advancedSetting-changeImage-${setting.name}`).simulate('click'); const newUserValue = `${userValue}=`; - await component.instance().onImageChange([newUserValue]); + await (component.instance() as Field).onImageChange([newUserValue]); const updated2 = wrapper.update(); findTestSubject(updated2, `advancedSetting-saveEditField-${setting.name}`).simulate( 'click' @@ -350,7 +366,7 @@ describe('Field', () => { component.setState({ savedValue: newUserValue }); await wrapper.setProps({ setting: { - ...component.instance().props.setting, + ...(component.instance() as Field).props.setting, value: newUserValue, }, }); @@ -370,18 +386,19 @@ describe('Field', () => { const fieldUserValue = userValue; it('should be able to change value and cancel', async () => { - component.instance().onCodeEditorChange(fieldUserValue); + (component.instance() as Field).onCodeEditorChange(fieldUserValue as UiSettingsType); const updated = wrapper.update(); findTestSubject(updated, `advancedSetting-cancelEditField-${setting.name}`).simulate( 'click' ); expect( - component.instance().state.unsavedValue === component.instance().state.savedValue + (component.instance() as Field).state.unsavedValue === + (component.instance() as Field).state.savedValue ).toBe(true); }); it('should be able to change value and save', async () => { - component.instance().onCodeEditorChange(fieldUserValue); + (component.instance() as Field).onCodeEditorChange(fieldUserValue as UiSettingsType); const updated = wrapper.update(); findTestSubject(updated, `advancedSetting-saveEditField-${setting.name}`).simulate( 'click' @@ -390,7 +407,7 @@ describe('Field', () => { component.setState({ savedValue: fieldUserValue }); await wrapper.setProps({ setting: { - ...component.instance().props.setting, + ...(component.instance() as Field).props.setting, value: userValue, }, }); @@ -399,9 +416,9 @@ describe('Field', () => { if (type === 'json') { it('should be able to clear value and have empty object populate', async () => { - component.instance().onCodeEditorChange(''); + (component.instance() as Field).onCodeEditorChange('' as UiSettingsType); wrapper.update(); - expect(component.instance().state.unsavedValue).toEqual('{}'); + expect((component.instance() as Field).state.unsavedValue).toEqual('{}'); }); } @@ -414,32 +431,35 @@ describe('Field', () => { } else { describe(`for changing ${type} setting`, () => { const { wrapper, component } = setup(); + // @ts-ignore const userValue = userValues[type]; const fieldUserValue = type === 'array' ? userValue.join(', ') : userValue; if (setting.validation) { + // @ts-ignore const invalidUserValue = invalidUserValues[type]; it('should display an error when validation fails', async () => { - component.instance().onFieldChange({ target: { value: invalidUserValue } }); + (component.instance() as Field).onFieldChange(invalidUserValue); const updated = wrapper.update(); const errorMessage = updated.find('.euiFormErrorText').text(); - expect(errorMessage).toEqual(setting.validation.message); + expect(errorMessage).toEqual((setting.validation as StringValidation).message); }); } it('should be able to change value and cancel', async () => { - component.instance().onFieldChange({ target: { value: fieldUserValue } }); + (component.instance() as Field).onFieldChange(fieldUserValue); const updated = wrapper.update(); findTestSubject(updated, `advancedSetting-cancelEditField-${setting.name}`).simulate( 'click' ); expect( - component.instance().state.unsavedValue === component.instance().state.savedValue + (component.instance() as Field).state.unsavedValue === + (component.instance() as Field).state.savedValue ).toBe(true); }); it('should be able to change value and save', async () => { - component.instance().onFieldChange({ target: { value: fieldUserValue } }); + (component.instance() as Field).onFieldChange(fieldUserValue); const updated = wrapper.update(); findTestSubject(updated, `advancedSetting-saveEditField-${setting.name}`).simulate( 'click' @@ -448,7 +468,7 @@ describe('Field', () => { component.setState({ savedValue: fieldUserValue }); await wrapper.setProps({ setting: { - ...component.instance().props.setting, + ...(component.instance() as Field).props.setting, value: userValue, }, }); @@ -472,7 +492,7 @@ describe('Field', () => { const wrapper = mountWithI18nProvider( ); - wrapper.instance().onFieldChange({ target: { value: 'a new value' } }); + (wrapper.instance() as Field).onFieldChange({ target: { value: 'a new value' } }); const updated = wrapper.update(); findTestSubject(updated, `advancedSetting-saveEditField-${setting.name}`).simulate('click'); expect(save).toHaveBeenCalled(); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/field.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/field.tsx similarity index 81% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/field.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/field.tsx index a2f201cf757f52..524160191d8f08 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/field.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/field.tsx @@ -18,7 +18,7 @@ */ import React, { PureComponent, Fragment } from 'react'; -import PropTypes from 'prop-types'; +import ReactDOM from 'react-dom'; import { npStart } from 'ui/new_platform'; import 'brace/theme/textmate'; @@ -35,6 +35,7 @@ import { EuiDescribedFormGroup, EuiFieldNumber, EuiFieldText, + // @ts-ignore EuiFilePicker, EuiFlexGroup, EuiFlexItem, @@ -47,22 +48,39 @@ import { EuiText, EuiSelect, EuiSwitch, + EuiSwitchEvent, keyCodes, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; - +import { FieldSetting } from '../../types'; import { isDefaultValue } from '../../lib'; +import { + UiSettingsType, + ImageValidation, + StringValidationRegex, +} from '../../../../../../../../../core/public'; + +interface FieldProps { + setting: FieldSetting; + save: (name: string, value: string) => Promise; + clear: (name: string) => Promise; + enableSaving: boolean; +} -export class Field extends PureComponent { - static propTypes = { - setting: PropTypes.object.isRequired, - save: PropTypes.func.isRequired, - clear: PropTypes.func.isRequired, - enableSaving: PropTypes.bool.isRequired, - }; +interface FieldState { + unsavedValue: any; + savedValue: any; + loading: boolean; + isInvalid: boolean; + error: string | null; + changeImage: boolean; + isJsonArray: boolean; +} - constructor(props) { +export class Field extends PureComponent { + private changeImageForm: EuiFilePicker | undefined; + constructor(props: FieldProps) { super(props); const { type, value, defVal } = this.props.setting; const editableValue = this.getEditableValue(type, value, defVal); @@ -74,12 +92,11 @@ export class Field extends PureComponent { changeImage: false, savedValue: editableValue, unsavedValue: editableValue, - isJsonArray: type === 'json' ? Array.isArray(JSON.parse(defVal || '{}')) : false, + isJsonArray: type === 'json' ? Array.isArray(JSON.parse(String(defVal) || '{}')) : false, }; - this.changeImageForm = null; } - UNSAFE_componentWillReceiveProps(nextProps) { + UNSAFE_componentWillReceiveProps(nextProps: FieldProps) { const { unsavedValue } = this.state; const { type, value, defVal } = nextProps.setting; const editableValue = this.getEditableValue(type, value, defVal); @@ -90,11 +107,15 @@ export class Field extends PureComponent { }); } - getEditableValue(type, value, defVal) { + getEditableValue( + type: UiSettingsType, + value: FieldSetting['value'], + defVal: FieldSetting['defVal'] + ) { const val = value === null || value === undefined ? defVal : value; switch (type) { case 'array': - return val.join(', '); + return (val as string[]).join(', '); case 'boolean': return !!val; case 'number': @@ -106,21 +127,27 @@ export class Field extends PureComponent { } } - getDisplayedDefaultValue(type, defVal, optionLabels = {}) { + getDisplayedDefaultValue( + type: UiSettingsType, + defVal: FieldSetting['defVal'], + optionLabels: Record = {} + ) { if (defVal === undefined || defVal === null || defVal === '') { return 'null'; } switch (type) { case 'array': - return defVal.join(', '); + return (defVal as string[]).join(', '); case 'select': - return optionLabels.hasOwnProperty(defVal) ? optionLabels[defVal] : String(defVal); + return optionLabels.hasOwnProperty(String(defVal)) + ? optionLabels[String(defVal)] + : String(defVal); default: return String(defVal); } } - setLoading(loading) { + setLoading(loading: boolean) { this.setState({ loading, }); @@ -133,11 +160,11 @@ export class Field extends PureComponent { }); } - onCodeEditorChange = value => { + onCodeEditorChange = (value: UiSettingsType) => { const { type } = this.props.setting; const { isJsonArray } = this.state; - let newUnsavedValue = undefined; + let newUnsavedValue; let isInvalid = false; let error = null; @@ -148,12 +175,9 @@ export class Field extends PureComponent { JSON.parse(newUnsavedValue); } catch (e) { isInvalid = true; - error = ( - - ); + error = i18n.translate('kbn.management.settings.field.codeEditorSyntaxErrorMessage', { + defaultMessage: 'Invalid JSON syntax', + }); } break; default: @@ -167,12 +191,18 @@ export class Field extends PureComponent { }); }; - onFieldChange = e => { - const value = e.target.value; + onFieldChangeSwitch = (e: EuiSwitchEvent) => { + return this.onFieldChange(e.target.checked); + }; + + onFieldChangeEvent = (e: React.ChangeEvent) => + this.onFieldChange(e.target.value); + + onFieldChange = (value: any) => { const { type, validation } = this.props.setting; const { unsavedValue } = this.state; - let newUnsavedValue = undefined; + let newUnsavedValue; switch (type) { case 'boolean': @@ -186,11 +216,11 @@ export class Field extends PureComponent { } let isInvalid = false; - let error = undefined; + let error = null; - if (validation && validation.regex) { - if (!validation.regex.test(newUnsavedValue)) { - error = validation.message; + if (validation && (validation as StringValidationRegex).regex) { + if (!(validation as StringValidationRegex).regex!.test(newUnsavedValue.toString())) { + error = (validation as StringValidationRegex).message; isInvalid = true; } } @@ -202,7 +232,7 @@ export class Field extends PureComponent { }); }; - onFieldKeyDown = ({ keyCode }) => { + onFieldKeyDown = ({ keyCode }: { keyCode: number }) => { if (keyCode === keyCodes.ENTER) { this.saveEdit(); } @@ -211,13 +241,13 @@ export class Field extends PureComponent { } }; - onFieldEscape = ({ keyCode }) => { + onFieldEscape = ({ keyCode }: { keyCode: number }) => { if (keyCode === keyCodes.ESCAPE) { this.cancelEdit(); } }; - onImageChange = async files => { + onImageChange = async (files: any[]) => { if (!files.length) { this.clearError(); this.setState({ @@ -227,9 +257,12 @@ export class Field extends PureComponent { } const file = files[0]; - const { maxSize } = this.props.setting.validation; + const { maxSize } = this.props.setting.validation as ImageValidation; try { - const base64Image = await this.getImageAsBase64(file); + let base64Image = ''; + if (file instanceof File) { + base64Image = (await this.getImageAsBase64(file)) as string; + } const isInvalid = !!(maxSize && maxSize.length && base64Image.length > maxSize.length); this.setState({ isInvalid, @@ -254,17 +287,13 @@ export class Field extends PureComponent { } }; - getImageAsBase64(file) { - if (!file instanceof File) { - return null; - } - + async getImageAsBase64(file: Blob): Promise { const reader = new FileReader(); reader.readAsDataURL(file); return new Promise((resolve, reject) => { reader.onload = () => { - resolve(reader.result); + resolve(reader.result || undefined); }; reader.onerror = err => { reject(err); @@ -309,20 +338,24 @@ export class Field extends PureComponent { settingName: this.props.setting.displayName || this.props.setting.name, }, }), - text: ( - <> - - - window.location.reload()}> - {i18n.translate( - 'kbn.management.settings.field.requiresPageReloadToastButtonLabel', - { defaultMessage: 'Reload page' } - )} - - - - - ), + text: element => { + const content = ( + <> + + + window.location.reload()}> + {i18n.translate( + 'kbn.management.settings.field.requiresPageReloadToastButtonLabel', + { defaultMessage: 'Reload page' } + )} + + + + + ); + ReactDOM.render(content, element); + return () => ReactDOM.unmountComponentAtNode(element); + }, color: 'success', }); } @@ -341,8 +374,8 @@ export class Field extends PureComponent { switch (type) { case 'array': - valueToSave = valueToSave.split(',').map(val => val.trim()); - isSameValue = valueToSave.join(',') === defVal.join(','); + valueToSave = valueToSave.split(',').map((val: string) => val.trim()); + isSameValue = valueToSave.join(',') === (defVal as string[]).join(','); break; case 'json': valueToSave = valueToSave.trim(); @@ -394,7 +427,7 @@ export class Field extends PureComponent { this.setLoading(false); }; - renderField(setting) { + renderField(setting: FieldSetting) { const { enableSaving } = this.props; const { loading, changeImage, unsavedValue } = this.state; const { name, value, type, options, optionLabels = {}, isOverridden, ariaName } = setting; @@ -414,7 +447,7 @@ export class Field extends PureComponent { ) } checked={!!unsavedValue} - onChange={this.onFieldChange} + onChange={this.onFieldChangeSwitch} disabled={loading || isOverridden || !enableSaving} onKeyDown={this.onFieldKeyDown} data-test-subj={`advancedSetting-editField-${name}`} @@ -449,14 +482,16 @@ export class Field extends PureComponent { ); case 'image': if (!isDefaultValue(setting) && !changeImage) { - return ; + return ( + + ); } else { return ( { + ref={(input: HTMLInputElement) => { this.changeImageForm = input; }} onKeyDown={this.onFieldEscape} @@ -469,13 +504,13 @@ export class Field extends PureComponent { { + options={(options as string[]).map(option => { return { text: optionLabels.hasOwnProperty(option) ? optionLabels[option] : option, value: option, }; })} - onChange={this.onFieldChange} + onChange={this.onFieldChangeEvent} isLoading={loading} disabled={loading || isOverridden || !enableSaving} onKeyDown={this.onFieldKeyDown} @@ -487,7 +522,7 @@ export class Field extends PureComponent { @@ -541,7 +576,7 @@ export class Field extends PureComponent { return null; } - renderTitle(setting) { + renderTitle(setting: FieldSetting) { return (

{setting.displayName || setting.name} @@ -566,7 +601,7 @@ export class Field extends PureComponent { ); } - renderDescription(setting) { + renderDescription(setting: FieldSetting) { let description; let deprecation; @@ -579,7 +614,7 @@ export class Field extends PureComponent { { - window.open(links.management[setting.deprecation.docLinksKey], '_blank'); + window.open(links.management[setting.deprecation!.docLinksKey], '_blank'); }} onClickAriaLabel={i18n.translate( 'kbn.management.settings.field.deprecationClickAreaLabel', @@ -608,7 +643,7 @@ export class Field extends PureComponent { * Justification for dangerouslySetInnerHTML: * Setting description may contain formatting and links to documentation. */ - dangerouslySetInnerHTML={{ __html: setting.description }} //eslint-disable-line react/no-danger + dangerouslySetInnerHTML={{ __html: setting.description || '' }} // eslint-disable-line react/no-danger /> ); } @@ -622,7 +657,7 @@ export class Field extends PureComponent { ); } - renderDefaultValue(setting) { + renderDefaultValue(setting: FieldSetting) { const { type, defVal, optionLabels } = setting; if (isDefaultValue(setting)) { return; @@ -641,7 +676,7 @@ export class Field extends PureComponent { = 500 ? 300 : null} + overflowHeight={(defVal as string).length >= 500 ? 300 : undefined} > {this.getDisplayedDefaultValue(type, defVal)} @@ -667,7 +702,7 @@ export class Field extends PureComponent { ); } - renderResetToDefaultLink(setting) { + renderResetToDefaultLink(setting: FieldSetting) { const { ariaName, name } = setting; if (isDefaultValue(setting)) { return; @@ -694,7 +729,7 @@ export class Field extends PureComponent { ); } - renderChangeImageLink(setting) { + renderChangeImageLink(setting: FieldSetting) { const { changeImage } = this.state; const { type, value, ariaName, name } = setting; if (type !== 'image' || !value || changeImage) { @@ -721,7 +756,7 @@ export class Field extends PureComponent { ); } - renderActions(setting) { + renderActions(setting: FieldSetting) { const { ariaName, name } = setting; const { loading, isInvalid, changeImage, savedValue, unsavedValue } = this.state; const isDisabled = loading || setting.isOverridden; @@ -798,6 +833,7 @@ export class Field extends PureComponent { helpText={this.renderHelpText(setting)} describedByIds={[`${setting.name}-aria`]} className="mgtAdvancedSettings__fieldRow" + // @ts-ignore hasChildLabel={setting.type !== 'boolean'} > {this.renderField(setting)} diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/index.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/index.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/field/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/__snapshots__/form.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/__snapshots__/form.test.tsx.snap similarity index 79% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/__snapshots__/form.test.js.snap rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/__snapshots__/form.test.tsx.snap index 4111b3d5fa2d3f..b43c17c2a88656 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/__snapshots__/form.test.js.snap +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/__snapshots__/form.test.tsx.snap @@ -61,9 +61,16 @@ exports[`Form should render normally 1`] = ` "category": Array [ "general", ], - "description": "bar", + "defVal": "defVal", + "description": "description", "displayName": "Test date", + "isCustom": false, + "isOverridden": false, "name": "general:test:date", + "readOnly": false, + "requiresPageReload": false, + "type": "string", + "value": "value", } } /> @@ -78,9 +85,16 @@ exports[`Form should render normally 1`] = ` "category": Array [ "general", ], - "description": "foo", + "defVal": "defVal", + "description": "description", "displayName": "Test setting", + "isCustom": false, + "isOverridden": false, "name": "setting:test", + "readOnly": false, + "requiresPageReload": false, + "type": "string", + "value": "value", } } /> @@ -120,8 +134,16 @@ exports[`Form should render normally 1`] = ` "category": Array [ "dashboard", ], + "defVal": "defVal", + "description": "description", "displayName": "Dashboard test setting", + "isCustom": false, + "isOverridden": false, "name": "dashboard:test:setting", + "readOnly": false, + "requiresPageReload": false, + "type": "string", + "value": "value", } } /> @@ -187,9 +209,16 @@ exports[`Form should render normally 1`] = ` "category": Array [ "x-pack", ], - "description": "bar", + "defVal": "defVal", + "description": "description", "displayName": "X-Pack test setting", + "isCustom": false, + "isOverridden": false, "name": "xpack:test:setting", + "readOnly": false, + "requiresPageReload": false, + "type": "string", + "value": "value", } } /> @@ -234,9 +263,16 @@ exports[`Form should render read-only when saving is disabled 1`] = ` "category": Array [ "general", ], - "description": "bar", + "defVal": "defVal", + "description": "description", "displayName": "Test date", + "isCustom": false, + "isOverridden": false, "name": "general:test:date", + "readOnly": false, + "requiresPageReload": false, + "type": "string", + "value": "value", } } /> @@ -251,9 +287,16 @@ exports[`Form should render read-only when saving is disabled 1`] = ` "category": Array [ "general", ], - "description": "foo", + "defVal": "defVal", + "description": "description", "displayName": "Test setting", + "isCustom": false, + "isOverridden": false, "name": "setting:test", + "readOnly": false, + "requiresPageReload": false, + "type": "string", + "value": "value", } } /> @@ -293,8 +336,16 @@ exports[`Form should render read-only when saving is disabled 1`] = ` "category": Array [ "dashboard", ], + "defVal": "defVal", + "description": "description", "displayName": "Dashboard test setting", + "isCustom": false, + "isOverridden": false, "name": "dashboard:test:setting", + "readOnly": false, + "requiresPageReload": false, + "type": "string", + "value": "value", } } /> @@ -360,9 +411,16 @@ exports[`Form should render read-only when saving is disabled 1`] = ` "category": Array [ "x-pack", ], - "description": "bar", + "defVal": "defVal", + "description": "description", "displayName": "X-Pack test setting", + "isCustom": false, + "isOverridden": false, "name": "xpack:test:setting", + "readOnly": false, + "requiresPageReload": false, + "type": "string", + "value": "value", } } /> diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/form.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/form.test.tsx similarity index 88% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/form.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/form.test.tsx index 7befed814e5d0a..6bbcfd543a6290 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/form.test.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/form.test.tsx @@ -19,6 +19,7 @@ import React from 'react'; import { shallowWithI18nProvider } from 'test_utils/enzyme_helpers'; +import { UiSettingsType } from '../../../../../../../../../core/public'; import { Form } from './form'; @@ -28,6 +29,17 @@ jest.mock('../field', () => ({ }, })); +const defaults = { + requiresPageReload: false, + readOnly: false, + value: 'value', + description: 'description', + isOverridden: false, + type: 'string' as UiSettingsType, + isCustom: false, + defVal: 'defVal', +}; + const settings = { dashboard: [ { @@ -35,6 +47,7 @@ const settings = { ariaName: 'dashboard test setting', displayName: 'Dashboard test setting', category: ['dashboard'], + ...defaults, }, ], general: [ @@ -44,6 +57,7 @@ const settings = { displayName: 'Test date', description: 'bar', category: ['general'], + ...defaults, }, { name: 'setting:test', @@ -51,6 +65,7 @@ const settings = { displayName: 'Test setting', description: 'foo', category: ['general'], + ...defaults, }, ], 'x-pack': [ @@ -60,6 +75,7 @@ const settings = { displayName: 'X-Pack test setting', category: ['x-pack'], description: 'bar', + ...defaults, }, ], }; @@ -69,8 +85,8 @@ const categoryCounts = { dashboard: 1, 'x-pack': 10, }; -const save = () => {}; -const clear = () => {}; +const save = (key: string, value: any) => Promise.resolve(true); +const clear = (key: string) => Promise.resolve(true); const clearQuery = () => {}; describe('Form', () => { diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/form.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/form.tsx similarity index 84% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/form.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/form.tsx index 19d8b9da446c76..113e0b2db5f308 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/form.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/form.tsx @@ -18,7 +18,6 @@ */ import React, { PureComponent, Fragment } from 'react'; -import PropTypes from 'prop-types'; import { EuiFlexGroup, @@ -33,20 +32,23 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { getCategoryName } from '../../lib'; import { Field } from '../field'; +import { FieldSetting } from '../../types'; -export class Form extends PureComponent { - static propTypes = { - settings: PropTypes.object.isRequired, - categories: PropTypes.array.isRequired, - categoryCounts: PropTypes.object.isRequired, - clearQuery: PropTypes.func.isRequired, - save: PropTypes.func.isRequired, - clear: PropTypes.func.isRequired, - showNoResultsMessage: PropTypes.bool.isRequired, - enableSaving: PropTypes.bool.isRequired, - }; +type Category = string; - renderClearQueryLink(totalSettings, currentSettings) { +interface FormProps { + settings: Record; + categories: Category[]; + categoryCounts: Record; + clearQuery: () => void; + save: (key: string, value: any) => Promise; + clear: (key: string) => Promise; + showNoResultsMessage: boolean; + enableSaving: boolean; +} + +export class Form extends PureComponent { + renderClearQueryLink(totalSettings: number, currentSettings: number) { const { clearQuery } = this.props; if (totalSettings !== currentSettings) { @@ -78,7 +80,7 @@ export class Form extends PureComponent { return null; } - renderCategory(category, settings, totalSettings) { + renderCategory(category: Category, settings: FieldSetting[], totalSettings: number) { return ( @@ -110,7 +112,7 @@ export class Form extends PureComponent { ); } - maybeRenderNoSettings(clearQuery) { + maybeRenderNoSettings(clearQuery: FormProps['clearQuery']) { if (this.props.showNoResultsMessage) { return ( @@ -136,7 +138,7 @@ export class Form extends PureComponent { render() { const { settings, categories, categoryCounts, clearQuery } = this.props; - const currentCategories = []; + const currentCategories: Category[] = []; categories.forEach(category => { if (settings[category] && settings[category].length) { @@ -148,7 +150,7 @@ export class Form extends PureComponent { {currentCategories.length ? currentCategories.map(category => { - return this.renderCategory(category, settings[category], categoryCounts[category]); // fix this + return this.renderCategory(category, settings[category], categoryCounts[category]); }) : this.maybeRenderNoSettings(clearQuery)} diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/index.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/index.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/form/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/__snapshots__/page_footer.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/__snapshots__/page_footer.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/__snapshots__/page_footer.test.js.snap rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/__snapshots__/page_footer.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/index.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/index.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/page_footer.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/page_footer.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/page_footer.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/page_footer.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/page_footer.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/page_footer.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/page_footer.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_footer/page_footer.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/__snapshots__/page_subtitle.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/__snapshots__/page_subtitle.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/__snapshots__/page_subtitle.test.js.snap rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/__snapshots__/page_subtitle.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/index.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/index.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/page_subtitle.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/page_subtitle.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/page_subtitle.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/page_subtitle.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/page_subtitle.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/page_subtitle.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/page_subtitle.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_subtitle/page_subtitle.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/__snapshots__/page_title.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/__snapshots__/page_title.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/__snapshots__/page_title.test.js.snap rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/__snapshots__/page_title.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/index.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/index.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/page_title.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/page_title.test.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/page_title.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/page_title.test.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/page_title.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/page_title.tsx similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/page_title.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/page_title/page_title.tsx diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/__snapshots__/search.test.js.snap b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/__snapshots__/search.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/__snapshots__/search.test.js.snap rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/__snapshots__/search.test.tsx.snap diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/index.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/index.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/search.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/search.test.tsx similarity index 97% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/search.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/search.test.tsx index 3cd2de6ddccaa7..8e7bac5129ae94 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/search.test.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/search.test.tsx @@ -19,6 +19,7 @@ import React from 'react'; import { shallowWithI18nProvider, mountWithI18nProvider } from 'test_utils/enzyme_helpers'; +// @ts-ignore import { findTestSubject } from '@elastic/eui/lib/test'; import { Query } from '@elastic/eui'; @@ -38,7 +39,7 @@ describe('Search', () => { }); it('should call parent function when query is changed', async () => { - //This test is brittle as it knows about implementation details + // This test is brittle as it knows about implementation details // (EuiFieldSearch uses onKeyup instead of onChange to handle input) const onQueryChange = jest.fn(); const component = mountWithI18nProvider( diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/search.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/search.tsx similarity index 84% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/search.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/search.tsx index 02315e73cc11b8..471f2ba28005ca 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/search.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/components/search/search.tsx @@ -18,21 +18,26 @@ */ import React, { Fragment, PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { i18n } from '@kbn/i18n'; - -import { EuiSearchBar, EuiFormErrorText } from '@elastic/eui'; +import { + // @ts-ignore + EuiSearchBar, + EuiFormErrorText, +} from '@elastic/eui'; +import { IQuery } from '../../types'; import { getCategoryName } from '../../lib'; -export class Search extends PureComponent { - static propTypes = { - categories: PropTypes.array.isRequired, - query: PropTypes.object.isRequired, - onQueryChange: PropTypes.func.isRequired, - }; +interface SearchProps { + categories: string[]; + query: IQuery; + onQueryChange: ({ query }: { query: IQuery }) => void; +} + +export class Search extends PureComponent { + private categories: Array<{ value: string; name: string }> = []; - constructor(props) { + constructor(props: SearchProps) { super(props); const { categories } = props; this.categories = categories.map(category => { @@ -48,7 +53,7 @@ export class Search extends PureComponent { parseErrorMessage: null, }; - onChange = ({ query, error }) => { + onChange = ({ query, error }: { query: IQuery; error: { message: string } }) => { if (error) { this.setState({ isSearchTextValid: false, diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/index.html b/src/legacy/core_plugins/kibana/public/management/sections/settings/index.html index e1b901a9669606..2fe8fce08b4abc 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/index.html +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/index.html @@ -1,5 +1,5 @@ -
+
diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/index.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/index.js index f03dcd195092aa..6d8987b1a928e5 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/index.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/index.js @@ -29,38 +29,10 @@ import { } from 'ui/registry/feature_catalogue'; import React from 'react'; -import { render, unmountComponentAtNode } from 'react-dom'; import { AdvancedSettings } from './advanced_settings'; import { i18n } from '@kbn/i18n'; import { getBreadcrumbs } from './breadcrumbs'; -const REACT_ADVANCED_SETTINGS_DOM_ELEMENT_ID = 'reactAdvancedSettings'; - -function updateAdvancedSettings($scope, config, query) { - $scope.$$postDigest(() => { - const node = document.getElementById(REACT_ADVANCED_SETTINGS_DOM_ELEMENT_ID); - if (!node) { - return; - } - - render( - - - , - node - ); - }); -} - -function destroyAdvancedSettings() { - const node = document.getElementById(REACT_ADVANCED_SETTINGS_DOM_ELEMENT_ID); - node && unmountComponentAtNode(node); -} - uiRoutes.when('/management/kibana/settings/:setting?', { template: indexTemplate, k7Breadcrumbs: getBreadcrumbs, @@ -82,23 +54,28 @@ uiRoutes.when('/management/kibana/settings/:setting?', { }, }); -uiModules.get('apps/management').directive('kbnManagementAdvanced', function(config, $route) { +uiModules.get('apps/management').directive('kbnManagementAdvanced', function($route) { return { restrict: 'E', link: function($scope) { - config.watchAll(() => { - updateAdvancedSettings($scope, config, $route.current.params.setting || ''); - }, $scope); - - $scope.$on('$destroy', () => { - destroyAdvancedSettings(); - }); - + $scope.query = $route.current.params.setting || ''; $route.updateParams({ setting: null }); }, }; }); +const AdvancedSettingsApp = ({ query = '' }) => { + return ( + + + + ); +}; + +uiModules.get('apps/management').directive('kbnManagementAdvancedReact', function(reactDirective) { + return reactDirective(AdvancedSettingsApp, [['query', { watchDepth: 'reference' }]]); +}); + management.getSection('kibana').register('settings', { display: i18n.translate('kbn.management.settings.sectionLabel', { defaultMessage: 'Advanced Settings', diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/get_category_name.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/get_category_name.test.js deleted file mode 100644 index 731281933161b3..00000000000000 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/get_category_name.test.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import expect from '@kbn/expect'; -import { getCategoryName } from '../get_category_name'; - -describe('Settings', function() { - describe('Advanced', function() { - describe('getCategoryName(category)', function() { - it('should be a function', function() { - expect(getCategoryName).to.be.a(Function); - }); - - it('should return correct name for known categories', function() { - expect(getCategoryName('general')).to.be('General'); - expect(getCategoryName('timelion')).to.be('Timelion'); - expect(getCategoryName('notifications')).to.be('Notifications'); - expect(getCategoryName('visualizations')).to.be('Visualizations'); - expect(getCategoryName('discover')).to.be('Discover'); - expect(getCategoryName('dashboard')).to.be('Dashboard'); - expect(getCategoryName('reporting')).to.be('Reporting'); - expect(getCategoryName('search')).to.be('Search'); - }); - - it('should capitalize unknown category', function() { - expect(getCategoryName('elasticsearch')).to.be('Elasticsearch'); - }); - - it('should return empty string for no category', function() { - expect(getCategoryName()).to.be(''); - expect(getCategoryName('')).to.be(''); - expect(getCategoryName(false)).to.be(''); - }); - }); - }); -}); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/default_category.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/default_category.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/lib/default_category.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/lib/default_category.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/get_aria_name.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_aria_name.test.ts similarity index 88% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/get_aria_name.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_aria_name.test.ts index 0e54480813e3fb..e129481a397c16 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/get_aria_name.test.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_aria_name.test.ts @@ -18,15 +18,11 @@ */ import expect from '@kbn/expect'; -import { getAriaName } from '../get_aria_name'; +import { getAriaName } from './get_aria_name'; describe('Settings', function() { describe('Advanced', function() { describe('getAriaName(name)', function() { - it('should be a function', function() { - expect(getAriaName).to.be.a(Function); - }); - it('should return a space delimited lower-case string with no special characters', function() { expect(getAriaName('xPack:defaultAdminEmail')).to.be('x pack default admin email'); expect(getAriaName('doc_table:highlight')).to.be('doc table highlight'); @@ -36,7 +32,6 @@ describe('Settings', function() { it('should return an empty string if passed undefined or null', function() { expect(getAriaName()).to.be(''); expect(getAriaName(undefined)).to.be(''); - expect(getAriaName(null)).to.be(''); }); }); }); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_aria_name.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_aria_name.ts similarity index 93% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_aria_name.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_aria_name.ts index c75c761328370d..d5c2be752a278a 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_aria_name.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_aria_name.ts @@ -26,8 +26,8 @@ import { words } from 'lodash'; * * Example: 'xPack:fooBar:foo_bar_baz' -> 'x pack foo bar foo bar baz' */ -export function getAriaName(name) { - return words(name) +export function getAriaName(name?: string) { + return words(name || '') .map(word => word.toLowerCase()) .join(' '); } diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/default_category.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_category_name.test.ts similarity index 69% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/default_category.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_category_name.test.ts index 1172542dbce3d0..73e303e20c64d7 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/default_category.test.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_category_name.test.ts @@ -18,13 +18,18 @@ */ import expect from '@kbn/expect'; -import { DEFAULT_CATEGORY } from '../default_category'; +import { getCategoryName } from './get_category_name'; describe('Settings', function() { describe('Advanced', function() { - describe('DEFAULT_CATEGORY', function() { - it('should be general', function() { - expect(DEFAULT_CATEGORY).to.be('general'); + describe('getCategoryName(category)', function() { + it('should capitalize unknown category', function() { + expect(getCategoryName('elasticsearch')).to.be('Elasticsearch'); + }); + + it('should return empty string for no category', function() { + expect(getCategoryName()).to.be(''); + expect(getCategoryName('')).to.be(''); }); }); }); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_category_name.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_category_name.ts similarity index 92% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_category_name.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_category_name.ts index c64b332e8ebee3..d0361ba698eebf 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_category_name.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_category_name.ts @@ -19,9 +19,9 @@ import { i18n } from '@kbn/i18n'; -const upperFirst = (str = '') => str.replace(/^./, str => str.toUpperCase()); +const upperFirst = (str = '') => str.replace(/^./, strng => strng.toUpperCase()); -const names = { +const names: Record = { general: i18n.translate('kbn.management.settings.categoryNames.generalLabel', { defaultMessage: 'General', }), @@ -51,6 +51,6 @@ const names = { }), }; -export function getCategoryName(category) { +export function getCategoryName(category?: string) { return category ? names[category] || upperFirst(category) : ''; } diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/get_val_type.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_val_type.test.ts similarity index 93% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/get_val_type.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_val_type.test.ts index 0a6cce972e518b..ec59dcaa1ea290 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/get_val_type.test.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_val_type.test.ts @@ -18,15 +18,11 @@ */ import expect from '@kbn/expect'; -import { getValType } from '../get_val_type'; +import { getValType } from './get_val_type'; describe('Settings', function() { describe('Advanced', function() { describe('getValType(def, val)', function() { - it('should be a function', function() { - expect(getValType).to.be.a(Function); - }); - it('should return the explicitly defined type of a setting', function() { expect(getValType({ type: 'string' })).to.be('string'); expect(getValType({ type: 'json' })).to.be('json'); diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_val_type.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_val_type.ts similarity index 67% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_val_type.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_val_type.ts index 35ed1f14332ede..e0aafb6710b7b4 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_val_type.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/get_val_type.ts @@ -22,7 +22,11 @@ * @param {?} current value of the setting * @returns {string} the type to use for determining the display and editor */ -export function getValType(def, value) { + +import { UiSettingsType } from 'src/core/public'; +import { FieldSetting } from '../types'; + +export function getValType(def: Partial, value?: any): UiSettingsType { if (def.type) { return def.type; } @@ -31,5 +35,17 @@ export function getValType(def, value) { return 'array'; } - return def.value != null ? typeof def.value : typeof value; + const typeofVal = def.value != null ? typeof def.value : typeof value; + + if (typeofVal === 'bigint') { + return 'number'; + } + + if (typeofVal === 'symbol' || typeofVal === 'object' || typeofVal === 'function') { + throw new Error( + `incompatible UiSettingsType: '${def.name}' type ${typeofVal} | ${JSON.stringify(def)}` + ); + } + + return typeofVal; } diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/index.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/index.ts similarity index 100% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/lib/index.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/lib/index.ts diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/is_default_value.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/is_default_value.test.ts similarity index 84% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/is_default_value.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/lib/is_default_value.test.ts index 58ffd0597a34a9..30531ca89b0b58 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/is_default_value.test.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/is_default_value.test.ts @@ -18,20 +18,29 @@ */ import expect from '@kbn/expect'; -import { isDefaultValue } from '../is_default_value'; +import { isDefaultValue } from './is_default_value'; +import { UiSettingsType } from '../../../../../../../../core/public'; describe('Settings', function() { describe('Advanced', function() { describe('getCategoryName(category)', function() { - it('should be a function', function() { - expect(isDefaultValue).to.be.a(Function); - }); - describe('when given a setting definition object', function() { const setting = { isCustom: false, value: 'value', defVal: 'defaultValue', + displayName: 'displayName', + name: 'name', + ariaName: 'ariaName', + description: 'description', + requiresPageReload: false, + type: 'string' as UiSettingsType, + isOverridden: false, + readOnly: false, + options: [], + optionLabels: { option: 'label' }, + category: ['category'], + validation: { regex: /regexString/, message: 'validation description' }, }; describe('that is custom', function() { diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/is_default_value.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/is_default_value.ts similarity index 90% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/lib/is_default_value.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/lib/is_default_value.ts index 166aed6aeb5130..53c2ef3187f091 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/is_default_value.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/is_default_value.ts @@ -16,8 +16,9 @@ * specific language governing permissions and limitations * under the License. */ +import { FieldSetting } from '../types'; -export function isDefaultValue(setting) { +export function isDefaultValue(setting: FieldSetting) { return ( setting.isCustom || setting.value === undefined || diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/to_editable_config.test.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/to_editable_config.test.ts similarity index 75% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/to_editable_config.test.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/lib/to_editable_config.test.ts index 4896b4516dd1da..881a2eb003cc81 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/__tests__/to_editable_config.test.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/to_editable_config.test.ts @@ -17,8 +17,25 @@ * under the License. */ +import { UiSettingsParams, StringValidationRegex } from 'src/core/public'; import expect from '@kbn/expect'; -import { toEditableConfig } from '../to_editable_config'; +import { toEditableConfig } from './to_editable_config'; + +const defDefault = { + isOverridden: true, +}; + +function invoke({ + def = defDefault, + name = 'woah', + value = 'forreal', +}: { + def?: UiSettingsParams & { isOverridden?: boolean }; + name?: string; + value?: any; +}) { + return toEditableConfig({ def, name, value, isCustom: def === defDefault, isOverridden: true }); +} describe('Settings', function() { describe('Advanced', function() { @@ -38,17 +55,17 @@ describe('Settings', function() { }); describe('when given a setting definition object', function() { - let def; + let def: UiSettingsParams & { isOverridden?: boolean }; beforeEach(function() { def = { value: 'the original', description: 'the one and only', - options: 'all the options', + options: ['all the options'], }; }); it('is not marked as custom', function() { - expect(invoke({ def }).isCustom).to.be.false; + expect(invoke({ def }).isCustom).to.be(false); }); it('sets a default value', function() { @@ -65,7 +82,7 @@ describe('Settings', function() { describe('that contains a type', function() { it('sets that type', function() { - def.type = 'something'; + def.type = 'string'; expect(invoke({ def }).type).to.equal(def.type); }); }); @@ -84,37 +101,34 @@ describe('Settings', function() { message: 'must start with "foo"', }; const result = invoke({ def }); - expect(result.validation.regex).to.be.a(RegExp); - expect(result.validation.message).to.equal('must start with "foo"'); + const validationTyped = result.validation as StringValidationRegex; + expect(validationTyped.regex).to.be.a(RegExp); + expect(validationTyped.message).to.equal('must start with "foo"'); }); }); }); describe('when not given a setting definition object', function() { it('is marked as custom', function() { - expect(invoke().isCustom).to.be.true; + expect(invoke({}).isCustom).to.be(true); }); it('sets defVal to undefined', function() { - expect(invoke().defVal).to.be.undefined; + expect(invoke({}).defVal).to.be(undefined); }); it('sets description to undefined', function() { - expect(invoke().description).to.be.undefined; + expect(invoke({}).description).to.be(undefined); }); it('sets options to undefined', function() { - expect(invoke().options).to.be.undefined; + expect(invoke({}).options).to.be(undefined); }); it('sets validation to undefined', function() { - expect(invoke().validation).to.be.undefined; + expect(invoke({}).validation).to.be(undefined); }); }); }); }); }); - -function invoke({ def = false, name = 'woah', value = 'forreal' } = {}) { - return toEditableConfig({ def, name, value, isCustom: def === false }); -} diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/to_editable_config.js b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/to_editable_config.ts similarity index 74% rename from src/legacy/core_plugins/kibana/public/management/sections/settings/lib/to_editable_config.js rename to src/legacy/core_plugins/kibana/public/management/sections/settings/lib/to_editable_config.ts index 6efb89cfba2b25..2c27d72f7f645a 100644 --- a/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/to_editable_config.js +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/lib/to_editable_config.ts @@ -17,6 +17,12 @@ * under the License. */ +import { + UiSettingsParams, + UserProvidedValues, + StringValidationRegexString, + SavedObjectAttribute, +} from 'src/core/public'; import { getValType } from './get_val_type'; import { getAriaName } from './get_aria_name'; import { DEFAULT_CATEGORY } from './default_category'; @@ -27,10 +33,25 @@ import { DEFAULT_CATEGORY } from './default_category'; * @param {object} current value of setting * @returns {object} the editable config object */ -export function toEditableConfig({ def, name, value, isCustom, isOverridden }) { +export function toEditableConfig({ + def, + name, + value, + isCustom, + isOverridden, +}: { + def: UiSettingsParams & UserProvidedValues; + name: string; + value: SavedObjectAttribute; + isCustom: boolean; + isOverridden: boolean; +}) { if (!def) { def = {}; } + + const validationTyped = def.validation as StringValidationRegexString; + const conf = { name, displayName: def.name || name, @@ -45,10 +66,10 @@ export function toEditableConfig({ def, name, value, isCustom, isOverridden }) { description: def.description, deprecation: def.deprecation, validation: - def.validation && def.validation.regexString + validationTyped && validationTyped.regexString ? { - regex: new RegExp(def.validation.regexString), - message: def.validation.message, + regex: new RegExp(validationTyped.regexString), + message: validationTyped.message, } : def.validation, options: def.options, diff --git a/src/legacy/core_plugins/kibana/public/management/sections/settings/types.ts b/src/legacy/core_plugins/kibana/public/management/sections/settings/types.ts new file mode 100644 index 00000000000000..fea70110f60711 --- /dev/null +++ b/src/legacy/core_plugins/kibana/public/management/sections/settings/types.ts @@ -0,0 +1,54 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { + UiSettingsType, + StringValidation, + ImageValidation, + SavedObjectAttribute, +} from '../../../../../../../core/public'; + +export interface FieldSetting { + displayName: string; + name: string; + value: SavedObjectAttribute; + description?: string; + options?: string[]; + optionLabels?: Record; + requiresPageReload: boolean; + type: UiSettingsType; + category: string[]; + ariaName: string; + isOverridden: boolean; + defVal: SavedObjectAttribute; + isCustom: boolean; + validation?: StringValidation | ImageValidation; + readOnly?: boolean; + deprecation?: { + message: string; + docLinksKey: string; + }; +} + +// until eui searchbar and query are typed +export interface IQuery { + ast: any; // incomplete + text: string; + syntax: any; // incomplete +} diff --git a/src/legacy/core_plugins/kibana/ui_setting_defaults.js b/src/legacy/core_plugins/kibana/ui_setting_defaults.js index 9b848666541ce7..02a4f10a543c4a 100644 --- a/src/legacy/core_plugins/kibana/ui_setting_defaults.js +++ b/src/legacy/core_plugins/kibana/ui_setting_defaults.js @@ -257,6 +257,7 @@ export function getUiSettingDefaults() { defaultMessage: 'Default index', }), value: null, + type: 'string', description: i18n.translate('kbn.advancedSettings.defaultIndexText', { defaultMessage: 'The index to access if no index is set', }), From a4cf4f4b75717fb6ba0ebc692d551e62a679e0c0 Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Thu, 23 Jan 2020 17:16:09 +0100 Subject: [PATCH 21/72] [ML] Single Metric Viewer: Fix zoom on forecast selection. (#55685) Fixes adjusting the focus chart zoom range when a forecast gets selected. The code is cleaned up so appStateHandler to set the zoom range in the url is only called in one place within contextChartSelected(). --- .../routing/routes/timeseriesexplorer.tsx | 46 ++++---- .../timeseries_chart/timeseries_chart.js | 6 +- .../timeseriesexplorer.d.ts | 3 +- .../timeseriesexplorer/timeseriesexplorer.js | 105 +++++++++--------- 4 files changed, 83 insertions(+), 77 deletions(-) diff --git a/x-pack/legacy/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx b/x-pack/legacy/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx index f824faf7845c64..bc457f1a3fe89e 100644 --- a/x-pack/legacy/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx +++ b/x-pack/legacy/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx @@ -72,6 +72,11 @@ const PageWrapper: FC = ({ config, deps }) => { ); }; +interface AppStateZoom { + from: string; + to: string; +} + interface TimeSeriesExplorerUrlStateManager { config: any; jobsWithTimeRange: MlJobWithTimeRange[]; @@ -159,10 +164,9 @@ export const TimeSeriesExplorerUrlStateManager: FC( + appState?.mlTimeSeriesExplorer?.forecastId + ); + useEffect(() => { if ( autoZoomDuration !== undefined && @@ -221,6 +231,9 @@ export const TimeSeriesExplorerUrlStateManager: FC { @@ -231,20 +244,6 @@ export const TimeSeriesExplorerUrlStateManager: FC { // eslint-disable-next-line no-console @@ -282,6 +282,11 @@ export const TimeSeriesExplorerUrlStateManager: FC ); diff --git a/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js b/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js index d8e9e4379395a5..4b2d640b99bb3d 100644 --- a/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js +++ b/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js @@ -385,6 +385,7 @@ const TimeseriesChartIntl = injectI18n( drawContextElements(context, this.vizWidth, contextChartHeight, swimlaneHeight); } + contextChartInitialized = false; drawContextChartSelection() { const { contextChartData, @@ -446,7 +447,10 @@ const TimeseriesChartIntl = injectI18n( }; if (!_.isEqual(newSelectedBounds, this.selectedBounds)) { this.selectedBounds = newSelectedBounds; - contextChartSelected({ from: contextXScaleDomain[0], to: contextXScaleDomain[1] }); + if (this.contextChartInitialized === false) { + this.contextChartInitialized = true; + contextChartSelected({ from: contextXScaleDomain[0], to: contextXScaleDomain[1] }); + } } } } diff --git a/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.d.ts b/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.d.ts index 6c1bb01137c917..4253316123f01a 100644 --- a/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.d.ts +++ b/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.d.ts @@ -19,8 +19,7 @@ declare const TimeSeriesExplorer: FC<{ selectedJobId: string; selectedDetectorIndex: number; selectedEntities: any[]; - selectedForecastId: string; - setGlobalState: (arg: any) => void; + selectedForecastId?: string; tableInterval: string; tableSeverity: number; zoom?: { from: string; to: string }; diff --git a/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js b/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js index 6d918a62d721a3..02cb2e3f4e25a5 100644 --- a/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js +++ b/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js @@ -188,6 +188,24 @@ export class TimeSeriesExplorer extends React.Component { */ contextChart$ = new Subject(); + /** + * Returns field names that don't have a selection yet. + */ + getFieldNamesWithEmptyValues = () => { + const latestEntityControls = this.getControlsForDetector(); + return latestEntityControls + .filter(({ fieldValue }) => !fieldValue) + .map(({ fieldName }) => fieldName); + }; + + /** + * Checks if all entity control dropdowns have a selection. + */ + arePartitioningFieldsProvided = () => { + const fieldNamesWithEmptyValues = this.getFieldNamesWithEmptyValues(); + return fieldNamesWithEmptyValues.length === 0; + }; + detectorIndexChangeHandler = e => { const { appStateHandler } = this.props; const id = e.target.value; @@ -296,7 +314,17 @@ export class TimeSeriesExplorer extends React.Component { } contextChartSelected = selection => { + const zoomState = { + from: selection.from.toISOString(), + to: selection.to.toISOString(), + }; + + if (isEqual(this.props.zoom, zoomState) && this.state.focusChartData !== undefined) { + return; + } + this.contextChart$.next(selection); + this.props.appStateHandler(APP_STATE_ACTION.SET_ZOOM, zoomState); }; entityFieldValueChanged = (entity, fieldValue) => { @@ -509,27 +537,38 @@ export class TimeSeriesExplorer extends React.Component { (Array.isArray(stateUpdate.contextForecastData) && stateUpdate.contextForecastData.length > 0); stateUpdate.loading = false; + // Set zoomFrom/zoomTo attributes in scope which will result in the metric chart automatically // selecting the specified range in the context chart, and so loading that date range in the focus chart. - if (stateUpdate.contextChartData.length) { + // Only touch the zoom range if data for the context chart has been loaded and all necessary + // partition fields have a selection. + if ( + stateUpdate.contextChartData.length && + this.arePartitioningFieldsProvided() === true + ) { // Check for a zoom parameter in the appState (URL). let focusRange = calculateInitialFocusRange( zoom, stateUpdate.contextAggregationInterval, bounds ); - - if (focusRange === undefined) { + if ( + focusRange === undefined || + this.previousSelectedForecastId !== this.props.selectedForecastId + ) { focusRange = calculateDefaultFocusRange( autoZoomDuration, stateUpdate.contextAggregationInterval, stateUpdate.contextChartData, stateUpdate.contextForecastData ); + this.previousSelectedForecastId = this.props.selectedForecastId; } - stateUpdate.zoomFrom = focusRange[0]; - stateUpdate.zoomTo = focusRange[1]; + this.contextChartSelected({ + from: focusRange[0], + to: focusRange[1], + }); } this.setState(stateUpdate); @@ -881,11 +920,6 @@ export class TimeSeriesExplorer extends React.Component { ...refreshFocusData, ...tableData, }); - const zoomState = { - from: selection.from.toISOString(), - to: selection.to.toISOString(), - }; - this.props.appStateHandler(APP_STATE_ACTION.SET_ZOOM, zoomState); }) ); @@ -917,6 +951,11 @@ export class TimeSeriesExplorer extends React.Component { if (this.props.selectedForecastId !== undefined) { // Ensure the forecast data will be shown if hidden previously. this.setState({ showForecast: true }); + // Not best practice but we need the previous value for another comparison + // once all the data was loaded. + if (previousProps !== undefined) { + this.previousSelectedForecastId = previousProps.selectedForecastId; + } } } @@ -927,8 +966,7 @@ export class TimeSeriesExplorer extends React.Component { !isEqual(previousProps.selectedDetectorIndex, this.props.selectedDetectorIndex) || !isEqual(previousProps.selectedEntities, this.props.selectedEntities) || !isEqual(previousProps.selectedForecastId, this.props.selectedForecastId) || - previousProps.selectedJobId !== this.props.selectedJobId || - !isEqual(previousProps.zoom, this.props.zoom) + previousProps.selectedJobId !== this.props.selectedJobId ) { const fullRefresh = previousProps === undefined || @@ -961,41 +999,6 @@ export class TimeSeriesExplorer extends React.Component { ) { tableControlsListener(); } - - if ( - this.props.autoZoomDuration === undefined || - this.props.selectedForecastId !== undefined || - this.state.contextAggregationInterval === undefined || - this.state.contextChartData === undefined || - this.state.contextChartData.length === 0 - ) { - return; - } - - const defaultRange = calculateDefaultFocusRange( - this.props.autoZoomDuration, - this.state.contextAggregationInterval, - this.state.contextChartData, - this.state.contextForecastData - ); - - const selection = { - from: this.state.zoomFrom, - to: this.state.zoomTo, - }; - - if ( - (selection.from.getTime() !== defaultRange[0].getTime() || - selection.to.getTime() !== defaultRange[1].getTime()) && - isNaN(Date.parse(selection.from)) === false && - isNaN(Date.parse(selection.to)) === false - ) { - const zoomState = { - from: selection.from.toISOString(), - to: selection.to.toISOString(), - }; - this.props.appStateHandler(APP_STATE_ACTION.SET_ZOOM, zoomState); - } } componentWillUnmount() { @@ -1070,12 +1073,8 @@ export class TimeSeriesExplorer extends React.Component { const selectedJob = mlJobService.getJob(selectedJobId); const entityControls = this.getControlsForDetector(); - - const fieldNamesWithEmptyValues = entityControls - .filter(({ fieldValue }) => !fieldValue) - .map(({ fieldName }) => fieldName); - - const arePartitioningFieldsProvided = fieldNamesWithEmptyValues.length === 0; + const fieldNamesWithEmptyValues = this.getFieldNamesWithEmptyValues(); + const arePartitioningFieldsProvided = this.arePartitioningFieldsProvided(); const detectorSelectOptions = getViewableDetectors(selectedJob).map(d => ({ value: d.index, From 38fd963ed3916ccbe565ee22551ce0ff65182a85 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Thu, 23 Jan 2020 18:19:33 +0100 Subject: [PATCH 22/72] Timelion api migration (#53005) --- .i18nrc.json | 2 +- src/legacy/core_plugins/timelion/index.ts | 9 -- .../directives/timelion_expression_input.js | 2 +- .../public/lib/_tests_/calculate_interval.js | 65 -------- .../public/panels/timechart/schema.ts | 6 +- .../core_plugins/timelion/server/plugin.ts | 62 -------- .../timelion/server/routes/index.ts | 32 ---- .../timelion/server/routes/run.ts | 125 --------------- .../public/components/panel.tsx | 2 +- .../components/timelion_expression_input.tsx | 5 +- .../timelion_expression_input_helpers.test.ts | 2 +- .../timelion_expression_input_helpers.ts | 7 +- .../public/helpers/arg_value_suggestions.ts | 2 +- .../public/helpers/panel_utils.ts | 2 +- .../timelion/common}/chain.peg | 0 .../common/lib/calculate_interval.test.ts | 66 ++++++++ .../common/lib/calculate_interval.ts | 4 +- .../timelion}/common/lib/index.ts | 0 .../timelion}/common/lib/to_milliseconds.ts | 0 .../timelion}/common/types.ts | 0 src/plugins/timelion/server/config.ts | 1 + .../timelion/server/fit_functions/average.js | 0 .../server/fit_functions/average.test.js} | 2 +- .../timelion/server/fit_functions/carry.js | 0 .../server/fit_functions/carry.test.js} | 2 +- .../timelion/server/fit_functions/nearest.js | 0 .../timelion/server/fit_functions/none.js | 0 .../timelion/server/fit_functions/scale.js | 0 .../timelion/server/handlers/chain_runner.js | 8 +- .../timelion/server/handlers/lib/arg_type.js | 0 .../server/handlers/lib/index_arguments.js | 0 .../server/handlers/lib/parse_sheet.js | 5 +- .../server/handlers/lib/parse_sheet.test.js} | 2 +- .../server/handlers/lib/preprocess_chain.js | 2 +- .../handlers/lib/reposition_arguments.js | 0 .../timelion/server/handlers/lib/tl_config.js | 0 .../server/handlers/lib/validate_arg.js | 0 .../server/handlers/lib/validate_time.js | 2 +- .../timelion/server/lib/alter.js | 0 .../timelion/server/lib/as_sorted.js} | 2 +- .../timelion/server/lib/build_target.js | 0 .../timelion/server/lib/classes/chainable.js | 0 .../timelion/server/lib/classes/datasource.js | 0 .../server/lib/classes/timelion_function.d.ts | 2 +- .../server/lib/classes/timelion_function.js | 0 .../timelion/server/lib/config_manager.ts} | 26 +++- .../timelion/server/lib/functions_md.js | 0 .../server/lib/get_namespaced_settings.js | 2 +- .../timelion/server/lib/load_functions.d.ts | 0 .../timelion/server/lib/load_functions.js | 18 +-- .../server/lib/load_functions.test.js} | 2 +- .../timelion/server/lib/offset_time.js | 0 .../timelion/server/lib/offset_time.test.js | 0 .../server/lib/process_function_definition.js | 0 .../timelion/server/lib/reduce.js | 0 .../timelion/server/lib/split_interval.js | 0 .../timelion/server/lib/unzip_pairs.js} | 0 src/plugins/timelion/server/plugin.ts | 46 +++++- .../timelion/server/routes/functions.ts} | 22 +-- src/plugins/timelion/server/routes/run.ts | 144 ++++++++++++++++++ .../timelion/server/routes/validate_es.ts} | 47 +++--- .../timelion/server/series_functions/abs.js | 0 .../server/series_functions/abs.test.js} | 4 +- .../aggregate/aggregate.test.js} | 9 +- .../server/series_functions/aggregate/avg.js | 0 .../series_functions/aggregate/cardinality.js | 0 .../series_functions/aggregate/first.js | 0 .../series_functions/aggregate/index.js | 0 .../server/series_functions/aggregate/last.js | 0 .../server/series_functions/aggregate/max.js | 0 .../server/series_functions/aggregate/min.js | 0 .../server/series_functions/aggregate/sum.js | 0 .../timelion/server/series_functions/bars.js | 0 .../server/series_functions/bars.test.js} | 4 +- .../timelion/server/series_functions/color.js | 0 .../server/series_functions/color.test.js} | 4 +- .../server/series_functions/condition.js | 0 .../series_functions/condition.test.js} | 4 +- .../timelion/server/series_functions/cusum.js | 0 .../server/series_functions/cusum.test.js} | 4 +- .../server/series_functions/derivative.js | 0 .../series_functions/derivative.test.js} | 4 +- .../server/series_functions/divide.js | 0 .../server/series_functions/divide.test.js} | 4 +- .../server/series_functions/es/es.test.js} | 48 +++--- .../server/series_functions/es/index.js | 14 +- .../series_functions/es/lib/agg_body.js | 0 .../es/lib/agg_response_to_series_list.js | 0 .../series_functions/es/lib/build_request.js | 0 .../es/lib/create_date_agg.js | 0 .../timelion/server/series_functions/first.js | 0 .../server/series_functions/first.test.js} | 4 +- .../timelion/server/series_functions/fit.js | 0 .../server/series_functions/fit.test.js} | 2 +- .../series_functions/fixtures/bucket_list.js} | 0 .../series_functions}/fixtures/es_response.js | 2 + .../series_functions/fixtures/series_list.js} | 2 +- .../series_functions/fixtures/tl_config.js} | 49 ++---- .../server/series_functions/graphite.js | 2 +- .../server/series_functions/graphite.test.js} | 15 +- .../series_functions}/helpers/get_series.js | 0 .../helpers/get_series_list.js | 0 .../helpers/get_single_series_list.js | 4 +- .../helpers/invoke_series_fn.js | 4 +- .../timelion/server/series_functions/hide.js | 0 .../server/series_functions/hide.test.js} | 4 +- .../server/series_functions/holt/index.js | 2 +- .../server/series_functions/holt/lib/des.js | 0 .../server/series_functions/holt/lib/ses.js | 0 .../server/series_functions/holt/lib/tes.js | 0 .../timelion/server/series_functions/label.js | 0 .../server/series_functions/label.test.js} | 4 +- .../server/series_functions/legend.js | 2 +- .../server/series_functions/legend.test.js} | 4 +- .../timelion/server/series_functions/lines.js | 0 .../server/series_functions/lines.test.js} | 4 +- .../timelion/server/series_functions/log.js | 0 .../server/series_functions/log.test.js} | 4 +- .../timelion/server/series_functions/max.js | 0 .../server/series_functions/max.test.js} | 4 +- .../timelion/server/series_functions/min.js | 0 .../server/series_functions/min.test.js} | 4 +- .../server/series_functions/movingaverage.js | 2 +- .../series_functions/movingaverage.test.js} | 4 +- .../server/series_functions/movingstd.js | 0 .../series_functions/movingstd.test.js} | 2 +- .../server/series_functions/multiply.js | 0 .../server/series_functions/multiply.test.js} | 4 +- .../server/series_functions/points.js | 0 .../server/series_functions/points.test.js} | 4 +- .../server/series_functions/precision.js | 0 .../series_functions/precision.test.js} | 4 +- .../timelion/server/series_functions/props.js | 0 .../server/series_functions/quandl.js | 3 - .../server/series_functions/quandl.test.js} | 82 +++++----- .../timelion/server/series_functions/range.js | 0 .../server/series_functions/range.test.js} | 4 +- .../server/series_functions/scale_interval.js | 2 +- .../series_functions/scale_interval.test.js} | 4 +- .../server/series_functions/static.js | 0 .../server/series_functions/static.test.js} | 2 +- .../server/series_functions/subtract.js | 0 .../server/series_functions/subtract.test.js} | 4 +- .../timelion/server/series_functions/sum.js | 0 .../server/series_functions/sum.test.js} | 4 +- .../timelion/server/series_functions/title.js | 0 .../server/series_functions/title.test.js} | 4 +- .../server/series_functions/trend/index.js | 0 .../series_functions/trend/lib/regress.js | 0 .../timelion/server/series_functions/trim.js | 0 .../server/series_functions/trim.test.js} | 4 +- .../server/series_functions/worldbank.js | 6 +- .../series_functions/worldbank_indicators.js | 4 +- .../timelion/server/series_functions/yaxis.js | 0 .../server/series_functions/yaxis.test.js} | 4 +- .../timelion/server}/timelion.json | 0 .../timelion/server/types.ts | 0 157 files changed, 517 insertions(+), 573 deletions(-) delete mode 100644 src/legacy/core_plugins/timelion/public/lib/_tests_/calculate_interval.js delete mode 100644 src/legacy/core_plugins/timelion/server/plugin.ts delete mode 100644 src/legacy/core_plugins/timelion/server/routes/index.ts delete mode 100644 src/legacy/core_plugins/timelion/server/routes/run.ts rename src/{legacy/core_plugins/vis_type_timelion/public => plugins/timelion/common}/chain.peg (100%) create mode 100644 src/plugins/timelion/common/lib/calculate_interval.test.ts rename src/{legacy/core_plugins/vis_type_timelion => plugins/timelion}/common/lib/calculate_interval.ts (100%) rename src/{legacy/core_plugins/vis_type_timelion => plugins/timelion}/common/lib/index.ts (100%) rename src/{legacy/core_plugins/vis_type_timelion => plugins/timelion}/common/lib/to_milliseconds.ts (100%) rename src/{legacy/core_plugins/vis_type_timelion => plugins/timelion}/common/types.ts (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/fit_functions/average.js (100%) rename src/{legacy/core_plugins/timelion/server/fit_functions/__tests__/average.js => plugins/timelion/server/fit_functions/average.test.js} (99%) rename src/{legacy/core_plugins => plugins}/timelion/server/fit_functions/carry.js (100%) rename src/{legacy/core_plugins/timelion/server/fit_functions/__tests__/carry.js => plugins/timelion/server/fit_functions/carry.test.js} (98%) rename src/{legacy/core_plugins => plugins}/timelion/server/fit_functions/nearest.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/fit_functions/none.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/fit_functions/scale.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/handlers/chain_runner.js (95%) rename src/{legacy/core_plugins => plugins}/timelion/server/handlers/lib/arg_type.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/handlers/lib/index_arguments.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/handlers/lib/parse_sheet.js (93%) rename src/{legacy/core_plugins/timelion/server/handlers/__tests__/parse_sheet.js => plugins/timelion/server/handlers/lib/parse_sheet.test.js} (97%) rename src/{legacy/core_plugins => plugins}/timelion/server/handlers/lib/preprocess_chain.js (95%) rename src/{legacy/core_plugins => plugins}/timelion/server/handlers/lib/reposition_arguments.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/handlers/lib/tl_config.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/handlers/lib/validate_arg.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/handlers/lib/validate_time.js (96%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/alter.js (100%) rename src/{legacy/core_plugins/timelion/server/lib/asSorted.js => plugins/timelion/server/lib/as_sorted.js} (95%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/build_target.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/classes/chainable.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/classes/datasource.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/classes/timelion_function.d.ts (93%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/classes/timelion_function.js (100%) rename src/{legacy/core_plugins/timelion/server/index.ts => plugins/timelion/server/lib/config_manager.ts} (56%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/functions_md.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/get_namespaced_settings.js (97%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/load_functions.d.ts (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/load_functions.js (84%) rename src/{legacy/core_plugins/timelion/server/lib/__tests__/load_functions.js => plugins/timelion/server/lib/load_functions.test.js} (95%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/offset_time.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/offset_time.test.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/process_function_definition.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/reduce.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/lib/split_interval.js (100%) rename src/{legacy/core_plugins/timelion/server/lib/unzipPairs.js => plugins/timelion/server/lib/unzip_pairs.js} (100%) rename src/{legacy/core_plugins/timelion/server/routes/functions.js => plugins/timelion/server/routes/functions.ts} (68%) create mode 100644 src/plugins/timelion/server/routes/run.ts rename src/{legacy/core_plugins/timelion/server/routes/validate_es.js => plugins/timelion/server/routes/validate_es.ts} (65%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/abs.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/abs.js => plugins/timelion/server/series_functions/abs.test.js} (94%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/aggregate.js => plugins/timelion/server/series_functions/aggregate/aggregate.test.js} (89%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/aggregate/avg.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/aggregate/cardinality.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/aggregate/first.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/aggregate/index.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/aggregate/last.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/aggregate/max.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/aggregate/min.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/aggregate/sum.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/bars.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/bars.js => plugins/timelion/server/series_functions/bars.test.js} (95%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/color.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/color.js => plugins/timelion/server/series_functions/color.test.js} (96%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/condition.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/condition.js => plugins/timelion/server/series_functions/condition.test.js} (97%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/cusum.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/cusum.js => plugins/timelion/server/series_functions/cusum.test.js} (93%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/derivative.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/derivative.js => plugins/timelion/server/series_functions/derivative.test.js} (92%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/divide.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/divide.js => plugins/timelion/server/series_functions/divide.test.js} (92%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/es.js => plugins/timelion/server/series_functions/es/es.test.js} (94%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/es/index.js (91%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/es/lib/agg_body.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/es/lib/agg_response_to_series_list.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/es/lib/build_request.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/es/lib/create_date_agg.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/first.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/first.js => plugins/timelion/server/series_functions/first.test.js} (92%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/fit.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/fit.js => plugins/timelion/server/series_functions/fit.test.js} (98%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/bucketList.js => plugins/timelion/server/series_functions/fixtures/bucket_list.js} (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__ => plugins/timelion/server/series_functions}/fixtures/es_response.js (99%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/seriesList.js => plugins/timelion/server/series_functions/fixtures/series_list.js} (97%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/tlConfig.js => plugins/timelion/server/series_functions/fixtures/tl_config.js} (52%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/graphite.js (97%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/graphite.js => plugins/timelion/server/series_functions/graphite.test.js} (85%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__ => plugins/timelion/server/series_functions}/helpers/get_series.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__ => plugins/timelion/server/series_functions}/helpers/get_series_list.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__ => plugins/timelion/server/series_functions}/helpers/get_single_series_list.js (90%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__ => plugins/timelion/server/series_functions}/helpers/invoke_series_fn.js (89%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/hide.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/hide.js => plugins/timelion/server/series_functions/hide.test.js} (93%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/holt/index.js (98%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/holt/lib/des.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/holt/lib/ses.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/holt/lib/tes.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/label.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/label.js => plugins/timelion/server/series_functions/label.test.js} (94%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/legend.js (98%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/legend.js => plugins/timelion/server/series_functions/legend.test.js} (96%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/lines.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/lines.js => plugins/timelion/server/series_functions/lines.test.js} (95%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/log.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/log.js => plugins/timelion/server/series_functions/log.test.js} (93%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/max.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/max.js => plugins/timelion/server/series_functions/max.test.js} (93%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/min.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/min.js => plugins/timelion/server/series_functions/min.test.js} (93%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/movingaverage.js (98%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/movingaverage.js => plugins/timelion/server/series_functions/movingaverage.test.js} (96%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/movingstd.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/movingstd.js => plugins/timelion/server/series_functions/movingstd.test.js} (98%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/multiply.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/multiply.js => plugins/timelion/server/series_functions/multiply.test.js} (92%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/points.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/points.js => plugins/timelion/server/series_functions/points.test.js} (96%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/precision.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/precision.js => plugins/timelion/server/series_functions/precision.test.js} (93%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/props.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/quandl.js (98%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/quandl.js => plugins/timelion/server/series_functions/quandl.test.js} (55%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/range.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/range.js => plugins/timelion/server/series_functions/range.test.js} (93%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/scale_interval.js (96%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/scale_interval.js => plugins/timelion/server/series_functions/scale_interval.test.js} (92%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/static.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/static.js => plugins/timelion/server/series_functions/static.test.js} (97%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/subtract.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/subtract.js => plugins/timelion/server/series_functions/subtract.test.js} (97%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/sum.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/sum.js => plugins/timelion/server/series_functions/sum.test.js} (93%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/title.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/title.js => plugins/timelion/server/series_functions/title.test.js} (93%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/trend/index.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/trend/lib/regress.js (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/trim.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/trim.js => plugins/timelion/server/series_functions/trim.test.js} (95%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/worldbank.js (96%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/worldbank_indicators.js (95%) rename src/{legacy/core_plugins => plugins}/timelion/server/series_functions/yaxis.js (100%) rename src/{legacy/core_plugins/timelion/server/series_functions/__tests__/yaxis.js => plugins/timelion/server/series_functions/yaxis.test.js} (97%) rename src/{legacy/core_plugins/timelion => plugins/timelion/server}/timelion.json (100%) rename src/{legacy/core_plugins => plugins}/timelion/server/types.ts (100%) diff --git a/.i18nrc.json b/.i18nrc.json index 907310b32e35cc..f03ced2b85093a 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -32,7 +32,7 @@ "statusPage": "src/legacy/core_plugins/status_page", "telemetry": "src/legacy/core_plugins/telemetry", "tileMap": "src/legacy/core_plugins/tile_map", - "timelion": ["src/legacy/core_plugins/timelion", "src/legacy/core_plugins/vis_type_timelion"], + "timelion": ["src/legacy/core_plugins/timelion", "src/legacy/core_plugins/vis_type_timelion", "src/plugins/timelion"], "uiActions": "src/plugins/ui_actions", "visTypeMarkdown": "src/legacy/core_plugins/vis_type_markdown", "visTypeMetric": "src/legacy/core_plugins/vis_type_metric", diff --git a/src/legacy/core_plugins/timelion/index.ts b/src/legacy/core_plugins/timelion/index.ts index d725327e2365b5..42d4e04184a257 100644 --- a/src/legacy/core_plugins/timelion/index.ts +++ b/src/legacy/core_plugins/timelion/index.ts @@ -21,10 +21,7 @@ import { resolve } from 'path'; import { i18n } from '@kbn/i18n'; import { Legacy } from 'kibana'; import { LegacyPluginApi, LegacyPluginInitializer } from 'src/legacy/plugin_discovery/types'; -import { CoreSetup, PluginInitializerContext } from 'src/core/server'; import { DEFAULT_APP_CATEGORIES } from '../../../core/utils'; -import { plugin } from './server'; -import { CustomCoreSetup } from './server/plugin'; const experimentalLabel = i18n.translate('timelion.uiSettings.experimentalLabel', { defaultMessage: 'experimental', @@ -195,12 +192,6 @@ const timelionPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPl }, }, }, - init: (server: Legacy.Server) => { - const initializerContext = {} as PluginInitializerContext; - const core = { http: { server } } as CoreSetup & CustomCoreSetup; - - plugin(initializerContext).setup(core); - }, }); // eslint-disable-next-line import/no-default-export diff --git a/src/legacy/core_plugins/timelion/public/directives/timelion_expression_input.js b/src/legacy/core_plugins/timelion/public/directives/timelion_expression_input.js index 1fec243a277f85..57262fda55e48a 100644 --- a/src/legacy/core_plugins/timelion/public/directives/timelion_expression_input.js +++ b/src/legacy/core_plugins/timelion/public/directives/timelion_expression_input.js @@ -43,7 +43,7 @@ import _ from 'lodash'; import $ from 'jquery'; import PEG from 'pegjs'; -import grammar from 'raw-loader!../../../vis_type_timelion/public/chain.peg'; +import grammar from 'raw-loader!../../../../../plugins/timelion/common/chain.peg'; import timelionExpressionInputTemplate from './timelion_expression_input.html'; import { SUGGESTION_TYPE, diff --git a/src/legacy/core_plugins/timelion/public/lib/_tests_/calculate_interval.js b/src/legacy/core_plugins/timelion/public/lib/_tests_/calculate_interval.js deleted file mode 100644 index 77472dc89cd734..00000000000000 --- a/src/legacy/core_plugins/timelion/public/lib/_tests_/calculate_interval.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -const filename = require('path').basename(__filename); -const fn = require(`../calculate_interval`); -const moment = require('moment'); -const expect = require('chai').expect; - -const from = (count, unit) => - moment() - .subtract(count, unit) - .valueOf(); -const to = moment().valueOf(); -const size = 200; -const min = '1ms'; - -describe(filename, () => { - it('Exports a function', () => { - expect(fn).to.be.a('function'); - }); - - it('Only calculates when interval = auto', () => { - const partialFn = interval => fn(from(1, 'y'), to, size, interval, min); - expect(partialFn('1ms')).to.equal('1ms'); - expect(partialFn('bag_of_beans')).to.equal('bag_of_beans'); - expect(partialFn('auto')).to.not.equal('auto'); - }); - - it('Calculates nice round intervals', () => { - const partialFn = (count, unit) => fn(from(count, unit), to, size, 'auto', min); - expect(partialFn(15, 'm')).to.equal('1s'); - expect(partialFn(1, 'h')).to.equal('30s'); - expect(partialFn(3, 'd')).to.equal('30m'); - expect(partialFn(1, 'w')).to.equal('1h'); - expect(partialFn(1, 'y')).to.equal('24h'); - expect(partialFn(100, 'y')).to.equal('1y'); - }); - - it('Does not calculate an interval lower than the minimum', () => { - const partialFn = (count, unit) => fn(from(count, unit), to, size, 'auto', '1m'); - expect(partialFn(5, 's')).to.equal('1m'); - expect(partialFn(15, 'm')).to.equal('1m'); - expect(partialFn(1, 'h')).to.equal('1m'); - expect(partialFn(3, 'd')).to.equal('30m'); - expect(partialFn(1, 'w')).to.equal('1h'); - expect(partialFn(1, 'y')).to.equal('24h'); - expect(partialFn(100, 'y')).to.equal('1y'); - }); -}); diff --git a/src/legacy/core_plugins/timelion/public/panels/timechart/schema.ts b/src/legacy/core_plugins/timelion/public/panels/timechart/schema.ts index 57ee99f5268b08..cd40cbfa89ffed 100644 --- a/src/legacy/core_plugins/timelion/public/panels/timechart/schema.ts +++ b/src/legacy/core_plugins/timelion/public/panels/timechart/schema.ts @@ -24,7 +24,11 @@ import moment from 'moment-timezone'; import { timefilter } from 'ui/timefilter'; // @ts-ignore import observeResize from '../../lib/observe_resize'; -import { calculateInterval, DEFAULT_TIME_FORMAT } from '../../../../vis_type_timelion/common/lib'; +import { + calculateInterval, + DEFAULT_TIME_FORMAT, + // @ts-ignore +} from '../../../../../../plugins/timelion/common/lib'; import { tickFormatters } from '../../../../vis_type_timelion/public/helpers/tick_formatters'; import { TimelionVisualizationDependencies } from '../../plugin'; import { xaxisFormatterProvider } from '../../../../vis_type_timelion/public/helpers/xaxis_formatter'; diff --git a/src/legacy/core_plugins/timelion/server/plugin.ts b/src/legacy/core_plugins/timelion/server/plugin.ts deleted file mode 100644 index c94277ebc7adcf..00000000000000 --- a/src/legacy/core_plugins/timelion/server/plugin.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import { Legacy } from 'kibana'; -import { i18n } from '@kbn/i18n'; -import { PluginInitializerContext, CoreSetup } from 'kibana/server'; - -import loadFunctions, { LoadFunctions } from './lib/load_functions'; -import { initRoutes } from './routes'; - -function getFunction(functions: LoadFunctions, name: string) { - if (functions[name]) { - return functions[name]; - } - - throw new Error( - i18n.translate('timelion.noFunctionErrorMessage', { - defaultMessage: 'No such function: {name}', - values: { name }, - }) - ); -} - -// TODO: Remove as CoreSetup is completed. -export interface CustomCoreSetup { - http: { - server: Legacy.Server; - }; -} - -export class TimelionServerPlugin { - public initializerContext: PluginInitializerContext; - - constructor(initializerContext: PluginInitializerContext) { - this.initializerContext = initializerContext; - } - - public setup(core: CoreSetup & CustomCoreSetup) { - const { server } = core.http; - const functions = loadFunctions('series_functions'); - - server.expose('functions', functions); - server.expose('getFunction', (name: string) => getFunction(functions, name)); - - initRoutes(server); - } -} diff --git a/src/legacy/core_plugins/timelion/server/routes/index.ts b/src/legacy/core_plugins/timelion/server/routes/index.ts deleted file mode 100644 index b6438c81ef002c..00000000000000 --- a/src/legacy/core_plugins/timelion/server/routes/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import { Legacy } from 'kibana'; - -// @ts-ignore -import { runRoute } from './run'; -// @ts-ignore -import { functionsRoute } from './functions'; -// @ts-ignore -import { validateEsRoute } from './validate_es'; - -export function initRoutes(server: Legacy.Server) { - runRoute(server); - functionsRoute(server); - validateEsRoute(server); -} diff --git a/src/legacy/core_plugins/timelion/server/routes/run.ts b/src/legacy/core_plugins/timelion/server/routes/run.ts deleted file mode 100644 index 17f87825cd8b04..00000000000000 --- a/src/legacy/core_plugins/timelion/server/routes/run.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import Joi from 'joi'; -import Bluebird from 'bluebird'; -import _ from 'lodash'; -import { Legacy } from 'kibana'; -// @ts-ignore -import chainRunnerFn from '../handlers/chain_runner.js'; -// @ts-ignore -import getNamespacesSettings from '../lib/get_namespaced_settings'; -// @ts-ignore -import getTlConfig from '../handlers/lib/tl_config'; - -const timelionDefaults = getNamespacesSettings(); - -export interface TimelionRequestQuery { - payload: { - sheet: string[]; - extended?: { - es: { - filter: { - bool: { - filter: string[] | object; - must: string[]; - should: string[]; - must_not: string[]; - }; - }; - }; - }; - }; - time?: { - from?: string; - interval: string; - timezone: string; - to?: string; - }; -} - -function formatErrorResponse(e: Error, h: Legacy.ResponseToolkit) { - return h - .response({ - title: e.toString(), - message: e.toString(), - }) - .code(500); -} - -const requestPayload = { - payload: Joi.object({ - sheet: Joi.array() - .items(Joi.string()) - .required(), - extended: Joi.object({ - es: Joi.object({ - filter: Joi.object({ - bool: Joi.object({ - filter: Joi.array().allow(null), - must: Joi.array().allow(null), - should: Joi.array().allow(null), - must_not: Joi.array().allow(null), - }), - }), - }), - }).optional(), - time: Joi.object({ - from: Joi.string(), - interval: Joi.string().required(), - timezone: Joi.string().required(), - to: Joi.string(), - }).required(), - }), -}; - -export function runRoute(server: Legacy.Server) { - server.route({ - method: 'POST', - path: '/api/timelion/run', - options: { - validate: requestPayload, - }, - handler: async (request: Legacy.Request & TimelionRequestQuery, h: Legacy.ResponseToolkit) => { - try { - const uiSettings = await request.getUiSettingsService().getAll(); - - const tlConfig = getTlConfig({ - server, - request, - settings: _.defaults(uiSettings, timelionDefaults), // Just in case they delete some setting. - }); - const chainRunner = chainRunnerFn(tlConfig); - const sheet = await Bluebird.all(chainRunner.processRequest(request.payload)); - - return { - sheet, - stats: chainRunner.getStats(), - }; - } catch (err) { - server.log(['timelion', 'error'], `${err.toString()}: ${err.stack}`); - // TODO Maybe we should just replace everywhere we throw with Boom? Probably. - if (err.isBoom) { - return err; - } else { - return formatErrorResponse(err, h); - } - } - }, - }); -} diff --git a/src/legacy/core_plugins/vis_type_timelion/public/components/panel.tsx b/src/legacy/core_plugins/vis_type_timelion/public/components/panel.tsx index 6095ba28443b8d..3b42fa7dfcbb88 100644 --- a/src/legacy/core_plugins/vis_type_timelion/public/components/panel.tsx +++ b/src/legacy/core_plugins/vis_type_timelion/public/components/panel.tsx @@ -24,7 +24,7 @@ import { debounce, compact, get, each, cloneDeep, last, map } from 'lodash'; import { useKibana } from '../../../../../plugins/kibana_react/public'; import '../flot'; -import { DEFAULT_TIME_FORMAT } from '../../common/lib'; +import { DEFAULT_TIME_FORMAT } from '../../../../../plugins/timelion/common/lib'; import { buildSeriesData, diff --git a/src/legacy/core_plugins/vis_type_timelion/public/components/timelion_expression_input.tsx b/src/legacy/core_plugins/vis_type_timelion/public/components/timelion_expression_input.tsx index fa79e4eb6871a9..620bc26d9184d1 100644 --- a/src/legacy/core_plugins/vis_type_timelion/public/components/timelion_expression_input.tsx +++ b/src/legacy/core_plugins/vis_type_timelion/public/components/timelion_expression_input.tsx @@ -24,8 +24,11 @@ import * as monacoEditor from 'monaco-editor/esm/vs/editor/editor.api'; import { CodeEditor, useKibana } from '../../../../../plugins/kibana_react/public'; import { suggest, getSuggestion } from './timelion_expression_input_helpers'; -import { ITimelionFunction, TimelionFunctionArgs } from '../../common/types'; import { getArgValueSuggestions } from '../helpers/arg_value_suggestions'; +import { + ITimelionFunction, + TimelionFunctionArgs, +} from '../../../../../plugins/timelion/common/types'; const LANGUAGE_ID = 'timelion_expression'; monacoEditor.languages.register({ id: LANGUAGE_ID }); diff --git a/src/legacy/core_plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts b/src/legacy/core_plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts index 18a0c0872dc031..cf40d2f791fc28 100644 --- a/src/legacy/core_plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts +++ b/src/legacy/core_plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.test.ts @@ -22,7 +22,7 @@ import { getArgValueSuggestions } from '../helpers/arg_value_suggestions'; import { setIndexPatterns, setSavedObjectsClient } from '../helpers/plugin_services'; import { IndexPatterns } from 'src/plugins/data/public'; import { SavedObjectsClient } from 'kibana/public'; -import { ITimelionFunction } from '../../common/types'; +import { ITimelionFunction } from '../../../../../plugins/timelion/common/types'; describe('Timelion expression suggestions', () => { setIndexPatterns({} as IndexPatterns); diff --git a/src/legacy/core_plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.ts b/src/legacy/core_plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.ts index d7818680c9543e..93b6a0d463c01b 100644 --- a/src/legacy/core_plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.ts +++ b/src/legacy/core_plugins/vis_type_timelion/public/components/timelion_expression_input_helpers.ts @@ -18,16 +18,19 @@ */ import { get, startsWith } from 'lodash'; +import { i18n } from '@kbn/i18n'; import * as monacoEditor from 'monaco-editor/esm/vs/editor/editor.api'; -import { i18n } from '@kbn/i18n'; import { Parser } from 'pegjs'; // @ts-ignore import { parse } from '../_generated_/chain'; -import { ITimelionFunction, TimelionFunctionArgs } from '../../common/types'; import { ArgValueSuggestions, FunctionArg, Location } from '../helpers/arg_value_suggestions'; +import { + ITimelionFunction, + TimelionFunctionArgs, +} from '../../../../../plugins/timelion/common/types'; export enum SUGGESTION_TYPE { ARGUMENTS = 'arguments', diff --git a/src/legacy/core_plugins/vis_type_timelion/public/helpers/arg_value_suggestions.ts b/src/legacy/core_plugins/vis_type_timelion/public/helpers/arg_value_suggestions.ts index 8d133de51f6d9a..e293a662a4ed7f 100644 --- a/src/legacy/core_plugins/vis_type_timelion/public/helpers/arg_value_suggestions.ts +++ b/src/legacy/core_plugins/vis_type_timelion/public/helpers/arg_value_suggestions.ts @@ -18,8 +18,8 @@ */ import { get } from 'lodash'; -import { TimelionFunctionArgs } from '../../common/types'; import { getIndexPatterns, getSavedObjectsClient } from './plugin_services'; +import { TimelionFunctionArgs } from '../../../../../plugins/timelion/common/types'; export interface Location { min: number; diff --git a/src/legacy/core_plugins/vis_type_timelion/public/helpers/panel_utils.ts b/src/legacy/core_plugins/vis_type_timelion/public/helpers/panel_utils.ts index db29d9112be8e8..f932e5ee4b2f46 100644 --- a/src/legacy/core_plugins/vis_type_timelion/public/helpers/panel_utils.ts +++ b/src/legacy/core_plugins/vis_type_timelion/public/helpers/panel_utils.ts @@ -23,7 +23,7 @@ import moment, { Moment } from 'moment-timezone'; import { TimefilterContract } from 'src/plugins/data/public'; import { IUiSettingsClient } from 'kibana/public'; -import { calculateInterval } from '../../common/lib'; +import { calculateInterval } from '../../../../../plugins/timelion/common/lib'; import { xaxisFormatterProvider } from './xaxis_formatter'; import { Series } from './timelion_request_handler'; diff --git a/src/legacy/core_plugins/vis_type_timelion/public/chain.peg b/src/plugins/timelion/common/chain.peg similarity index 100% rename from src/legacy/core_plugins/vis_type_timelion/public/chain.peg rename to src/plugins/timelion/common/chain.peg diff --git a/src/plugins/timelion/common/lib/calculate_interval.test.ts b/src/plugins/timelion/common/lib/calculate_interval.test.ts new file mode 100644 index 00000000000000..17e8a019110714 --- /dev/null +++ b/src/plugins/timelion/common/lib/calculate_interval.test.ts @@ -0,0 +1,66 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { calculateInterval as fn } from './calculate_interval'; + +import moment, { unitOfTime } from 'moment'; + +const from = (count: number, unit: unitOfTime.DurationConstructor) => + moment() + .subtract(count, unit) + .valueOf(); +const to = moment().valueOf(); +const size = 200; +const min = '1ms'; + +describe('calculate_interval', () => { + it('Exports a function', () => { + expect(typeof fn).toBe('function'); + }); + + it('Only calculates when interval = auto', () => { + const partialFn = (interval: string) => fn(from(1, 'y'), to, size, interval, min); + expect(partialFn('1ms')).toEqual('1ms'); + expect(partialFn('bag_of_beans')).toEqual('bag_of_beans'); + expect(partialFn('auto')).not.toEqual('auto'); + }); + + it('Calculates nice round intervals', () => { + const partialFn = (count: number, unit: unitOfTime.DurationConstructor) => + fn(from(count, unit), to, size, 'auto', min); + expect(partialFn(15, 'm')).toEqual('1s'); + expect(partialFn(1, 'h')).toEqual('30s'); + expect(partialFn(3, 'd')).toEqual('30m'); + expect(partialFn(1, 'w')).toEqual('1h'); + expect(partialFn(1, 'y')).toEqual('24h'); + expect(partialFn(100, 'y')).toEqual('1y'); + }); + + it('Does not calculate an interval lower than the minimum', () => { + const partialFn = (count: number, unit: unitOfTime.DurationConstructor) => + fn(from(count, unit), to, size, 'auto', '1m'); + expect(partialFn(5, 's')).toEqual('1m'); + expect(partialFn(15, 'm')).toEqual('1m'); + expect(partialFn(1, 'h')).toEqual('1m'); + expect(partialFn(3, 'd')).toEqual('30m'); + expect(partialFn(1, 'w')).toEqual('1h'); + expect(partialFn(1, 'y')).toEqual('24h'); + expect(partialFn(100, 'y')).toEqual('1y'); + }); +}); diff --git a/src/legacy/core_plugins/vis_type_timelion/common/lib/calculate_interval.ts b/src/plugins/timelion/common/lib/calculate_interval.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_timelion/common/lib/calculate_interval.ts rename to src/plugins/timelion/common/lib/calculate_interval.ts index 328c634ea51537..f724f4723a9290 100644 --- a/src/legacy/core_plugins/vis_type_timelion/common/lib/calculate_interval.ts +++ b/src/plugins/timelion/common/lib/calculate_interval.ts @@ -17,10 +17,10 @@ * under the License. */ -import { toMS } from './to_milliseconds'; - // Totally cribbed this from Kibana 3. // I bet there's something similar in the Kibana 4 code. Somewhere. Somehow. +import { toMS } from './to_milliseconds'; + function roundInterval(interval: number) { switch (true) { case interval <= 500: // <= 0.5s diff --git a/src/legacy/core_plugins/vis_type_timelion/common/lib/index.ts b/src/plugins/timelion/common/lib/index.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_timelion/common/lib/index.ts rename to src/plugins/timelion/common/lib/index.ts diff --git a/src/legacy/core_plugins/vis_type_timelion/common/lib/to_milliseconds.ts b/src/plugins/timelion/common/lib/to_milliseconds.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_timelion/common/lib/to_milliseconds.ts rename to src/plugins/timelion/common/lib/to_milliseconds.ts diff --git a/src/legacy/core_plugins/vis_type_timelion/common/types.ts b/src/plugins/timelion/common/types.ts similarity index 100% rename from src/legacy/core_plugins/vis_type_timelion/common/types.ts rename to src/plugins/timelion/common/types.ts diff --git a/src/plugins/timelion/server/config.ts b/src/plugins/timelion/server/config.ts index a47d39beb7555b..e76c878c0c6b1f 100644 --- a/src/plugins/timelion/server/config.ts +++ b/src/plugins/timelion/server/config.ts @@ -22,6 +22,7 @@ import { schema } from '@kbn/config-schema'; export const ConfigSchema = schema.object( { ui: schema.object({ enabled: schema.boolean({ defaultValue: false }) }), + graphiteUrls: schema.maybe(schema.arrayOf(schema.string())), }, // This option should be removed as soon as we entirely migrate config from legacy Timelion plugin. { allowUnknowns: true } diff --git a/src/legacy/core_plugins/timelion/server/fit_functions/average.js b/src/plugins/timelion/server/fit_functions/average.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/fit_functions/average.js rename to src/plugins/timelion/server/fit_functions/average.js diff --git a/src/legacy/core_plugins/timelion/server/fit_functions/__tests__/average.js b/src/plugins/timelion/server/fit_functions/average.test.js similarity index 99% rename from src/legacy/core_plugins/timelion/server/fit_functions/__tests__/average.js rename to src/plugins/timelion/server/fit_functions/average.test.js index d30244610a1248..2f61a29bc25b23 100644 --- a/src/legacy/core_plugins/timelion/server/fit_functions/__tests__/average.js +++ b/src/plugins/timelion/server/fit_functions/average.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../average`); +import fn from './average'; import moment from 'moment'; const expect = require('chai').expect; import _ from 'lodash'; diff --git a/src/legacy/core_plugins/timelion/server/fit_functions/carry.js b/src/plugins/timelion/server/fit_functions/carry.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/fit_functions/carry.js rename to src/plugins/timelion/server/fit_functions/carry.js diff --git a/src/legacy/core_plugins/timelion/server/fit_functions/__tests__/carry.js b/src/plugins/timelion/server/fit_functions/carry.test.js similarity index 98% rename from src/legacy/core_plugins/timelion/server/fit_functions/__tests__/carry.js rename to src/plugins/timelion/server/fit_functions/carry.test.js index 8e35d63618ae4b..22608e0bf49888 100644 --- a/src/legacy/core_plugins/timelion/server/fit_functions/__tests__/carry.js +++ b/src/plugins/timelion/server/fit_functions/carry.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../carry`); +import fn from './carry'; import moment from 'moment'; const expect = require('chai').expect; import _ from 'lodash'; diff --git a/src/legacy/core_plugins/timelion/server/fit_functions/nearest.js b/src/plugins/timelion/server/fit_functions/nearest.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/fit_functions/nearest.js rename to src/plugins/timelion/server/fit_functions/nearest.js diff --git a/src/legacy/core_plugins/timelion/server/fit_functions/none.js b/src/plugins/timelion/server/fit_functions/none.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/fit_functions/none.js rename to src/plugins/timelion/server/fit_functions/none.js diff --git a/src/legacy/core_plugins/timelion/server/fit_functions/scale.js b/src/plugins/timelion/server/fit_functions/scale.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/fit_functions/scale.js rename to src/plugins/timelion/server/fit_functions/scale.js diff --git a/src/legacy/core_plugins/timelion/server/handlers/chain_runner.js b/src/plugins/timelion/server/handlers/chain_runner.js similarity index 95% rename from src/legacy/core_plugins/timelion/server/handlers/chain_runner.js rename to src/plugins/timelion/server/handlers/chain_runner.js index 9056362cb723a2..9a87909b0a857e 100644 --- a/src/legacy/core_plugins/timelion/server/handlers/chain_runner.js +++ b/src/plugins/timelion/server/handlers/chain_runner.js @@ -26,7 +26,7 @@ import parseSheet from './lib/parse_sheet.js'; import repositionArguments from './lib/reposition_arguments.js'; import indexArguments from './lib/index_arguments.js'; import validateTime from './lib/validate_time.js'; -import { calculateInterval } from '../../../vis_type_timelion/common/lib'; +import { calculateInterval } from '../../common/lib'; export default function chainRunner(tlConfig) { const preprocessChain = require('./lib/preprocess_chain')(tlConfig); @@ -41,7 +41,7 @@ export default function chainRunner(tlConfig) { // Invokes a modifier function, resolving arguments into series as needed function invoke(fnName, args) { - const functionDef = tlConfig.server.plugins.timelion.getFunction(fnName); + const functionDef = tlConfig.getFunction(fnName); function resolveArgument(item) { if (Array.isArray(item)) { @@ -51,7 +51,7 @@ export default function chainRunner(tlConfig) { if (_.isObject(item)) { switch (item.type) { case 'function': { - const itemFunctionDef = tlConfig.server.plugins.timelion.getFunction(item.function); + const itemFunctionDef = tlConfig.getFunction(item.function); if (itemFunctionDef.cacheKey && queryCache[itemFunctionDef.cacheKey(item)]) { stats.queryCount++; return Bluebird.resolve(_.cloneDeep(queryCache[itemFunctionDef.cacheKey(item)])); @@ -168,7 +168,7 @@ export default function chainRunner(tlConfig) { stats.queryTime = new Date().getTime(); _.each(queries, function(query, i) { - const functionDef = tlConfig.server.plugins.timelion.getFunction(query.function); + const functionDef = tlConfig.getFunction(query.function); const resolvedDatasource = resolvedDatasources[i]; if (resolvedDatasource.isRejected()) { diff --git a/src/legacy/core_plugins/timelion/server/handlers/lib/arg_type.js b/src/plugins/timelion/server/handlers/lib/arg_type.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/handlers/lib/arg_type.js rename to src/plugins/timelion/server/handlers/lib/arg_type.js diff --git a/src/legacy/core_plugins/timelion/server/handlers/lib/index_arguments.js b/src/plugins/timelion/server/handlers/lib/index_arguments.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/handlers/lib/index_arguments.js rename to src/plugins/timelion/server/handlers/lib/index_arguments.js diff --git a/src/legacy/core_plugins/timelion/server/handlers/lib/parse_sheet.js b/src/plugins/timelion/server/handlers/lib/parse_sheet.js similarity index 93% rename from src/legacy/core_plugins/timelion/server/handlers/lib/parse_sheet.js rename to src/plugins/timelion/server/handlers/lib/parse_sheet.js index 4957d3cb78b85e..4880c73f42bb2e 100644 --- a/src/legacy/core_plugins/timelion/server/handlers/lib/parse_sheet.js +++ b/src/plugins/timelion/server/handlers/lib/parse_sheet.js @@ -21,10 +21,7 @@ import { i18n } from '@kbn/i18n'; import fs from 'fs'; import path from 'path'; import _ from 'lodash'; -const grammar = fs.readFileSync( - path.resolve(__dirname, '../../../../vis_type_timelion/public/chain.peg'), - 'utf8' -); +const grammar = fs.readFileSync(path.resolve(__dirname, '../../../common/chain.peg'), 'utf8'); import PEG from 'pegjs'; const Parser = PEG.generate(grammar); diff --git a/src/legacy/core_plugins/timelion/server/handlers/__tests__/parse_sheet.js b/src/plugins/timelion/server/handlers/lib/parse_sheet.test.js similarity index 97% rename from src/legacy/core_plugins/timelion/server/handlers/__tests__/parse_sheet.js rename to src/plugins/timelion/server/handlers/lib/parse_sheet.test.js index 4ec2a88d3e68b0..16d5f8b4a02bb9 100644 --- a/src/legacy/core_plugins/timelion/server/handlers/__tests__/parse_sheet.js +++ b/src/plugins/timelion/server/handlers/lib/parse_sheet.test.js @@ -17,7 +17,7 @@ * under the License. */ -const parseSheet = require('../lib/parse_sheet'); +const parseSheet = require('./parse_sheet'); const expect = require('chai').expect; diff --git a/src/legacy/core_plugins/timelion/server/handlers/lib/preprocess_chain.js b/src/plugins/timelion/server/handlers/lib/preprocess_chain.js similarity index 95% rename from src/legacy/core_plugins/timelion/server/handlers/lib/preprocess_chain.js rename to src/plugins/timelion/server/handlers/lib/preprocess_chain.js index 5e5f274115ee21..6a667e36054ce3 100644 --- a/src/legacy/core_plugins/timelion/server/handlers/lib/preprocess_chain.js +++ b/src/plugins/timelion/server/handlers/lib/preprocess_chain.js @@ -24,7 +24,7 @@ export default function preProcessChainFn(tlConfig) { queries = queries || {}; function validateAndStore(item) { if (_.isObject(item) && item.type === 'function') { - const functionDef = tlConfig.server.plugins.timelion.getFunction(item.function); + const functionDef = tlConfig.getFunction(item.function); if (functionDef.datasource) { queries[functionDef.cacheKey(item)] = item; diff --git a/src/legacy/core_plugins/timelion/server/handlers/lib/reposition_arguments.js b/src/plugins/timelion/server/handlers/lib/reposition_arguments.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/handlers/lib/reposition_arguments.js rename to src/plugins/timelion/server/handlers/lib/reposition_arguments.js diff --git a/src/legacy/core_plugins/timelion/server/handlers/lib/tl_config.js b/src/plugins/timelion/server/handlers/lib/tl_config.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/handlers/lib/tl_config.js rename to src/plugins/timelion/server/handlers/lib/tl_config.js diff --git a/src/legacy/core_plugins/timelion/server/handlers/lib/validate_arg.js b/src/plugins/timelion/server/handlers/lib/validate_arg.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/handlers/lib/validate_arg.js rename to src/plugins/timelion/server/handlers/lib/validate_arg.js diff --git a/src/legacy/core_plugins/timelion/server/handlers/lib/validate_time.js b/src/plugins/timelion/server/handlers/lib/validate_time.js similarity index 96% rename from src/legacy/core_plugins/timelion/server/handlers/lib/validate_time.js rename to src/plugins/timelion/server/handlers/lib/validate_time.js index db924e33be5e9b..07157a9a8c6d9c 100644 --- a/src/legacy/core_plugins/timelion/server/handlers/lib/validate_time.js +++ b/src/plugins/timelion/server/handlers/lib/validate_time.js @@ -20,7 +20,7 @@ import { i18n } from '@kbn/i18n'; import moment from 'moment'; -import { toMS } from '../../../../vis_type_timelion/common/lib'; +import { toMS } from '../../../common/lib/to_milliseconds'; export default function validateTime(time, tlConfig) { const span = moment.duration(moment(time.to).diff(moment(time.from))).asMilliseconds(); diff --git a/src/legacy/core_plugins/timelion/server/lib/alter.js b/src/plugins/timelion/server/lib/alter.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/alter.js rename to src/plugins/timelion/server/lib/alter.js diff --git a/src/legacy/core_plugins/timelion/server/lib/asSorted.js b/src/plugins/timelion/server/lib/as_sorted.js similarity index 95% rename from src/legacy/core_plugins/timelion/server/lib/asSorted.js rename to src/plugins/timelion/server/lib/as_sorted.js index ff20af78b43623..536145a6b8dcda 100644 --- a/src/legacy/core_plugins/timelion/server/lib/asSorted.js +++ b/src/plugins/timelion/server/lib/as_sorted.js @@ -18,7 +18,7 @@ */ import _ from 'lodash'; -import unzipPairs from './unzipPairs.js'; +import unzipPairs from './unzip_pairs.js'; export default function asSorted(timeValObject, fn) { const data = unzipPairs(timeValObject); diff --git a/src/legacy/core_plugins/timelion/server/lib/build_target.js b/src/plugins/timelion/server/lib/build_target.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/build_target.js rename to src/plugins/timelion/server/lib/build_target.js diff --git a/src/legacy/core_plugins/timelion/server/lib/classes/chainable.js b/src/plugins/timelion/server/lib/classes/chainable.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/classes/chainable.js rename to src/plugins/timelion/server/lib/classes/chainable.js diff --git a/src/legacy/core_plugins/timelion/server/lib/classes/datasource.js b/src/plugins/timelion/server/lib/classes/datasource.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/classes/datasource.js rename to src/plugins/timelion/server/lib/classes/datasource.js diff --git a/src/legacy/core_plugins/timelion/server/lib/classes/timelion_function.d.ts b/src/plugins/timelion/server/lib/classes/timelion_function.d.ts similarity index 93% rename from src/legacy/core_plugins/timelion/server/lib/classes/timelion_function.d.ts rename to src/plugins/timelion/server/lib/classes/timelion_function.d.ts index 08358b9d81f781..798902aa133dee 100644 --- a/src/legacy/core_plugins/timelion/server/lib/classes/timelion_function.d.ts +++ b/src/plugins/timelion/server/lib/classes/timelion_function.d.ts @@ -17,7 +17,7 @@ * under the License. */ -import { TimelionFunctionArgs } from '../../../../vis_type_timelion/common/types'; +import { TimelionFunctionArgs } from '../../../common/types'; export interface TimelionFunctionInterface extends TimelionFunctionConfig { chainable: boolean; diff --git a/src/legacy/core_plugins/timelion/server/lib/classes/timelion_function.js b/src/plugins/timelion/server/lib/classes/timelion_function.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/classes/timelion_function.js rename to src/plugins/timelion/server/lib/classes/timelion_function.js diff --git a/src/legacy/core_plugins/timelion/server/index.ts b/src/plugins/timelion/server/lib/config_manager.ts similarity index 56% rename from src/legacy/core_plugins/timelion/server/index.ts rename to src/plugins/timelion/server/lib/config_manager.ts index 36af9ce7b85dff..60d89f34a4c085 100644 --- a/src/legacy/core_plugins/timelion/server/index.ts +++ b/src/plugins/timelion/server/lib/config_manager.ts @@ -18,8 +18,28 @@ */ import { PluginInitializerContext } from 'kibana/server'; -import { TimelionServerPlugin as Plugin } from './plugin'; +import { TypeOf } from '@kbn/config-schema'; +import { ConfigSchema } from '../config'; -export function plugin(initializerContext: PluginInitializerContext) { - return new Plugin(initializerContext); +export class ConfigManager { + private esShardTimeout: number = 0; + private graphiteUrls: string[] = []; + + constructor(config: PluginInitializerContext['config']) { + config.create>().subscribe(configUpdate => { + this.graphiteUrls = configUpdate.graphiteUrls || []; + }); + + config.legacy.globalConfig$.subscribe(configUpdate => { + this.esShardTimeout = configUpdate.elasticsearch.shardTimeout.asMilliseconds(); + }); + } + + getEsShardTimeout() { + return this.esShardTimeout; + } + + getGraphiteUrls() { + return this.graphiteUrls; + } } diff --git a/src/legacy/core_plugins/timelion/server/lib/functions_md.js b/src/plugins/timelion/server/lib/functions_md.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/functions_md.js rename to src/plugins/timelion/server/lib/functions_md.js diff --git a/src/legacy/core_plugins/timelion/server/lib/get_namespaced_settings.js b/src/plugins/timelion/server/lib/get_namespaced_settings.js similarity index 97% rename from src/legacy/core_plugins/timelion/server/lib/get_namespaced_settings.js rename to src/plugins/timelion/server/lib/get_namespaced_settings.js index 5d18d87e8e054b..31bd6b440f9b86 100644 --- a/src/legacy/core_plugins/timelion/server/lib/get_namespaced_settings.js +++ b/src/plugins/timelion/server/lib/get_namespaced_settings.js @@ -18,7 +18,7 @@ */ import _ from 'lodash'; -import configFile from '../../timelion.json'; +import configFile from '../timelion.json'; export default function() { function flattenWith(dot, nestedObj, flattenArrays) { diff --git a/src/legacy/core_plugins/timelion/server/lib/load_functions.d.ts b/src/plugins/timelion/server/lib/load_functions.d.ts similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/load_functions.d.ts rename to src/plugins/timelion/server/lib/load_functions.d.ts diff --git a/src/legacy/core_plugins/timelion/server/lib/load_functions.js b/src/plugins/timelion/server/lib/load_functions.js similarity index 84% rename from src/legacy/core_plugins/timelion/server/lib/load_functions.js rename to src/plugins/timelion/server/lib/load_functions.js index 11501ce3f102b8..b7cec8f68faf22 100644 --- a/src/legacy/core_plugins/timelion/server/lib/load_functions.js +++ b/src/plugins/timelion/server/lib/load_functions.js @@ -28,18 +28,18 @@ export default function(directory) { } // Get a list of all files and use the filename as the object key - const files = _.map(glob.sync(path.resolve(__dirname, '../' + directory + '/*.js')), function( - file - ) { - const name = file.substring(file.lastIndexOf('/') + 1, file.lastIndexOf('.')); - return getTuple(directory, name); - }); + const files = _.map( + glob + .sync(path.resolve(__dirname, '../' + directory + '/*.js')) + .filter(filename => !filename.includes('.test')), + function(file) { + const name = file.substring(file.lastIndexOf('/') + 1, file.lastIndexOf('.')); + return getTuple(directory, name); + } + ); // Get a list of all directories with an index.js, use the directory name as the key in the object const directories = _.chain(glob.sync(path.resolve(__dirname, '../' + directory + '/*/index.js'))) - .filter(function(file) { - return file.match(/__test__/) == null; - }) .map(function(file) { const parts = file.split('/'); const name = parts[parts.length - 2]; diff --git a/src/legacy/core_plugins/timelion/server/lib/__tests__/load_functions.js b/src/plugins/timelion/server/lib/load_functions.test.js similarity index 95% rename from src/legacy/core_plugins/timelion/server/lib/__tests__/load_functions.js rename to src/plugins/timelion/server/lib/load_functions.test.js index 45dd436be6943a..ebe1a04532e050 100644 --- a/src/legacy/core_plugins/timelion/server/lib/__tests__/load_functions.js +++ b/src/plugins/timelion/server/lib/load_functions.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../load_functions`); +const fn = require(`src/plugins/timelion/server/lib/load_functions`); const expect = require('chai').expect; diff --git a/src/legacy/core_plugins/timelion/server/lib/offset_time.js b/src/plugins/timelion/server/lib/offset_time.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/offset_time.js rename to src/plugins/timelion/server/lib/offset_time.js diff --git a/src/legacy/core_plugins/timelion/server/lib/offset_time.test.js b/src/plugins/timelion/server/lib/offset_time.test.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/offset_time.test.js rename to src/plugins/timelion/server/lib/offset_time.test.js diff --git a/src/legacy/core_plugins/timelion/server/lib/process_function_definition.js b/src/plugins/timelion/server/lib/process_function_definition.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/process_function_definition.js rename to src/plugins/timelion/server/lib/process_function_definition.js diff --git a/src/legacy/core_plugins/timelion/server/lib/reduce.js b/src/plugins/timelion/server/lib/reduce.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/reduce.js rename to src/plugins/timelion/server/lib/reduce.js diff --git a/src/legacy/core_plugins/timelion/server/lib/split_interval.js b/src/plugins/timelion/server/lib/split_interval.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/split_interval.js rename to src/plugins/timelion/server/lib/split_interval.js diff --git a/src/legacy/core_plugins/timelion/server/lib/unzipPairs.js b/src/plugins/timelion/server/lib/unzip_pairs.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/lib/unzipPairs.js rename to src/plugins/timelion/server/lib/unzip_pairs.js diff --git a/src/plugins/timelion/server/plugin.ts b/src/plugins/timelion/server/plugin.ts index 4436c1539fc5bc..4330bc0ffb357c 100644 --- a/src/plugins/timelion/server/plugin.ts +++ b/src/plugins/timelion/server/plugin.ts @@ -17,11 +17,21 @@ * under the License. */ +import { i18n } from '@kbn/i18n'; import { first } from 'rxjs/operators'; import { TypeOf } from '@kbn/config-schema'; -import { PluginInitializerContext, RecursiveReadonly } from '../../../../src/core/server'; +import { + CoreSetup, + PluginInitializerContext, + RecursiveReadonly, +} from '../../../../src/core/server'; import { deepFreeze } from '../../../../src/core/utils'; import { ConfigSchema } from './config'; +import loadFunctions from './lib/load_functions'; +import { functionsRoute } from './routes/functions'; +import { validateEsRoute } from './routes/validate_es'; +import { runRoute } from './routes/run'; +import { ConfigManager } from './lib/config_manager'; /** * Describes public Timelion plugin contract returned at the `setup` stage. @@ -36,12 +46,44 @@ export interface PluginSetupContract { export class Plugin { constructor(private readonly initializerContext: PluginInitializerContext) {} - public async setup(): Promise> { + public async setup(core: CoreSetup): Promise> { const config = await this.initializerContext.config .create>() .pipe(first()) .toPromise(); + const configManager = new ConfigManager(this.initializerContext.config); + + const functions = loadFunctions('series_functions'); + + const getFunction = (name: string) => { + if (functions[name]) { + return functions[name]; + } + + throw new Error( + i18n.translate('timelion.noFunctionErrorMessage', { + defaultMessage: 'No such function: {name}', + values: { name }, + }) + ); + }; + + const logger = this.initializerContext.logger.get('timelion'); + + const router = core.http.createRouter(); + + const deps = { + configManager, + functions, + getFunction, + logger, + }; + + functionsRoute(router, deps); + runRoute(router, deps); + validateEsRoute(router); + return deepFreeze({ uiEnabled: config.ui.enabled }); } diff --git a/src/legacy/core_plugins/timelion/server/routes/functions.js b/src/plugins/timelion/server/routes/functions.ts similarity index 68% rename from src/legacy/core_plugins/timelion/server/routes/functions.js rename to src/plugins/timelion/server/routes/functions.ts index 813d006225f43d..a908fefa377eb9 100644 --- a/src/legacy/core_plugins/timelion/server/routes/functions.js +++ b/src/plugins/timelion/server/routes/functions.ts @@ -18,18 +18,22 @@ */ import _ from 'lodash'; +import { IRouter } from 'kibana/server'; +import { LoadFunctions } from '../lib/load_functions'; -export function functionsRoute(server) { - server.route({ - method: 'GET', - path: '/api/timelion/functions', - handler: () => { - const functionArray = _.map(server.plugins.timelion.functions, function(val, key) { +export function functionsRoute(router: IRouter, { functions }: { functions: LoadFunctions }) { + router.get( + { + path: '/api/timelion/functions', + validate: false, + }, + async (context, request, response) => { + const functionArray = _.map(functions, function(val, key) { // TODO: This won't work on frozen objects, it should be removed when everything is converted to datasources and chainables return _.extend({}, val, { name: key }); }); - return _.sortBy(functionArray, 'name'); - }, - }); + return response.ok({ body: _.sortBy(functionArray, 'name') }); + } + ); } diff --git a/src/plugins/timelion/server/routes/run.ts b/src/plugins/timelion/server/routes/run.ts new file mode 100644 index 00000000000000..b7a4179da768ea --- /dev/null +++ b/src/plugins/timelion/server/routes/run.ts @@ -0,0 +1,144 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { IRouter, Logger } from 'kibana/server'; +import { schema } from '@kbn/config-schema'; +import Bluebird from 'bluebird'; +import _ from 'lodash'; +// @ts-ignore +import chainRunnerFn from '../handlers/chain_runner.js'; +// @ts-ignore +import getNamespacesSettings from '../lib/get_namespaced_settings'; +// @ts-ignore +import getTlConfig from '../handlers/lib/tl_config'; +import { TimelionFunctionInterface } from '../types'; +import { ConfigManager } from '../lib/config_manager'; + +const timelionDefaults = getNamespacesSettings(); + +export interface TimelionRequestQuery { + payload: { + sheet: string[]; + extended?: { + es: { + filter: { + bool: { + filter: string[] | object; + must: string[]; + should: string[]; + must_not: string[]; + }; + }; + }; + }; + }; + time?: { + from?: string; + interval: string; + timezone: string; + to?: string; + }; +} + +export function runRoute( + router: IRouter, + { + logger, + getFunction, + configManager, + }: { + logger: Logger; + getFunction: (name: string) => TimelionFunctionInterface; + configManager: ConfigManager; + } +) { + router.post( + { + path: '/api/timelion/run', + validate: { + body: schema.object({ + sheet: schema.arrayOf(schema.string()), + extended: schema.maybe( + schema.object({ + es: schema.object({ + filter: schema.object({ + bool: schema.object({ + filter: schema.maybe( + schema.arrayOf(schema.object({}, { allowUnknowns: true })) + ), + must: schema.maybe(schema.arrayOf(schema.object({}, { allowUnknowns: true }))), + should: schema.maybe( + schema.arrayOf(schema.object({}, { allowUnknowns: true })) + ), + must_not: schema.maybe( + schema.arrayOf(schema.object({}, { allowUnknowns: true })) + ), + }), + }), + }), + }) + ), + time: schema.maybe( + schema.object({ + from: schema.maybe(schema.string()), + interval: schema.string(), + timezone: schema.string(), + to: schema.maybe(schema.string()), + }) + ), + }), + }, + }, + router.handleLegacyErrors(async (context, request, response) => { + try { + const uiSettings = await context.core.uiSettings.client.getAll(); + + const tlConfig = getTlConfig({ + request, + settings: _.defaults(uiSettings, timelionDefaults), // Just in case they delete some setting. + getFunction, + allowedGraphiteUrls: configManager.getGraphiteUrls(), + esShardTimeout: configManager.getEsShardTimeout(), + savedObjectsClient: context.core.savedObjects.client, + esDataClient: () => context.core.elasticsearch.dataClient, + }); + const chainRunner = chainRunnerFn(tlConfig); + const sheet = await Bluebird.all(chainRunner.processRequest(request.body)); + + return response.ok({ + body: { + sheet, + stats: chainRunner.getStats(), + }, + }); + } catch (err) { + logger.error(`${err.toString()}: ${err.stack}`); + // TODO Maybe we should just replace everywhere we throw with Boom? Probably. + if (err.isBoom) { + throw err; + } else { + return response.internalError({ + body: { + message: err.toString(), + }, + }); + } + } + }) + ); +} diff --git a/src/legacy/core_plugins/timelion/server/routes/validate_es.js b/src/plugins/timelion/server/routes/validate_es.ts similarity index 65% rename from src/legacy/core_plugins/timelion/server/routes/validate_es.js rename to src/plugins/timelion/server/routes/validate_es.ts index 5e39069f2a698e..70d53b6b2c5e3c 100644 --- a/src/legacy/core_plugins/timelion/server/routes/validate_es.js +++ b/src/plugins/timelion/server/routes/validate_es.ts @@ -18,15 +18,18 @@ */ import _ from 'lodash'; +import { IRouter } from 'kibana/server'; -export function validateEsRoute(server) { - server.route({ - method: 'GET', - path: '/api/timelion/validate/es', - handler: async function(request) { - const uiSettings = await request.getUiSettingsService().getAll(); +export function validateEsRoute(router: IRouter) { + router.get( + { + path: '/api/timelion/validate/es', + validate: false, + }, + async function(context, request, response) { + const uiSettings = await context.core.uiSettings.client.getAll(); - const { callWithRequest } = server.plugins.elasticsearch.getCluster('data'); + const { callAsCurrentUser } = context.core.elasticsearch.dataClient; const timefield = uiSettings['timelion:es.timefield']; @@ -51,24 +54,28 @@ export function validateEsRoute(server) { let resp = {}; try { - resp = await callWithRequest(request, 'search', body); + resp = await callAsCurrentUser('search', body); } catch (errResp) { resp = errResp; } if (_.has(resp, 'aggregations.maxAgg.value') && _.has(resp, 'aggregations.minAgg.value')) { - return { - ok: true, - field: timefield, - min: _.get(resp, 'aggregations.minAgg.value'), - max: _.get(resp, 'aggregations.maxAgg.value'), - }; + return response.ok({ + body: { + ok: true, + field: timefield, + min: _.get(resp, 'aggregations.minAgg.value'), + max: _.get(resp, 'aggregations.maxAgg.value'), + }, + }); } - return { - ok: false, - resp: resp, - }; - }, - }); + return response.ok({ + body: { + ok: false, + resp, + }, + }); + } + ); } diff --git a/src/legacy/core_plugins/timelion/server/series_functions/abs.js b/src/plugins/timelion/server/series_functions/abs.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/abs.js rename to src/plugins/timelion/server/series_functions/abs.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/abs.js b/src/plugins/timelion/server/series_functions/abs.test.js similarity index 94% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/abs.js rename to src/plugins/timelion/server/series_functions/abs.test.js index 28538d4da2f79f..385fad7db739ca 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/abs.js +++ b/src/plugins/timelion/server/series_functions/abs.test.js @@ -17,11 +17,11 @@ * under the License. */ -const fn = require(`../abs`); +import fn from './abs'; import _ from 'lodash'; const expect = require('chai').expect; -const seriesList = require('./fixtures/seriesList.js')(); +const seriesList = require('./fixtures/series_list.js')(); import invoke from './helpers/invoke_series_fn.js'; describe('abs.js', function() { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/aggregate.js b/src/plugins/timelion/server/series_functions/aggregate/aggregate.test.js similarity index 89% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/aggregate.js rename to src/plugins/timelion/server/series_functions/aggregate/aggregate.test.js index 6177f7cb7bac4d..d2708a525b9c6c 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/aggregate.js +++ b/src/plugins/timelion/server/series_functions/aggregate/aggregate.test.js @@ -17,17 +17,16 @@ * under the License. */ -const filename = require('path').basename(__filename); -const fn = require(`../aggregate/index.js`); +import fn from './index'; import _ from 'lodash'; const expect = require('chai').expect; -import invoke from './helpers/invoke_series_fn.js'; +import invoke from '../helpers/invoke_series_fn.js'; -describe(filename, () => { +describe('aggregate', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('../fixtures/series_list.js')(); }); it('first', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/aggregate/avg.js b/src/plugins/timelion/server/series_functions/aggregate/avg.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/aggregate/avg.js rename to src/plugins/timelion/server/series_functions/aggregate/avg.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/aggregate/cardinality.js b/src/plugins/timelion/server/series_functions/aggregate/cardinality.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/aggregate/cardinality.js rename to src/plugins/timelion/server/series_functions/aggregate/cardinality.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/aggregate/first.js b/src/plugins/timelion/server/series_functions/aggregate/first.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/aggregate/first.js rename to src/plugins/timelion/server/series_functions/aggregate/first.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/aggregate/index.js b/src/plugins/timelion/server/series_functions/aggregate/index.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/aggregate/index.js rename to src/plugins/timelion/server/series_functions/aggregate/index.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/aggregate/last.js b/src/plugins/timelion/server/series_functions/aggregate/last.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/aggregate/last.js rename to src/plugins/timelion/server/series_functions/aggregate/last.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/aggregate/max.js b/src/plugins/timelion/server/series_functions/aggregate/max.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/aggregate/max.js rename to src/plugins/timelion/server/series_functions/aggregate/max.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/aggregate/min.js b/src/plugins/timelion/server/series_functions/aggregate/min.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/aggregate/min.js rename to src/plugins/timelion/server/series_functions/aggregate/min.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/aggregate/sum.js b/src/plugins/timelion/server/series_functions/aggregate/sum.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/aggregate/sum.js rename to src/plugins/timelion/server/series_functions/aggregate/sum.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/bars.js b/src/plugins/timelion/server/series_functions/bars.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/bars.js rename to src/plugins/timelion/server/series_functions/bars.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/bars.js b/src/plugins/timelion/server/series_functions/bars.test.js similarity index 95% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/bars.js rename to src/plugins/timelion/server/series_functions/bars.test.js index 90b66759f7341b..74105330e6053d 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/bars.js +++ b/src/plugins/timelion/server/series_functions/bars.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../bars`); +import fn from './bars'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('bars.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('creates the bars property, with defaults, on all series', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/color.js b/src/plugins/timelion/server/series_functions/color.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/color.js rename to src/plugins/timelion/server/series_functions/color.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/color.js b/src/plugins/timelion/server/series_functions/color.test.js similarity index 96% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/color.js rename to src/plugins/timelion/server/series_functions/color.test.js index f333a39bec5baf..2dc8c6fbcb8969 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/color.js +++ b/src/plugins/timelion/server/series_functions/color.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../color`); +import fn from './color'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('color.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('sets the color, on all series', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/condition.js b/src/plugins/timelion/server/series_functions/condition.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/condition.js rename to src/plugins/timelion/server/series_functions/condition.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/condition.js b/src/plugins/timelion/server/series_functions/condition.test.js similarity index 97% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/condition.js rename to src/plugins/timelion/server/series_functions/condition.test.js index 533c5adfd62aba..469f84344eb4f3 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/condition.js +++ b/src/plugins/timelion/server/series_functions/condition.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../condition`); +import fn from './condition'; import moment from 'moment'; const expect = require('chai').expect; import invoke from './helpers/invoke_series_fn.js'; @@ -28,7 +28,7 @@ describe('condition.js', function() { let comparable; let seriesList; beforeEach(function() { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); comparable = getSeriesList('', [ [moment.utc('1980-01-01T00:00:00.000Z'), 12], [moment.utc('1981-01-01T00:00:00.000Z'), 33], diff --git a/src/legacy/core_plugins/timelion/server/series_functions/cusum.js b/src/plugins/timelion/server/series_functions/cusum.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/cusum.js rename to src/plugins/timelion/server/series_functions/cusum.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/cusum.js b/src/plugins/timelion/server/series_functions/cusum.test.js similarity index 93% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/cusum.js rename to src/plugins/timelion/server/series_functions/cusum.test.js index d9f534555b9d7e..29927a8d0faf21 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/cusum.js +++ b/src/plugins/timelion/server/series_functions/cusum.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../cusum`); +import fn from './cusum'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('cusum.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('progressively adds the numbers in the list', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/derivative.js b/src/plugins/timelion/server/series_functions/derivative.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/derivative.js rename to src/plugins/timelion/server/series_functions/derivative.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/derivative.js b/src/plugins/timelion/server/series_functions/derivative.test.js similarity index 92% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/derivative.js rename to src/plugins/timelion/server/series_functions/derivative.test.js index 88ef4778ef2f16..296cf91711d027 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/derivative.js +++ b/src/plugins/timelion/server/series_functions/derivative.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../derivative`); +import fn from './derivative'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('derivative.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('gets the change in the set', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/divide.js b/src/plugins/timelion/server/series_functions/divide.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/divide.js rename to src/plugins/timelion/server/series_functions/divide.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/divide.js b/src/plugins/timelion/server/series_functions/divide.test.js similarity index 92% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/divide.js rename to src/plugins/timelion/server/series_functions/divide.test.js index afe531922522fa..e24ec7d60541cb 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/divide.js +++ b/src/plugins/timelion/server/series_functions/divide.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../divide`); +import fn from './divide'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('divide.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('divides by a single number', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/es.js b/src/plugins/timelion/server/series_functions/es/es.test.js similarity index 94% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/es.js rename to src/plugins/timelion/server/series_functions/es/es.test.js index f2b364afb723ba..4bd37b03f01fe2 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/es.js +++ b/src/plugins/timelion/server/series_functions/es/es.test.js @@ -17,52 +17,38 @@ * under the License. */ -const filename = require('path').basename(__filename); -import es from '../es'; +import es from './index'; -import tlConfigFn from './fixtures/tlConfig'; -import * as aggResponse from '../es/lib/agg_response_to_series_list'; -import buildRequest from '../es/lib/build_request'; -import createDateAgg from '../es/lib/create_date_agg'; -import esResponse from './fixtures/es_response'; +import tlConfigFn from '../fixtures/tl_config'; +import * as aggResponse from './lib/agg_response_to_series_list'; +import buildRequest from './lib/build_request'; +import createDateAgg from './lib/create_date_agg'; +import esResponse from '../fixtures/es_response'; import Bluebird from 'bluebird'; import _ from 'lodash'; import { expect } from 'chai'; import sinon from 'sinon'; -import invoke from './helpers/invoke_series_fn.js'; +import invoke from '../helpers/invoke_series_fn.js'; function stubRequestAndServer(response, indexPatternSavedObjects = []) { return { - server: { - plugins: { - elasticsearch: { - getCluster: sinon - .stub() - .withArgs('data') - .returns({ - callWithRequest: function() { - return Bluebird.resolve(response); - }, - }), - }, + esDataClient: sinon.stub().returns({ + callAsCurrentUser: function() { + return Bluebird.resolve(response); }, - }, - request: { - getSavedObjectsClient: function() { - return { - find: function() { - return Bluebird.resolve({ - saved_objects: indexPatternSavedObjects, - }); - }, - }; + }), + savedObjectsClient: { + find: function() { + return Bluebird.resolve({ + saved_objects: indexPatternSavedObjects, + }); }, }, }; } -describe(filename, () => { +describe('es', () => { let tlConfig; describe('seriesList processor', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/es/index.js b/src/plugins/timelion/server/series_functions/es/index.js similarity index 91% rename from src/legacy/core_plugins/timelion/server/series_functions/es/index.js rename to src/plugins/timelion/server/series_functions/es/index.js index 4ce2752fbf9be3..eb41663b71cf72 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/es/index.js +++ b/src/plugins/timelion/server/series_functions/es/index.js @@ -17,7 +17,6 @@ * under the License. */ -import { first, map } from 'rxjs/operators'; import { i18n } from '@kbn/i18n'; import _ from 'lodash'; import Datasource from '../../lib/classes/datasource'; @@ -109,7 +108,7 @@ export default new Datasource('es', { fit: 'nearest', }); - const findResp = await tlConfig.request.getSavedObjectsClient().find({ + const findResp = await tlConfig.savedObjectsClient.find({ type: 'index-pattern', fields: ['title', 'fields'], search: `"${config.index}"`, @@ -126,17 +125,12 @@ export default new Datasource('es', { }); } - const esShardTimeout = await tlConfig.server.newPlatform.__internals.elasticsearch.legacy.config$ - .pipe( - first(), - map(config => config.shardTimeout.asMilliseconds()) - ) - .toPromise(); + const esShardTimeout = tlConfig.esShardTimeout; const body = buildRequest(config, tlConfig, scriptedFields, esShardTimeout); - const { callWithRequest } = tlConfig.server.plugins.elasticsearch.getCluster('data'); - const resp = await callWithRequest(tlConfig.request, 'search', body); + const { callAsCurrentUser: callWithRequest } = tlConfig.esDataClient(); + const resp = await callWithRequest('search', body); if (!resp._shards.total) { throw new Error( i18n.translate('timelion.serverSideErrors.esFunction.indexNotFoundErrorMessage', { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/es/lib/agg_body.js b/src/plugins/timelion/server/series_functions/es/lib/agg_body.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/es/lib/agg_body.js rename to src/plugins/timelion/server/series_functions/es/lib/agg_body.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/es/lib/agg_response_to_series_list.js b/src/plugins/timelion/server/series_functions/es/lib/agg_response_to_series_list.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/es/lib/agg_response_to_series_list.js rename to src/plugins/timelion/server/series_functions/es/lib/agg_response_to_series_list.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/es/lib/build_request.js b/src/plugins/timelion/server/series_functions/es/lib/build_request.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/es/lib/build_request.js rename to src/plugins/timelion/server/series_functions/es/lib/build_request.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/es/lib/create_date_agg.js b/src/plugins/timelion/server/series_functions/es/lib/create_date_agg.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/es/lib/create_date_agg.js rename to src/plugins/timelion/server/series_functions/es/lib/create_date_agg.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/first.js b/src/plugins/timelion/server/series_functions/first.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/first.js rename to src/plugins/timelion/server/series_functions/first.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/first.js b/src/plugins/timelion/server/series_functions/first.test.js similarity index 92% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/first.js rename to src/plugins/timelion/server/series_functions/first.test.js index 3e86554e843b0c..96192b2b3903f6 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/first.js +++ b/src/plugins/timelion/server/series_functions/first.test.js @@ -17,10 +17,10 @@ * under the License. */ -const fn = require(`../first`); +import fn from './first'; const expect = require('chai').expect; -const seriesList = require('./fixtures/seriesList.js')(); +const seriesList = require('./fixtures/series_list.js')(); import invoke from './helpers/invoke_series_fn.js'; describe('first.js', function() { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/fit.js b/src/plugins/timelion/server/series_functions/fit.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/fit.js rename to src/plugins/timelion/server/series_functions/fit.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/fit.js b/src/plugins/timelion/server/series_functions/fit.test.js similarity index 98% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/fit.js rename to src/plugins/timelion/server/series_functions/fit.test.js index db9360da3f5921..75eaa2a50ea720 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/fit.js +++ b/src/plugins/timelion/server/series_functions/fit.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../fit`); +const fn = require(`src/plugins/timelion/server/series_functions/fit`); import moment from 'moment'; const expect = require('chai').expect; import invoke from './helpers/invoke_series_fn.js'; diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/bucketList.js b/src/plugins/timelion/server/series_functions/fixtures/bucket_list.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/bucketList.js rename to src/plugins/timelion/server/series_functions/fixtures/bucket_list.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/es_response.js b/src/plugins/timelion/server/series_functions/fixtures/es_response.js similarity index 99% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/es_response.js rename to src/plugins/timelion/server/series_functions/fixtures/es_response.js index 65aed311e232b8..22352258b2f518 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/es_response.js +++ b/src/plugins/timelion/server/series_functions/fixtures/es_response.js @@ -17,6 +17,8 @@ * under the License. */ +/* eslint-disable quotes */ + /* Really didn't want to do this, but testing the agg flatten logic in units isn't really possible since the functions depend on each other diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/seriesList.js b/src/plugins/timelion/server/series_functions/fixtures/series_list.js similarity index 97% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/seriesList.js rename to src/plugins/timelion/server/series_functions/fixtures/series_list.js index 29b759af521ed0..90d9bc8417ef7e 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/seriesList.js +++ b/src/plugins/timelion/server/series_functions/fixtures/series_list.js @@ -17,7 +17,7 @@ * under the License. */ -import buckets from './bucketList'; +import buckets from './bucket_list'; import getSeries from '../helpers/get_series'; import getSeriesList from '../helpers/get_series_list'; diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/tlConfig.js b/src/plugins/timelion/server/series_functions/fixtures/tl_config.js similarity index 52% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/tlConfig.js rename to src/plugins/timelion/server/series_functions/fixtures/tl_config.js index 6eea99424c4abe..bf477110be379b 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/fixtures/tlConfig.js +++ b/src/plugins/timelion/server/series_functions/fixtures/tl_config.js @@ -18,48 +18,25 @@ */ import moment from 'moment'; -import { of } from 'rxjs'; import sinon from 'sinon'; -import timelionDefaults from '../../../lib/get_namespaced_settings'; +import timelionDefaults from '../../lib/get_namespaced_settings'; import esResponse from './es_response'; export default function() { - const functions = require('../../../lib/load_functions')('series_functions'); - const kibanaServerConfigs = { - 'timelion.graphiteUrls': ['https://www.hostedgraphite.com/UID/ACCESS_KEY/graphite'], - }; - const server = { - plugins: { - timelion: { - getFunction: name => { - if (!functions[name]) throw new Error('No such function: ' + name); - return functions[name]; - }, - }, - elasticsearch: { - getCluster: sinon - .stub() - .withArgs('data') - .returns({ - callWithRequest: function() { - return Promise.resolve(esResponse); - }, - }), - }, + const functions = require('../../lib/load_functions')('series_functions'); + + const tlConfig = require('../../handlers/lib/tl_config.js')({ + getFunction: name => { + if (!functions[name]) throw new Error('No such function: ' + name); + return functions[name]; }, - newPlatform: { - __internals: { - elasticsearch: { - legacy: { config$: of({ shardTimeout: moment.duration(30000) }) }, - }, + esDataClient: sinon.stub().returns({ + callAsCurrentUser: function() { + return Promise.resolve(esResponse); }, - }, - config: () => ({ get: key => kibanaServerConfigs[key] }), - }; - - const tlConfig = require('../../../handlers/lib/tl_config.js')({ - server, - request: {}, + }), + esShardTimeout: moment.duration(30000), + allowedGraphiteUrls: ['https://www.hostedgraphite.com/UID/ACCESS_KEY/graphite'], }); tlConfig.time = { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/graphite.js b/src/plugins/timelion/server/series_functions/graphite.js similarity index 97% rename from src/legacy/core_plugins/timelion/server/series_functions/graphite.js rename to src/plugins/timelion/server/series_functions/graphite.js index a80dd2f3ff29e7..7b7bb1541bea0a 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/graphite.js +++ b/src/plugins/timelion/server/series_functions/graphite.js @@ -46,7 +46,7 @@ export default new Datasource('graphite', { min: moment(tlConfig.time.from).format('HH:mm[_]YYYYMMDD'), max: moment(tlConfig.time.to).format('HH:mm[_]YYYYMMDD'), }; - const allowedUrls = tlConfig.server.config().get('timelion.graphiteUrls'); + const allowedUrls = tlConfig.allowedGraphiteUrls; const configuredUrl = tlConfig.settings['timelion:graphite.url']; if (!allowedUrls.includes(configuredUrl)) { throw new Error( diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/graphite.js b/src/plugins/timelion/server/series_functions/graphite.test.js similarity index 85% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/graphite.js rename to src/plugins/timelion/server/series_functions/graphite.test.js index b7ee96ef77575f..914e0a7aaa4a11 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/graphite.js +++ b/src/plugins/timelion/server/series_functions/graphite.test.js @@ -17,12 +17,12 @@ * under the License. */ -import proxyquire from 'proxyquire'; -import Bluebird from 'bluebird'; const expect = require('chai').expect; -const graphiteResponse = function() { - return Bluebird.resolve({ +import fn from './graphite'; + +jest.mock('node-fetch', () => () => { + return Promise.resolve({ json: function() { return [ { @@ -37,14 +37,11 @@ const graphiteResponse = function() { ]; }, }); -}; - -const filename = require('path').basename(__filename); -const fn = proxyquire(`../${filename}`, { 'node-fetch': graphiteResponse }); +}); import invoke from './helpers/invoke_series_fn.js'; -describe(filename, function() { +describe('graphite', function() { it('should wrap the graphite response up in a seriesList', function() { return invoke(fn, []).then(function(result) { expect(result.output.list[0].data[0][1]).to.eql(3); diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/helpers/get_series.js b/src/plugins/timelion/server/series_functions/helpers/get_series.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/helpers/get_series.js rename to src/plugins/timelion/server/series_functions/helpers/get_series.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/helpers/get_series_list.js b/src/plugins/timelion/server/series_functions/helpers/get_series_list.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/helpers/get_series_list.js rename to src/plugins/timelion/server/series_functions/helpers/get_series_list.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/helpers/get_single_series_list.js b/src/plugins/timelion/server/series_functions/helpers/get_single_series_list.js similarity index 90% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/helpers/get_single_series_list.js rename to src/plugins/timelion/server/series_functions/helpers/get_single_series_list.js index cef5bed5d32185..c9cd3393e62f06 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/helpers/get_single_series_list.js +++ b/src/plugins/timelion/server/series_functions/helpers/get_single_series_list.js @@ -17,8 +17,8 @@ * under the License. */ -import getSeries from '../helpers/get_series'; -import getSeriesList from '../helpers/get_series_list'; +import getSeries from './get_series'; +import getSeriesList from './get_series_list'; import _ from 'lodash'; export default function(name, data) { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/helpers/invoke_series_fn.js b/src/plugins/timelion/server/series_functions/helpers/invoke_series_fn.js similarity index 89% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/helpers/invoke_series_fn.js rename to src/plugins/timelion/server/series_functions/helpers/invoke_series_fn.js index 51ef4c61a95e83..3a8bb92a883f87 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/helpers/invoke_series_fn.js +++ b/src/plugins/timelion/server/series_functions/helpers/invoke_series_fn.js @@ -20,10 +20,10 @@ // invokes a series_function with the specified arguments import _ from 'lodash'; -import indexArguments from '../../../handlers/lib/index_arguments'; +import indexArguments from '../../handlers/lib/index_arguments'; export default function invokeSeriesFn(fnDef, args, tlConfigOverrides) { - const tlConfig = _.merge(require('../fixtures/tlConfig')(), tlConfigOverrides); + const tlConfig = _.merge(require('../fixtures/tl_config')(), tlConfigOverrides); return Promise.all(args).then(function(args) { args.byName = indexArguments(fnDef, args); diff --git a/src/legacy/core_plugins/timelion/server/series_functions/hide.js b/src/plugins/timelion/server/series_functions/hide.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/hide.js rename to src/plugins/timelion/server/series_functions/hide.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/hide.js b/src/plugins/timelion/server/series_functions/hide.test.js similarity index 93% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/hide.js rename to src/plugins/timelion/server/series_functions/hide.test.js index 5d4b6246708471..5e71c1508e9e07 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/hide.js +++ b/src/plugins/timelion/server/series_functions/hide.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../hide`); +import fn from './hide'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('hide.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('hides a series', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/holt/index.js b/src/plugins/timelion/server/series_functions/holt/index.js similarity index 98% rename from src/legacy/core_plugins/timelion/server/series_functions/holt/index.js rename to src/plugins/timelion/server/series_functions/holt/index.js index 0cc41df933e8c8..39cfe0bb3556dc 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/holt/index.js +++ b/src/plugins/timelion/server/series_functions/holt/index.js @@ -23,7 +23,7 @@ import Chainable from '../../lib/classes/chainable'; import ses from './lib/ses'; import des from './lib/des'; import tes from './lib/tes'; -import { toMS } from '../../../../vis_type_timelion/common/lib'; +import { toMS } from '../../../common/lib/to_milliseconds'; export default new Chainable('holt', { args: [ diff --git a/src/legacy/core_plugins/timelion/server/series_functions/holt/lib/des.js b/src/plugins/timelion/server/series_functions/holt/lib/des.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/holt/lib/des.js rename to src/plugins/timelion/server/series_functions/holt/lib/des.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/holt/lib/ses.js b/src/plugins/timelion/server/series_functions/holt/lib/ses.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/holt/lib/ses.js rename to src/plugins/timelion/server/series_functions/holt/lib/ses.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/holt/lib/tes.js b/src/plugins/timelion/server/series_functions/holt/lib/tes.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/holt/lib/tes.js rename to src/plugins/timelion/server/series_functions/holt/lib/tes.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/label.js b/src/plugins/timelion/server/series_functions/label.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/label.js rename to src/plugins/timelion/server/series_functions/label.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/label.js b/src/plugins/timelion/server/series_functions/label.test.js similarity index 94% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/label.js rename to src/plugins/timelion/server/series_functions/label.test.js index 9e0a92b1e40042..8d97083769060b 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/label.js +++ b/src/plugins/timelion/server/series_functions/label.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../label`); +import fn from './label'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('label.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('changes the label on the series', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/legend.js b/src/plugins/timelion/server/series_functions/legend.js similarity index 98% rename from src/legacy/core_plugins/timelion/server/series_functions/legend.js rename to src/plugins/timelion/server/series_functions/legend.js index fd9ff53a1391f9..b4673186867296 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/legend.js +++ b/src/plugins/timelion/server/series_functions/legend.js @@ -20,7 +20,7 @@ import { i18n } from '@kbn/i18n'; import alter from '../lib/alter.js'; import Chainable from '../lib/classes/chainable'; -import { DEFAULT_TIME_FORMAT } from '../../../vis_type_timelion/common/lib'; +import { DEFAULT_TIME_FORMAT } from '../../common/lib'; export default new Chainable('legend', { args: [ diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/legend.js b/src/plugins/timelion/server/series_functions/legend.test.js similarity index 96% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/legend.js rename to src/plugins/timelion/server/series_functions/legend.test.js index 205f0c4431fccd..10789555deac83 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/legend.js +++ b/src/plugins/timelion/server/series_functions/legend.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../legend`); +import fn from './legend'; const expect = require('chai').expect; import invoke from './helpers/invoke_series_fn.js'; @@ -25,7 +25,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('legend.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('should create the _global object if it does not exist', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/lines.js b/src/plugins/timelion/server/series_functions/lines.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/lines.js rename to src/plugins/timelion/server/series_functions/lines.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/lines.js b/src/plugins/timelion/server/series_functions/lines.test.js similarity index 95% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/lines.js rename to src/plugins/timelion/server/series_functions/lines.test.js index 32974495b40eb4..c8985cd4791504 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/lines.js +++ b/src/plugins/timelion/server/series_functions/lines.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../lines`); +import fn from './lines'; const expect = require('chai').expect; import invoke from './helpers/invoke_series_fn.js'; @@ -25,7 +25,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('lines.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('should simply set show, steps, stack and lineWidth', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/log.js b/src/plugins/timelion/server/series_functions/log.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/log.js rename to src/plugins/timelion/server/series_functions/log.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/log.js b/src/plugins/timelion/server/series_functions/log.test.js similarity index 93% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/log.js rename to src/plugins/timelion/server/series_functions/log.test.js index 8cd2e2caa2c470..f37553508bc8ad 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/log.js +++ b/src/plugins/timelion/server/series_functions/log.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../log`); +import fn from './log'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('log.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('should return the log10 value of every value', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/max.js b/src/plugins/timelion/server/series_functions/max.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/max.js rename to src/plugins/timelion/server/series_functions/max.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/max.js b/src/plugins/timelion/server/series_functions/max.test.js similarity index 93% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/max.js rename to src/plugins/timelion/server/series_functions/max.test.js index 9cc4afffb22ba9..7b3d819d0666b9 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/max.js +++ b/src/plugins/timelion/server/series_functions/max.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../max`); +import fn from './max'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('max.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('keeps the max of a series vs a number', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/min.js b/src/plugins/timelion/server/series_functions/min.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/min.js rename to src/plugins/timelion/server/series_functions/min.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/min.js b/src/plugins/timelion/server/series_functions/min.test.js similarity index 93% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/min.js rename to src/plugins/timelion/server/series_functions/min.test.js index a89183ee90c6b6..d30339d6218f8a 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/min.js +++ b/src/plugins/timelion/server/series_functions/min.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../min`); +import fn from './min'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('min.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('keeps the min of a series vs a number', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/movingaverage.js b/src/plugins/timelion/server/series_functions/movingaverage.js similarity index 98% rename from src/legacy/core_plugins/timelion/server/series_functions/movingaverage.js rename to src/plugins/timelion/server/series_functions/movingaverage.js index a4b458991c1bc0..be5f9027703476 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/movingaverage.js +++ b/src/plugins/timelion/server/series_functions/movingaverage.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import alter from '../lib/alter.js'; import _ from 'lodash'; import Chainable from '../lib/classes/chainable'; -import { toMS } from '../../../vis_type_timelion/common/lib'; +import { toMS } from '../../common/lib/to_milliseconds'; const validPositions = ['left', 'right', 'center']; const defaultPosition = 'center'; diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/movingaverage.js b/src/plugins/timelion/server/series_functions/movingaverage.test.js similarity index 96% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/movingaverage.js rename to src/plugins/timelion/server/series_functions/movingaverage.test.js index dceef96b1d1664..760d5af92a1eff 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/movingaverage.js +++ b/src/plugins/timelion/server/series_functions/movingaverage.test.js @@ -17,12 +17,12 @@ * under the License. */ -const fn = require(`../movingaverage`); +import fn from './movingaverage'; const expect = require('chai').expect; import moment from 'moment'; import _ from 'lodash'; -import buckets from './fixtures/bucketList'; +import buckets from './fixtures/bucket_list'; import getSeries from './helpers/get_series'; import getSeriesList from './helpers/get_series_list'; import invoke from './helpers/invoke_series_fn.js'; diff --git a/src/legacy/core_plugins/timelion/server/series_functions/movingstd.js b/src/plugins/timelion/server/series_functions/movingstd.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/movingstd.js rename to src/plugins/timelion/server/series_functions/movingstd.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/movingstd.js b/src/plugins/timelion/server/series_functions/movingstd.test.js similarity index 98% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/movingstd.js rename to src/plugins/timelion/server/series_functions/movingstd.test.js index d2ef271293afc6..bd165488687d4a 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/movingstd.js +++ b/src/plugins/timelion/server/series_functions/movingstd.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../movingstd`); +import fn from './movingstd'; import moment from 'moment'; const expect = require('chai').expect; diff --git a/src/legacy/core_plugins/timelion/server/series_functions/multiply.js b/src/plugins/timelion/server/series_functions/multiply.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/multiply.js rename to src/plugins/timelion/server/series_functions/multiply.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/multiply.js b/src/plugins/timelion/server/series_functions/multiply.test.js similarity index 92% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/multiply.js rename to src/plugins/timelion/server/series_functions/multiply.test.js index 0cc5665fb919a0..f460e5dd307310 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/multiply.js +++ b/src/plugins/timelion/server/series_functions/multiply.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../multiply`); +import fn from './multiply'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('multiply.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('multiplies by a number', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/points.js b/src/plugins/timelion/server/series_functions/points.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/points.js rename to src/plugins/timelion/server/series_functions/points.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/points.js b/src/plugins/timelion/server/series_functions/points.test.js similarity index 96% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/points.js rename to src/plugins/timelion/server/series_functions/points.test.js index 53831f0f6138de..c45d68a5e45503 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/points.js +++ b/src/plugins/timelion/server/series_functions/points.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../points`); +import fn from './points'; import _ from 'lodash'; import assert from 'chai'; @@ -27,7 +27,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('points.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('should set the point radius', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/precision.js b/src/plugins/timelion/server/series_functions/precision.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/precision.js rename to src/plugins/timelion/server/series_functions/precision.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/precision.js b/src/plugins/timelion/server/series_functions/precision.test.js similarity index 93% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/precision.js rename to src/plugins/timelion/server/series_functions/precision.test.js index 29e3bc1ab66f8f..e8bd2c947c200d 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/precision.js +++ b/src/plugins/timelion/server/series_functions/precision.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../precision`); +import fn from './precision'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('precision.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('keeps the min of a series vs a number', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/props.js b/src/plugins/timelion/server/series_functions/props.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/props.js rename to src/plugins/timelion/server/series_functions/props.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/quandl.js b/src/plugins/timelion/server/series_functions/quandl.js similarity index 98% rename from src/legacy/core_plugins/timelion/server/series_functions/quandl.js rename to src/plugins/timelion/server/series_functions/quandl.js index fd7de05464da33..40400ea44c7fc6 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/quandl.js +++ b/src/plugins/timelion/server/series_functions/quandl.js @@ -127,9 +127,6 @@ export default new Datasource('quandl', { }, ], }; - }) - .catch(function(e) { - throw e; }); }, }); diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/quandl.js b/src/plugins/timelion/server/series_functions/quandl.test.js similarity index 55% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/quandl.js rename to src/plugins/timelion/server/series_functions/quandl.test.js index 009c0e4e025cd9..fe5aab512370f9 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/quandl.js +++ b/src/plugins/timelion/server/series_functions/quandl.test.js @@ -17,85 +17,79 @@ * under the License. */ -import proxyquire from 'proxyquire'; -import Bluebird from 'bluebird'; -import assert from 'chai'; -const expect = assert.expect; +import fn from './quandl'; const parseURL = require('url').parse; const parseQueryString = require('querystring').parse; -const tlConfig = require('./fixtures/tlConfig')(); +const tlConfig = require('./fixtures/tl_config')(); import moment from 'moment'; +import fetchMock from 'node-fetch'; + +function parseUrlParams(url) { + return parseQueryString(parseURL(url).query); +} + +jest.mock('node-fetch', () => + jest.fn(() => + Promise.resolve({ + json: function() { + return { + name: '__beer__', + data: [ + ['2015-01-01', 3], + ['2015-01-02', 14], + ['2015-01-03', 15.92], + ['2015-01-04', 65.35], + ], + }; + }, + }) + ) +); -const filename = require('path').basename(__filename); import invoke from './helpers/invoke_series_fn.js'; -let fn; -let response; -let calledWith; -describe(filename, function() { +describe('quandl', function() { beforeEach(function() { - response = function(url) { - calledWith = { - params: parseQueryString(parseURL(url).query), - code: url.match(/datasets\/(.*).json/)[1], - }; - return Bluebird.resolve({ - json: function() { - return { - name: '__beer__', - data: [ - ['2015-01-01', 3], - ['2015-01-02', 14], - ['2015-01-03', 15.92], - ['2015-01-04', 65.35], - ], - }; - }, - }); - }; - fn = proxyquire(`../${filename}`, { 'node-fetch': response }); + jest.clearAllMocks(); }); it('should wrap the quandl response up in a seriesList', function() { return invoke(fn, []).then(function(result) { - expect(result.output.list[0].data[0][1]).to.eql(3); - expect(result.output.list[0].data[1][1]).to.eql(14); + expect(result.output.list[0].data[0][1]).toEqual(3); + expect(result.output.list[0].data[1][1]).toEqual(14); }); }); it('should set the label to that of the quandl name', function() { return invoke(fn, []).then(function(result) { - expect(result.output.list[0].label).to.eql('__beer__'); + expect(result.output.list[0].label).toEqual('__beer__'); }); }); it('should call the quandl API with the quandl code that has been passed', function() { return invoke(fn, ['BEER/IS_GOOD']).then(function() { - expect(calledWith.code).to.eql('BEER/IS_GOOD'); + expect(fetchMock).toHaveBeenCalled(); + expect(fetchMock.mock.calls[0][0].match(/datasets\/(.*).json/)[1]).toEqual('BEER/IS_GOOD'); }); }); it('should limit the time span and interval to the stuff attached to tlConfig', function() { return invoke(fn, []).then(function() { - expect(calledWith.params.trim_start).to.eql( - moment.utc(tlConfig.time.from).format('YYYY-MM-DD') - ); - expect(calledWith.params.trim_end).to.eql(moment.utc(tlConfig.time.to).format('YYYY-MM-DD')); + const params = parseUrlParams(fetchMock.mock.calls[0][0]); + expect(params.trim_start).toEqual(moment.utc(tlConfig.time.from).format('YYYY-MM-DD')); + expect(params.trim_end).toEqual(moment.utc(tlConfig.time.to).format('YYYY-MM-DD')); }); }); it('should throw an error is passed an unsupported interval', function() { - return invoke(fn, [], { time: { interval: '2d' } }) - .then(expect.fail) - .catch(function(r) { - expect(r).to.be.an('error'); - }); + return expect(invoke(fn, [], { time: { interval: '2d' } })).rejects.toThrowError(); }); it('should use the configured API key when talking to quandl', function() { return invoke(fn, [], { settings: { 'timelion:quandl.key': 'bEeR' } }).then(function() { - expect(calledWith.params.auth_token).to.eql('bEeR'); + const params = parseUrlParams(fetchMock.mock.calls[0][0]); + expect(params.auth_token).toEqual('bEeR'); }); }); }); diff --git a/src/legacy/core_plugins/timelion/server/series_functions/range.js b/src/plugins/timelion/server/series_functions/range.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/range.js rename to src/plugins/timelion/server/series_functions/range.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/range.js b/src/plugins/timelion/server/series_functions/range.test.js similarity index 93% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/range.js rename to src/plugins/timelion/server/series_functions/range.test.js index 38bee7d45565e6..f03488a6f2cf2b 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/range.js +++ b/src/plugins/timelion/server/series_functions/range.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../range`); +import fn from './range'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('range.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); seriesList.list[0].data = [ [1000, 20], [2000, 10], diff --git a/src/legacy/core_plugins/timelion/server/series_functions/scale_interval.js b/src/plugins/timelion/server/series_functions/scale_interval.js similarity index 96% rename from src/legacy/core_plugins/timelion/server/series_functions/scale_interval.js rename to src/plugins/timelion/server/series_functions/scale_interval.js index b604015624dfd6..821f2714631ccf 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/scale_interval.js +++ b/src/plugins/timelion/server/series_functions/scale_interval.js @@ -19,7 +19,7 @@ import { i18n } from '@kbn/i18n'; import alter from '../lib/alter.js'; -import { toMS } from '../../../vis_type_timelion/common/lib'; +import { toMS } from '../../common/lib/to_milliseconds'; import _ from 'lodash'; import Chainable from '../lib/classes/chainable'; diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/scale_interval.js b/src/plugins/timelion/server/series_functions/scale_interval.test.js similarity index 92% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/scale_interval.js rename to src/plugins/timelion/server/series_functions/scale_interval.test.js index 12ad5503e69bfe..dfd5fd349ea041 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/scale_interval.js +++ b/src/plugins/timelion/server/series_functions/scale_interval.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../scale_interval`); +import fn from './scale_interval'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('scale_interval.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('Can multiply to transform one interval to another', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/static.js b/src/plugins/timelion/server/series_functions/static.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/static.js rename to src/plugins/timelion/server/series_functions/static.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/static.js b/src/plugins/timelion/server/series_functions/static.test.js similarity index 97% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/static.js rename to src/plugins/timelion/server/series_functions/static.test.js index cea9525694ab3d..f791009e9e2b49 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/static.js +++ b/src/plugins/timelion/server/series_functions/static.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../static`); +import fn from './static'; import _ from 'lodash'; const expect = require('chai').expect; diff --git a/src/legacy/core_plugins/timelion/server/series_functions/subtract.js b/src/plugins/timelion/server/series_functions/subtract.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/subtract.js rename to src/plugins/timelion/server/series_functions/subtract.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/subtract.js b/src/plugins/timelion/server/series_functions/subtract.test.js similarity index 97% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/subtract.js rename to src/plugins/timelion/server/series_functions/subtract.test.js index 55d661ea95485e..7085e0baed0232 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/subtract.js +++ b/src/plugins/timelion/server/series_functions/subtract.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../subtract`); +import fn from './subtract'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('subtract.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('it throws an error if first argument is not seriesList', async () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/sum.js b/src/plugins/timelion/server/series_functions/sum.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/sum.js rename to src/plugins/timelion/server/series_functions/sum.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/sum.js b/src/plugins/timelion/server/series_functions/sum.test.js similarity index 93% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/sum.js rename to src/plugins/timelion/server/series_functions/sum.test.js index 61e3a254d0b5de..d897d1a958460a 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/sum.js +++ b/src/plugins/timelion/server/series_functions/sum.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../sum`); +import fn from './sum'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('sum.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('it adds a number', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/title.js b/src/plugins/timelion/server/series_functions/title.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/title.js rename to src/plugins/timelion/server/series_functions/title.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/title.js b/src/plugins/timelion/server/series_functions/title.test.js similarity index 93% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/title.js rename to src/plugins/timelion/server/series_functions/title.test.js index 973bb2ed0ea32d..e2238bb740bcdb 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/title.js +++ b/src/plugins/timelion/server/series_functions/title.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../title`); +import fn from './title'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('title.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('sets the title property', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/trend/index.js b/src/plugins/timelion/server/series_functions/trend/index.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/trend/index.js rename to src/plugins/timelion/server/series_functions/trend/index.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/trend/lib/regress.js b/src/plugins/timelion/server/series_functions/trend/lib/regress.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/trend/lib/regress.js rename to src/plugins/timelion/server/series_functions/trend/lib/regress.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/trim.js b/src/plugins/timelion/server/series_functions/trim.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/trim.js rename to src/plugins/timelion/server/series_functions/trim.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/trim.js b/src/plugins/timelion/server/series_functions/trim.test.js similarity index 95% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/trim.js rename to src/plugins/timelion/server/series_functions/trim.test.js index ed7a8999d706a7..e2b88a52f0045e 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/trim.js +++ b/src/plugins/timelion/server/series_functions/trim.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../trim`); +import fn from './trim'; import _ from 'lodash'; const expect = require('chai').expect; @@ -26,7 +26,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('trim.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('Sets the first and last values to null by default', () => { diff --git a/src/legacy/core_plugins/timelion/server/series_functions/worldbank.js b/src/plugins/timelion/server/series_functions/worldbank.js similarity index 96% rename from src/legacy/core_plugins/timelion/server/series_functions/worldbank.js rename to src/plugins/timelion/server/series_functions/worldbank.js index 3630d6c956b681..f19bfab01b0f9e 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/worldbank.js +++ b/src/plugins/timelion/server/series_functions/worldbank.js @@ -45,7 +45,7 @@ export default new Datasource('worldbank', { The worldbank provides mostly yearly data, and often has no data for the current year. Try {offsetQuery} if you get no data for recent time ranges.`, values: { - worldbankUrl: 'http://data.worldbank.org/', + worldbankUrl: 'https://api.worldbank.org/v2/', offsetQuery: 'offset=-1y', }, }), @@ -53,7 +53,7 @@ export default new Datasource('worldbank', { // http://api.worldbank.org/en/countries/ind;chn/indicators/DPANUSSPF?date=2000:2006&MRV=5 const config = _.defaults(args.byName, { - code: 'countries/wld/indicators/SP.POP.TOTL', + code: 'country/all/indicator/SP.POP.TOTL', }); const time = { @@ -62,7 +62,7 @@ export default new Datasource('worldbank', { }; const URL = - 'http://api.worldbank.org/' + + 'https://api.worldbank.org/v2/' + config.code + '?date=' + time.min + diff --git a/src/legacy/core_plugins/timelion/server/series_functions/worldbank_indicators.js b/src/plugins/timelion/server/series_functions/worldbank_indicators.js similarity index 95% rename from src/legacy/core_plugins/timelion/server/series_functions/worldbank_indicators.js rename to src/plugins/timelion/server/series_functions/worldbank_indicators.js index dc9a3b4a67b338..7049eefb8f808d 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/worldbank_indicators.js +++ b/src/plugins/timelion/server/series_functions/worldbank_indicators.js @@ -54,7 +54,7 @@ export default new Datasource('worldbank_indicators', { mostly yearly data, and often has no data for the current year. Try {offsetQuery} if you get no data for recent time ranges.`, values: { - worldbankUrl: 'http://data.worldbank.org/', + worldbankUrl: 'https://api.worldbank.org/v2/', offsetQuery: 'offset=-1y', }, }), @@ -66,7 +66,7 @@ export default new Datasource('worldbank_indicators', { const countries = config.country.split(':'); const seriesLists = _.map(countries, function(country) { - const code = 'countries/' + country + '/indicators/' + config.indicator; + const code = 'country/' + country + '/indicator/' + config.indicator; const wbArgs = [code]; wbArgs.byName = { code: code }; return worldbank.timelionFn(wbArgs, tlConfig); diff --git a/src/legacy/core_plugins/timelion/server/series_functions/yaxis.js b/src/plugins/timelion/server/series_functions/yaxis.js similarity index 100% rename from src/legacy/core_plugins/timelion/server/series_functions/yaxis.js rename to src/plugins/timelion/server/series_functions/yaxis.js diff --git a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/yaxis.js b/src/plugins/timelion/server/series_functions/yaxis.test.js similarity index 97% rename from src/legacy/core_plugins/timelion/server/series_functions/__tests__/yaxis.js rename to src/plugins/timelion/server/series_functions/yaxis.test.js index 9210a2cd300b09..87001ce45fd39f 100644 --- a/src/legacy/core_plugins/timelion/server/series_functions/__tests__/yaxis.js +++ b/src/plugins/timelion/server/series_functions/yaxis.test.js @@ -17,7 +17,7 @@ * under the License. */ -const fn = require(`../yaxis`); +import fn from './yaxis'; import Bluebird from 'bluebird'; const expect = require('chai').expect; import invoke from './helpers/invoke_series_fn.js'; @@ -25,7 +25,7 @@ import invoke from './helpers/invoke_series_fn.js'; describe('yaxis.js', () => { let seriesList; beforeEach(() => { - seriesList = require('./fixtures/seriesList.js')(); + seriesList = require('./fixtures/series_list.js')(); }); it('creates the yaxes array', () => { diff --git a/src/legacy/core_plugins/timelion/timelion.json b/src/plugins/timelion/server/timelion.json similarity index 100% rename from src/legacy/core_plugins/timelion/timelion.json rename to src/plugins/timelion/server/timelion.json diff --git a/src/legacy/core_plugins/timelion/server/types.ts b/src/plugins/timelion/server/types.ts similarity index 100% rename from src/legacy/core_plugins/timelion/server/types.ts rename to src/plugins/timelion/server/types.ts From bb30bb4fd4d3234cb166f9bbe86ee7fdcb7077b9 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Thu, 23 Jan 2020 19:07:40 +0100 Subject: [PATCH 23/72] Update .github/CODEOWNERS (#55728) --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 82568b47a78098..ba468c5a2d9896 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -52,6 +52,7 @@ /x-pack/test/functional/apps/apm/ @elastic/apm-ui /src/legacy/core_plugins/apm_oss/ @elastic/apm-ui /src/plugins/apm_oss/ @elastic/apm-ui +/src/apm.js @watson # Beats /x-pack/legacy/plugins/beats_management/ @elastic/beats From d97526e88c062bd7c097b787884eb4d5af6697a2 Mon Sep 17 00:00:00 2001 From: patrykkopycinski Date: Thu, 23 Jan 2020 20:01:10 +0100 Subject: [PATCH 24/72] [SIEM] Attach VisibilitySensor to the TimelineBody instead of window (#55620) --- .../components/timeline/body/events/index.tsx | 116 +++++++++--------- .../timeline/body/events/stateful_event.tsx | 5 +- .../public/components/timeline/body/index.tsx | 6 +- 3 files changed, 67 insertions(+), 60 deletions(-) diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/events/index.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/body/events/index.tsx index 9361a46dddff45..6b2e105ad05664 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/body/events/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/body/events/index.tsx @@ -31,6 +31,7 @@ interface Props { browserFields: BrowserFields; columnHeaders: ColumnHeader[]; columnRenderers: ColumnRenderer[]; + containerElementRef: HTMLDivElement; data: TimelineItem[]; eventIdToNoteIds: Readonly>; getNotesByIds: (noteIds: string[]) => Note[]; @@ -53,61 +54,62 @@ interface Props { // Passing the styles directly to the component because the width is // being calculated and is recommended by Styled Components for performance // https://github.com/styled-components/styled-components/issues/134#issuecomment-312415291 -export const Events = React.memo( - ({ - actionsColumnWidth, - addNoteToEvent, - browserFields, - columnHeaders, - columnRenderers, - data, - eventIdToNoteIds, - getNotesByIds, - id, - isEventViewer = false, - loadingEventIds, - onColumnResized, - onPinEvent, - onRowSelected, - onUpdateColumns, - onUnPinEvent, - pinnedEventIds, - rowRenderers, - selectedEventIds, - showCheckboxes, - toggleColumn, - updateNote, - }) => ( - - {data.map((event, i) => ( - - ))} - - ) +const EventsComponent: React.FC = ({ + actionsColumnWidth, + addNoteToEvent, + browserFields, + columnHeaders, + columnRenderers, + containerElementRef, + data, + eventIdToNoteIds, + getNotesByIds, + id, + isEventViewer = false, + loadingEventIds, + onColumnResized, + onPinEvent, + onRowSelected, + onUpdateColumns, + onUnPinEvent, + pinnedEventIds, + rowRenderers, + selectedEventIds, + showCheckboxes, + toggleColumn, + updateNote, +}) => ( + + {data.map((event, i) => ( + + ))} + ); -Events.displayName = 'Events'; + +export const Events = React.memo(EventsComponent); diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/events/stateful_event.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/body/events/stateful_event.tsx index 6c43d9a63029c2..5704b6030e7d19 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/body/events/stateful_event.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/body/events/stateful_event.tsx @@ -35,6 +35,7 @@ import { StatefulEventChild } from './stateful_event_child'; interface Props { actionsColumnWidth: number; + containerElementRef: HTMLDivElement; addNoteToEvent: AddNoteToEvent; browserFields: BrowserFields; columnHeaders: ColumnHeader[]; @@ -115,6 +116,7 @@ const StatefulEventComponent: React.FC = ({ actionsColumnWidth, addNoteToEvent, browserFields, + containerElementRef, columnHeaders, columnRenderers, event, @@ -201,6 +203,7 @@ const StatefulEventComponent: React.FC = ({ {({ isVisible }) => { @@ -279,7 +282,7 @@ const StatefulEventComponent: React.FC = ({ } else { // Height place holder for visibility detection as well as re-rendering sections. const height = - divElement.current != null + divElement.current != null && divElement.current.clientHeight ? `${divElement.current.clientHeight}px` : DEFAULT_ROW_HEIGHT; diff --git a/x-pack/legacy/plugins/siem/public/components/timeline/body/index.tsx b/x-pack/legacy/plugins/siem/public/components/timeline/body/index.tsx index c4ad532f76fc42..f00da482669278 100644 --- a/x-pack/legacy/plugins/siem/public/components/timeline/body/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/timeline/body/index.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { useMemo } from 'react'; +import React, { useMemo, useRef } from 'react'; import { BrowserFields } from '../../../containers/source'; import { TimelineItem, TimelineNonEcsData } from '../../../graphql/types'; @@ -95,6 +95,7 @@ export const Body = React.memo( toggleColumn, updateNote, }) => { + const containerElementRef = useRef(null); const timelineTypeContext = useTimelineTypeContext(); const additionalActionWidth = timelineTypeContext.timelineActions?.reduce((acc, v) => acc + v.width, 0) ?? 0; @@ -112,7 +113,7 @@ export const Body = React.memo( return ( <> - + ( /> Date: Thu, 23 Jan 2020 14:52:43 -0500 Subject: [PATCH 25/72] [Lens] Fix regression in field list for beats (thousands of fields) (#55625) * [Lens] Fix regression in field list for beats * Add api test --- .../lens/server/routes/existing_fields.ts | 6 +- .../apis/lens/existing_fields.ts | 49 +++++++ .../es_archives/visualize/default/data.json | 123 ++++++++++++++++++ 3 files changed, 174 insertions(+), 4 deletions(-) diff --git a/x-pack/legacy/plugins/lens/server/routes/existing_fields.ts b/x-pack/legacy/plugins/lens/server/routes/existing_fields.ts index fbbcf9973431b8..30ded3572cae70 100644 --- a/x-pack/legacy/plugins/lens/server/routes/existing_fields.ts +++ b/x-pack/legacy/plugins/lens/server/routes/existing_fields.ts @@ -226,17 +226,15 @@ async function fetchIndexPatternStats({ match_all: {}, }; } - const viableFields = fields.filter( - f => !f.isScript && !f.isAlias && !metaFields.includes(f.name) - ); const scriptedFields = fields.filter(f => f.isScript); const result = await client.callAsCurrentUser('search', { index, body: { size: SAMPLE_SIZE, - _source: viableFields.map(f => f.name), query, + // _source is required because we are also providing script fields. + _source: '*', script_fields: scriptedFields.reduce((acc, field) => { acc[field.name] = { script: { diff --git a/x-pack/test/api_integration/apis/lens/existing_fields.ts b/x-pack/test/api_integration/apis/lens/existing_fields.ts index bceb8250edd2df..cf65e114d38965 100644 --- a/x-pack/test/api_integration/apis/lens/existing_fields.ts +++ b/x-pack/test/api_integration/apis/lens/existing_fields.ts @@ -94,6 +94,41 @@ const fieldsWithData = [ 'relatedContent.url.raw', ]; +const metricBeatData = [ + '@timestamp', + 'agent.ephemeral_id', + 'agent.hostname', + 'agent.id', + 'agent.type', + 'agent.version', + 'ecs.version', + 'event.dataset', + 'event.duration', + 'event.module', + 'host.architecture', + 'host.hostname', + 'host.id', + 'host.name', + 'host.os.build', + 'host.os.family', + 'host.os.kernel', + 'host.os.name', + 'host.os.platform', + 'host.os.version', + 'metricset.name', + 'service.type', + 'system.cpu.cores', + 'system.cpu.idle.pct', + 'system.cpu.iowait.pct', + 'system.cpu.irq.pct', + 'system.cpu.nice.pct', + 'system.cpu.softirq.pct', + 'system.cpu.steal.pct', + 'system.cpu.system.pct', + 'system.cpu.total.pct', + 'system.cpu.user.pct', +]; + // eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); @@ -124,6 +159,20 @@ export default ({ getService }: FtrProviderContext) => { expect(body.existingFieldNames.sort()).to.eql(fieldsWithData.sort()); }); + it('should succeed for thousands of fields', async () => { + const { body } = await supertest + .get( + `/api/lens/existing_fields/${encodeURIComponent( + 'metricbeat-*' + )}?fromDate=${TEST_START_TIME}&toDate=${TEST_END_TIME}` + ) + .set(COMMON_HEADERS) + .expect(200); + + expect(body.indexPatternTitle).to.eql('metricbeat-*'); + expect(body.existingFieldNames.sort()).to.eql(metricBeatData.sort()); + }); + it('should throw a 404 for a non-existent index', async () => { await supertest .get( diff --git a/x-pack/test/functional/es_archives/visualize/default/data.json b/x-pack/test/functional/es_archives/visualize/default/data.json index aa3428b62a6367..b9a6e2346b482e 100644 --- a/x-pack/test/functional/es_archives/visualize/default/data.json +++ b/x-pack/test/functional/es_archives/visualize/default/data.json @@ -19,6 +19,129 @@ } } +{ + "type": "doc", + "value": { + "index": "metricbeat-7", + "id": "asdf", + "source": { + "@timestamp" : "2015-09-20T21:43:43.104Z", + "event" : { + "dataset" : "system.cpu", + "module" : "system", + "duration" : 34818 + }, + "metricset" : { + "name" : "cpu" + }, + "service" : { + "type" : "system" + }, + "system" : { + "cpu" : { + "system" : { + "pct" : 0.16 + }, + "idle" : { + "pct" : 10.5088 + }, + "irq" : { + "pct" : 0 + }, + "cores" : 12, + "total" : { + "pct" : 1.4912 + }, + "iowait" : { + "pct" : 0 + }, + "softirq" : { + "pct" : 0 + }, + "user" : { + "pct" : 1.3312 + }, + "nice" : { + "pct" : 0 + }, + "steal" : { + "pct" : 0 + } + } + }, + "ecs" : { + "version" : "1.0.1" + }, + "host" : { + "name" : "my-host-name.local", + "os" : { + "name" : "Mac OS X", + "kernel" : "", + "build" : "", + "platform" : "darwin", + "version" : "", + "family" : "darwin" + }, + "id" : "", + "hostname" : "my-host-name.local", + "architecture" : "x86_64" + }, + "agent" : { + "id" : "aaaaa", + "version" : "7.6.0", + "type" : "metricbeat", + "ephemeral_id" : "bbbbb", + "hostname" : "my-host-name.local" + } + } + } +} + +{ + "type": "doc", + "value": { + "index" : ".kibana", + "id" : "index-pattern:metricbeat-*", + "type": "_doc", + "source" : { + "index-pattern" : { + "fieldFormatMap" : "{\"aerospike.namespace.device.available.pct\":{\"id\":\"percent\",\"params\":{}},\"aerospike.namespace.device.free.pct\":{\"id\":\"percent\",\"params\":{}},\"aerospike.namespace.device.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aerospike.namespace.device.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aerospike.namespace.memory.free.pct\":{\"id\":\"percent\",\"params\":{}},\"aerospike.namespace.memory.used.data.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aerospike.namespace.memory.used.index.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aerospike.namespace.memory.used.sindex.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aerospike.namespace.memory.used.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.ec2.diskio.read.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.ec2.diskio.write.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.ec2.network.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.ec2.network.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.rds.cpu.total.pct\":{\"id\":\"percent\",\"params\":{}},\"aws.rds.disk_usage.bin_log.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.rds.free_local_storage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.rds.free_storage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.rds.freeable_memory.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.rds.latency.commit\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.ddl\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.dml\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.insert\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.read\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.select\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.update\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.write\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.replica_lag.sec\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.swap_usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.rds.volume_used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.s3_daily_storage.bucket.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.s3_request.downloaded.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.s3_request.latency.first_byte.ms\":{\"id\":\"duration\",\"params\":{}},\"aws.s3_request.latency.total_request.ms\":{\"id\":\"duration\",\"params\":{}},\"aws.s3_request.requests.select_returned.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.s3_request.requests.select_scanned.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.s3_request.uploaded.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.sqs.oldest_message_age.sec\":{\"id\":\"duration\",\"params\":{}},\"aws.sqs.sent_message_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_disk.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_disk.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_disk.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_status.degraded.ratio\":{\"id\":\"percent\",\"params\":{}},\"ceph.cluster_status.misplace.ratio\":{\"id\":\"percent\",\"params\":{}},\"ceph.cluster_status.pg.avail_bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_status.pg.data_bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_status.pg.total_bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_status.pg.used_bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_status.traffic.read_bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_status.traffic.write_bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.monitor_health.store_stats.log.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.monitor_health.store_stats.misc.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.monitor_health.store_stats.sst.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.monitor_health.store_stats.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.osd_df.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.osd_df.total.byte\":{\"id\":\"bytes\",\"params\":{}},\"ceph.osd_df.used.byte\":{\"id\":\"bytes\",\"params\":{}},\"ceph.osd_df.used.pct\":{\"id\":\"percent\",\"params\":{}},\"ceph.pool_disk.stats.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.pool_disk.stats.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"client.bytes\":{\"id\":\"bytes\",\"params\":{}},\"client.nat.port\":{\"id\":\"string\",\"params\":{}},\"client.port\":{\"id\":\"string\",\"params\":{}},\"coredns.stats.dns.request.duration.ns.sum\":{\"id\":\"duration\",\"params\":{}},\"couchbase.bucket.data.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.bucket.disk.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.bucket.memory.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.bucket.quota.ram.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.bucket.quota.use.pct\":{\"id\":\"percent\",\"params\":{}},\"couchbase.cluster.hdd.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.hdd.quota.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.hdd.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.hdd.used.by_data.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.hdd.used.value.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.quota.total.per_node.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.quota.total.value.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.quota.used.per_node.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.quota.used.value.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.used.by_data.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.used.value.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.node.couch.docs.data_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.node.couch.docs.disk_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.node.mcd_memory.allocated.bytes\":{\"id\":\"bytes\",\"params\":{}},\"destination.bytes\":{\"id\":\"bytes\",\"params\":{}},\"destination.nat.port\":{\"id\":\"string\",\"params\":{}},\"destination.port\":{\"id\":\"string\",\"params\":{}},\"docker.cpu.core.*.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.cpu.kernel.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.cpu.system.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.cpu.total.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.cpu.user.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.diskio.read.bytes\":{\"id\":\"bytes\",\"params\":{}},\"docker.diskio.summary.bytes\":{\"id\":\"bytes\",\"params\":{}},\"docker.diskio.write.bytes\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.commit.peak\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.commit.total\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.limit\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.private_working_set.total\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.rss.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.memory.rss.total\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.usage.max\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.usage.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.memory.usage.total\":{\"id\":\"bytes\",\"params\":{}},\"docker.network.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"docker.network.inbound.bytes\":{\"id\":\"bytes\",\"params\":{}},\"docker.network.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"docker.network.outbound.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.index.summary.primaries.segments.memory.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.index.summary.primaries.store.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.index.summary.total.segments.memory.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.index.summary.total.store.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.index.total.segments.memory.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.index.total.store.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.jvm.memory.heap.init.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.jvm.memory.heap.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.jvm.memory.nonheap.init.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.jvm.memory.nonheap.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.fs.summary.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.fs.summary.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.fs.summary.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.indices.segments.memory.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.old.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.old.peak.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.old.peak_max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.old.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.survivor.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.survivor.peak.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.survivor.peak_max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.survivor.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.young.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.young.peak.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.young.peak_max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.young.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"etcd.disk.mvcc_db_total_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"etcd.memory.go_memstats_alloc.bytes\":{\"id\":\"bytes\",\"params\":{}},\"etcd.network.client_grpc_received.bytes\":{\"id\":\"bytes\",\"params\":{}},\"etcd.network.client_grpc_sent.bytes\":{\"id\":\"bytes\",\"params\":{}},\"event.duration\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"nanoseconds\",\"outputFormat\":\"asMilliseconds\",\"outputPrecision\":1}},\"event.sequence\":{\"id\":\"string\",\"params\":{}},\"event.severity\":{\"id\":\"string\",\"params\":{}},\"golang.heap.allocations.active\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.allocations.allocated\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.allocations.idle\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.allocations.total\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.gc.next_gc_limit\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.system.obtained\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.system.released\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.system.stack\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.system.total\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.info.idle.pct\":{\"id\":\"percent\",\"params\":{}},\"haproxy.info.memory.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.info.ssl.frontend.session_reuse.pct\":{\"id\":\"percent\",\"params\":{}},\"haproxy.stat.compressor.bypassed.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.stat.compressor.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.stat.compressor.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.stat.compressor.response.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.stat.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.stat.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.stat.throttle.pct\":{\"id\":\"percent\",\"params\":{}},\"http.request.body.bytes\":{\"id\":\"bytes\",\"params\":{}},\"http.request.bytes\":{\"id\":\"bytes\",\"params\":{}},\"http.response.body.bytes\":{\"id\":\"bytes\",\"params\":{}},\"http.response.bytes\":{\"id\":\"bytes\",\"params\":{}},\"http.response.status_code\":{\"id\":\"string\",\"params\":{}},\"kibana.stats.process.memory.heap.size_limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kibana.stats.process.memory.heap.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kibana.stats.process.memory.heap.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.apiserver.http.request.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.apiserver.http.response.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.apiserver.process.memory.resident.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.apiserver.process.memory.virtual.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.cpu.usage.limit.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.container.cpu.usage.node.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.container.logs.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.logs.capacity.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.logs.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.memory.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.memory.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.memory.request.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.memory.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.memory.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.memory.usage.limit.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.container.memory.usage.node.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.container.memory.workingset.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.rootfs.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.rootfs.capacity.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.rootfs.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.controllermanager.http.request.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.controllermanager.http.response.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.controllermanager.process.memory.resident.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.controllermanager.process.memory.virtual.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.fs.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.fs.capacity.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.fs.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.memory.allocatable.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.memory.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.memory.capacity.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.memory.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.memory.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.memory.workingset.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.network.rx.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.network.tx.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.runtime.imagefs.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.runtime.imagefs.capacity.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.runtime.imagefs.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.pod.cpu.usage.limit.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.pod.cpu.usage.node.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.pod.memory.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.pod.memory.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.pod.memory.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.pod.memory.usage.limit.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.pod.memory.usage.node.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.pod.memory.working_set.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.pod.network.rx.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.pod.network.tx.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.proxy.http.request.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.proxy.http.response.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.proxy.process.memory.resident.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.proxy.process.memory.virtual.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.scheduler.http.request.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.scheduler.http.response.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.scheduler.process.memory.resident.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.scheduler.process.memory.virtual.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.system.memory.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.system.memory.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.system.memory.workingset.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.volume.fs.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.volume.fs.capacity.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.volume.fs.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.dbstats.avg_obj_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.dbstats.data_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.dbstats.extent_free_list.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.dbstats.file_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.dbstats.index_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.dbstats.storage_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.replstatus.headroom.max\":{\"id\":\"duration\",\"params\":{}},\"mongodb.replstatus.headroom.min\":{\"id\":\"duration\",\"params\":{}},\"mongodb.replstatus.lag.max\":{\"id\":\"duration\",\"params\":{}},\"mongodb.replstatus.lag.min\":{\"id\":\"duration\",\"params\":{}},\"mongodb.replstatus.oplog.size.allocated\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.replstatus.oplog.size.used\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.extra_info.heap_usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.network.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.network.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.wired_tiger.cache.dirty.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.wired_tiger.cache.maximum.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.wired_tiger.cache.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.wired_tiger.log.max_file_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.wired_tiger.log.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.wired_tiger.log.write.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mysql.status.bytes.received\":{\"id\":\"bytes\",\"params\":{}},\"mysql.status.bytes.sent\":{\"id\":\"bytes\",\"params\":{}},\"nats.stats.cpu\":{\"id\":\"percent\",\"params\":{}},\"nats.stats.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"nats.stats.mem.bytes\":{\"id\":\"bytes\",\"params\":{}},\"nats.stats.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"nats.stats.uptime\":{\"id\":\"duration\",\"params\":{}},\"nats.subscriptions.cache.hit_rate\":{\"id\":\"percent\",\"params\":{}},\"network.bytes\":{\"id\":\"bytes\",\"params\":{}},\"oracle.tablespace.data_file.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"oracle.tablespace.data_file.size.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"oracle.tablespace.data_file.size.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"oracle.tablespace.space.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"oracle.tablespace.space.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"oracle.tablespace.space.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"process.pgid\":{\"id\":\"string\",\"params\":{}},\"process.pid\":{\"id\":\"string\",\"params\":{}},\"process.ppid\":{\"id\":\"string\",\"params\":{}},\"process.thread.id\":{\"id\":\"string\",\"params\":{}},\"rabbitmq.connection.frame_max\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.node.disk.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.node.disk.free.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.node.gc.reclaimed.bytes\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.node.io.read.bytes\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.node.io.write.bytes\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.node.mem.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.queue.consumers.utilisation.pct\":{\"id\":\"percent\",\"params\":{}},\"rabbitmq.queue.memory.bytes\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.allocator_stats.active\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.allocator_stats.allocated\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.allocator_stats.fragmentation.bytes\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.allocator_stats.resident\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.allocator_stats.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.fragmentation.bytes\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.max.value\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.used.dataset\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.used.lua\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.used.peak\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.used.rss\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.used.value\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.persistence.aof.buffer.size\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.persistence.aof.copy_on_write.last_size\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.persistence.aof.rewrite.buffer.size\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.persistence.aof.rewrite.current_time.sec\":{\"id\":\"duration\",\"params\":{}},\"redis.info.persistence.aof.rewrite.last_time.sec\":{\"id\":\"duration\",\"params\":{}},\"redis.info.persistence.aof.size.base\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.persistence.aof.size.current\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.persistence.rdb.bgsave.current_time.sec\":{\"id\":\"duration\",\"params\":{}},\"redis.info.persistence.rdb.bgsave.last_time.sec\":{\"id\":\"duration\",\"params\":{}},\"redis.info.persistence.rdb.copy_on_write.last_size\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.replication.backlog.size\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.replication.master.last_io_seconds_ago\":{\"id\":\"duration\",\"params\":{}},\"redis.info.replication.master.sync.last_io_seconds_ago\":{\"id\":\"duration\",\"params\":{}},\"redis.info.replication.master.sync.left_bytes\":{\"id\":\"bytes\",\"params\":{}},\"server.bytes\":{\"id\":\"bytes\",\"params\":{}},\"server.nat.port\":{\"id\":\"string\",\"params\":{}},\"server.port\":{\"id\":\"string\",\"params\":{}},\"source.bytes\":{\"id\":\"bytes\",\"params\":{}},\"source.nat.port\":{\"id\":\"string\",\"params\":{}},\"source.port\":{\"id\":\"string\",\"params\":{}},\"system.core.idle.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.iowait.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.irq.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.nice.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.softirq.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.steal.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.system.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.user.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.idle.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.idle.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.iowait.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.iowait.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.irq.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.irq.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.nice.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.nice.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.softirq.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.softirq.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.steal.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.steal.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.system.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.system.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.total.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.total.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.user.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.user.pct\":{\"id\":\"percent\",\"params\":{}},\"system.diskio.iostat.read.per_sec.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.diskio.iostat.write.per_sec.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.diskio.read.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.diskio.write.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.entropy.pct\":{\"id\":\"percent\",\"params\":{}},\"system.filesystem.available\":{\"id\":\"bytes\",\"params\":{}},\"system.filesystem.free\":{\"id\":\"bytes\",\"params\":{}},\"system.filesystem.total\":{\"id\":\"bytes\",\"params\":{}},\"system.filesystem.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.filesystem.used.pct\":{\"id\":\"percent\",\"params\":{}},\"system.fsstat.total_size.free\":{\"id\":\"bytes\",\"params\":{}},\"system.fsstat.total_size.total\":{\"id\":\"bytes\",\"params\":{}},\"system.fsstat.total_size.used\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.actual.free\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.actual.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.actual.used.pct\":{\"id\":\"percent\",\"params\":{}},\"system.memory.free\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.hugepages.default_size\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.hugepages.free\":{\"id\":\"number\",\"params\":{}},\"system.memory.hugepages.reserved\":{\"id\":\"number\",\"params\":{}},\"system.memory.hugepages.surplus\":{\"id\":\"number\",\"params\":{}},\"system.memory.hugepages.total\":{\"id\":\"number\",\"params\":{}},\"system.memory.hugepages.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.hugepages.used.pct\":{\"id\":\"percent\",\"params\":{}},\"system.memory.swap.free\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.swap.total\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.swap.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.swap.used.pct\":{\"id\":\"percent\",\"params\":{}},\"system.memory.total\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.used.pct\":{\"id\":\"percent\",\"params\":{}},\"system.network.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.network.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.blkio.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.kmem.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.kmem.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.kmem.usage.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.kmem_tcp.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.kmem_tcp.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.kmem_tcp.usage.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.mem.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.mem.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.mem.usage.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.memsw.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.memsw.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.memsw.usage.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.active_anon.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.active_file.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.cache.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.hierarchical_memory_limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.hierarchical_memsw_limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.inactive_anon.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.inactive_file.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.mapped_file.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.rss_huge.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.swap.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.unevictable.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cpu.total.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.process.cpu.total.pct\":{\"id\":\"percent\",\"params\":{}},\"system.process.memory.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.memory.rss.pct\":{\"id\":\"percent\",\"params\":{}},\"system.process.memory.share\":{\"id\":\"bytes\",\"params\":{}},\"system.process.memory.size\":{\"id\":\"bytes\",\"params\":{}},\"system.socket.summary.tcp.memory\":{\"id\":\"bytes\",\"params\":{}},\"system.socket.summary.udp.memory\":{\"id\":\"bytes\",\"params\":{}},\"system.uptime.duration.ms\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"milliseconds\"}},\"url.port\":{\"id\":\"string\",\"params\":{}},\"vsphere.datastore.capacity.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.datastore.capacity.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.datastore.capacity.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.datastore.capacity.used.pct\":{\"id\":\"percent\",\"params\":{}},\"vsphere.host.memory.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.host.memory.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.host.memory.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.virtualmachine.memory.free.guest.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.virtualmachine.memory.total.guest.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.virtualmachine.memory.used.guest.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.virtualmachine.memory.used.host.bytes\":{\"id\":\"bytes\",\"params\":{}},\"windows.service.uptime.ms\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"milliseconds\"}}}", + "fields" : "[{\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"esTypes\":[\"_type\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"aerospike.namespace.client.delete.error\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.delete.not_found\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.delete.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.delete.timeout\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.read.error\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.read.not_found\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.read.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.read.timeout\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.write.error\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.write.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.write.timeout\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.device.available.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.device.free.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.device.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.device.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.hwm_breached\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.memory.free.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.memory.used.data.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.memory.used.index.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.memory.used.sindex.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.memory.used.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.node.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.node.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.objects.master\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.objects.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.stop_writes\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"agent.ephemeral_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"agent.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"agent.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"agent.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"agent.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"agent.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.bytes_per_request\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.bytes_per_sec\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.connections.async.closing\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.connections.async.keep_alive\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.connections.async.writing\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.connections.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.cpu.children_system\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.cpu.children_user\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.cpu.load\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.cpu.system\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.cpu.user\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.load.1\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.load.15\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.load.5\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.requests_per_sec\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.closing_connection\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.dns_lookup\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.gracefully_finishing\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.idle_cleanup\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.keepalive\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.logging\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.open_slot\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.reading_request\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.sending_reply\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.starting_up\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.waiting_for_connection\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.total_accesses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.total_kbytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.uptime.server_uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.uptime.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.workers.busy\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.workers.idle\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"as.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"as.organization.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.cloudwatch.namespace\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.cpu.credit_balance\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.cpu.credit_usage\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.cpu.surplus_credit_balance\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.cpu.surplus_credits_charged\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.cpu.total.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.read.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.read.bytes_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.read.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.read.ops_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.write.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.write.bytes_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.write.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.write.ops_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.core.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.image.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.monitoring.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.private.dns_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.private.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.public.dns_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.public.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.state.code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.state.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.threads_per_core\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.in.bytes_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.in.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.in.packets_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.out.bytes_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.out.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.out.packets_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.status.check_failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.status.check_failed_instance\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.status.check_failed_system\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.cpu.credit_balance\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.cpu.credit_usage\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.cpu.total.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.database_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.db_instance.arn\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.db_instance.class\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.db_instance.identifier\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.db_instance.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.deadlocks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.disk_queue_depth\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.disk_usage.bin_log.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.disk_usage.replication_slot.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.disk_usage.transaction_logs.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.failed_sql_server_agent_jobs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.free_local_storage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.free_storage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.freeable_memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.commit\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.ddl\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.dml\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.insert\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.read\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.select\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.update\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.write\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.login_failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.maximum_used_transaction_ids\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.oldest_replication_slot_lag.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.queries\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.read_io.ops_per_sec\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.replica_lag.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.swap_usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.commit\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.ddl\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.delete\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.dml\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.insert\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.network\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.network_receive\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.network_transmit\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.read\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.select\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.update\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.write\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.transaction_logs_generation\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.transactions.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.transactions.blocked\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.volume_used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.write_io.ops_per_sec\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_daily_storage.bucket.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_daily_storage.bucket.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_daily_storage.number_of_objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.bucket.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.downloaded.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.errors.4xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.errors.5xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.latency.first_byte.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.latency.total_request.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.delete\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.get\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.head\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.list\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.post\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.put\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.select\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.select_returned.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.select_scanned.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.uploaded.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.empty_receives\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.messages.delayed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.messages.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.messages.not_visible\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.messages.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.messages.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.messages.visible\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.oldest_message_age.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.queue.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.sent_message_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.state.management.enabled\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.state.module.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.state.output.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.state.queue.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.acked\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.batches\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.dropped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.duplicates\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.toomany\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.read.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.read.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.write.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.write.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.runtime.goroutines\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.uptime.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_disk.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_disk.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_disk.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_health.overall_status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_health.timechecks.epoch\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_health.timechecks.round.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_health.timechecks.round.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.degraded.objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.degraded.ratio\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.degraded.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.misplace.objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.misplace.ratio\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.misplace.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.epoch\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.full\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.nearfull\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.num_in_osds\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.num_osds\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.num_remapped_pgs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.num_up_osds\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg.avail_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg.data_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg.total_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg.used_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg_state.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg_state.state_name\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg_state.version\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.traffic.read_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.traffic.read_op_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.traffic.write_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.traffic.write_op_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.version\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.available.kb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.available.pct\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.health\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.last_updated\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.store_stats.last_updated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.store_stats.log.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.store_stats.misc.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.store_stats.sst.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.store_stats.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.total.kb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.used.kb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.device_class\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.pg_num\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.total.byte\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.used.byte\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.used.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.children\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.crush_weight\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.depth\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.device_class\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.exists\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.father\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.primary_affinity\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.reweight\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.type_id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.pool_disk.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.pool_disk.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.pool_disk.stats.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.pool_disk.stats.objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.pool_disk.stats.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.pool_disk.stats.used.kb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.as.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.as.organization.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.nat.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.nat.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.email\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.full_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.account.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.availability_zone\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.image.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.instance.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.instance.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.machine.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.project.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.provider\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.region\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.autopilot.healthy\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.alloc.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.garbage_collector.pause.current.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.garbage_collector.pause.total.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.garbage_collector.runs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.goroutines\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.heap_objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.malloc_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.sys.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"container.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"container.image.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"container.image.tag\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"container.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"container.runtime\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.cache.hits.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.cache.misses.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.do.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.duration.ns.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.duration.ns.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.type.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.response.rcode.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.response.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.response.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.family\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.panic.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.proto\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.rcode\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.server\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.zone\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.data.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.disk.fetches\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.disk.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.item_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.memory.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.ops_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.quota.ram.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.quota.use.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.hdd.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.hdd.quota.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.hdd.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.hdd.used.by_data.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.hdd.used.value.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.max_bucket_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.quota.index_memory.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.quota.memory.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.quota.total.per_node.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.quota.total.value.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.quota.used.per_node.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.quota.used.value.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.used.by_data.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.used.value.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.cmd_get\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.couch.docs.data_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.couch.docs.disk_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.couch.spatial.data_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.couch.spatial.disk_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.couch.views.data_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.couch.views.disk_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.cpu_utilization_rate.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.current_items.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.current_items.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.ep_bg_fetched\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.get_hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.mcd_memory.allocated.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.mcd_memory.reserved.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.memory.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.memory.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.memory.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.swap.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.swap.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.uptime.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.vb_replica_curr_items\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.auth_cache_hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.auth_cache_misses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.database_reads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.database_writes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.open_databases\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.open_os_files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.request_time\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd.bulk_requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd.clients_requesting_changes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd.temporary_view_reads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd.view_reads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_request_methods.COPY\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_request_methods.DELETE\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_request_methods.GET\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_request_methods.HEAD\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_request_methods.POST\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_request_methods.PUT\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.200\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.201\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.202\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.301\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.304\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.400\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.401\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.403\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.404\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.405\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.409\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.412\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.500\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.as.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.as.organization.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.nat.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.nat.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.email\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.full_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.answers.class\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.answers.data\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.answers.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.answers.ttl\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.answers.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.header_flags\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.op_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.question.class\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.question.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.question.registered_domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.question.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.resolved_ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.response_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.command\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.created\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.ip_addresses\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.size.root_fs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.size.rw\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.tags\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.kernel.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.kernel.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.system.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.system.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.total.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.user.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.user.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.read.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.read.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.read.rate\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.reads\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.summary.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.summary.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.summary.rate\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.total\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.write.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.write.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.write.rate\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.writes\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.event.action\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.event.actor.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.event.from\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.event.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.event.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.event.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.healthcheck.event.end_date\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.healthcheck.event.exit_code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.healthcheck.event.output\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.healthcheck.event.start_date\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.healthcheck.failingstreak\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.healthcheck.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.image.created\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.image.id.current\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.image.id.parent\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.image.size.regular\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.image.size.virtual\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.image.tags\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.info.containers.paused\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.info.containers.running\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.info.containers.stopped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.info.containers.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.info.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.info.images\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.commit.peak\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.commit.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.fail.count\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.private_working_set.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.rss.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.rss.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.usage.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.usage.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.usage.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.in.dropped\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.in.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.in.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.inbound.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.inbound.dropped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.inbound.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.inbound.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.interface\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.out.dropped\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.out.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.out.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.outbound.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.outbound.dropped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.outbound.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.outbound.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ecs.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.follower.global_checkpoint\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.follower.index\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.follower.operations_written\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.follower.shard.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.follower.time_since_last_read.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.leader.index\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.leader.max_seq_no\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.pending_task.insert_order\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.pending_task.priority\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.pending_task.source\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.pending_task.time_in_queue.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.state.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.indices.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.indices.fielddata.memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.indices.shards.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.indices.shards.primaries\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.nodes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.nodes.data\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.nodes.master\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.primary\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.source.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.source.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.source.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.stage\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.target.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.target.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.target.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.primaries.docs.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.primaries.docs.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.primaries.segments.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.primaries.segments.memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.primaries.store.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.total.docs.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.total.docs.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.total.segments.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.total.segments.memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.total.store.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.total.docs.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.total.docs.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.total.segments.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.total.segments.memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.total.store.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ml.job.data_counts.invalid_date_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ml.job.data_counts.processed_record_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ml.job.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ml.job.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.jvm.memory.heap.init.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.jvm.memory.heap.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.jvm.memory.nonheap.init.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.jvm.memory.nonheap.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.jvm.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.process.mlockall\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.fs.summary.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.fs.summary.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.fs.summary.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.indices.docs.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.indices.docs.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.indices.segments.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.indices.segments.memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.indices.store.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.gc.collectors.old.collection.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.gc.collectors.old.collection.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.gc.collectors.young.collection.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.gc.collectors.young.collection.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.old.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.old.peak.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.old.peak_max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.old.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.survivor.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.survivor.peak.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.survivor.peak_max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.survivor.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.young.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.young.peak.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.young.peak_max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.young.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.shard.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.shard.primary\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.shard.relocating_node.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.shard.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.cluster_manager.active_clusters\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.cluster_manager.cluster_added\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.cluster_manager.cluster_modified\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.cluster_manager.cluster_removed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.cluster_manager.warming_clusters\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.filesystem.flushed_by_timer\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.filesystem.reopen_failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.filesystem.write_buffered\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.filesystem.write_completed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.filesystem.write_total_buffered\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.header_overflow\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.headers_cb_no_stream\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.rx_messaging_error\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.rx_reset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.too_many_header_frames\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.trailers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.tx_reset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.listener_added\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.listener_create_failure\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.listener_create_success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.listener_modified\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.listener_removed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.total_listeners_active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.total_listeners_draining\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.total_listeners_warming\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.runtime.admin_overrides_active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.runtime.load_error\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.runtime.load_success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.runtime.num_keys\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.runtime.override_dir_exists\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.runtime.override_dir_not_exists\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.days_until_first_cert_expiring\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.hot_restart_epoch\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.live\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.memory_allocated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.memory_heap_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.parent_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.total_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.version\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.watchdog_mega_miss\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.watchdog_miss\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.stats.overflow\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"error.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"error.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"error.message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"error.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.api_version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.disk.backend_commit_duration.ns.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.disk.backend_commit_duration.ns.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.disk.mvcc_db_total_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.disk.wal_fsync_duration.ns.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.disk.wal_fsync_duration.ns.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.counts.followers.counts.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.counts.followers.counts.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.latency.follower.latency.standardDeviation\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.latency.followers.latency.average\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.latency.followers.latency.current\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.latency.followers.latency.maximum\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.latency.followers.latency.minimum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.leader\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.memory.go_memstats_alloc.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.network.client_grpc_received.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.network.client_grpc_sent.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.leaderinfo.leader\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.leaderinfo.starttime\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.leaderinfo.uptime\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.recv.appendrequest.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.recv.bandwidthrate\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.recv.pkgrate\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.send.appendrequest.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.send.bandwidthrate\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.send.pkgrate\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.starttime\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.grpc_handled.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.grpc_started.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.has_leader\",\"type\":\"number\",\"esTypes\":[\"byte\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.leader_changes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.proposals_committed.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.proposals_failed.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.proposals_pending.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.compareanddelete.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.compareanddelete.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.compareandswap.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.compareandswap.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.create.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.create.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.delete.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.delete.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.expire.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.gets.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.gets.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.sets.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.sets.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.update.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.update.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.watchers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.action\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.category\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.created\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.dataset\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.duration\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.end\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.module\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.original\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.outcome\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.provider\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.risk_score\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.risk_score_norm\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.sequence\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.severity\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.start\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.timezone\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.accessed\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.created\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.ctime\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.device\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.directory\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.extension\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.gid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.group\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.hash.md5\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.hash.sha1\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.hash.sha256\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.hash.sha512\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.inode\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.mode\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.mtime\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.owner\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.target_path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.uid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.expvar.cmdline\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.allocated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.frees\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.idle\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.mallocs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.cmdline\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.cpu_fraction\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.next_gc_limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.pause.avg.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.pause.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.pause.max.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.pause.sum.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.total_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.total_pause.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.system.obtained\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.system.released\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.system.stack\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.system.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"graphite.server.example\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.compress.bps.in\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.compress.bps.out\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.compress.bps.rate_limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.hard_max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.rate.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.ssl.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.ssl.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.ssl.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.idle.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.memory.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.pipes.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.pipes.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.pipes.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.process_num\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.processes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.requests.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.requests.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.run_queue\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.session.rate.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.session.rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.session.rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.sockets.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.backend.key_rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.backend.key_rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.cache_misses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.cached_lookups\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.frontend.key_rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.frontend.key_rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.frontend.session_reuse.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.rate.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.tasks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ulimit_n\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.uptime.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.zlib_mem_usage.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.zlib_mem_usage.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.agent.last\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.down\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.duration\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.health.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.health.last\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.client.aborted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.component_type\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.compressor.bypassed.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.compressor.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.compressor.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.compressor.response.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.connection.retried\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.connection.time.avg\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.connection.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.downtime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.last_change\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.proxy.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.proxy.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.queue.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.queue.time.avg\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.connection.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.denied\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.queued.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.queued.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.redispatched\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.denied\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.http.1xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.http.2xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.http.3xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.http.4xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.http.5xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.http.other\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.time.avg\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.selected.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.server.aborted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.server.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.server.backup\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.server.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.service_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.session.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.session.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.session.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.session.rate.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.session.rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.session.rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.throttle.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.tracked.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.weight\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"hash.md5\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"hash.sha1\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"hash.sha256\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"hash.sha512\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.architecture\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.containerized\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.build\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.codename\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.family\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.full\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.kernel\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.platform\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.email\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.full_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.request.body.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.request.body.content\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.request.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.request.method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.request.referrer\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.response.body.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.response.body.content\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.response.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.response.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.response.phrase\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.response.status_code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.agent.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.agent.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.secured\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.server.product\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.server.vendor\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.server.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.broker.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.broker.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.broker.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.broker.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.client.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.client.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.client.member_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.error.code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.meta\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.offset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.partition\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.topic\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.broker.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.broker.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.offset.newest\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.offset.oldest\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.error.code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.insync_replica\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.is_leader\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.isr\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.leader\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.replica\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.topic.error.code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.topic.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.topic_broker_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.topic_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.topic.error.code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.topic.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.concurrent_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.host.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.index\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.process.event_loop_delay.ms\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.process.memory.heap.size_limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.process.memory.heap.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.process.memory.heap.uptime.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.process.memory.heap.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.request.disconnects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.request.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.response_time.avg.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.response_time.max.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.snapshot\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.status.metrics.concurrent_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.status.metrics.requests.disconnects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.status.metrics.requests.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.status.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.status.status.overall.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.audit.event.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.audit.rejected.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.client.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.etcd.object.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.request.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.request.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.request.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.request.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.response.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.response.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.process.cpu.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.process.fds.open.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.process.memory.resident.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.process.memory.virtual.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.process.started.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.client\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.component\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.content_type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.current.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.dry_run\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.group\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.handler\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.latency.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.latency.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.longrunning.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.resource\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.scope\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.subresource\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.verb\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.limit.cores\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.limit.nanocores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.request.cores\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.request.nanocores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.usage.core.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.usage.limit.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.usage.nanocores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.usage.node.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.image\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.logs.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.logs.capacity.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.logs.inodes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.logs.inodes.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.logs.inodes.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.logs.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.majorpagefaults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.pagefaults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.request.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.usage.limit.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.usage.node.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.workingset.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.rootfs.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.rootfs.capacity.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.rootfs.inodes.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.rootfs.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.status.phase\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.status.ready\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.status.reason\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.status.restarts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.client.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.handler\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.request.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.request.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.request.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.request.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.response.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.response.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.leader.is_master\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.node.collector.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.node.collector.eviction.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.node.collector.health.pct\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.node.collector.unhealthy.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.process.cpu.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.process.fds.open.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.process.memory.resident.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.process.memory.virtual.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.process.started.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.workqueue.adds.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.workqueue.depth.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.workqueue.longestrunning.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.workqueue.retries.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.workqueue.unfinished.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.zone\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.active.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.concurrency\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.created.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.deadline.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.is_suspended\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.last_schedule.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.next_schedule.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.schedule\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.deployment.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.deployment.paused\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.deployment.replicas.available\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.deployment.replicas.desired\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.deployment.replicas.unavailable\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.deployment.replicas.updated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.involved_object.api_version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.involved_object.kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.involved_object.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.involved_object.resource_version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.involved_object.uid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.message\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.metadata.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.metadata.namespace\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.metadata.resource_version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.metadata.self_link\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.metadata.timestamp.created\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.metadata.uid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.reason\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.timestamp.first_occurrence\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.timestamp.last_occurrence\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.namespace\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.cpu.allocatable.cores\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.cpu.capacity.cores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.cpu.usage.core.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.cpu.usage.nanocores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.fs.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.fs.capacity.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.fs.inodes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.fs.inodes.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.fs.inodes.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.fs.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.allocatable.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.capacity.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.majorpagefaults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.pagefaults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.workingset.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.network.rx.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.network.rx.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.network.tx.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.network.tx.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.pod.allocatable.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.pod.capacity.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.runtime.imagefs.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.runtime.imagefs.capacity.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.runtime.imagefs.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.status.ready\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.status.unschedulable\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.cpu.usage.limit.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.cpu.usage.nanocores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.cpu.usage.node.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.host_ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.major_page_faults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.page_faults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.usage.limit.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.usage.node.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.working_set.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.network.rx.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.network.rx.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.network.tx.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.network.tx.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.status.phase\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.status.ready\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.status.scheduled\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.uid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.client.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.handler\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.request.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.request.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.request.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.request.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.response.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.response.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.process.cpu.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.process.fds.open.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.process.memory.resident.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.process.memory.virtual.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.process.started.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.sync.networkprogramming.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.sync.networkprogramming.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.sync.rules.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.sync.rules.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.replicaset.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.replicaset.replicas.available\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.replicaset.replicas.desired\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.replicaset.replicas.labeled\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.replicaset.replicas.observed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.replicaset.replicas.ready\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.client.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.handler\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.request.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.request.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.request.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.request.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.response.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.response.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.leader.is_master\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.operation\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.process.cpu.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.process.fds.open.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.process.memory.resident.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.process.memory.virtual.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.process.started.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.result\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.scheduling.duration.seconds.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.scheduling.duration.seconds.sum\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.scheduling.e2e.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.scheduling.e2e.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.scheduling.pod.attempts.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.scheduling.pod.preemption.victims.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.statefulset.created\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.statefulset.generation.desired\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.statefulset.generation.observed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.statefulset.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.statefulset.replicas.desired\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.statefulset.replicas.observed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.container\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.cpu.usage.core.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.cpu.usage.nanocores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.memory.majorpagefaults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.memory.pagefaults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.memory.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.memory.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.memory.workingset.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.fs.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.fs.capacity.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.fs.inodes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.fs.inodes.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.fs.inodes.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.fs.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kvm.dommemstat.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kvm.dommemstat.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kvm.dommemstat.stat.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kvm.dommemstat.stat.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"log.level\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"log.logger\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"log.original\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"logstash.node.jvm.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"logstash.node.stats.events.filtered\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"logstash.node.stats.events.in\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"logstash.node.stats.events.out\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.bytes.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.bytes.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.cmd.get\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.cmd.set\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.connections.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.connections.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.evictions\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.get.hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.get.misses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.items.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.items.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.read.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.threads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.uptime.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.written.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"metricset.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"metricset.period\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.collection\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.commands.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.commands.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.db\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.getmore.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.getmore.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.insert.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.insert.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.lock.read.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.lock.read.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.lock.write.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.lock.write.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.queries.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.queries.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.remove.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.remove.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.total.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.total.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.update.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.update.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.avg_obj_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.collections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.data_file_version.major\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.data_file_version.minor\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.data_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.db\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.extent_free_list.num\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.extent_free_list.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.file_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.index_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.indexes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.ns_size_mb.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.num_extents\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.storage_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.aggregate.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.aggregate.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.build_info.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.build_info.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.coll_stats.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.coll_stats.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.connection_pool_stats.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.connection_pool_stats.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.count.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.count.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.db_stats.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.db_stats.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.distinct.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.distinct.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.find.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.find.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_cmd_line_opts.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_cmd_line_opts.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_last_error.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_last_error.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_log.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_log.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_more.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_more.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_parameter.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_parameter.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.host_info.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.host_info.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.insert.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.insert.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.is_master.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.is_master.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.is_self.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.is_self.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.last_collections.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.last_collections.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.last_commands.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.last_commands.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.list_databased.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.list_databased.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.list_indexes.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.list_indexes.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.ping.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.ping.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.profile.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.profile.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_get_rbid.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_get_rbid.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_get_status.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_get_status.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_heartbeat.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_heartbeat.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_update_position.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_update_position.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.server_status.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.server_status.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.update.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.update.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.whatsmyuri.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.whatsmyuri.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.cursor.open.no_timeout\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.cursor.open.pinned\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.cursor.open.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.cursor.timed_out\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.document.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.document.inserted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.document.returned\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.document.updated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.get_last_error.write_timeouts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.get_last_error.write_wait.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.get_last_error.write_wait.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.operation.scan_and_order\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.operation.write_conflicts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.query_executor.scanned_documents\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.query_executor.scanned_indexes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.apply.attempts_to_become_secondary\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.apply.batches.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.apply.batches.time.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.apply.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.buffer.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.buffer.max_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.buffer.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.cancels\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.event_created\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.event_wait\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.scheduled.dbwork\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.scheduled.exclusive\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.scheduled.failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.scheduled.netcmd\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.scheduled.work\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.scheduled.work_at\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.waits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.event_waiters\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.network_interface\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.queues.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.queues.in_progress.dbwork\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.queues.in_progress.exclusive\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.queues.in_progress.network\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.queues.ready\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.queues.sleepers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.shutting_down\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.unsignaled_events\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.initial_sync.completed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.initial_sync.failed_attempts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.initial_sync.failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.network.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.network.getmores.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.network.getmores.time.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.network.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.network.reders_created\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.preload.docs.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.preload.docs.time.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.preload.indexes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.preload.indexes.time.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.storage.free_list.search.bucket_exhausted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.storage.free_list.search.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.storage.free_list.search.scanned\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.ttl.deleted_documents\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.ttl.passes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.headroom.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.headroom.min\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.lag.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.lag.min\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.arbiter.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.arbiter.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.down.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.down.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.primary.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.primary.optime\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.recovering.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.recovering.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.rollback.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.rollback.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.secondary.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.secondary.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.secondary.optimes\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.startup2.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.startup2.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.unhealthy.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.unhealthy.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.unknown.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.unknown.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.oplog.first.timestamp\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.oplog.last.timestamp\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.oplog.size.allocated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.oplog.size.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.oplog.window\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.optimes.applied\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.optimes.durable\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.optimes.last_committed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.server_date\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.set_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.asserts.msg\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.asserts.regular\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.asserts.rollovers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.asserts.user\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.asserts.warning\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.background_flushing.average.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.background_flushing.flushes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.background_flushing.last.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.background_flushing.last_finished\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.background_flushing.total.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.connections.available\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.connections.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.connections.total_created\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.extra_info.heap_usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.extra_info.page_faults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.active_clients.readers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.active_clients.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.active_clients.writers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.current_queue.readers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.current_queue.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.current_queue.writers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.total_time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.commits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.commits_in_write_lock\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.compression\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.early_commits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.journaled.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.commits.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.commits_in_write_lock.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.dt.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.prep_log_buffer.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.remap_private_view.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.write_to_data_files.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.write_to_journal.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.write_to_data_files.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.local_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.acquire.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.acquire.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.acquire.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.acquire.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.deadlock.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.deadlock.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.deadlock.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.deadlock.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.us.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.us.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.us.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.us.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.acquire.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.acquire.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.acquire.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.acquire.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.deadlock.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.deadlock.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.deadlock.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.deadlock.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.us.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.us.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.us.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.us.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.acquire.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.acquire.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.acquire.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.acquire.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.deadlock.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.deadlock.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.deadlock.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.deadlock.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.us.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.us.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.us.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.us.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.acquire.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.acquire.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.acquire.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.acquire.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.deadlock.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.deadlock.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.deadlock.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.deadlock.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.us.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.us.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.us.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.us.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.acquire.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.acquire.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.acquire.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.acquire.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.deadlock.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.deadlock.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.deadlock.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.deadlock.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.us.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.us.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.us.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.us.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.memory.bits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.memory.mapped.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.memory.mapped_with_journal.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.memory.resident.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.memory.virtual.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.network.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.network.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.network.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.counters.command\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.counters.delete\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.counters.getmore\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.counters.insert\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.counters.query\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.counters.update\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.latencies.commands.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.latencies.commands.latency\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.latencies.reads.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.latencies.reads.latency\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.latencies.writes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.latencies.writes.latency\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.replicated.command\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.replicated.delete\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.replicated.getmore\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.replicated.insert\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.replicated.query\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.replicated.update\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.process\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.storage_engine.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.uptime.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.cache.dirty.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.cache.maximum.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.cache.pages.evicted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.cache.pages.read\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.cache.pages.write\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.cache.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.concurrent_transactions.read.available\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.concurrent_transactions.read.out\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.concurrent_transactions.read.total_tickets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.concurrent_transactions.write.available\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.concurrent_transactions.write.out\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.concurrent_transactions.write.total_tickets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.flushes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.max_file_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.scans\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.syncs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.write.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.writes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.write_backs_queued\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.database.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.database.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.active_temp_tables\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.batch_requests_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.buffer.cache_hit.pct\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.buffer.checkpoint_pages_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.buffer.database_pages\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.buffer.page_life_expectancy.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.buffer.target_pages\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.compilations_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.connections_reset_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.lock_waits_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.logins_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.logouts_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.page_splits_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.recompilations_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.transactions\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.user_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.space_usage.since_last_backup.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.space_usage.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.space_usage.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.space_usage.used.pct\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.stats.active_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.stats.backup_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.stats.recovery_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.stats.since_last_checkpoint.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.stats.total_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"munin.plugin.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.apply.oooe\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.apply.oool\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.apply.window\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.cert.deps_distance\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.cert.index_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.cert.interval\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.cluster.conf_id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.cluster.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.cluster.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.commit.oooe\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.commit.window\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.connected\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.evs.evict\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.evs.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.flow_ctl.paused\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.flow_ctl.paused_ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.flow_ctl.recv\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.flow_ctl.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.last_committed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.bf_aborts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.cert_failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.commits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.recv.queue\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.recv.queue_avg\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.recv.queue_max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.recv.queue_min\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.replays\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.send.queue\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.send.queue_avg\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.send.queue_max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.send.queue_min\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.ready\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.received.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.received.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.repl.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.repl.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.repl.data_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.repl.keys\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.repl.keys_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.repl.other_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.aborted.clients\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.aborted.connects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.binlog.cache.disk_use\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.binlog.cache.use\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.bytes.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.bytes.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.command.delete\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.command.insert\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.command.select\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.command.update\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.created.tmp.disk_tables\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.created.tmp.files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.created.tmp.tables\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.delayed.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.delayed.insert_threads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.delayed.writes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.flush_commands\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.commit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.delete\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.external_lock\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.mrr_init\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.prepare\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.first\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.key\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.last\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.next\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.prev\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.rnd\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.rnd_next\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.rollback\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.savepoint\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.savepoint_rollback\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.update\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.write\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.bytes.data\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.bytes.dirty\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.dump_status\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.load_status\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.data\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.dirty\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.flushed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.latched\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.misc\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pool.reads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pool.resize_status\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pool.wait_free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.read.ahead\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.read.ahead_evicted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.read.ahead_rnd\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.read.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.write_requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.max_used_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.open.files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.open.streams\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.open.tables\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.opened_tables\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.queries\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.questions\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.threads.cached\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.threads.connected\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.threads.created\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.threads.running\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.connections.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.routes.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.server.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.server.time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.cores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.cpu\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.http.req_stats.uri.connz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.http.req_stats.uri.root\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.http.req_stats.uri.routez\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.http.req_stats.uri.subsz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.http.req_stats.uri.varz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.in.messages\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.mem.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.out.messages\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.remotes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.slow_consumers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.total_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.cache.fanout.avg\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.cache.fanout.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.cache.hit_rate\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.cache.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.inserts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.matches\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.removes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.application\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.community_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.direction\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.forwarded_ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.iana_number\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.protocol\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.transport\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.accepts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.dropped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.handled\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.reading\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.waiting\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.writing\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.os.family\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.os.full\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.os.kernel\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.os.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.os.platform\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.os.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.serial_number\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.vendor\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.buffer_pool\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cache.buffer.hit.pct\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cache.get.consistent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cache.get.db_blocks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cache.physical_reads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.avg\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.cache_hit.pct\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.max\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.opened.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.opened.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.parse.real\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.parse.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.session.cache_hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.total\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.io_reloads\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.lock_requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.machine\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.pin_requests\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.username\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.online_status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.size.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.size.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.space.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.space.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.space.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"organization.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"organization.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"os.family\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"os.full\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"os.kernel\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"os.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"os.platform\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"os.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.connections.accepted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.connections.listen_queue_len\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.connections.max_listen_queue\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.connections.queued\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.process_manager\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.processes.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.processes.idle\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.processes.max_active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.processes.max_children_reached\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.processes.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.slow_requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.start_since\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.last_request_cpu\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.last_request_memory\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.request_duration\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.script\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.start_since\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.application_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.backend_start\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.client.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.client.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.client.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.database.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.database.oid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.query\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.query_start\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.state_change\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.transaction_start\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.user.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.waiting\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.buffers.allocated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.buffers.backend\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.buffers.backend_fsync\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.buffers.checkpoints\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.buffers.clean\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.buffers.clean_full\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.checkpoints.requested\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.checkpoints.scheduled\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.checkpoints.times.sync.ms\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.checkpoints.times.write.ms\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.stats_reset\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.blocks.hit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.blocks.read\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.blocks.time.read.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.blocks.time.write.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.conflicts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.deadlocks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.number_of_backends\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.oid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.rows.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.rows.fetched\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.rows.inserted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.rows.returned\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.rows.updated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.stats_reset\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.temporary.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.temporary.files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.transactions.commit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.transactions.rollback\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.database.oid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.calls\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.local.dirtied\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.local.hit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.local.read\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.local.written\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.shared.dirtied\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.shared.hit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.shared.read\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.shared.written\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.temp.read\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.temp.written\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.rows\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.text\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.time.max.ms\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.time.mean.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.time.min.ms\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.time.stddev.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.time.total.ms\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.user.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.args\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.executable\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.hash.md5\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.hash.sha1\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.hash.sha256\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.hash.sha512\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.pgid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.ppid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.start\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.thread.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.thread.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.title\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.working_directory\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.channel_max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.channels\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.client_provided.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.frame_max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.octet_count.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.octet_count.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.packet_count.pending\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.packet_count.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.packet_count.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.peer.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.peer.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.auto_delete\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.durable\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.internal\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.messages.publish_in.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.messages.publish_in.details.rate\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.messages.publish_out.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.messages.publish_out.details.rate\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.disk.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.disk.free.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.fd.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.fd.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.gc.num.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.gc.reclaimed.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.file_handle.open_attempt.avg.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.file_handle.open_attempt.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.read.avg.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.read.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.read.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.reopen.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.seek.avg.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.seek.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.sync.avg.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.sync.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.write.avg.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.write.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.write.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.mem.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.mem.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.mnesia.disk.tx.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.mnesia.ram.tx.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.msg.store_read.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.msg.store_write.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.proc.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.proc.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.processors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.queue.index.journal_write.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.queue.index.read.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.queue.index.write.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.run.queue\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.socket.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.socket.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.arguments.max_priority\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.auto_delete\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.consumers.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.consumers.utilisation.pct\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.disk.reads.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.disk.writes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.durable\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.exclusive\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.persistent.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.ready.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.ready.details.rate\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.total.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.total.details.rate\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.unacknowledged.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.unacknowledged.details.rate\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.vhost\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.clients.biggest_input_buf\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.clients.blocked\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.clients.connected\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.clients.longest_output_list\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.clients.max_input_buffer\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.clients.max_output_buffer\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.cluster.enabled\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.cpu.used.sys\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.cpu.used.sys_children\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.cpu.used.user\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.cpu.used.user_children\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.active_defrag.is_running\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.allocated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.fragmentation.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.fragmentation.ratio\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.resident\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.rss.ratio\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.fragmentation.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.fragmentation.ratio\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.max.policy\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.max.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.used.dataset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.used.lua\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.used.peak\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.used.rss\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.used.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.bgrewrite.last_status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.buffer.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.copy_on_write.last_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.enabled\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.fsync.delayed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.fsync.pending\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.rewrite.buffer.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.rewrite.current_time.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.rewrite.in_progress\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.rewrite.last_time.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.rewrite.scheduled\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.size.base\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.size.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.write.last_status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.loading\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.bgsave.current_time.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.bgsave.in_progress\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.bgsave.last_status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.bgsave.last_time.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.copy_on_write.last_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.last_save.changes_since\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.last_save.time\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.backlog.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.backlog.first_byte_offset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.backlog.histlen\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.backlog.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.connected_slaves\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.last_io_seconds_ago\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.link_status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.offset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.second_offset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.sync.in_progress\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.sync.last_io_seconds_ago\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.sync.left_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master_offset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.role\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.slave.is_readonly\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.slave.offset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.slave.priority\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.arch_bits\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.build_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.config_file\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.gcc_version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.git_dirty\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.git_sha1\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.hz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.lru_clock\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.mode\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.multiplexing_api\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.run_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.tcp_port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.slowlog.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.active_defrag.hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.active_defrag.key_hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.active_defrag.key_misses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.active_defrag.misses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.commands_processed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.connections.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.connections.rejected\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.instantaneous.input_kbps\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.instantaneous.ops_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.instantaneous.output_kbps\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.keys.evicted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.keys.expired\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.keyspace.hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.keyspace.misses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.latest_fork_usec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.migrate_cached_sockets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.net.input.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.net.output.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.pubsub.channels\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.pubsub.patterns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.slave_expires_tracked_keys\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.sync.full\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.sync.partial.err\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.sync.partial.ok\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.key.expire.ttl\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.key.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.key.length\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.key.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.key.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.keyspace.avg_ttl\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.keyspace.expires\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.keyspace.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.keyspace.keys\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"related.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.as.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.as.organization.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.nat.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.nat.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.email\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.full_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.ephemeral_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.as.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.as.organization.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.nat.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.nat.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.email\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.full_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.idle.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.idle.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.iowait.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.iowait.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.irq.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.irq.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.nice.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.nice.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.softirq.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.softirq.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.steal.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.steal.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.system.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.system.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.user.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.user.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.cores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.idle.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.idle.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.idle.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.iowait.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.iowait.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.iowait.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.irq.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.irq.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.irq.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.nice.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.nice.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.nice.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.softirq.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.softirq.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.softirq.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.steal.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.steal.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.steal.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.system.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.system.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.system.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.total.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.total.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.user.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.user.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.user.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.io.time\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.await\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.busy\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.queue.avg_size\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.read.await\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.read.per_sec.bytes\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.read.request.merges_per_sec\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.read.request.per_sec\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.request.avg_size\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.service_time\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.write.await\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.write.per_sec.bytes\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.write.request.merges_per_sec\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.write.request.per_sec\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.read.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.read.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.read.time\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.serial_number\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.write.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.write.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.write.time\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.entropy.available_bits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.entropy.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.available\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.device_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.free_files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.mount_point\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.used.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.fsstat.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.fsstat.total_files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.fsstat.total_size.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.fsstat.total_size.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.fsstat.total_size.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.1\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.15\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.5\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.cores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.norm.1\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.norm.15\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.norm.5\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.actual.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.actual.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.actual.used.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.default_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.reserved\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.surplus\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.used.pct\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.swap.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.swap.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.swap.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.swap.used.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.used.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.in.dropped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.in.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.in.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.out.dropped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.out.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.out.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.blkio.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.blkio.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.blkio.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.blkio.total.ios\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.cfs.period.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.cfs.quota.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.cfs.shares\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.rt.period.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.rt.runtime.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.stats.periods\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.stats.throttled.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.stats.throttled.periods\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpuacct.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpuacct.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpuacct.stats.system.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpuacct.stats.user.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpuacct.total.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem.failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem.usage.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem_tcp.failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem_tcp.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem_tcp.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem_tcp.usage.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.mem.failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.mem.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.mem.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.mem.usage.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.memsw.failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.memsw.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.memsw.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.memsw.usage.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.active_anon.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.active_file.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.cache.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.hierarchical_memory_limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.hierarchical_memsw_limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.inactive_anon.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.inactive_file.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.major_page_faults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.mapped_file.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.page_faults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.pages_in\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.pages_out\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.rss_huge.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.swap.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.unevictable.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cmdline\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.system.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.total.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.total.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.total.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.total.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.user.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.fd.limit.hard\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.fd.limit.soft\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.fd.open\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.memory.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.memory.rss.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.memory.share\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.memory.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.dead\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.idle\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.running\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.sleeping\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.stopped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.unknown\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.zombie\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.blocks.synced\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.blocks.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.disks.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.disks.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.disks.spare\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.disks.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.level\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.sync_action\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.local.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.local.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.process.cmdline\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.remote.etld_plus_one\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.remote.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.remote.host_error\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.remote.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.remote.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.all.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.all.listening\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.all.close_wait\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.all.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.all.established\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.all.listening\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.all.orphan\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.all.time_wait\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.memory\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.udp.all.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.udp.memory\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.uptime.duration.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"tags\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"timeseries.instance\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"tracing.trace.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"tracing.transaction.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"traefik.health.response.avg_time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"traefik.health.response.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"traefik.health.uptime.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.fragment\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.full\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.original\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.password\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.query\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.scheme\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.username\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.email\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.full_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.device.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.original\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.os.family\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.os.full\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.os.kernel\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.os.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.os.platform\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.os.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.read_errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.requests.offloaded\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.requests.routed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.requests.static\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.requests.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.worker_pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.write_errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.total.exceptions\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.total.pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.total.read_errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.total.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.total.write_errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.accepting\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.avg_rt\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.delta_requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.exceptions\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.harakiri_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.respawn_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.rss\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.running_time\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.signal_queue\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.signals\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.tx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.vsz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.datastore.capacity.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.datastore.capacity.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.datastore.capacity.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.datastore.capacity.used.pct\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.datastore.fstype\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.datastore.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.cpu.free.mhz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.cpu.total.mhz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.cpu.used.mhz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.memory.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.memory.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.memory.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.network_names\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.cpu.used.mhz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.memory.free.guest.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.memory.total.guest.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.memory.used.guest.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.memory.used.host.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.network_names\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.os\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.display_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.exit_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.path_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.start_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.start_type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.uptime.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.connection.interest_ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.connection.queued\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.connection.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.connection.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.approximate_data_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.ephemerals_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.followers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.latency.avg\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.latency.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.latency.min\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.max_file_descriptor_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.num_alive_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.open_file_descriptor_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.outstanding_requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.packets.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.packets.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.pending_syncs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.server_state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.synced_followers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.watch_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.znode_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.epoch\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.latency.avg\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.latency.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.latency.min\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.mode\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.node_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.outstanding\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.version_date\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.zxid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName" : "@timestamp", + "title" : "metricbeat-*" + }, + "type" : "index-pattern", + "migrationVersion" : { + "index-pattern" : "7.6.0" + }, + "updated_at" : "2020-01-22T15:34:59.061Z" + } + } +} + +{ + "type": "doc", + "value": { + "type": "_doc", + "index" : ".kibana", + "type": "doc", + "id" : "custom-space:index-pattern:metricbeat-*", + "source" : { + "index-pattern" : { + "fieldFormatMap" : "{\"aerospike.namespace.device.available.pct\":{\"id\":\"percent\",\"params\":{}},\"aerospike.namespace.device.free.pct\":{\"id\":\"percent\",\"params\":{}},\"aerospike.namespace.device.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aerospike.namespace.device.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aerospike.namespace.memory.free.pct\":{\"id\":\"percent\",\"params\":{}},\"aerospike.namespace.memory.used.data.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aerospike.namespace.memory.used.index.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aerospike.namespace.memory.used.sindex.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aerospike.namespace.memory.used.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.ec2.diskio.read.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.ec2.diskio.write.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.ec2.network.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.ec2.network.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.rds.cpu.total.pct\":{\"id\":\"percent\",\"params\":{}},\"aws.rds.disk_usage.bin_log.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.rds.free_local_storage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.rds.free_storage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.rds.freeable_memory.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.rds.latency.commit\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.ddl\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.dml\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.insert\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.read\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.select\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.update\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.latency.write\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.replica_lag.sec\":{\"id\":\"duration\",\"params\":{}},\"aws.rds.swap_usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.rds.volume_used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.s3_daily_storage.bucket.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.s3_request.downloaded.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.s3_request.latency.first_byte.ms\":{\"id\":\"duration\",\"params\":{}},\"aws.s3_request.latency.total_request.ms\":{\"id\":\"duration\",\"params\":{}},\"aws.s3_request.requests.select_returned.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.s3_request.requests.select_scanned.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.s3_request.uploaded.bytes\":{\"id\":\"bytes\",\"params\":{}},\"aws.sqs.oldest_message_age.sec\":{\"id\":\"duration\",\"params\":{}},\"aws.sqs.sent_message_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_disk.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_disk.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_disk.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_status.degraded.ratio\":{\"id\":\"percent\",\"params\":{}},\"ceph.cluster_status.misplace.ratio\":{\"id\":\"percent\",\"params\":{}},\"ceph.cluster_status.pg.avail_bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_status.pg.data_bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_status.pg.total_bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_status.pg.used_bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_status.traffic.read_bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.cluster_status.traffic.write_bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.monitor_health.store_stats.log.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.monitor_health.store_stats.misc.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.monitor_health.store_stats.sst.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.monitor_health.store_stats.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.osd_df.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.osd_df.total.byte\":{\"id\":\"bytes\",\"params\":{}},\"ceph.osd_df.used.byte\":{\"id\":\"bytes\",\"params\":{}},\"ceph.osd_df.used.pct\":{\"id\":\"percent\",\"params\":{}},\"ceph.pool_disk.stats.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"ceph.pool_disk.stats.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"client.bytes\":{\"id\":\"bytes\",\"params\":{}},\"client.nat.port\":{\"id\":\"string\",\"params\":{}},\"client.port\":{\"id\":\"string\",\"params\":{}},\"coredns.stats.dns.request.duration.ns.sum\":{\"id\":\"duration\",\"params\":{}},\"couchbase.bucket.data.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.bucket.disk.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.bucket.memory.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.bucket.quota.ram.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.bucket.quota.use.pct\":{\"id\":\"percent\",\"params\":{}},\"couchbase.cluster.hdd.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.hdd.quota.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.hdd.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.hdd.used.by_data.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.hdd.used.value.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.quota.total.per_node.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.quota.total.value.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.quota.used.per_node.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.quota.used.value.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.used.by_data.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.cluster.ram.used.value.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.node.couch.docs.data_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.node.couch.docs.disk_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"couchbase.node.mcd_memory.allocated.bytes\":{\"id\":\"bytes\",\"params\":{}},\"destination.bytes\":{\"id\":\"bytes\",\"params\":{}},\"destination.nat.port\":{\"id\":\"string\",\"params\":{}},\"destination.port\":{\"id\":\"string\",\"params\":{}},\"docker.cpu.core.*.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.cpu.kernel.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.cpu.system.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.cpu.total.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.cpu.user.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.diskio.read.bytes\":{\"id\":\"bytes\",\"params\":{}},\"docker.diskio.summary.bytes\":{\"id\":\"bytes\",\"params\":{}},\"docker.diskio.write.bytes\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.commit.peak\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.commit.total\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.limit\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.private_working_set.total\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.rss.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.memory.rss.total\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.usage.max\":{\"id\":\"bytes\",\"params\":{}},\"docker.memory.usage.pct\":{\"id\":\"percent\",\"params\":{}},\"docker.memory.usage.total\":{\"id\":\"bytes\",\"params\":{}},\"docker.network.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"docker.network.inbound.bytes\":{\"id\":\"bytes\",\"params\":{}},\"docker.network.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"docker.network.outbound.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.index.summary.primaries.segments.memory.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.index.summary.primaries.store.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.index.summary.total.segments.memory.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.index.summary.total.store.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.index.total.segments.memory.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.index.total.store.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.jvm.memory.heap.init.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.jvm.memory.heap.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.jvm.memory.nonheap.init.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.jvm.memory.nonheap.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.fs.summary.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.fs.summary.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.fs.summary.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.indices.segments.memory.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.old.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.old.peak.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.old.peak_max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.old.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.survivor.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.survivor.peak.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.survivor.peak_max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.survivor.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.young.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.young.peak.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.young.peak_max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"elasticsearch.node.stats.jvm.mem.pools.young.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"etcd.disk.mvcc_db_total_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"etcd.memory.go_memstats_alloc.bytes\":{\"id\":\"bytes\",\"params\":{}},\"etcd.network.client_grpc_received.bytes\":{\"id\":\"bytes\",\"params\":{}},\"etcd.network.client_grpc_sent.bytes\":{\"id\":\"bytes\",\"params\":{}},\"event.duration\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"nanoseconds\",\"outputFormat\":\"asMilliseconds\",\"outputPrecision\":1}},\"event.sequence\":{\"id\":\"string\",\"params\":{}},\"event.severity\":{\"id\":\"string\",\"params\":{}},\"golang.heap.allocations.active\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.allocations.allocated\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.allocations.idle\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.allocations.total\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.gc.next_gc_limit\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.system.obtained\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.system.released\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.system.stack\":{\"id\":\"bytes\",\"params\":{}},\"golang.heap.system.total\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.info.idle.pct\":{\"id\":\"percent\",\"params\":{}},\"haproxy.info.memory.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.info.ssl.frontend.session_reuse.pct\":{\"id\":\"percent\",\"params\":{}},\"haproxy.stat.compressor.bypassed.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.stat.compressor.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.stat.compressor.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.stat.compressor.response.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.stat.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.stat.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"haproxy.stat.throttle.pct\":{\"id\":\"percent\",\"params\":{}},\"http.request.body.bytes\":{\"id\":\"bytes\",\"params\":{}},\"http.request.bytes\":{\"id\":\"bytes\",\"params\":{}},\"http.response.body.bytes\":{\"id\":\"bytes\",\"params\":{}},\"http.response.bytes\":{\"id\":\"bytes\",\"params\":{}},\"http.response.status_code\":{\"id\":\"string\",\"params\":{}},\"kibana.stats.process.memory.heap.size_limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kibana.stats.process.memory.heap.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kibana.stats.process.memory.heap.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.apiserver.http.request.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.apiserver.http.response.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.apiserver.process.memory.resident.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.apiserver.process.memory.virtual.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.cpu.usage.limit.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.container.cpu.usage.node.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.container.logs.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.logs.capacity.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.logs.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.memory.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.memory.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.memory.request.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.memory.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.memory.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.memory.usage.limit.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.container.memory.usage.node.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.container.memory.workingset.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.rootfs.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.rootfs.capacity.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.container.rootfs.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.controllermanager.http.request.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.controllermanager.http.response.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.controllermanager.process.memory.resident.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.controllermanager.process.memory.virtual.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.fs.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.fs.capacity.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.fs.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.memory.allocatable.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.memory.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.memory.capacity.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.memory.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.memory.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.memory.workingset.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.network.rx.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.network.tx.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.runtime.imagefs.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.runtime.imagefs.capacity.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.node.runtime.imagefs.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.pod.cpu.usage.limit.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.pod.cpu.usage.node.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.pod.memory.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.pod.memory.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.pod.memory.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.pod.memory.usage.limit.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.pod.memory.usage.node.pct\":{\"id\":\"percent\",\"params\":{}},\"kubernetes.pod.memory.working_set.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.pod.network.rx.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.pod.network.tx.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.proxy.http.request.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.proxy.http.response.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.proxy.process.memory.resident.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.proxy.process.memory.virtual.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.scheduler.http.request.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.scheduler.http.response.size.bytes.sum\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.scheduler.process.memory.resident.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.scheduler.process.memory.virtual.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.system.memory.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.system.memory.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.system.memory.workingset.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.volume.fs.available.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.volume.fs.capacity.bytes\":{\"id\":\"bytes\",\"params\":{}},\"kubernetes.volume.fs.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.dbstats.avg_obj_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.dbstats.data_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.dbstats.extent_free_list.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.dbstats.file_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.dbstats.index_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.dbstats.storage_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.replstatus.headroom.max\":{\"id\":\"duration\",\"params\":{}},\"mongodb.replstatus.headroom.min\":{\"id\":\"duration\",\"params\":{}},\"mongodb.replstatus.lag.max\":{\"id\":\"duration\",\"params\":{}},\"mongodb.replstatus.lag.min\":{\"id\":\"duration\",\"params\":{}},\"mongodb.replstatus.oplog.size.allocated\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.replstatus.oplog.size.used\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.extra_info.heap_usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.network.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.network.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.wired_tiger.cache.dirty.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.wired_tiger.cache.maximum.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.wired_tiger.cache.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.wired_tiger.log.max_file_size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.wired_tiger.log.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mongodb.status.wired_tiger.log.write.bytes\":{\"id\":\"bytes\",\"params\":{}},\"mysql.status.bytes.received\":{\"id\":\"bytes\",\"params\":{}},\"mysql.status.bytes.sent\":{\"id\":\"bytes\",\"params\":{}},\"nats.stats.cpu\":{\"id\":\"percent\",\"params\":{}},\"nats.stats.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"nats.stats.mem.bytes\":{\"id\":\"bytes\",\"params\":{}},\"nats.stats.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"nats.stats.uptime\":{\"id\":\"duration\",\"params\":{}},\"nats.subscriptions.cache.hit_rate\":{\"id\":\"percent\",\"params\":{}},\"network.bytes\":{\"id\":\"bytes\",\"params\":{}},\"oracle.tablespace.data_file.size.bytes\":{\"id\":\"bytes\",\"params\":{}},\"oracle.tablespace.data_file.size.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"oracle.tablespace.data_file.size.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"oracle.tablespace.space.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"oracle.tablespace.space.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"oracle.tablespace.space.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"process.pgid\":{\"id\":\"string\",\"params\":{}},\"process.pid\":{\"id\":\"string\",\"params\":{}},\"process.ppid\":{\"id\":\"string\",\"params\":{}},\"process.thread.id\":{\"id\":\"string\",\"params\":{}},\"rabbitmq.connection.frame_max\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.node.disk.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.node.disk.free.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.node.gc.reclaimed.bytes\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.node.io.read.bytes\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.node.io.write.bytes\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.node.mem.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"rabbitmq.queue.consumers.utilisation.pct\":{\"id\":\"percent\",\"params\":{}},\"rabbitmq.queue.memory.bytes\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.allocator_stats.active\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.allocator_stats.allocated\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.allocator_stats.fragmentation.bytes\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.allocator_stats.resident\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.allocator_stats.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.fragmentation.bytes\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.max.value\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.used.dataset\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.used.lua\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.used.peak\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.used.rss\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.memory.used.value\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.persistence.aof.buffer.size\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.persistence.aof.copy_on_write.last_size\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.persistence.aof.rewrite.buffer.size\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.persistence.aof.rewrite.current_time.sec\":{\"id\":\"duration\",\"params\":{}},\"redis.info.persistence.aof.rewrite.last_time.sec\":{\"id\":\"duration\",\"params\":{}},\"redis.info.persistence.aof.size.base\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.persistence.aof.size.current\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.persistence.rdb.bgsave.current_time.sec\":{\"id\":\"duration\",\"params\":{}},\"redis.info.persistence.rdb.bgsave.last_time.sec\":{\"id\":\"duration\",\"params\":{}},\"redis.info.persistence.rdb.copy_on_write.last_size\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.replication.backlog.size\":{\"id\":\"bytes\",\"params\":{}},\"redis.info.replication.master.last_io_seconds_ago\":{\"id\":\"duration\",\"params\":{}},\"redis.info.replication.master.sync.last_io_seconds_ago\":{\"id\":\"duration\",\"params\":{}},\"redis.info.replication.master.sync.left_bytes\":{\"id\":\"bytes\",\"params\":{}},\"server.bytes\":{\"id\":\"bytes\",\"params\":{}},\"server.nat.port\":{\"id\":\"string\",\"params\":{}},\"server.port\":{\"id\":\"string\",\"params\":{}},\"source.bytes\":{\"id\":\"bytes\",\"params\":{}},\"source.nat.port\":{\"id\":\"string\",\"params\":{}},\"source.port\":{\"id\":\"string\",\"params\":{}},\"system.core.idle.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.iowait.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.irq.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.nice.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.softirq.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.steal.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.system.pct\":{\"id\":\"percent\",\"params\":{}},\"system.core.user.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.idle.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.idle.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.iowait.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.iowait.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.irq.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.irq.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.nice.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.nice.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.softirq.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.softirq.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.steal.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.steal.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.system.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.system.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.total.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.total.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.user.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.cpu.user.pct\":{\"id\":\"percent\",\"params\":{}},\"system.diskio.iostat.read.per_sec.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.diskio.iostat.write.per_sec.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.diskio.read.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.diskio.write.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.entropy.pct\":{\"id\":\"percent\",\"params\":{}},\"system.filesystem.available\":{\"id\":\"bytes\",\"params\":{}},\"system.filesystem.free\":{\"id\":\"bytes\",\"params\":{}},\"system.filesystem.total\":{\"id\":\"bytes\",\"params\":{}},\"system.filesystem.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.filesystem.used.pct\":{\"id\":\"percent\",\"params\":{}},\"system.fsstat.total_size.free\":{\"id\":\"bytes\",\"params\":{}},\"system.fsstat.total_size.total\":{\"id\":\"bytes\",\"params\":{}},\"system.fsstat.total_size.used\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.actual.free\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.actual.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.actual.used.pct\":{\"id\":\"percent\",\"params\":{}},\"system.memory.free\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.hugepages.default_size\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.hugepages.free\":{\"id\":\"number\",\"params\":{}},\"system.memory.hugepages.reserved\":{\"id\":\"number\",\"params\":{}},\"system.memory.hugepages.surplus\":{\"id\":\"number\",\"params\":{}},\"system.memory.hugepages.total\":{\"id\":\"number\",\"params\":{}},\"system.memory.hugepages.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.hugepages.used.pct\":{\"id\":\"percent\",\"params\":{}},\"system.memory.swap.free\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.swap.total\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.swap.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.swap.used.pct\":{\"id\":\"percent\",\"params\":{}},\"system.memory.total\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.memory.used.pct\":{\"id\":\"percent\",\"params\":{}},\"system.network.in.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.network.out.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.blkio.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.kmem.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.kmem.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.kmem.usage.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.kmem_tcp.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.kmem_tcp.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.kmem_tcp.usage.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.mem.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.mem.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.mem.usage.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.memsw.limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.memsw.usage.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.memsw.usage.max.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.active_anon.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.active_file.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.cache.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.hierarchical_memory_limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.hierarchical_memsw_limit.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.inactive_anon.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.inactive_file.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.mapped_file.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.rss_huge.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.swap.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cgroup.memory.stats.unevictable.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.cpu.total.norm.pct\":{\"id\":\"percent\",\"params\":{}},\"system.process.cpu.total.pct\":{\"id\":\"percent\",\"params\":{}},\"system.process.memory.rss.bytes\":{\"id\":\"bytes\",\"params\":{}},\"system.process.memory.rss.pct\":{\"id\":\"percent\",\"params\":{}},\"system.process.memory.share\":{\"id\":\"bytes\",\"params\":{}},\"system.process.memory.size\":{\"id\":\"bytes\",\"params\":{}},\"system.socket.summary.tcp.memory\":{\"id\":\"bytes\",\"params\":{}},\"system.socket.summary.udp.memory\":{\"id\":\"bytes\",\"params\":{}},\"system.uptime.duration.ms\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"milliseconds\"}},\"url.port\":{\"id\":\"string\",\"params\":{}},\"vsphere.datastore.capacity.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.datastore.capacity.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.datastore.capacity.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.datastore.capacity.used.pct\":{\"id\":\"percent\",\"params\":{}},\"vsphere.host.memory.free.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.host.memory.total.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.host.memory.used.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.virtualmachine.memory.free.guest.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.virtualmachine.memory.total.guest.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.virtualmachine.memory.used.guest.bytes\":{\"id\":\"bytes\",\"params\":{}},\"vsphere.virtualmachine.memory.used.host.bytes\":{\"id\":\"bytes\",\"params\":{}},\"windows.service.uptime.ms\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"milliseconds\"}}}", + "fields" : "[{\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"esTypes\":[\"_type\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"aerospike.namespace.client.delete.error\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.delete.not_found\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.delete.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.delete.timeout\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.read.error\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.read.not_found\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.read.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.read.timeout\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.write.error\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.write.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.client.write.timeout\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.device.available.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.device.free.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.device.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.device.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.hwm_breached\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.memory.free.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.memory.used.data.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.memory.used.index.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.memory.used.sindex.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.memory.used.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.node.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.node.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.objects.master\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.objects.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aerospike.namespace.stop_writes\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"agent.ephemeral_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"agent.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"agent.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"agent.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"agent.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"agent.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.bytes_per_request\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.bytes_per_sec\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.connections.async.closing\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.connections.async.keep_alive\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.connections.async.writing\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.connections.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.cpu.children_system\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.cpu.children_user\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.cpu.load\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.cpu.system\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.cpu.user\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.load.1\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.load.15\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.load.5\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.requests_per_sec\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.closing_connection\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.dns_lookup\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.gracefully_finishing\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.idle_cleanup\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.keepalive\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.logging\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.open_slot\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.reading_request\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.sending_reply\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.starting_up\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.scoreboard.waiting_for_connection\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.total_accesses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.total_kbytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.uptime.server_uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.uptime.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.workers.busy\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"apache.status.workers.idle\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"as.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"as.organization.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.cloudwatch.namespace\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.cpu.credit_balance\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.cpu.credit_usage\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.cpu.surplus_credit_balance\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.cpu.surplus_credits_charged\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.cpu.total.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.read.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.read.bytes_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.read.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.read.ops_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.write.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.write.bytes_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.write.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.diskio.write.ops_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.core.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.image.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.monitoring.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.private.dns_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.private.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.public.dns_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.public.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.state.code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.state.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.instance.threads_per_core\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.in.bytes_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.in.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.in.packets_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.out.bytes_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.out.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.network.out.packets_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.status.check_failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.status.check_failed_instance\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.ec2.status.check_failed_system\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.cpu.credit_balance\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.cpu.credit_usage\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.cpu.total.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.database_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.db_instance.arn\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.db_instance.class\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.db_instance.identifier\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.db_instance.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.deadlocks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.disk_queue_depth\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.disk_usage.bin_log.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.disk_usage.replication_slot.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.disk_usage.transaction_logs.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.failed_sql_server_agent_jobs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.free_local_storage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.free_storage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.freeable_memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.commit\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.ddl\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.dml\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.insert\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.read\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.select\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.update\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.latency.write\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.login_failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.maximum_used_transaction_ids\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.oldest_replication_slot_lag.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.queries\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.read_io.ops_per_sec\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.replica_lag.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.swap_usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.commit\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.ddl\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.delete\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.dml\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.insert\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.network\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.network_receive\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.network_transmit\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.read\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.select\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.update\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.throughput.write\",\"type\":\"number\",\"esTypes\":[\"float\",\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.transaction_logs_generation\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.transactions.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.transactions.blocked\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.volume_used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.rds.write_io.ops_per_sec\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_daily_storage.bucket.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_daily_storage.bucket.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_daily_storage.number_of_objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.bucket.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.downloaded.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.errors.4xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.errors.5xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.latency.first_byte.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.latency.total_request.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.delete\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.get\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.head\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.list\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.post\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.put\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.select\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.select_returned.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.select_scanned.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.requests.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.s3_request.uploaded.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.empty_receives\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.messages.delayed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.messages.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.messages.not_visible\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.messages.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.messages.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.messages.visible\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.oldest_message_age.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.queue.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"aws.sqs.sent_message_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.state.management.enabled\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.state.module.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.state.output.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.state.queue.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.acked\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.batches\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.dropped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.duplicates\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.toomany\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.events.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.read.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.read.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.write.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.libbeat.output.write.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.runtime.goroutines\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.stats.uptime.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"beat.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_disk.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_disk.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_disk.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_health.overall_status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_health.timechecks.epoch\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_health.timechecks.round.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_health.timechecks.round.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.degraded.objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.degraded.ratio\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.degraded.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.misplace.objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.misplace.ratio\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.misplace.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.epoch\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.full\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.nearfull\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.num_in_osds\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.num_osds\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.num_remapped_pgs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.osd.num_up_osds\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg.avail_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg.data_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg.total_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg.used_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg_state.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg_state.state_name\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.pg_state.version\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.traffic.read_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.traffic.read_op_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.traffic.write_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.traffic.write_op_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.cluster_status.version\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.available.kb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.available.pct\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.health\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.last_updated\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.store_stats.last_updated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.store_stats.log.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.store_stats.misc.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.store_stats.sst.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.store_stats.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.total.kb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.monitor_health.used.kb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.device_class\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.pg_num\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.total.byte\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.used.byte\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_df.used.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.children\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.crush_weight\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.depth\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.device_class\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.exists\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.father\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.primary_affinity\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.reweight\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.osd_tree.type_id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.pool_disk.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.pool_disk.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.pool_disk.stats.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.pool_disk.stats.objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.pool_disk.stats.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ceph.pool_disk.stats.used.kb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.as.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.as.organization.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.nat.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.nat.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.email\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.full_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"client.user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.account.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.availability_zone\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.image.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.instance.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.instance.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.machine.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.project.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.provider\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"cloud.region\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.autopilot.healthy\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.alloc.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.garbage_collector.pause.current.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.garbage_collector.pause.total.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.garbage_collector.runs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.goroutines\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.heap_objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.malloc_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"consul.agent.runtime.sys.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"container.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"container.image.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"container.image.tag\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"container.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"container.runtime\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.cache.hits.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.cache.misses.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.do.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.duration.ns.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.duration.ns.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.request.type.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.response.rcode.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.response.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.dns.response.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.family\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.panic.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.proto\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.rcode\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.server\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"coredns.stats.zone\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.data.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.disk.fetches\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.disk.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.item_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.memory.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.ops_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.quota.ram.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.quota.use.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.bucket.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.hdd.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.hdd.quota.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.hdd.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.hdd.used.by_data.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.hdd.used.value.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.max_bucket_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.quota.index_memory.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.quota.memory.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.quota.total.per_node.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.quota.total.value.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.quota.used.per_node.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.quota.used.value.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.used.by_data.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.cluster.ram.used.value.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.cmd_get\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.couch.docs.data_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.couch.docs.disk_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.couch.spatial.data_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.couch.spatial.disk_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.couch.views.data_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.couch.views.disk_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.cpu_utilization_rate.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.current_items.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.current_items.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.ep_bg_fetched\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.get_hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.mcd_memory.allocated.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.mcd_memory.reserved.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.memory.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.memory.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.memory.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.swap.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.swap.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.uptime.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchbase.node.vb_replica_curr_items\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.auth_cache_hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.auth_cache_misses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.database_reads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.database_writes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.open_databases\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.open_os_files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.couchdb.request_time\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd.bulk_requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd.clients_requesting_changes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd.temporary_view_reads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd.view_reads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_request_methods.COPY\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_request_methods.DELETE\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_request_methods.GET\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_request_methods.HEAD\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_request_methods.POST\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_request_methods.PUT\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.200\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.201\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.202\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.301\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.304\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.400\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.401\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.403\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.404\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.405\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.409\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.412\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"couchdb.server.httpd_status_codes.500\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.as.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.as.organization.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.nat.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.nat.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.email\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.full_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"destination.user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.answers.class\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.answers.data\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.answers.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.answers.ttl\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.answers.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.header_flags\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.op_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.question.class\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.question.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.question.registered_domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.question.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.resolved_ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.response_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"dns.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.command\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.created\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.ip_addresses\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.size.root_fs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.size.rw\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.container.tags\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.kernel.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.kernel.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.system.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.system.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.total.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.user.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.cpu.user.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.read.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.read.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.read.rate\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.reads\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.summary.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.summary.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.summary.rate\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.total\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.write.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.write.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.write.rate\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.diskio.writes\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.event.action\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.event.actor.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.event.from\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.event.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.event.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.event.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.healthcheck.event.end_date\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.healthcheck.event.exit_code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.healthcheck.event.output\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.healthcheck.event.start_date\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.healthcheck.failingstreak\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.healthcheck.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.image.created\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.image.id.current\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.image.id.parent\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.image.size.regular\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.image.size.virtual\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.image.tags\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.info.containers.paused\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.info.containers.running\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.info.containers.stopped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.info.containers.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.info.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.info.images\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.commit.peak\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.commit.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.fail.count\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.private_working_set.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.rss.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.rss.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.usage.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.usage.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.memory.usage.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.in.dropped\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.in.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.in.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.inbound.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.inbound.dropped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.inbound.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.inbound.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.interface\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.out.dropped\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.out.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.out.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.outbound.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.outbound.dropped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.outbound.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"docker.network.outbound.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"ecs.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.follower.global_checkpoint\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.follower.index\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.follower.operations_written\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.follower.shard.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.follower.time_since_last_read.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.leader.index\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ccr.leader.max_seq_no\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.pending_task.insert_order\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.pending_task.priority\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.pending_task.source\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.pending_task.time_in_queue.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.state.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.indices.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.indices.fielddata.memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.indices.shards.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.indices.shards.primaries\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.nodes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.nodes.data\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.nodes.master\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.cluster.stats.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.primary\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.source.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.source.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.source.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.stage\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.target.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.target.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.target.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.recovery.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.primaries.docs.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.primaries.docs.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.primaries.segments.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.primaries.segments.memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.primaries.store.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.total.docs.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.total.docs.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.total.segments.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.total.segments.memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.summary.total.store.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.total.docs.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.total.docs.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.total.segments.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.total.segments.memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.index.total.store.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ml.job.data_counts.invalid_date_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ml.job.data_counts.processed_record_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ml.job.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.ml.job.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.jvm.memory.heap.init.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.jvm.memory.heap.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.jvm.memory.nonheap.init.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.jvm.memory.nonheap.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.jvm.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.process.mlockall\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.fs.summary.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.fs.summary.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.fs.summary.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.indices.docs.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.indices.docs.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.indices.segments.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.indices.segments.memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.indices.store.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.gc.collectors.old.collection.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.gc.collectors.old.collection.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.gc.collectors.young.collection.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.gc.collectors.young.collection.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.old.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.old.peak.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.old.peak_max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.old.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.survivor.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.survivor.peak.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.survivor.peak_max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.survivor.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.young.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.young.peak.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.young.peak_max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.stats.jvm.mem.pools.young.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.node.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.shard.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.shard.primary\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.shard.relocating_node.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"elasticsearch.shard.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.cluster_manager.active_clusters\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.cluster_manager.cluster_added\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.cluster_manager.cluster_modified\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.cluster_manager.cluster_removed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.cluster_manager.warming_clusters\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.filesystem.flushed_by_timer\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.filesystem.reopen_failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.filesystem.write_buffered\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.filesystem.write_completed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.filesystem.write_total_buffered\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.header_overflow\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.headers_cb_no_stream\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.rx_messaging_error\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.rx_reset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.too_many_header_frames\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.trailers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.http2.tx_reset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.listener_added\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.listener_create_failure\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.listener_create_success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.listener_modified\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.listener_removed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.total_listeners_active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.total_listeners_draining\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.listener_manager.total_listeners_warming\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.runtime.admin_overrides_active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.runtime.load_error\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.runtime.load_success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.runtime.num_keys\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.runtime.override_dir_exists\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.runtime.override_dir_not_exists\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.days_until_first_cert_expiring\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.hot_restart_epoch\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.live\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.memory_allocated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.memory_heap_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.parent_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.total_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.version\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.watchdog_mega_miss\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.server.watchdog_miss\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"envoyproxy.server.stats.overflow\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"error.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"error.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"error.message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"error.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.api_version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.disk.backend_commit_duration.ns.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.disk.backend_commit_duration.ns.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.disk.mvcc_db_total_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.disk.wal_fsync_duration.ns.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.disk.wal_fsync_duration.ns.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.counts.followers.counts.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.counts.followers.counts.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.latency.follower.latency.standardDeviation\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.latency.followers.latency.average\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.latency.followers.latency.current\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.latency.followers.latency.maximum\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.followers.latency.followers.latency.minimum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.leader.leader\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.memory.go_memstats_alloc.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.network.client_grpc_received.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.network.client_grpc_sent.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.leaderinfo.leader\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.leaderinfo.starttime\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.leaderinfo.uptime\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.recv.appendrequest.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.recv.bandwidthrate\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.recv.pkgrate\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.send.appendrequest.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.send.bandwidthrate\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.send.pkgrate\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.starttime\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.self.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.grpc_handled.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.grpc_started.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.has_leader\",\"type\":\"number\",\"esTypes\":[\"byte\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.leader_changes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.proposals_committed.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.proposals_failed.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.server.proposals_pending.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.compareanddelete.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.compareanddelete.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.compareandswap.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.compareandswap.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.create.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.create.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.delete.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.delete.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.expire.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.gets.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.gets.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.sets.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.sets.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.update.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.update.success\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"etcd.store.watchers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.action\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.category\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.created\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.dataset\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.duration\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.end\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.module\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.original\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.outcome\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.provider\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.risk_score\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.risk_score_norm\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.sequence\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.severity\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.start\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.timezone\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"event.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.accessed\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.created\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.ctime\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.device\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.directory\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.extension\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.gid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.group\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.hash.md5\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.hash.sha1\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.hash.sha256\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.hash.sha512\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.inode\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.mode\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.mtime\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.owner\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.target_path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"file.uid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.expvar.cmdline\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.allocated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.frees\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.idle\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.mallocs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.allocations.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.cmdline\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.cpu_fraction\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.next_gc_limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.pause.avg.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.pause.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.pause.max.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.pause.sum.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.total_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.gc.total_pause.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.system.obtained\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.system.released\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.system.stack\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"golang.heap.system.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"graphite.server.example\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.compress.bps.in\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.compress.bps.out\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.compress.bps.rate_limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.hard_max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.rate.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.ssl.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.ssl.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.ssl.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.connection.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.idle.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.memory.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.pipes.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.pipes.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.pipes.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.process_num\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.processes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.requests.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.requests.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.run_queue\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.session.rate.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.session.rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.session.rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.sockets.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.backend.key_rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.backend.key_rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.cache_misses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.cached_lookups\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.frontend.key_rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.frontend.key_rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.frontend.session_reuse.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.rate.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ssl.rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.tasks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.ulimit_n\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.uptime.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.zlib_mem_usage.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.info.zlib_mem_usage.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.agent.last\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.down\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.duration\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.health.fail\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.health.last\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.check.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.client.aborted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.component_type\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.compressor.bypassed.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.compressor.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.compressor.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.compressor.response.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.connection.retried\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.connection.time.avg\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.connection.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.downtime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.last_change\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.proxy.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.proxy.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.queue.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.queue.time.avg\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.connection.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.denied\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.queued.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.queued.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.redispatched\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.request.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.denied\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.http.1xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.http.2xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.http.3xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.http.4xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.http.5xx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.http.other\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.response.time.avg\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.selected.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.server.aborted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.server.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.server.backup\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.server.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.service_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.session.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.session.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.session.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.session.rate.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.session.rate.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.session.rate.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.throttle.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.tracked.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"haproxy.stat.weight\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"hash.md5\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"hash.sha1\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"hash.sha256\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"hash.sha512\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.architecture\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.containerized\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.build\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.codename\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.family\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.full\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.kernel\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.platform\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.os.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.email\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.full_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.request.body.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.request.body.content\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.request.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.request.method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.request.referrer\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.response.body.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.response.body.content\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.response.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.response.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.response.phrase\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.response.status_code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.agent.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.agent.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.secured\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.server.product\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.server.vendor\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.server.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"jolokia.url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.broker.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.broker.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.broker.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.broker.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.client.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.client.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.client.member_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.error.code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.meta\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.offset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.partition\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.consumergroup.topic\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.broker.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.broker.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.offset.newest\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.offset.oldest\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.error.code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.insync_replica\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.is_leader\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.isr\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.leader\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.partition.replica\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.topic.error.code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.topic.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.topic_broker_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.partition.topic_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.topic.error.code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka.topic.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.concurrent_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.host.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.index\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.process.event_loop_delay.ms\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.process.memory.heap.size_limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.process.memory.heap.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.process.memory.heap.uptime.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.process.memory.heap.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.request.disconnects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.request.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.response_time.avg.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.response_time.max.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.snapshot\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.stats.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.status.metrics.concurrent_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.status.metrics.requests.disconnects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.status.metrics.requests.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.status.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kibana.status.status.overall.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.audit.event.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.audit.rejected.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.client.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.etcd.object.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.request.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.request.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.request.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.request.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.response.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.http.response.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.process.cpu.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.process.fds.open.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.process.memory.resident.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.process.memory.virtual.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.process.started.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.client\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.component\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.content_type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.current.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.dry_run\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.group\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.handler\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.latency.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.latency.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.longrunning.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.resource\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.scope\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.subresource\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.verb\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.apiserver.request.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.limit.cores\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.limit.nanocores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.request.cores\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.request.nanocores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.usage.core.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.usage.limit.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.usage.nanocores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.cpu.usage.node.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.image\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.logs.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.logs.capacity.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.logs.inodes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.logs.inodes.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.logs.inodes.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.logs.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.majorpagefaults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.pagefaults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.request.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.usage.limit.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.usage.node.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.memory.workingset.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.rootfs.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.rootfs.capacity.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.rootfs.inodes.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.rootfs.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.status.phase\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.status.ready\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.status.reason\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.container.status.restarts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.client.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.handler\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.request.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.request.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.request.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.request.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.response.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.http.response.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.leader.is_master\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.node.collector.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.node.collector.eviction.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.node.collector.health.pct\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.node.collector.unhealthy.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.process.cpu.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.process.fds.open.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.process.memory.resident.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.process.memory.virtual.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.process.started.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.workqueue.adds.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.workqueue.depth.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.workqueue.longestrunning.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.workqueue.retries.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.workqueue.unfinished.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.controllermanager.zone\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.active.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.concurrency\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.created.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.deadline.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.is_suspended\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.last_schedule.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.next_schedule.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.cronjob.schedule\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.deployment.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.deployment.paused\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.deployment.replicas.available\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.deployment.replicas.desired\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.deployment.replicas.unavailable\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.deployment.replicas.updated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.involved_object.api_version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.involved_object.kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.involved_object.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.involved_object.resource_version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.involved_object.uid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.message\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.metadata.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.metadata.namespace\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.metadata.resource_version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.metadata.self_link\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.metadata.timestamp.created\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.metadata.uid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.reason\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.timestamp.first_occurrence\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.timestamp.last_occurrence\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.event.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.namespace\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.cpu.allocatable.cores\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.cpu.capacity.cores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.cpu.usage.core.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.cpu.usage.nanocores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.fs.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.fs.capacity.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.fs.inodes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.fs.inodes.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.fs.inodes.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.fs.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.allocatable.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.capacity.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.majorpagefaults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.pagefaults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.memory.workingset.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.network.rx.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.network.rx.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.network.tx.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.network.tx.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.pod.allocatable.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.pod.capacity.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.runtime.imagefs.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.runtime.imagefs.capacity.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.runtime.imagefs.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.status.ready\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.node.status.unschedulable\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.cpu.usage.limit.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.cpu.usage.nanocores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.cpu.usage.node.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.host_ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.major_page_faults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.page_faults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.usage.limit.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.usage.node.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.memory.working_set.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.network.rx.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.network.rx.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.network.tx.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.network.tx.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.status.phase\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.status.ready\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.status.scheduled\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.pod.uid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.client.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.handler\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.request.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.request.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.request.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.request.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.response.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.http.response.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.process.cpu.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.process.fds.open.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.process.memory.resident.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.process.memory.virtual.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.process.started.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.sync.networkprogramming.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.sync.networkprogramming.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.sync.rules.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.proxy.sync.rules.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.replicaset.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.replicaset.replicas.available\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.replicaset.replicas.desired\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.replicaset.replicas.labeled\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.replicaset.replicas.observed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.replicaset.replicas.ready\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.client.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.handler\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.request.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.request.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.request.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.request.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.request.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.response.size.bytes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.http.response.size.bytes.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.leader.is_master\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.operation\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.process.cpu.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.process.fds.open.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.process.memory.resident.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.process.memory.virtual.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.process.started.sec\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.result\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.scheduling.duration.seconds.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.scheduling.duration.seconds.sum\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.scheduling.e2e.duration.us.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.scheduling.e2e.duration.us.sum\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.scheduling.pod.attempts.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.scheduler.scheduling.pod.preemption.victims.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.statefulset.created\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.statefulset.generation.desired\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.statefulset.generation.observed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.statefulset.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.statefulset.replicas.desired\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.statefulset.replicas.observed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.container\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.cpu.usage.core.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.cpu.usage.nanocores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.memory.majorpagefaults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.memory.pagefaults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.memory.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.memory.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.memory.workingset.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.system.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.fs.available.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.fs.capacity.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.fs.inodes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.fs.inodes.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.fs.inodes.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.fs.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kubernetes.volume.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kvm.dommemstat.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kvm.dommemstat.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kvm.dommemstat.stat.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kvm.dommemstat.stat.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"log.level\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"log.logger\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"log.original\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"logstash.node.jvm.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"logstash.node.stats.events.filtered\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"logstash.node.stats.events.in\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"logstash.node.stats.events.out\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.bytes.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.bytes.limit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.cmd.get\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.cmd.set\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.connections.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.connections.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.evictions\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.get.hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.get.misses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.items.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.items.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.read.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.threads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.uptime.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"memcached.stats.written.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"metricset.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"metricset.period\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.collection\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.commands.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.commands.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.db\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.getmore.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.getmore.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.insert.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.insert.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.lock.read.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.lock.read.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.lock.write.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.lock.write.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.queries.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.queries.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.remove.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.remove.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.total.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.total.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.update.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.collstats.update.time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.avg_obj_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.collections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.data_file_version.major\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.data_file_version.minor\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.data_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.db\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.extent_free_list.num\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.extent_free_list.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.file_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.index_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.indexes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.ns_size_mb.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.num_extents\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.objects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.dbstats.storage_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.aggregate.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.aggregate.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.build_info.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.build_info.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.coll_stats.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.coll_stats.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.connection_pool_stats.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.connection_pool_stats.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.count.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.count.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.db_stats.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.db_stats.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.distinct.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.distinct.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.find.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.find.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_cmd_line_opts.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_cmd_line_opts.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_last_error.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_last_error.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_log.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_log.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_more.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_more.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_parameter.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.get_parameter.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.host_info.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.host_info.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.insert.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.insert.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.is_master.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.is_master.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.is_self.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.is_self.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.last_collections.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.last_collections.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.last_commands.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.last_commands.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.list_databased.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.list_databased.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.list_indexes.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.list_indexes.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.ping.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.ping.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.profile.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.profile.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_get_rbid.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_get_rbid.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_get_status.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_get_status.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_heartbeat.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_heartbeat.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_update_position.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.replset_update_position.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.server_status.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.server_status.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.update.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.update.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.whatsmyuri.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.commands.whatsmyuri.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.cursor.open.no_timeout\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.cursor.open.pinned\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.cursor.open.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.cursor.timed_out\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.document.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.document.inserted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.document.returned\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.document.updated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.get_last_error.write_timeouts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.get_last_error.write_wait.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.get_last_error.write_wait.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.operation.scan_and_order\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.operation.write_conflicts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.query_executor.scanned_documents\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.query_executor.scanned_indexes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.apply.attempts_to_become_secondary\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.apply.batches.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.apply.batches.time.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.apply.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.buffer.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.buffer.max_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.buffer.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.cancels\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.event_created\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.event_wait\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.scheduled.dbwork\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.scheduled.exclusive\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.scheduled.failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.scheduled.netcmd\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.scheduled.work\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.scheduled.work_at\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.counters.waits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.event_waiters\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.network_interface\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.queues.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.queues.in_progress.dbwork\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.queues.in_progress.exclusive\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.queues.in_progress.network\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.queues.ready\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.queues.sleepers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.shutting_down\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.executor.unsignaled_events\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.initial_sync.completed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.initial_sync.failed_attempts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.initial_sync.failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.network.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.network.getmores.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.network.getmores.time.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.network.ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.network.reders_created\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.preload.docs.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.preload.docs.time.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.preload.indexes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.replication.preload.indexes.time.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.storage.free_list.search.bucket_exhausted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.storage.free_list.search.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.storage.free_list.search.scanned\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.ttl.deleted_documents\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.metrics.ttl.passes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.headroom.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.headroom.min\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.lag.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.lag.min\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.arbiter.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.arbiter.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.down.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.down.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.primary.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.primary.optime\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.recovering.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.recovering.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.rollback.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.rollback.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.secondary.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.secondary.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.secondary.optimes\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.startup2.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.startup2.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.unhealthy.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.unhealthy.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.unknown.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.members.unknown.hosts\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.oplog.first.timestamp\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.oplog.last.timestamp\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.oplog.size.allocated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.oplog.size.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.oplog.window\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.optimes.applied\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.optimes.durable\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.optimes.last_committed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.server_date\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.replstatus.set_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.asserts.msg\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.asserts.regular\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.asserts.rollovers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.asserts.user\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.asserts.warning\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.background_flushing.average.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.background_flushing.flushes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.background_flushing.last.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.background_flushing.last_finished\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.background_flushing.total.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.connections.available\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.connections.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.connections.total_created\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.extra_info.heap_usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.extra_info.page_faults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.active_clients.readers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.active_clients.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.active_clients.writers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.current_queue.readers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.current_queue.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.current_queue.writers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.global_lock.total_time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.commits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.commits_in_write_lock\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.compression\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.early_commits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.journaled.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.commits.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.commits_in_write_lock.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.dt.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.prep_log_buffer.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.remap_private_view.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.write_to_data_files.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.times.write_to_journal.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.journaling.write_to_data_files.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.local_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.acquire.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.acquire.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.acquire.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.acquire.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.deadlock.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.deadlock.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.deadlock.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.deadlock.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.us.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.us.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.us.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.collection.wait.us.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.acquire.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.acquire.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.acquire.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.acquire.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.deadlock.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.deadlock.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.deadlock.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.deadlock.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.us.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.us.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.us.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.database.wait.us.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.acquire.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.acquire.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.acquire.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.acquire.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.deadlock.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.deadlock.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.deadlock.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.deadlock.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.us.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.us.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.us.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.global.wait.us.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.acquire.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.acquire.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.acquire.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.acquire.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.deadlock.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.deadlock.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.deadlock.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.deadlock.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.us.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.us.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.us.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.meta_data.wait.us.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.acquire.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.acquire.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.acquire.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.acquire.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.deadlock.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.deadlock.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.deadlock.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.deadlock.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.count.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.count.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.count.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.count.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.us.R\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.us.W\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.us.r\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.locks.oplog.wait.us.w\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.memory.bits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.memory.mapped.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.memory.mapped_with_journal.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.memory.resident.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.memory.virtual.mb\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.network.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.network.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.network.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.counters.command\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.counters.delete\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.counters.getmore\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.counters.insert\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.counters.query\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.counters.update\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.latencies.commands.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.latencies.commands.latency\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.latencies.reads.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.latencies.reads.latency\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.latencies.writes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.latencies.writes.latency\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.replicated.command\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.replicated.delete\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.replicated.getmore\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.replicated.insert\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.replicated.query\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.ops.replicated.update\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.process\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.storage_engine.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.uptime.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.cache.dirty.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.cache.maximum.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.cache.pages.evicted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.cache.pages.read\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.cache.pages.write\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.cache.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.concurrent_transactions.read.available\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.concurrent_transactions.read.out\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.concurrent_transactions.read.total_tickets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.concurrent_transactions.write.available\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.concurrent_transactions.write.out\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.concurrent_transactions.write.total_tickets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.flushes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.max_file_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.scans\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.syncs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.write.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.wired_tiger.log.writes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mongodb.status.write_backs_queued\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.database.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.database.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.active_temp_tables\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.batch_requests_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.buffer.cache_hit.pct\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.buffer.checkpoint_pages_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.buffer.database_pages\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.buffer.page_life_expectancy.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.buffer.target_pages\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.compilations_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.connections_reset_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.lock_waits_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.logins_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.logouts_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.page_splits_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.recompilations_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.transactions\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.performance.user_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.space_usage.since_last_backup.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.space_usage.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.space_usage.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.space_usage.used.pct\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.stats.active_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.stats.backup_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.stats.recovery_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.stats.since_last_checkpoint.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mssql.transaction_log.stats.total_size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"munin.plugin.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.apply.oooe\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.apply.oool\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.apply.window\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.cert.deps_distance\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.cert.index_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.cert.interval\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.cluster.conf_id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.cluster.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.cluster.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.commit.oooe\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.commit.window\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.connected\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.evs.evict\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.evs.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.flow_ctl.paused\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.flow_ctl.paused_ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.flow_ctl.recv\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.flow_ctl.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.last_committed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.bf_aborts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.cert_failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.commits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.recv.queue\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.recv.queue_avg\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.recv.queue_max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.recv.queue_min\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.replays\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.send.queue\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.send.queue_avg\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.send.queue_max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.send.queue_min\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.local.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.ready\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.received.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.received.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.repl.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.repl.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.repl.data_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.repl.keys\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.repl.keys_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.galera_status.repl.other_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.aborted.clients\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.aborted.connects\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.binlog.cache.disk_use\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.binlog.cache.use\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.bytes.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.bytes.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.command.delete\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.command.insert\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.command.select\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.command.update\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.created.tmp.disk_tables\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.created.tmp.files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.created.tmp.tables\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.delayed.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.delayed.insert_threads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.delayed.writes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.flush_commands\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.commit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.delete\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.external_lock\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.mrr_init\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.prepare\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.first\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.key\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.last\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.next\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.prev\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.rnd\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.read.rnd_next\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.rollback\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.savepoint\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.savepoint_rollback\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.update\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.handler.write\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.bytes.data\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.bytes.dirty\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.dump_status\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.load_status\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.data\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.dirty\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.flushed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.latched\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.misc\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pages.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pool.reads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pool.resize_status\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.pool.wait_free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.read.ahead\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.read.ahead_evicted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.read.ahead_rnd\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.read.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.innodb.buffer_pool.write_requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.max_used_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.open.files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.open.streams\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.open.tables\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.opened_tables\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.queries\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.questions\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.threads.cached\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.threads.connected\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.threads.created\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"mysql.status.threads.running\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.connections.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.routes.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.server.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.server.time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.cores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.cpu\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.http.req_stats.uri.connz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.http.req_stats.uri.root\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.http.req_stats.uri.routez\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.http.req_stats.uri.subsz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.http.req_stats.uri.varz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.in.messages\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.mem.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.out.messages\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.remotes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.slow_consumers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.total_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.stats.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.cache.fanout.avg\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.cache.fanout.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.cache.hit_rate\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.cache.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.inserts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.matches\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.removes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nats.subscriptions.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.application\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.community_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.direction\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.forwarded_ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.iana_number\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.protocol\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.transport\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"network.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.accepts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.dropped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.handled\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.reading\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.waiting\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"nginx.stubstatus.writing\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.os.family\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.os.full\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.os.kernel\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.os.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.os.platform\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.os.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.serial_number\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.vendor\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"observer.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.buffer_pool\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cache.buffer.hit.pct\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cache.get.consistent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cache.get.db_blocks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cache.physical_reads\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.avg\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.cache_hit.pct\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.max\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.opened.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.opened.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.parse.real\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.parse.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.session.cache_hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.cursors.total\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.io_reloads\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.lock_requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.machine\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.pin_requests\",\"type\":\"number\",\"esTypes\":[\"double\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.performance.username\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.online_status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.size.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.size.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.size.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.data_file.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.space.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.space.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"oracle.tablespace.space.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"organization.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"organization.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"os.family\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"os.full\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"os.kernel\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"os.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"os.platform\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"os.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.connections.accepted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.connections.listen_queue_len\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.connections.max_listen_queue\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.connections.queued\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.process_manager\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.processes.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.processes.idle\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.processes.max_active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.processes.max_children_reached\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.processes.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.slow_requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.start_since\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.pool.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.last_request_cpu\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.last_request_memory\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.request_duration\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.script\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.start_since\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"php_fpm.process.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.application_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.backend_start\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.client.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.client.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.client.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.database.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.database.oid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.query\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.query_start\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.state_change\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.transaction_start\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.user.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.activity.waiting\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.buffers.allocated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.buffers.backend\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.buffers.backend_fsync\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.buffers.checkpoints\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.buffers.clean\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.buffers.clean_full\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.checkpoints.requested\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.checkpoints.scheduled\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.checkpoints.times.sync.ms\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.checkpoints.times.write.ms\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.bgwriter.stats_reset\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.blocks.hit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.blocks.read\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.blocks.time.read.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.blocks.time.write.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.conflicts\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.deadlocks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.number_of_backends\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.oid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.rows.deleted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.rows.fetched\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.rows.inserted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.rows.returned\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.rows.updated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.stats_reset\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.temporary.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.temporary.files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.transactions.commit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.database.transactions.rollback\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.database.oid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.calls\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.local.dirtied\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.local.hit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.local.read\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.local.written\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.shared.dirtied\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.shared.hit\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.shared.read\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.shared.written\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.temp.read\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.memory.temp.written\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.rows\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.text\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.time.max.ms\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.time.mean.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.time.min.ms\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.time.stddev.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.query.time.total.ms\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"postgresql.statement.user.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.args\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.executable\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.hash.md5\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.hash.sha1\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.hash.sha256\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.hash.sha512\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.pgid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.ppid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.start\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.thread.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.thread.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.title\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"process.working_directory\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.channel_max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.channels\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.client_provided.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.frame_max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.octet_count.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.octet_count.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.packet_count.pending\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.packet_count.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.packet_count.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.peer.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.peer.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.connection.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.auto_delete\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.durable\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.internal\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.messages.publish_in.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.messages.publish_in.details.rate\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.messages.publish_out.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.messages.publish_out.details.rate\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.exchange.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.disk.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.disk.free.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.fd.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.fd.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.gc.num.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.gc.reclaimed.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.file_handle.open_attempt.avg.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.file_handle.open_attempt.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.read.avg.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.read.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.read.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.reopen.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.seek.avg.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.seek.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.sync.avg.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.sync.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.write.avg.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.write.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.io.write.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.mem.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.mem.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.mnesia.disk.tx.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.mnesia.ram.tx.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.msg.store_read.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.msg.store_write.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.proc.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.proc.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.processors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.queue.index.journal_write.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.queue.index.read.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.queue.index.write.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.run.queue\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.socket.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.socket.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.node.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.arguments.max_priority\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.auto_delete\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.consumers.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.consumers.utilisation.pct\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.disk.reads.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.disk.writes.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.durable\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.exclusive\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.memory.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.persistent.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.ready.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.ready.details.rate\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.total.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.total.details.rate\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.unacknowledged.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.messages.unacknowledged.details.rate\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.queue.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"rabbitmq.vhost\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.clients.biggest_input_buf\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.clients.blocked\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.clients.connected\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.clients.longest_output_list\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.clients.max_input_buffer\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.clients.max_output_buffer\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.cluster.enabled\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.cpu.used.sys\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.cpu.used.sys_children\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.cpu.used.user\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.cpu.used.user_children\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.active_defrag.is_running\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.allocated\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.fragmentation.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.fragmentation.ratio\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.resident\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.allocator_stats.rss.ratio\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.fragmentation.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.fragmentation.ratio\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.max.policy\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.max.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.used.dataset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.used.lua\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.used.peak\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.used.rss\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.memory.used.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.bgrewrite.last_status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.buffer.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.copy_on_write.last_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.enabled\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.fsync.delayed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.fsync.pending\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.rewrite.buffer.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.rewrite.current_time.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.rewrite.in_progress\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.rewrite.last_time.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.rewrite.scheduled\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.size.base\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.size.current\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.aof.write.last_status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.loading\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.bgsave.current_time.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.bgsave.in_progress\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.bgsave.last_status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.bgsave.last_time.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.copy_on_write.last_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.last_save.changes_since\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.persistence.rdb.last_save.time\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.backlog.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.backlog.first_byte_offset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.backlog.histlen\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.backlog.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.connected_slaves\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.last_io_seconds_ago\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.link_status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.offset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.second_offset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.sync.in_progress\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.sync.last_io_seconds_ago\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master.sync.left_bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.master_offset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.role\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.slave.is_readonly\",\"type\":\"boolean\",\"esTypes\":[\"boolean\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.slave.offset\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.replication.slave.priority\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.arch_bits\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.build_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.config_file\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.gcc_version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.git_dirty\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.git_sha1\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.hz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.lru_clock\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.mode\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.multiplexing_api\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.run_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.tcp_port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.server.uptime\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.slowlog.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.active_defrag.hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.active_defrag.key_hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.active_defrag.key_misses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.active_defrag.misses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.commands_processed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.connections.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.connections.rejected\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.instantaneous.input_kbps\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.instantaneous.ops_per_sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.instantaneous.output_kbps\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.keys.evicted\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.keys.expired\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.keyspace.hits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.keyspace.misses\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.latest_fork_usec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.migrate_cached_sockets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.net.input.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.net.output.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.pubsub.channels\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.pubsub.patterns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.slave_expires_tracked_keys\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.sync.full\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.sync.partial.err\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.info.stats.sync.partial.ok\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.key.expire.ttl\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.key.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.key.length\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.key.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.key.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.keyspace.avg_ttl\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.keyspace.expires\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.keyspace.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"redis.keyspace.keys\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"related.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.as.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.as.organization.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.nat.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.nat.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.email\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.full_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"server.user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.ephemeral_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"service.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.as.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.as.organization.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.continent_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.region_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.geo.region_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.nat.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.nat.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.email\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.full_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"source.user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.idle.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.idle.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.iowait.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.iowait.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.irq.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.irq.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.nice.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.nice.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.softirq.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.softirq.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.steal.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.steal.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.system.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.system.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.user.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.core.user.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.cores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.idle.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.idle.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.idle.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.iowait.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.iowait.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.iowait.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.irq.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.irq.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.irq.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.nice.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.nice.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.nice.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.softirq.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.softirq.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.softirq.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.steal.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.steal.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.steal.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.system.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.system.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.system.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.total.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.total.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":3,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.user.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.user.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.cpu.user.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.io.time\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.await\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.busy\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.queue.avg_size\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.read.await\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.read.per_sec.bytes\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.read.request.merges_per_sec\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.read.request.per_sec\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.request.avg_size\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.service_time\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.write.await\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.write.per_sec.bytes\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.write.request.merges_per_sec\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.iostat.write.request.per_sec\",\"type\":\"number\",\"esTypes\":[\"float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.read.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.read.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.read.time\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.serial_number\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.write.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.write.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.diskio.write.time\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.entropy.available_bits\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.entropy.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.available\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.device_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.free_files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.mount_point\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.filesystem.used.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.fsstat.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.fsstat.total_files\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.fsstat.total_size.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.fsstat.total_size.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.fsstat.total_size.used\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.1\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.15\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.5\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.cores\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.norm.1\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.norm.15\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.load.norm.5\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.actual.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.actual.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.actual.used.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.default_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.reserved\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.surplus\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.hugepages.used.pct\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.swap.free\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.swap.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.swap.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.swap.used.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.memory.used.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.in.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.in.dropped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.in.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.in.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.out.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.out.dropped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.out.errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.network.out.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.blkio.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.blkio.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.blkio.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.blkio.total.ios\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.cfs.period.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.cfs.quota.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.cfs.shares\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.rt.period.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.rt.runtime.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.stats.periods\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.stats.throttled.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpu.stats.throttled.periods\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpuacct.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpuacct.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpuacct.stats.system.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpuacct.stats.user.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.cpuacct.total.ns\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem.failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem.usage.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem_tcp.failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem_tcp.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem_tcp.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.kmem_tcp.usage.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.mem.failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.mem.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.mem.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.mem.usage.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.memsw.failures\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.memsw.limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.memsw.usage.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.memsw.usage.max.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.active_anon.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.active_file.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.cache.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.hierarchical_memory_limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.hierarchical_memsw_limit.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.inactive_anon.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.inactive_file.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.major_page_faults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.mapped_file.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.page_faults\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.pages_in\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.pages_out\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.rss_huge.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.swap.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.memory.stats.unevictable.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cgroup.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cmdline\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.start_time\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.system.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.total.norm.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.total.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.total.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.total.value\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.cpu.user.ticks\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.fd.limit.hard\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.fd.limit.soft\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.fd.open\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.memory.rss.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.memory.rss.pct\",\"type\":\"number\",\"esTypes\":[\"scaled_float\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.memory.share\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.memory.size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.dead\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.idle\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.running\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.sleeping\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.stopped\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.unknown\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.process.summary.zombie\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.blocks.synced\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.blocks.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.disks.active\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.disks.failed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.disks.spare\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.disks.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.level\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.raid.sync_action\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.local.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.local.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.process.cmdline\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.remote.etld_plus_one\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.remote.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.remote.host_error\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.remote.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.remote.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.all.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.all.listening\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.all.close_wait\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.all.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.all.established\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.all.listening\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.all.orphan\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.all.time_wait\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.tcp.memory\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.udp.all.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.socket.summary.udp.memory\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"system.uptime.duration.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"tags\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"timeseries.instance\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"tracing.trace.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"tracing.transaction.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"traefik.health.response.avg_time.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"traefik.health.response.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"traefik.health.uptime.sec\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.fragment\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.full\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.original\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.password\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.query\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.scheme\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"url.username\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.email\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.full_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.group.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.group.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.hash\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.device.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.original\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.os.family\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.os.full\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.os.kernel\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.os.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.os.platform\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.os.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"user_agent.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.read_errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.requests.offloaded\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.requests.routed\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.requests.static\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.requests.total\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.worker_pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.core.write_errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.total.exceptions\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.total.pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.total.read_errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.total.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.total.write_errors\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.accepting\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.avg_rt\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.delta_requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.exceptions\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.harakiri_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.respawn_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.rss\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.running_time\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.signal_queue\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.signals\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.status\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.tx\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"uwsgi.status.worker.vsz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.datastore.capacity.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.datastore.capacity.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.datastore.capacity.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.datastore.capacity.used.pct\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.datastore.fstype\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.datastore.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.cpu.free.mhz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.cpu.total.mhz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.cpu.used.mhz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.memory.free.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.memory.total.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.memory.used.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.host.network_names\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.cpu.used.mhz\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.memory.free.guest.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.memory.total.guest.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.memory.used.guest.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.memory.used.host.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.network_names\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vsphere.virtualmachine.os\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.display_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.exit_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.path_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.pid\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.start_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.start_type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"windows.service.uptime.ms\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.connection.interest_ops\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.connection.queued\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.connection.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.connection.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.approximate_data_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.ephemerals_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.followers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.hostname\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.latency.avg\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.latency.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.latency.min\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.max_file_descriptor_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.num_alive_connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.open_file_descriptor_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.outstanding_requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.packets.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.packets.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.pending_syncs\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.server_state\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.synced_followers\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.watch_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.mntr.znode_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.connections\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.epoch\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.latency.avg\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.latency.max\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.latency.min\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.mode\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.node_count\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.outstanding\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.received\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.sent\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.version_date\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"zookeeper.server.zxid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]", + "timeFieldName" : "@timestamp", + "title" : "metricbeat-*" + }, + "type" : "index-pattern", + "migrationVersion" : { + "index-pattern" : "7.6.0" + }, + "updated_at" : "2020-01-22T15:34:59.061Z" + } + } +} + { "type": "doc", "value": { From e102ae673c0e320151bfe478c2ddf9d763020dfd Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Thu, 23 Jan 2020 13:40:05 -0700 Subject: [PATCH 26/72] [Reporting/New Platform] Use the logger service from core (#55442) * More Typescript Fixes * [Reporting/New Platform] Use the logger service from core * Add log tag * fix jest tests * ts fixes * fix mocha test * convert to jest --- .../execute_job.js => execute_job.test.js} | 263 +++++++++--------- .../export_types/csv/server/execute_job.ts | 13 +- .../server/create_job/create_job.ts | 13 +- .../server/execute_job.ts | 25 +- .../png/server/execute_job/index.test.js | 8 +- .../png/server/execute_job/index.ts | 7 +- .../server/execute_job/index.test.js | 8 +- .../printable_pdf/server/execute_job/index.ts | 7 +- x-pack/legacy/plugins/reporting/index.ts | 4 +- .../browsers/create_browser_driver_factory.ts | 9 +- .../reporting/server/lib/create_queue.ts | 14 +- .../server/lib/create_tagged_logger.ts | 32 +-- .../server/lib/create_worker.test.ts | 7 +- .../reporting/server/lib/create_worker.ts | 6 +- .../reporting/server/lib/enqueue_job.ts | 6 +- .../plugins/reporting/server/lib/get_user.ts | 6 +- .../reporting/server/lib/level_logger.ts | 32 +-- .../legacy/plugins/reporting/server/plugin.ts | 22 +- .../server/routes/generate_from_jobparams.ts | 8 +- .../routes/generate_from_savedobject.ts | 7 +- .../generate_from_savedobject_immediate.ts | 10 +- .../reporting/server/routes/generation.ts | 10 +- .../plugins/reporting/server/routes/jobs.ts | 48 ++-- .../authorized_user_pre_routing.test.js | 34 +-- .../routes/lib/authorized_user_pre_routing.ts | 14 +- .../server/routes/lib/get_document_payload.ts | 26 +- ...nse_handler.js => job_response_handler.ts} | 33 ++- .../lib/reporting_feature_pre_routing.ts | 7 +- .../routes/lib/route_config_factories.ts | 31 ++- x-pack/legacy/plugins/reporting/types.d.ts | 41 +-- 30 files changed, 397 insertions(+), 354 deletions(-) rename x-pack/legacy/plugins/reporting/export_types/csv/server/{__tests__/execute_job.js => execute_job.test.js} (78%) rename x-pack/legacy/plugins/reporting/server/routes/lib/{__tests__ => }/authorized_user_pre_routing.test.js (87%) rename x-pack/legacy/plugins/reporting/server/routes/lib/{job_response_handler.js => job_response_handler.ts} (65%) diff --git a/x-pack/legacy/plugins/reporting/export_types/csv/server/__tests__/execute_job.js b/x-pack/legacy/plugins/reporting/export_types/csv/server/execute_job.test.js similarity index 78% rename from x-pack/legacy/plugins/reporting/export_types/csv/server/__tests__/execute_job.js rename to x-pack/legacy/plugins/reporting/export_types/csv/server/execute_job.test.js index 83be303191badb..6109db8542764d 100644 --- a/x-pack/legacy/plugins/reporting/export_types/csv/server/__tests__/execute_job.js +++ b/x-pack/legacy/plugins/reporting/export_types/csv/server/execute_job.test.js @@ -4,33 +4,19 @@ * you may not use this file except in compliance with the Elastic License. */ -import expect from '@kbn/expect'; import Puid from 'puid'; import sinon from 'sinon'; import nodeCrypto from '@elastic/node-crypto'; - -import { CancellationToken } from '../../../../common/cancellation_token'; -import { FieldFormatsService } from '../../../../../../../../src/legacy/ui/field_formats/mixin/field_formats_service'; +import { CancellationToken } from '../../../common/cancellation_token'; +import { FieldFormatsService } from '../../../../../../../src/legacy/ui/field_formats/mixin/field_formats_service'; // Reporting uses an unconventional directory structure so the linter marks this as a violation // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { StringFormat } from '../../../../../../../../src/plugins/data/server'; - -import { executeJobFactory } from '../execute_job'; +import { StringFormat } from '../../../../../../../src/plugins/data/server'; +import { LevelLogger } from '../../../server/lib/level_logger'; +import { executeJobFactory } from './execute_job'; const delay = ms => new Promise(resolve => setTimeout(() => resolve(), ms)); -const expectRejectedPromise = async promise => { - let error = null; - try { - await promise; - } catch (err) { - error = err; - } finally { - expect(error).to.not.be(null); - expect(error).to.be.an(Error); - } -}; - const puid = new Puid(); const getRandomScrollId = () => { return puid.generate(); @@ -41,6 +27,13 @@ describe('CSV Execute Job', function() { const headers = { sid: 'test', }; + const mockLogger = new LevelLogger({ + get: () => ({ + debug: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }), + }); let defaultElasticsearchResponse; let encryptedHeaders; @@ -50,7 +43,7 @@ describe('CSV Execute Job', function() { let callWithRequestStub; let uiSettingsGetStub; - before(async function() { + beforeAll(async function() { const crypto = nodeCrypto({ encryptionKey }); encryptedHeaders = await crypto.encrypt(headers); }); @@ -123,16 +116,16 @@ describe('CSV Execute Job', function() { describe('calls getScopedSavedObjectsClient with request', function() { it('containing decrypted headers', async function() { - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); await executeJob( 'job456', { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null } }, cancellationToken ); - expect(mockServer.savedObjects.getScopedSavedObjectsClient.calledOnce).to.be(true); - expect( - mockServer.savedObjects.getScopedSavedObjectsClient.firstCall.args[0].headers - ).to.be.eql(headers); + expect(mockServer.savedObjects.getScopedSavedObjectsClient.calledOnce).toBe(true); + expect(mockServer.savedObjects.getScopedSavedObjectsClient.firstCall.args[0].headers).toEqual( + headers + ); }); it(`containing getBasePath() returning server's basePath if the job doesn't have one`, async function() { @@ -141,16 +134,16 @@ describe('CSV Execute Job', function() { .config() .get.withArgs('server.basePath') .returns(serverBasePath); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); await executeJob( 'job456', { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null } }, cancellationToken ); - expect(mockServer.savedObjects.getScopedSavedObjectsClient.calledOnce).to.be(true); + expect(mockServer.savedObjects.getScopedSavedObjectsClient.calledOnce).toBe(true); expect( mockServer.savedObjects.getScopedSavedObjectsClient.firstCall.args[0].getBasePath() - ).to.be.eql(serverBasePath); + ).toEqual(serverBasePath); }); it(`containing getBasePath() returning job's basePath if the job has one`, async function() { @@ -159,7 +152,7 @@ describe('CSV Execute Job', function() { .config() .get.withArgs('server.basePath') .returns(serverBasePath); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobBasePath = 'foo-job/basePath/'; await executeJob( 'job789', @@ -171,10 +164,10 @@ describe('CSV Execute Job', function() { }, cancellationToken ); - expect(mockServer.savedObjects.getScopedSavedObjectsClient.calledOnce).to.be(true); + expect(mockServer.savedObjects.getScopedSavedObjectsClient.calledOnce).toBe(true); expect( mockServer.savedObjects.getScopedSavedObjectsClient.firstCall.args[0].getBasePath() - ).to.be.eql(jobBasePath); + ).toEqual(jobBasePath); }); }); @@ -182,14 +175,14 @@ describe('CSV Execute Job', function() { it('passed scoped SavedObjectsClient to uiSettingsServiceFactory', async function() { const returnValue = Symbol(); mockServer.savedObjects.getScopedSavedObjectsClient.returns(returnValue); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); await executeJob( 'job456', { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null } }, cancellationToken ); - expect(mockServer.uiSettingsServiceFactory.calledOnce).to.be(true); - expect(mockServer.uiSettingsServiceFactory.firstCall.args[0].savedObjectsClient).to.be( + expect(mockServer.uiSettingsServiceFactory.calledOnce).toBe(true); + expect(mockServer.uiSettingsServiceFactory.firstCall.args[0].savedObjectsClient).toBe( returnValue ); }); @@ -197,14 +190,14 @@ describe('CSV Execute Job', function() { describe('basic Elasticsearch call behavior', function() { it('should decrypt encrypted headers and pass to callWithRequest', async function() { - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); await executeJob( 'job456', { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null } }, cancellationToken ); - expect(callWithRequestStub.called).to.be(true); - expect(callWithRequestStub.firstCall.args[0].headers).to.be.eql(headers); + expect(callWithRequestStub.called).toBe(true); + expect(callWithRequestStub.firstCall.args[0].headers).toEqual(headers); }); it('should pass the index and body to execute the initial search', async function() { @@ -213,7 +206,7 @@ describe('CSV Execute Job', function() { testBody: true, }; - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const job = { headers: encryptedHeaders, fields: [], @@ -226,9 +219,9 @@ describe('CSV Execute Job', function() { await executeJob('job777', job, cancellationToken); const searchCall = callWithRequestStub.firstCall; - expect(searchCall.args[1]).to.be('search'); - expect(searchCall.args[2].index).to.be(index); - expect(searchCall.args[2].body).to.be(body); + expect(searchCall.args[1]).toBe('search'); + expect(searchCall.args[2].index).toBe(index); + expect(searchCall.args[2].body).toBe(body); }); it('should pass the scrollId from the initial search to the subsequent scroll', async function() { @@ -240,7 +233,7 @@ describe('CSV Execute Job', function() { _scroll_id: scrollId, }); callWithRequestStub.onSecondCall().resolves(defaultElasticsearchResponse); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); await executeJob( 'job456', { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null } }, @@ -249,25 +242,25 @@ describe('CSV Execute Job', function() { const scrollCall = callWithRequestStub.secondCall; - expect(scrollCall.args[1]).to.be('scroll'); - expect(scrollCall.args[2].scrollId).to.be(scrollId); + expect(scrollCall.args[1]).toBe('scroll'); + expect(scrollCall.args[2].scrollId).toBe(scrollId); }); it('should not execute scroll if there are no hits from the search', async function() { - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); await executeJob( 'job456', { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null } }, cancellationToken ); - expect(callWithRequestStub.callCount).to.be(2); + expect(callWithRequestStub.callCount).toBe(2); const searchCall = callWithRequestStub.firstCall; - expect(searchCall.args[1]).to.be('search'); + expect(searchCall.args[1]).toBe('search'); const clearScrollCall = callWithRequestStub.secondCall; - expect(clearScrollCall.args[1]).to.be('clearScroll'); + expect(clearScrollCall.args[1]).toBe('clearScroll'); }); it('should stop executing scroll if there are no hits', async function() { @@ -284,23 +277,23 @@ describe('CSV Execute Job', function() { _scroll_id: 'scrollId', }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); await executeJob( 'job456', { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null } }, cancellationToken ); - expect(callWithRequestStub.callCount).to.be(3); + expect(callWithRequestStub.callCount).toBe(3); const searchCall = callWithRequestStub.firstCall; - expect(searchCall.args[1]).to.be('search'); + expect(searchCall.args[1]).toBe('search'); const scrollCall = callWithRequestStub.secondCall; - expect(scrollCall.args[1]).to.be('scroll'); + expect(scrollCall.args[1]).toBe('scroll'); const clearScroll = callWithRequestStub.thirdCall; - expect(clearScroll.args[1]).to.be('clearScroll'); + expect(clearScroll.args[1]).toBe('clearScroll'); }); it('should call clearScroll with scrollId when there are no more hits', async function() { @@ -319,7 +312,7 @@ describe('CSV Execute Job', function() { _scroll_id: lastScrollId, }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); await executeJob( 'job456', { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null } }, @@ -327,8 +320,8 @@ describe('CSV Execute Job', function() { ); const lastCall = callWithRequestStub.getCall(callWithRequestStub.callCount - 1); - expect(lastCall.args[1]).to.be('clearScroll'); - expect(lastCall.args[2].scrollId).to.eql([lastScrollId]); + expect(lastCall.args[1]).toBe('clearScroll'); + expect(lastCall.args[2].scrollId).toEqual([lastScrollId]); }); it('calls clearScroll when there is an error iterating the hits', async function() { @@ -347,18 +340,20 @@ describe('CSV Execute Job', function() { _scroll_id: lastScrollId, }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], conflictedTypesFields: undefined, searchRequest: { index: null, body: null }, }; - await expectRejectedPromise(executeJob('job123', jobParams, cancellationToken)); + await expect( + executeJob('job123', jobParams, cancellationToken) + ).rejects.toMatchInlineSnapshot(`[TypeError: Cannot read property 'indexOf' of undefined]`); const lastCall = callWithRequestStub.getCall(callWithRequestStub.callCount - 1); - expect(lastCall.args[1]).to.be('clearScroll'); - expect(lastCall.args[2].scrollId).to.eql([lastScrollId]); + expect(lastCall.args[1]).toBe('clearScroll'); + expect(lastCall.args[2].scrollId).toEqual([lastScrollId]); }); }); @@ -375,7 +370,7 @@ describe('CSV Execute Job', function() { _scroll_id: 'scrollId', }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], @@ -388,7 +383,7 @@ describe('CSV Execute Job', function() { cancellationToken ); - expect(csvContainsFormulas).to.equal(true); + expect(csvContainsFormulas).toEqual(true); }); it('returns warnings when headings contain formulas', async function() { @@ -403,7 +398,7 @@ describe('CSV Execute Job', function() { _scroll_id: 'scrollId', }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['=SUM(A1:A2)', 'two'], @@ -416,7 +411,7 @@ describe('CSV Execute Job', function() { cancellationToken ); - expect(csvContainsFormulas).to.equal(true); + expect(csvContainsFormulas).toEqual(true); }); it('returns no warnings when cells have no formulas', async function() { @@ -431,7 +426,7 @@ describe('CSV Execute Job', function() { _scroll_id: 'scrollId', }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], @@ -444,7 +439,7 @@ describe('CSV Execute Job', function() { cancellationToken ); - expect(csvContainsFormulas).to.equal(false); + expect(csvContainsFormulas).toEqual(false); }); it('returns no warnings when configured not to', async () => { @@ -459,7 +454,7 @@ describe('CSV Execute Job', function() { _scroll_id: 'scrollId', }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], @@ -472,20 +467,22 @@ describe('CSV Execute Job', function() { cancellationToken ); - expect(csvContainsFormulas).to.equal(false); + expect(csvContainsFormulas).toEqual(false); }); }); describe('Elasticsearch call errors', function() { it('should reject Promise if search call errors out', async function() { callWithRequestStub.rejects(new Error()); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null }, }; - await expectRejectedPromise(executeJob('job123', jobParams, cancellationToken)); + await expect( + executeJob('job123', jobParams, cancellationToken) + ).rejects.toMatchInlineSnapshot(`[Error]`); }); it('should reject Promise if scroll call errors out', async function() { @@ -496,13 +493,15 @@ describe('CSV Execute Job', function() { _scroll_id: 'scrollId', }); callWithRequestStub.onSecondCall().rejects(new Error()); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null }, }; - await expectRejectedPromise(executeJob('job123', jobParams, cancellationToken)); + await expect( + executeJob('job123', jobParams, cancellationToken) + ).rejects.toMatchInlineSnapshot(`[Error]`); }); }); @@ -515,13 +514,17 @@ describe('CSV Execute Job', function() { _scroll_id: undefined, }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null }, }; - await expectRejectedPromise(executeJob('job123', jobParams, cancellationToken)); + await expect( + executeJob('job123', jobParams, cancellationToken) + ).rejects.toMatchInlineSnapshot( + `[Error: Expected _scroll_id in the following Elasticsearch response: {"hits":{"hits":[{}]}}]` + ); }); it('should reject Promise if search returns no hits and no _scroll_id', async function() { @@ -532,13 +535,17 @@ describe('CSV Execute Job', function() { _scroll_id: undefined, }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null }, }; - await expectRejectedPromise(executeJob('job123', jobParams, cancellationToken)); + await expect( + executeJob('job123', jobParams, cancellationToken) + ).rejects.toMatchInlineSnapshot( + `[Error: Expected _scroll_id in the following Elasticsearch response: {"hits":{"hits":[]}}]` + ); }); it('should reject Promise if scroll returns hits but no _scroll_id', async function() { @@ -556,13 +563,17 @@ describe('CSV Execute Job', function() { _scroll_id: undefined, }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null }, }; - await expectRejectedPromise(executeJob('job123', jobParams, cancellationToken)); + await expect( + executeJob('job123', jobParams, cancellationToken) + ).rejects.toMatchInlineSnapshot( + `[Error: Expected _scroll_id in the following Elasticsearch response: {"hits":{"hits":[{}]}}]` + ); }); it('should reject Promise if scroll returns no hits and no _scroll_id', async function() { @@ -580,13 +591,17 @@ describe('CSV Execute Job', function() { _scroll_id: undefined, }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null }, }; - await expectRejectedPromise(executeJob('job123', jobParams, cancellationToken)); + await expect( + executeJob('job123', jobParams, cancellationToken) + ).rejects.toMatchInlineSnapshot( + `[Error: Expected _scroll_id in the following Elasticsearch response: {"hits":{"hits":[]}}]` + ); }); }); @@ -610,7 +625,7 @@ describe('CSV Execute Job', function() { }); it('should stop calling Elasticsearch when cancellationToken.cancel is called', async function() { - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); executeJob( 'job345', { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null } }, @@ -621,11 +636,11 @@ describe('CSV Execute Job', function() { const callCount = callWithRequestStub.callCount; cancellationToken.cancel(); await delay(250); - expect(callWithRequestStub.callCount).to.be(callCount + 1); // last call is to clear the scroll + expect(callWithRequestStub.callCount).toBe(callCount + 1); // last call is to clear the scroll }); it(`shouldn't call clearScroll if it never got a scrollId`, async function() { - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); executeJob( 'job345', { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null } }, @@ -639,7 +654,7 @@ describe('CSV Execute Job', function() { }); it('should call clearScroll if it got a scrollId', async function() { - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); executeJob( 'job345', { headers: encryptedHeaders, fields: [], searchRequest: { index: null, body: null } }, @@ -650,61 +665,61 @@ describe('CSV Execute Job', function() { await delay(100); const lastCall = callWithRequestStub.getCall(callWithRequestStub.callCount - 1); - expect(lastCall.args[1]).to.be('clearScroll'); - expect(lastCall.args[2].scrollId).to.eql([scrollId]); + expect(lastCall.args[1]).toBe('clearScroll'); + expect(lastCall.args[2].scrollId).toEqual([scrollId]); }); }); describe('csv content', function() { it('should write column headers to output, even if there are no results', async function() { - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], searchRequest: { index: null, body: null }, }; const { content } = await executeJob('job123', jobParams, cancellationToken); - expect(content).to.be(`one,two\n`); + expect(content).toBe(`one,two\n`); }); it('should use custom uiSettings csv:separator for header', async function() { uiSettingsGetStub.withArgs('csv:separator').returns(';'); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], searchRequest: { index: null, body: null }, }; const { content } = await executeJob('job123', jobParams, cancellationToken); - expect(content).to.be(`one;two\n`); + expect(content).toBe(`one;two\n`); }); it('should escape column headers if uiSettings csv:quoteValues is true', async function() { uiSettingsGetStub.withArgs('csv:quoteValues').returns(true); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one and a half', 'two', 'three-and-four', 'five & six'], searchRequest: { index: null, body: null }, }; const { content } = await executeJob('job123', jobParams, cancellationToken); - expect(content).to.be(`"one and a half",two,"three-and-four","five & six"\n`); + expect(content).toBe(`"one and a half",two,"three-and-four","five & six"\n`); }); it(`shouldn't escape column headers if uiSettings csv:quoteValues is false`, async function() { uiSettingsGetStub.withArgs('csv:quoteValues').returns(false); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one and a half', 'two', 'three-and-four', 'five & six'], searchRequest: { index: null, body: null }, }; const { content } = await executeJob('job123', jobParams, cancellationToken); - expect(content).to.be(`one and a half,two,three-and-four,five & six\n`); + expect(content).toBe(`one and a half,two,three-and-four,five & six\n`); }); it('should write column headers to output, when there are results', async function() { - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); callWithRequestStub.onFirstCall().resolves({ hits: { hits: [{ one: '1', two: '2' }], @@ -720,11 +735,11 @@ describe('CSV Execute Job', function() { const { content } = await executeJob('job123', jobParams, cancellationToken); const lines = content.split('\n'); const headerLine = lines[0]; - expect(headerLine).to.be('one,two'); + expect(headerLine).toBe('one,two'); }); it('should use comma separated values of non-nested fields from _source', async function() { - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); callWithRequestStub.onFirstCall().resolves({ hits: { hits: [{ _source: { one: 'foo', two: 'bar' } }], @@ -741,11 +756,11 @@ describe('CSV Execute Job', function() { const { content } = await executeJob('job123', jobParams, cancellationToken); const lines = content.split('\n'); const valuesLine = lines[1]; - expect(valuesLine).to.be('foo,bar'); + expect(valuesLine).toBe('foo,bar'); }); it('should concatenate the hits from multiple responses', async function() { - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); callWithRequestStub.onFirstCall().resolves({ hits: { hits: [{ _source: { one: 'foo', two: 'bar' } }], @@ -768,12 +783,12 @@ describe('CSV Execute Job', function() { const { content } = await executeJob('job123', jobParams, cancellationToken); const lines = content.split('\n'); - expect(lines[1]).to.be('foo,bar'); - expect(lines[2]).to.be('baz,qux'); + expect(lines[1]).toBe('foo,bar'); + expect(lines[2]).toBe('baz,qux'); }); it('should use field formatters to format fields', async function() { - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); callWithRequestStub.onFirstCall().resolves({ hits: { hits: [{ _source: { one: 'foo', two: 'bar' } }], @@ -799,7 +814,7 @@ describe('CSV Execute Job', function() { const { content } = await executeJob('job123', jobParams, cancellationToken); const lines = content.split('\n'); - expect(lines[1]).to.be('FOO,bar'); + expect(lines[1]).toBe('FOO,bar'); }); }); @@ -818,7 +833,7 @@ describe('CSV Execute Job', function() { .get.withArgs('xpack.reporting.csv.maxSizeBytes') .returns(1); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], @@ -833,11 +848,11 @@ describe('CSV Execute Job', function() { }); it('should return max_size_reached', function() { - expect(maxSizeReached).to.be(true); + expect(maxSizeReached).toBe(true); }); it('should return empty content', function() { - expect(content).to.be(''); + expect(content).toBe(''); }); }); @@ -851,7 +866,7 @@ describe('CSV Execute Job', function() { .get.withArgs('xpack.reporting.csv.maxSizeBytes') .returns(9); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], @@ -866,11 +881,11 @@ describe('CSV Execute Job', function() { }); it(`shouldn't return max_size_reached`, function() { - expect(maxSizeReached).to.be(false); + expect(maxSizeReached).toBe(false); }); it(`should return content`, function() { - expect(content).to.be('one,two\n'); + expect(content).toBe('one,two\n'); }); }); @@ -891,7 +906,7 @@ describe('CSV Execute Job', function() { _scroll_id: 'scrollId', }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], @@ -907,11 +922,11 @@ describe('CSV Execute Job', function() { }); it(`should return max_size_reached`, function() { - expect(maxSizeReached).to.be(true); + expect(maxSizeReached).toBe(true); }); it(`should return the headers in the content`, function() { - expect(content).to.be('one,two\n'); + expect(content).toBe('one,two\n'); }); }); @@ -932,7 +947,7 @@ describe('CSV Execute Job', function() { _scroll_id: 'scrollId', }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], @@ -948,11 +963,11 @@ describe('CSV Execute Job', function() { }); it(`shouldn't return max_size_reached`, async function() { - expect(maxSizeReached).to.be(false); + expect(maxSizeReached).toBe(false); }); it('should return headers and data in content', function() { - expect(content).to.be('one,two\nfoo,bar\n'); + expect(content).toBe('one,two\nfoo,bar\n'); }); }); }); @@ -972,7 +987,7 @@ describe('CSV Execute Job', function() { _scroll_id: 'scrollId', }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], @@ -983,8 +998,8 @@ describe('CSV Execute Job', function() { await executeJob('job123', jobParams, cancellationToken); const searchCall = callWithRequestStub.firstCall; - expect(searchCall.args[1]).to.be('search'); - expect(searchCall.args[2].scroll).to.be(scrollDuration); + expect(searchCall.args[1]).toBe('search'); + expect(searchCall.args[2].scroll).toBe(scrollDuration); }); it('passes scroll size to initial search call', async function() { @@ -1001,7 +1016,7 @@ describe('CSV Execute Job', function() { _scroll_id: 'scrollId', }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], @@ -1012,8 +1027,8 @@ describe('CSV Execute Job', function() { await executeJob('job123', jobParams, cancellationToken); const searchCall = callWithRequestStub.firstCall; - expect(searchCall.args[1]).to.be('search'); - expect(searchCall.args[2].size).to.be(scrollSize); + expect(searchCall.args[1]).toBe('search'); + expect(searchCall.args[2].size).toBe(scrollSize); }); it('passes scroll duration to subsequent scroll call', async function() { @@ -1030,7 +1045,7 @@ describe('CSV Execute Job', function() { _scroll_id: 'scrollId', }); - const executeJob = executeJobFactory(mockServer); + const executeJob = executeJobFactory(mockServer, mockLogger); const jobParams = { headers: encryptedHeaders, fields: ['one', 'two'], @@ -1041,8 +1056,8 @@ describe('CSV Execute Job', function() { await executeJob('job123', jobParams, cancellationToken); const scrollCall = callWithRequestStub.secondCall; - expect(scrollCall.args[1]).to.be('scroll'); - expect(scrollCall.args[2].scroll).to.be(scrollDuration); + expect(scrollCall.args[1]).toBe('scroll'); + expect(scrollCall.args[2].scroll).toBe(scrollDuration); }); }); }); diff --git a/x-pack/legacy/plugins/reporting/export_types/csv/server/execute_job.ts b/x-pack/legacy/plugins/reporting/export_types/csv/server/execute_job.ts index 83bcc90ba92ed3..d8b4cdd9718eaa 100644 --- a/x-pack/legacy/plugins/reporting/export_types/csv/server/execute_job.ts +++ b/x-pack/legacy/plugins/reporting/export_types/csv/server/execute_job.ts @@ -7,25 +7,26 @@ import { i18n } from '@kbn/i18n'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { KibanaRequest } from '../../../../../../../src/core/server'; +import { CSV_JOB_TYPE } from '../../../common/constants'; +import { cryptoFactory } from '../../../server/lib'; import { - ExecuteJobFactory, ESQueueWorkerExecuteFn, + ExecuteJobFactory, FieldFormats, + Logger, ServerFacade, } from '../../../types'; -import { CSV_JOB_TYPE, PLUGIN_ID } from '../../../common/constants'; -import { cryptoFactory, LevelLogger } from '../../../server/lib'; import { JobDocPayloadDiscoverCsv } from '../types'; -import { createGenerateCsv } from './lib/generate_csv'; import { fieldFormatMapFactory } from './lib/field_format_map'; +import { createGenerateCsv } from './lib/generate_csv'; export const executeJobFactory: ExecuteJobFactory> = function executeJobFactoryFn(server: ServerFacade) { +>> = function executeJobFactoryFn(server: ServerFacade, parentLogger: Logger) { const { callWithRequest } = server.plugins.elasticsearch.getCluster('data'); const crypto = cryptoFactory(server); const config = server.config(); - const logger = LevelLogger.createForServer(server, [PLUGIN_ID, CSV_JOB_TYPE, 'execute-job']); + const logger = parentLogger.clone([CSV_JOB_TYPE, 'execute-job']); const serverBasePath = config.get('server.basePath'); return async function executeJob( diff --git a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/create_job/create_job.ts b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/create_job/create_job.ts index 8443be2b25f4f9..a270e3e0329fe8 100644 --- a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/create_job/create_job.ts +++ b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/create_job/create_job.ts @@ -6,13 +6,14 @@ import { notFound, notImplemented } from 'boom'; import { get } from 'lodash'; -import { PLUGIN_ID, CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../../../common/constants'; -import { cryptoFactory, LevelLogger } from '../../../../server/lib'; +import { CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../../../common/constants'; +import { cryptoFactory } from '../../../../server/lib'; import { CreateJobFactory, ImmediateCreateJobFn, ServerFacade, RequestFacade, + Logger, } from '../../../../types'; import { SavedObject, @@ -34,13 +35,9 @@ interface VisData { export const createJobFactory: CreateJobFactory> = function createJobFactoryFn(server: ServerFacade) { +>> = function createJobFactoryFn(server: ServerFacade, parentLogger: Logger) { const crypto = cryptoFactory(server); - const logger = LevelLogger.createForServer(server, [ - PLUGIN_ID, - CSV_FROM_SAVEDOBJECT_JOB_TYPE, - 'create-job', - ]); + const logger = parentLogger.clone([CSV_FROM_SAVEDOBJECT_JOB_TYPE, 'create-job']); return async function createJob( jobParams: JobParamsPanelCsv, diff --git a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/execute_job.ts b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/execute_job.ts index 69d9a173d40b38..03f491deaa43d6 100644 --- a/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/execute_job.ts +++ b/x-pack/legacy/plugins/reporting/export_types/csv_from_savedobject/server/execute_job.ts @@ -5,38 +5,31 @@ */ import { i18n } from '@kbn/i18n'; -import { cryptoFactory, LevelLogger } from '../../../server/lib'; +import { CONTENT_TYPE_CSV, CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../../common/constants'; +import { cryptoFactory } from '../../../server/lib'; import { ExecuteJobFactory, ImmediateExecuteFn, - JobDocOutputExecuted, - ServerFacade, + JobDocOutput, + Logger, RequestFacade, + ServerFacade, } from '../../../types'; -import { - CONTENT_TYPE_CSV, - CSV_FROM_SAVEDOBJECT_JOB_TYPE, - PLUGIN_ID, -} from '../../../common/constants'; import { CsvResultFromSearch } from '../../csv/types'; -import { JobParamsPanelCsv, SearchPanel, JobDocPayloadPanelCsv, FakeRequest } from '../types'; +import { FakeRequest, JobDocPayloadPanelCsv, JobParamsPanelCsv, SearchPanel } from '../types'; import { createGenerateCsv } from './lib'; export const executeJobFactory: ExecuteJobFactory> = function executeJobFactoryFn(server: ServerFacade) { +>> = function executeJobFactoryFn(server: ServerFacade, parentLogger: Logger) { const crypto = cryptoFactory(server); - const logger = LevelLogger.createForServer(server, [ - PLUGIN_ID, - CSV_FROM_SAVEDOBJECT_JOB_TYPE, - 'execute-job', - ]); + const logger = parentLogger.clone([CSV_FROM_SAVEDOBJECT_JOB_TYPE, 'execute-job']); return async function executeJob( jobId: string | null, job: JobDocPayloadPanelCsv, realRequest?: RequestFacade - ): Promise { + ): Promise { // There will not be a jobID for "immediate" generation. // jobID is only for "queued" jobs // Use the jobID as a logging tag or "immediate" diff --git a/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.test.js b/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.test.js index 1be65722fa668b..4f02ab5d4c077e 100644 --- a/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.test.js +++ b/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.test.js @@ -57,6 +57,8 @@ beforeEach(() => { afterEach(() => generatePngObservableFactory.mockReset()); +const getMockLogger = () => new LevelLogger(); + const encryptHeaders = async headers => { const crypto = cryptoFactory(mockServer); return await crypto.encrypt(headers); @@ -68,7 +70,7 @@ test(`passes browserTimezone to generatePng`, async () => { const generatePngObservable = generatePngObservableFactory(); generatePngObservable.mockReturnValue(Rx.of(Buffer.from(''))); - const executeJob = executeJobFactory(mockServer, { browserDriverFactory: {} }); + const executeJob = executeJobFactory(mockServer, getMockLogger(), { browserDriverFactory: {} }); const browserTimezone = 'UTC'; await executeJob( 'pngJobId', @@ -86,7 +88,7 @@ test(`passes browserTimezone to generatePng`, async () => { }); test(`returns content_type of application/png`, async () => { - const executeJob = executeJobFactory(mockServer, { browserDriverFactory: {} }); + const executeJob = executeJobFactory(mockServer, getMockLogger(), { browserDriverFactory: {} }); const encryptedHeaders = await encryptHeaders({}); const generatePngObservable = generatePngObservableFactory(); @@ -106,7 +108,7 @@ test(`returns content of generatePng getBuffer base64 encoded`, async () => { const generatePngObservable = generatePngObservableFactory(); generatePngObservable.mockReturnValue(Rx.of(Buffer.from(testContent))); - const executeJob = executeJobFactory(mockServer, { browserDriverFactory: {} }); + const executeJob = executeJobFactory(mockServer, getMockLogger(), { browserDriverFactory: {} }); const encryptedHeaders = await encryptHeaders({}); const { content } = await executeJob( 'pngJobId', diff --git a/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.ts b/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.ts index c2fda05fbe3e93..7d5c69655c362f 100644 --- a/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.ts +++ b/x-pack/legacy/plugins/reporting/export_types/png/server/execute_job/index.ts @@ -6,14 +6,14 @@ import * as Rx from 'rxjs'; import { catchError, map, mergeMap, takeUntil } from 'rxjs/operators'; -import { PLUGIN_ID, PNG_JOB_TYPE } from '../../../../common/constants'; +import { PNG_JOB_TYPE } from '../../../../common/constants'; import { ServerFacade, ExecuteJobFactory, ESQueueWorkerExecuteFn, HeadlessChromiumDriverFactory, + Logger, } from '../../../../types'; -import { LevelLogger } from '../../../../server/lib'; import { decryptJobHeaders, omitBlacklistedHeaders, @@ -27,10 +27,11 @@ type QueuedPngExecutorFactory = ExecuteJobFactory { afterEach(() => generatePdfObservableFactory.mockReset()); +const getMockLogger = () => new LevelLogger(); + const encryptHeaders = async headers => { const crypto = cryptoFactory(mockServer); return await crypto.encrypt(headers); @@ -68,7 +70,7 @@ test(`passes browserTimezone to generatePdf`, async () => { const generatePdfObservable = generatePdfObservableFactory(); generatePdfObservable.mockReturnValue(Rx.of(Buffer.from(''))); - const executeJob = executeJobFactory(mockServer, { browserDriverFactory: {} }); + const executeJob = executeJobFactory(mockServer, getMockLogger(), { browserDriverFactory: {} }); const browserTimezone = 'UTC'; await executeJob( 'pdfJobId', @@ -89,7 +91,7 @@ test(`passes browserTimezone to generatePdf`, async () => { }); test(`returns content_type of application/pdf`, async () => { - const executeJob = executeJobFactory(mockServer, { browserDriverFactory: {} }); + const executeJob = executeJobFactory(mockServer, getMockLogger(), { browserDriverFactory: {} }); const encryptedHeaders = await encryptHeaders({}); const generatePdfObservable = generatePdfObservableFactory(); @@ -109,7 +111,7 @@ test(`returns content of generatePdf getBuffer base64 encoded`, async () => { const generatePdfObservable = generatePdfObservableFactory(); generatePdfObservable.mockReturnValue(Rx.of(Buffer.from(testContent))); - const executeJob = executeJobFactory(mockServer, { browserDriverFactory: {} }); + const executeJob = executeJobFactory(mockServer, getMockLogger(), { browserDriverFactory: {} }); const encryptedHeaders = await encryptHeaders({}); const { content } = await executeJob( 'pdfJobId', diff --git a/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/execute_job/index.ts b/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/execute_job/index.ts index d85207e6712125..dee53697c6681d 100644 --- a/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/execute_job/index.ts +++ b/x-pack/legacy/plugins/reporting/export_types/printable_pdf/server/execute_job/index.ts @@ -11,10 +11,10 @@ import { ExecuteJobFactory, ESQueueWorkerExecuteFn, HeadlessChromiumDriverFactory, + Logger, } from '../../../../types'; import { JobDocPayloadPDF } from '../../types'; -import { PLUGIN_ID, PDF_JOB_TYPE } from '../../../../common/constants'; -import { LevelLogger } from '../../../../server/lib'; +import { PDF_JOB_TYPE } from '../../../../common/constants'; import { generatePdfObservableFactory } from '../lib/generate_pdf'; import { decryptJobHeaders, @@ -28,10 +28,11 @@ type QueuedPdfExecutorFactory = ExecuteJobFactory { uiSettingsServiceFactory: server.uiSettingsServiceFactory, // @ts-ignore Property 'fieldFormatServiceFactory' does not exist on type 'Server'. fieldFormatServiceFactory: server.fieldFormatServiceFactory, - log: server.log.bind(server), }; - const plugin: ReportingPlugin = reportingPluginFactory(__LEGACY, this); + const initializerContext = server.newPlatform.coreContext; + const plugin: ReportingPlugin = reportingPluginFactory(initializerContext, __LEGACY, this); await plugin.setup(coreSetup, pluginsSetup); }, diff --git a/x-pack/legacy/plugins/reporting/server/browsers/create_browser_driver_factory.ts b/x-pack/legacy/plugins/reporting/server/browsers/create_browser_driver_factory.ts index a253988b01952e..128df4d318c764 100644 --- a/x-pack/legacy/plugins/reporting/server/browsers/create_browser_driver_factory.ts +++ b/x-pack/legacy/plugins/reporting/server/browsers/create_browser_driver_factory.ts @@ -6,17 +6,16 @@ import { ensureBrowserDownloaded } from './download'; import { installBrowser } from './install'; -import { LevelLogger } from '../lib/level_logger'; -import { ServerFacade, CaptureConfig } from '../../types'; -import { PLUGIN_ID, BROWSER_TYPE } from '../../common/constants'; +import { ServerFacade, CaptureConfig, Logger } from '../../types'; +import { BROWSER_TYPE } from '../../common/constants'; import { chromium } from './index'; import { HeadlessChromiumDriverFactory } from './chromium/driver_factory'; export async function createBrowserDriverFactory( - server: ServerFacade + server: ServerFacade, + logger: Logger ): Promise { const config = server.config(); - const logger = LevelLogger.createForServer(server, [PLUGIN_ID, 'browser-driver']); const dataDir: string = config.get('path.data'); const captureConfig: CaptureConfig = config.get('xpack.reporting.capture'); diff --git a/x-pack/legacy/plugins/reporting/server/lib/create_queue.ts b/x-pack/legacy/plugins/reporting/server/lib/create_queue.ts index 4a9b0c7cd2ebb3..05b760c0c3bd6c 100644 --- a/x-pack/legacy/plugins/reporting/server/lib/create_queue.ts +++ b/x-pack/legacy/plugins/reporting/server/lib/create_queue.ts @@ -4,17 +4,16 @@ * you may not use this file except in compliance with the Elastic License. */ -import { PLUGIN_ID } from '../../common/constants'; import { ServerFacade, ExportTypesRegistry, HeadlessChromiumDriverFactory, QueueConfig, + Logger, } from '../../types'; // @ts-ignore import { Esqueue } from './esqueue'; import { createWorkerFactory } from './create_worker'; -import { LevelLogger } from './level_logger'; import { createTaggedLogger } from './create_tagged_logger'; // TODO remove createTaggedLogger once esqueue is removed interface CreateQueueFactoryOpts { @@ -24,6 +23,7 @@ interface CreateQueueFactoryOpts { export function createQueueFactory( server: ServerFacade, + logger: Logger, { exportTypesRegistry, browserDriverFactory }: CreateQueueFactoryOpts ): Esqueue { const queueConfig: QueueConfig = server.config().get('xpack.reporting.queue'); @@ -34,23 +34,25 @@ export function createQueueFactory( timeout: queueConfig.timeout, dateSeparator: '.', client: server.plugins.elasticsearch.getCluster('admin'), - logger: createTaggedLogger(server, [PLUGIN_ID, 'esqueue', 'queue-worker']), + logger: createTaggedLogger(logger, ['esqueue', 'queue-worker']), }; const queue: Esqueue = new Esqueue(index, queueOptions); if (queueConfig.pollEnabled) { // create workers to poll the index for idle jobs waiting to be claimed and executed - const createWorker = createWorkerFactory(server, { exportTypesRegistry, browserDriverFactory }); + const createWorker = createWorkerFactory(server, logger, { + exportTypesRegistry, + browserDriverFactory, + }); createWorker(queue); } else { - const logger = LevelLogger.createForServer(server, [PLUGIN_ID, 'create_queue']); logger.info( 'xpack.reporting.queue.pollEnabled is set to false. This Kibana instance ' + 'will not poll for idle jobs to claim and execute. Make sure another ' + 'Kibana instance with polling enabled is running in this cluster so ' + 'reporting jobs can complete.', - ['info'] + ['create_queue'] ); } diff --git a/x-pack/legacy/plugins/reporting/server/lib/create_tagged_logger.ts b/x-pack/legacy/plugins/reporting/server/lib/create_tagged_logger.ts index 40a1cd8203d2fe..97b34dfe40830c 100644 --- a/x-pack/legacy/plugins/reporting/server/lib/create_tagged_logger.ts +++ b/x-pack/legacy/plugins/reporting/server/lib/create_tagged_logger.ts @@ -4,23 +4,23 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ServerFacade } from '../../types'; +import { Logger } from '../../types'; -/** - * @function taggedLogger - * @param {string} message - * @param {string[]} [additionalTags] - */ - -/** - * Creates a taggedLogger function with tags, allows the consumer to optionally provide additional tags - * - * @param {Server} server - * @param {string[]} tags - tags to always be passed into the `logger` function - * @returns taggedLogger - */ -export function createTaggedLogger(server: ServerFacade, tags: string[]) { +export function createTaggedLogger(logger: Logger, tags: string[]) { return (msg: string, additionalTags = []) => { - server.log([...tags, ...additionalTags], msg); + const allTags = [...tags, ...additionalTags]; + + if (allTags.includes('info')) { + const newTags = allTags.filter(t => t !== 'info'); // Ensure 'info' is not included twice + logger.info(msg, newTags); + } else if (allTags.includes('debug')) { + const newTags = allTags.filter(t => t !== 'debug'); + logger.debug(msg, newTags); + } else if (allTags.includes('warn') || allTags.includes('warning')) { + const newTags = allTags.filter(t => t !== 'warn' && t !== 'warning'); + logger.warn(msg, newTags); + } else { + logger.error(msg, allTags); + } }; } diff --git a/x-pack/legacy/plugins/reporting/server/lib/create_worker.test.ts b/x-pack/legacy/plugins/reporting/server/lib/create_worker.test.ts index 8f843752491ecb..6a5c93db32376a 100644 --- a/x-pack/legacy/plugins/reporting/server/lib/create_worker.test.ts +++ b/x-pack/legacy/plugins/reporting/server/lib/create_worker.test.ts @@ -25,10 +25,11 @@ const executeJobFactoryStub = sinon.stub(); const getMockServer = (): ServerFacade => { return ({ - log: sinon.stub(), config: () => ({ get: configGetStub }), } as unknown) as ServerFacade; }; +const getMockLogger = jest.fn(); + const getMockExportTypesRegistry = ( exportTypes: any[] = [{ executeJobFactory: executeJobFactoryStub }] ) => ({ @@ -47,7 +48,7 @@ describe('Create Worker', () => { test('Creates a single Esqueue worker for Reporting', async () => { const exportTypesRegistry = getMockExportTypesRegistry(); - const createWorker = createWorkerFactory(getMockServer(), { + const createWorker = createWorkerFactory(getMockServer(), getMockLogger(), { exportTypesRegistry: exportTypesRegistry as ExportTypesRegistry, browserDriverFactory: {} as HeadlessChromiumDriverFactory, }); @@ -81,7 +82,7 @@ Object { { executeJobFactory: executeJobFactoryStub }, { executeJobFactory: executeJobFactoryStub }, ]); - const createWorker = createWorkerFactory(getMockServer(), { + const createWorker = createWorkerFactory(getMockServer(), getMockLogger(), { exportTypesRegistry: exportTypesRegistry as ExportTypesRegistry, browserDriverFactory: {} as HeadlessChromiumDriverFactory, }); diff --git a/x-pack/legacy/plugins/reporting/server/lib/create_worker.ts b/x-pack/legacy/plugins/reporting/server/lib/create_worker.ts index 1326e411b6c5c7..67869016a250be 100644 --- a/x-pack/legacy/plugins/reporting/server/lib/create_worker.ts +++ b/x-pack/legacy/plugins/reporting/server/lib/create_worker.ts @@ -17,10 +17,10 @@ import { JobSource, RequestFacade, ServerFacade, + Logger, } from '../../types'; // @ts-ignore untyped dependency import { events as esqueueEvents } from './esqueue'; -import { LevelLogger } from './level_logger'; interface CreateWorkerFactoryOpts { exportTypesRegistry: ExportTypesRegistry; @@ -29,11 +29,11 @@ interface CreateWorkerFactoryOpts { export function createWorkerFactory( server: ServerFacade, + logger: Logger, { exportTypesRegistry, browserDriverFactory }: CreateWorkerFactoryOpts ) { type JobDocPayloadType = JobDocPayload; const config = server.config(); - const logger = LevelLogger.createForServer(server, [PLUGIN_ID, 'queue-worker']); const queueConfig: QueueConfig = config.get('xpack.reporting.queue'); const kibanaName: string = config.get('server.name'); const kibanaId: string = config.get('server.uuid'); @@ -50,7 +50,7 @@ export function createWorkerFactory( ExportTypeDefinition >) { // TODO: the executeJobFn should be unwrapped in the register method of the export types registry - const jobExecutor = exportType.executeJobFactory(server, { browserDriverFactory }); + const jobExecutor = exportType.executeJobFactory(server, logger, { browserDriverFactory }); jobExecutors.set(exportType.jobType, jobExecutor); } diff --git a/x-pack/legacy/plugins/reporting/server/lib/enqueue_job.ts b/x-pack/legacy/plugins/reporting/server/lib/enqueue_job.ts index 2d044ab31a160e..14c57fa35dcf4e 100644 --- a/x-pack/legacy/plugins/reporting/server/lib/enqueue_job.ts +++ b/x-pack/legacy/plugins/reporting/server/lib/enqueue_job.ts @@ -35,8 +35,10 @@ interface EnqueueJobFactoryOpts { export function enqueueJobFactory( server: ServerFacade, + parentLogger: Logger, { exportTypesRegistry, esqueue }: EnqueueJobFactoryOpts ): EnqueueJobFn { + const logger = parentLogger.clone(['queue-job']); const config = server.config(); const captureConfig: CaptureConfig = config.get('xpack.reporting.capture'); const browserType = captureConfig.browser.type; @@ -44,7 +46,6 @@ export function enqueueJobFactory( const queueConfig: QueueConfig = config.get('xpack.reporting.queue'); return async function enqueueJob( - parentLogger: Logger, exportTypeId: string, jobParams: JobParamsType, user: string, @@ -53,7 +54,6 @@ export function enqueueJobFactory( ): Promise { type CreateJobFn = ESQueueCreateJobFn | ImmediateCreateJobFn; - const logger = parentLogger.clone(['queue-job']); const exportType = exportTypesRegistry.getById(exportTypeId); if (exportType == null) { @@ -61,7 +61,7 @@ export function enqueueJobFactory( } // TODO: the createJobFn should be unwrapped in the register method of the export types registry - const createJob = exportType.createJobFactory(server) as CreateJobFn; + const createJob = exportType.createJobFactory(server, logger) as CreateJobFn; const payload = await createJob(jobParams, headers, request); const options = { diff --git a/x-pack/legacy/plugins/reporting/server/lib/get_user.ts b/x-pack/legacy/plugins/reporting/server/lib/get_user.ts index e2921de795012b..9ee8d9a835c89e 100644 --- a/x-pack/legacy/plugins/reporting/server/lib/get_user.ts +++ b/x-pack/legacy/plugins/reporting/server/lib/get_user.ts @@ -5,9 +5,9 @@ */ import { Legacy } from 'kibana'; -import { ServerFacade } from '../../types'; +import { Logger, ServerFacade } from '../../types'; -export function getUserFactory(server: ServerFacade) { +export function getUserFactory(server: ServerFacade, logger: Logger) { /* * Legacy.Request because this is called from routing middleware */ @@ -19,7 +19,7 @@ export function getUserFactory(server: ServerFacade) { try { return await server.plugins.security.getUser(request); } catch (err) { - server.log(['reporting', 'getUser', 'error'], err); + logger.error(err, ['getUser']); return null; } }; diff --git a/x-pack/legacy/plugins/reporting/server/lib/level_logger.ts b/x-pack/legacy/plugins/reporting/server/lib/level_logger.ts index 839fa16a716b7d..d015d500363c12 100644 --- a/x-pack/legacy/plugins/reporting/server/lib/level_logger.ts +++ b/x-pack/legacy/plugins/reporting/server/lib/level_logger.ts @@ -4,48 +4,46 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ServerFacade } from '../../types'; +import { LoggerFactory } from 'src/core/server'; const trimStr = (toTrim: string) => { return typeof toTrim === 'string' ? toTrim.trim() : toTrim; }; export class LevelLogger { - private _logger: any; + private _logger: LoggerFactory; private _tags: string[]; + public warning: (msg: string, tags?: string[]) => void; - public warn: (msg: string, tags?: string[]) => void; - - static createForServer(server: ServerFacade, tags: string[]) { - const serverLog: ServerFacade['log'] = (tgs: string[], msg: string) => server.log(tgs, msg); - return new LevelLogger(serverLog, tags); - } - - constructor(logger: ServerFacade['log'], tags: string[]) { + constructor(logger: LoggerFactory, tags?: string[]) { this._logger = logger; - this._tags = tags; + this._tags = tags || []; /* * This shortcut provides maintenance convenience: Reporting code has been * using both .warn and .warning */ - this.warn = this.warning.bind(this); + this.warning = this.warn.bind(this); + } + + private getLogger(tags: string[]) { + return this._logger.get(...this._tags, ...tags); } public error(err: string | Error, tags: string[] = []) { - this._logger([...this._tags, ...tags, 'error'], err); + this.getLogger(tags).error(err); } - public warning(msg: string, tags: string[] = []) { - this._logger([...this._tags, ...tags, 'warning'], trimStr(msg)); + public warn(msg: string, tags: string[] = []) { + this.getLogger(tags).warn(msg); } public debug(msg: string, tags: string[] = []) { - this._logger([...this._tags, ...tags, 'debug'], trimStr(msg)); + this.getLogger(tags).debug(msg); } public info(msg: string, tags: string[] = []) { - this._logger([...this._tags, ...tags, 'info'], trimStr(msg)); + this.getLogger(tags).info(trimStr(msg)); } public clone(tags: string[]) { diff --git a/x-pack/legacy/plugins/reporting/server/plugin.ts b/x-pack/legacy/plugins/reporting/server/plugin.ts index 934a3487209c42..b0dc56dd8d8d0e 100644 --- a/x-pack/legacy/plugins/reporting/server/plugin.ts +++ b/x-pack/legacy/plugins/reporting/server/plugin.ts @@ -5,7 +5,7 @@ */ import { Legacy } from 'kibana'; -import { CoreSetup, CoreStart, Plugin } from 'src/core/server'; +import { CoreSetup, CoreStart, Plugin, LoggerFactory } from 'src/core/server'; import { IUiSettingsClient } from 'src/core/server'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/server'; import { XPackMainPlugin } from '../../xpack_main/server/xpack_main'; @@ -14,11 +14,15 @@ import { mirrorPluginStatus } from '../../../server/lib/mirror_plugin_status'; import { PLUGIN_ID } from '../common/constants'; import { ReportingPluginSpecOptions } from '../types.d'; import { registerRoutes } from './routes'; -import { LevelLogger, checkLicenseFactory, getExportTypesRegistry, runValidations } from './lib'; +import { checkLicenseFactory, getExportTypesRegistry, runValidations, LevelLogger } from './lib'; import { createBrowserDriverFactory } from './browsers'; import { registerReportingUsageCollector } from './usage'; import { logConfiguration } from '../log_configuration'; +export interface ReportingInitializerContext { + logger: LoggerFactory; +} + // For now there is no exposed functionality to other plugins export type ReportingSetup = object; export type ReportingStart = object; @@ -33,7 +37,6 @@ type LegacyPlugins = Legacy.Server['plugins']; export interface LegacySetup { config: Legacy.Server['config']; info: Legacy.Server['info']; - log: Legacy.Server['log']; plugins: { elasticsearch: LegacyPlugins['elasticsearch']; security: LegacyPlugins['security']; @@ -59,10 +62,17 @@ export type ReportingPlugin = Plugin< * into `setup`. The factory parameters take the legacy dependencies, and the * `setup` method gets it from enclosure */ export function reportingPluginFactory( + initializerContext: ReportingInitializerContext, __LEGACY: LegacySetup, legacyPlugin: ReportingPluginSpecOptions ) { return new (class ReportingPlugin implements ReportingPlugin { + private initializerContext: ReportingInitializerContext; + + constructor(context: ReportingInitializerContext) { + this.initializerContext = context; + } + public async setup(core: CoreSetup, plugins: ReportingSetupDeps): Promise { const exportTypesRegistry = getExportTypesRegistry(); @@ -76,8 +86,8 @@ export function reportingPluginFactory( exportTypesRegistry ); - const logger = LevelLogger.createForServer(__LEGACY, [PLUGIN_ID]); - const browserDriverFactory = await createBrowserDriverFactory(__LEGACY); + const logger = new LevelLogger(this.initializerContext.logger.get('reporting')); + const browserDriverFactory = await createBrowserDriverFactory(__LEGACY, logger); logConfiguration(__LEGACY, logger); runValidations(__LEGACY, logger, browserDriverFactory); @@ -103,5 +113,5 @@ export function reportingPluginFactory( public start(core: CoreStart, plugins: ReportingStartDeps): ReportingStart { return {}; } - })(); + })(initializerContext); } diff --git a/x-pack/legacy/plugins/reporting/server/routes/generate_from_jobparams.ts b/x-pack/legacy/plugins/reporting/server/routes/generate_from_jobparams.ts index c9225dfee69788..d920015c4290c0 100644 --- a/x-pack/legacy/plugins/reporting/server/routes/generate_from_jobparams.ts +++ b/x-pack/legacy/plugins/reporting/server/routes/generate_from_jobparams.ts @@ -9,7 +9,7 @@ import boom from 'boom'; import Joi from 'joi'; import rison from 'rison-node'; import { API_BASE_URL } from '../../common/constants'; -import { ServerFacade, ReportingResponseToolkit } from '../../types'; +import { ServerFacade, ReportingResponseToolkit, Logger } from '../../types'; import { getRouteConfigFactoryReportingPre, GetRouteConfigFactoryFn, @@ -23,11 +23,13 @@ const BASE_GENERATE = `${API_BASE_URL}/generate`; export function registerGenerateFromJobParams( server: ServerFacade, handler: HandlerFunction, - handleError: HandlerErrorFunction + handleError: HandlerErrorFunction, + logger: Logger ) { const getRouteConfig = () => { const getOriginalRouteConfig: GetRouteConfigFactoryFn = getRouteConfigFactoryReportingPre( - server + server, + logger ); const routeConfigFactory: RouteConfigFactory = getOriginalRouteConfig( ({ params: { exportType } }) => exportType diff --git a/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject.ts b/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject.ts index 2c509136b1b441..0da8e40ea29c0f 100644 --- a/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject.ts +++ b/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject.ts @@ -7,7 +7,7 @@ import { Legacy } from 'kibana'; import { get } from 'lodash'; import { API_BASE_GENERATE_V1, CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../common/constants'; -import { ServerFacade, ReportingResponseToolkit } from '../../types'; +import { ServerFacade, ReportingResponseToolkit, Logger } from '../../types'; import { HandlerErrorFunction, HandlerFunction, QueuedJobPayload } from './types'; import { getRouteOptionsCsv } from './lib/route_config_factories'; import { makeRequestFacade } from './lib/make_request_facade'; @@ -25,9 +25,10 @@ import { getJobParamsFromRequest } from '../../export_types/csv_from_savedobject export function registerGenerateCsvFromSavedObject( server: ServerFacade, handleRoute: HandlerFunction, - handleRouteError: HandlerErrorFunction + handleRouteError: HandlerErrorFunction, + logger: Logger ) { - const routeOptions = getRouteOptionsCsv(server); + const routeOptions = getRouteOptionsCsv(server, logger); server.route({ path: `${API_BASE_GENERATE_V1}/csv/saved-object/{savedObjectType}:{savedObjectId}`, diff --git a/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject_immediate.ts b/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject_immediate.ts index 8d1c84664cbe9d..60799b20ce4205 100644 --- a/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject_immediate.ts +++ b/x-pack/legacy/plugins/reporting/server/routes/generate_from_savedobject_immediate.ts @@ -13,7 +13,7 @@ import { HeadlessChromiumDriverFactory, ReportingResponseToolkit, Logger, - JobDocOutputExecuted, + JobDocOutput, } from '../../types'; import { JobDocPayloadPanelCsv } from '../../export_types/csv_from_savedobject/types'; import { getJobParamsFromRequest } from '../../export_types/csv_from_savedobject/server/lib/get_job_params_from_request'; @@ -33,7 +33,7 @@ export function registerGenerateCsvFromSavedObjectImmediate( server: ServerFacade, parentLogger: Logger ) { - const routeOptions = getRouteOptionsCsv(server); + const routeOptions = getRouteOptionsCsv(server, parentLogger); /* * CSV export with the `immediate` option does not queue a job with Reporting's ESQueue to run the job async. Instead, this does: @@ -55,8 +55,8 @@ export function registerGenerateCsvFromSavedObjectImmediate( * * Calling an execute job factory requires passing a browserDriverFactory option, so we should not call the factory from here */ - const createJobFn = createJobFactory(server); - const executeJobFn = executeJobFactory(server, { + const createJobFn = createJobFactory(server, logger); + const executeJobFn = executeJobFactory(server, logger, { browserDriverFactory: {} as HeadlessChromiumDriverFactory, }); const jobDocPayload: JobDocPayloadPanelCsv = await createJobFn( @@ -68,7 +68,7 @@ export function registerGenerateCsvFromSavedObjectImmediate( content_type: jobOutputContentType, content: jobOutputContent, size: jobOutputSize, - }: JobDocOutputExecuted = await executeJobFn(null, jobDocPayload, request); + }: JobDocOutput = await executeJobFn(null, jobDocPayload, request); logger.info(`Job output size: ${jobOutputSize} bytes`); diff --git a/x-pack/legacy/plugins/reporting/server/routes/generation.ts b/x-pack/legacy/plugins/reporting/server/routes/generation.ts index 21af54ddf11e36..2a3102d0dd1590 100644 --- a/x-pack/legacy/plugins/reporting/server/routes/generation.ts +++ b/x-pack/legacy/plugins/reporting/server/routes/generation.ts @@ -31,8 +31,8 @@ export function registerJobGenerationRoutes( // @ts-ignore TODO const { errors: esErrors } = server.plugins.elasticsearch.getCluster('admin'); - const esqueue = createQueueFactory(server, { exportTypesRegistry, browserDriverFactory }); - const enqueueJob = enqueueJobFactory(server, { exportTypesRegistry, esqueue }); + const esqueue = createQueueFactory(server, logger, { exportTypesRegistry, browserDriverFactory }); + const enqueueJob = enqueueJobFactory(server, logger, { exportTypesRegistry, esqueue }); /* * Generates enqueued job details to use in responses @@ -47,7 +47,7 @@ export function registerJobGenerationRoutes( const user = request.pre.user; const headers = request.headers; - const job = await enqueueJob(logger, exportTypeId, jobParams, user, headers, request); + const job = await enqueueJob(exportTypeId, jobParams, user, headers, request); // return the queue's job information const jobJson = job.toJSON(); @@ -73,11 +73,11 @@ export function registerJobGenerationRoutes( return err; } - registerGenerateFromJobParams(server, handler, handleError); + registerGenerateFromJobParams(server, handler, handleError, logger); // Register beta panel-action download-related API's if (config.get('xpack.reporting.csv.enablePanelActionDownload')) { - registerGenerateCsvFromSavedObject(server, handler, handleError); + registerGenerateCsvFromSavedObject(server, handler, handleError, logger); registerGenerateCsvFromSavedObjectImmediate(server, logger); } } diff --git a/x-pack/legacy/plugins/reporting/server/routes/jobs.ts b/x-pack/legacy/plugins/reporting/server/routes/jobs.ts index 6084ca613d10ed..049ee0ce20ceb7 100644 --- a/x-pack/legacy/plugins/reporting/server/routes/jobs.ts +++ b/x-pack/legacy/plugins/reporting/server/routes/jobs.ts @@ -4,8 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ +import Boom from 'boom'; import { Legacy } from 'kibana'; -import boom from 'boom'; +import { ResponseObject } from 'hapi'; import { API_BASE_URL } from '../../common/constants'; import { ServerFacade, @@ -16,9 +17,7 @@ import { JobSource, ListQuery, } from '../../types'; -// @ts-ignore import { jobsQueryFactory } from '../lib/jobs_query'; -// @ts-ignore import { jobResponseHandlerFactory } from './lib/job_response_handler'; import { getRouteConfigFactoryDownloadPre, @@ -28,14 +27,18 @@ import { makeRequestFacade } from './lib/make_request_facade'; const MAIN_ENTRY = `${API_BASE_URL}/jobs`; +function isResponse(response: Boom | ResponseObject): response is ResponseObject { + return !(response as Boom).isBoom; +} + export function registerJobInfoRoutes( server: ServerFacade, exportTypesRegistry: ExportTypesRegistry, logger: Logger ) { const jobsQuery = jobsQueryFactory(server); - const getRouteConfig = getRouteConfigFactoryManagementPre(server); - const getRouteConfigDownload = getRouteConfigFactoryDownloadPre(server); + const getRouteConfig = getRouteConfigFactoryManagementPre(server, logger); + const getRouteConfigDownload = getRouteConfigFactoryDownloadPre(server, logger); // list jobs in the queue, paginated server.route({ @@ -84,14 +87,14 @@ export function registerJobInfoRoutes( return jobsQuery.get(request.pre.user, docId, { includeContent: true }).then( (result): JobDocOutput => { if (!result) { - throw boom.notFound(); + throw Boom.notFound(); } const { _source: { jobtype: jobType, output: jobOutput }, } = result; if (!request.pre.management.jobTypes.includes(jobType)) { - throw boom.unauthorized(`Sorry, you are not authorized to download ${jobType} reports`); + throw Boom.unauthorized(`Sorry, you are not authorized to download ${jobType} reports`); } return jobOutput; @@ -111,13 +114,13 @@ export function registerJobInfoRoutes( return jobsQuery.get(request.pre.user, docId).then((result): JobSource['_source'] => { if (!result) { - throw boom.notFound(); + throw Boom.notFound(); } const { _source: job } = result; const { jobtype: jobType, payload: jobPayload } = job; if (!request.pre.management.jobTypes.includes(jobType)) { - throw boom.unauthorized(`Sorry, you are not authorized to view ${jobType} info`); + throw Boom.unauthorized(`Sorry, you are not authorized to view ${jobType} info`); } return { @@ -147,21 +150,22 @@ export function registerJobInfoRoutes( h, { docId } ); - const { statusCode } = response; - - if (statusCode !== 200) { - if (statusCode === 500) { - logger.error(`Report ${docId} has failed: ${JSON.stringify(response.source)}`); - } else { - logger.debug( - `Report ${docId} has non-OK status: [${statusCode}] Reason: [${JSON.stringify( - response.source - )}]` - ); + + if (isResponse(response)) { + const { statusCode } = response; + + if (statusCode !== 200) { + if (statusCode === 500) { + logger.error(`Report ${docId} has failed: ${JSON.stringify(response.source)}`); + } else { + logger.debug( + `Report ${docId} has non-OK status: [${statusCode}] Reason: [${JSON.stringify( + response.source + )}]` + ); + } } - } - if (!response.isBoom) { response = response.header('accept-ranges', 'none'); } diff --git a/x-pack/legacy/plugins/reporting/server/routes/lib/__tests__/authorized_user_pre_routing.test.js b/x-pack/legacy/plugins/reporting/server/routes/lib/authorized_user_pre_routing.test.js similarity index 87% rename from x-pack/legacy/plugins/reporting/server/routes/lib/__tests__/authorized_user_pre_routing.test.js rename to x-pack/legacy/plugins/reporting/server/routes/lib/authorized_user_pre_routing.test.js index 0b2aff53793cdb..841f753f0c09b4 100644 --- a/x-pack/legacy/plugins/reporting/server/routes/lib/__tests__/authorized_user_pre_routing.test.js +++ b/x-pack/legacy/plugins/reporting/server/routes/lib/authorized_user_pre_routing.test.js @@ -5,8 +5,7 @@ */ import expect from '@kbn/expect'; -import sinon from 'sinon'; -import { authorizedUserPreRoutingFactory } from '../authorized_user_pre_routing'; +import { authorizedUserPreRoutingFactory } from './authorized_user_pre_routing'; describe('authorized_user_pre_routing', function() { // the getClientShield is using `once` which forces us to use a constant mock @@ -14,14 +13,14 @@ describe('authorized_user_pre_routing', function() { // so createMockServer reuses the same 'instance' of the server and overwrites // the properties to contain different values const createMockServer = (function() { - const getUserStub = sinon.stub(); + const getUserStub = jest.fn(); let mockConfig; const mockServer = { - expose: function() {}, - config: function() { + expose() {}, + config() { return { - get: function(key) { + get(key) { return mockConfig[key]; }, }; @@ -45,7 +44,7 @@ describe('authorized_user_pre_routing', function() { mockServer.plugins.xpack_main = { info: !xpackInfoUndefined && { isAvailable: () => xpackInfoAvailable, - feature: function(featureName) { + feature(featureName) { if (featureName === 'security') { return { isEnabled: () => securityEnabled, @@ -56,17 +55,18 @@ describe('authorized_user_pre_routing', function() { }, }; - getUserStub.resetHistory(); - getUserStub.resolves(user); + getUserStub.mockReset(); + getUserStub.mockResolvedValue(user); return mockServer; }; })(); + const getMockLogger = () => ({ warn: jest.fn() }); it('should return with boom notFound when xpackInfo is undefined', async function() { const mockServer = createMockServer({ xpackInfoUndefined: true }); - const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer); - const response = await authorizedUserPreRouting(); + const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer, getMockLogger()); + const response = await authorizedUserPreRouting({}); expect(response.isBoom).to.be(true); expect(response.output.statusCode).to.be(404); }); @@ -74,7 +74,7 @@ describe('authorized_user_pre_routing', function() { it(`should return with boom notFound when xpackInfo isn't available`, async function() { const mockServer = createMockServer({ xpackInfoAvailable: false }); - const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer); + const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer, getMockLogger()); const response = await authorizedUserPreRouting(); expect(response.isBoom).to.be(true); expect(response.output.statusCode).to.be(404); @@ -83,7 +83,7 @@ describe('authorized_user_pre_routing', function() { it('should return with null user when security is disabled in Elasticsearch', async function() { const mockServer = createMockServer({ securityEnabled: false }); - const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer); + const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer, getMockLogger()); const response = await authorizedUserPreRouting(); expect(response).to.be(null); }); @@ -91,7 +91,7 @@ describe('authorized_user_pre_routing', function() { it('should return with boom unauthenticated when security is enabled but no authenticated user', async function() { const mockServer = createMockServer({ user: null }); - const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer); + const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer, getMockLogger()); const response = await authorizedUserPreRouting(); expect(response.isBoom).to.be(true); expect(response.output.statusCode).to.be(401); @@ -103,7 +103,7 @@ describe('authorized_user_pre_routing', function() { config: { 'xpack.reporting.roles.allow': ['.reporting_user'] }, }); - const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer); + const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer, getMockLogger()); const response = await authorizedUserPreRouting(); expect(response.isBoom).to.be(true); expect(response.output.statusCode).to.be(403); @@ -116,7 +116,7 @@ describe('authorized_user_pre_routing', function() { config: { 'xpack.reporting.roles.allow': ['.reporting_user'] }, }); - const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer); + const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer, getMockLogger()); const response = await authorizedUserPreRouting(); expect(response).to.be(user); }); @@ -128,7 +128,7 @@ describe('authorized_user_pre_routing', function() { config: { 'xpack.reporting.roles.allow': [] }, }); - const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer); + const authorizedUserPreRouting = authorizedUserPreRoutingFactory(mockServer, getMockLogger()); const response = await authorizedUserPreRouting(); expect(response).to.be(user); }); diff --git a/x-pack/legacy/plugins/reporting/server/routes/lib/authorized_user_pre_routing.ts b/x-pack/legacy/plugins/reporting/server/routes/lib/authorized_user_pre_routing.ts index eb473e0bc76d45..906f266290a421 100644 --- a/x-pack/legacy/plugins/reporting/server/routes/lib/authorized_user_pre_routing.ts +++ b/x-pack/legacy/plugins/reporting/server/routes/lib/authorized_user_pre_routing.ts @@ -8,7 +8,7 @@ import Boom from 'boom'; import { Legacy } from 'kibana'; import { AuthenticatedUser } from '../../../../../../plugins/security/server'; import { getUserFactory } from '../../lib/get_user'; -import { ServerFacade } from '../../../types'; +import { ServerFacade, Logger } from '../../../types'; const superuserRole = 'superuser'; @@ -17,19 +17,19 @@ export type PreRoutingFunction = ( ) => Promise | AuthenticatedUser | null>; export const authorizedUserPreRoutingFactory = function authorizedUserPreRoutingFn( - server: ServerFacade + server: ServerFacade, + logger: Logger ) { - const getUser = getUserFactory(server); + const getUser = getUserFactory(server, logger); const config = server.config(); return async function authorizedUserPreRouting(request: Legacy.Request) { const xpackInfo = server.plugins.xpack_main.info; if (!xpackInfo || !xpackInfo.isAvailable()) { - server.log( - ['reporting', 'authorizedUserPreRouting', 'debug'], - 'Unable to authorize user before xpack info is available.' - ); + logger.warn('Unable to authorize user before xpack info is available.', [ + 'authorizedUserPreRouting', + ]); return Boom.notFound(); } diff --git a/x-pack/legacy/plugins/reporting/server/routes/lib/get_document_payload.ts b/x-pack/legacy/plugins/reporting/server/routes/lib/get_document_payload.ts index c3a30f9dda4543..1c0566100e1977 100644 --- a/x-pack/legacy/plugins/reporting/server/routes/lib/get_document_payload.ts +++ b/x-pack/legacy/plugins/reporting/server/routes/lib/get_document_payload.ts @@ -11,8 +11,8 @@ import { ServerFacade, ExportTypesRegistry, ExportTypeDefinition, - JobDocExecuted, - JobDocOutputExecuted, + JobDocOutput, + JobSource, } from '../../../types'; import { CSV_JOB_TYPE } from '../../../common/constants'; @@ -20,14 +20,21 @@ interface ICustomHeaders { [x: string]: any; } -const DEFAULT_TITLE = 'report'; +type ExportTypeType = ExportTypeDefinition; + +interface Payload { + statusCode: number; + content: any; + contentType: string; + headers: Record; +} -type ExportTypeType = ExportTypeDefinition; +const DEFAULT_TITLE = 'report'; const getTitle = (exportType: ExportTypeType, title?: string): string => `${title || DEFAULT_TITLE}.${exportType.jobContentExtension}`; -const getReportingHeaders = (output: JobDocOutputExecuted, exportType: ExportTypeType) => { +const getReportingHeaders = (output: JobDocOutput, exportType: ExportTypeType) => { const metaDataHeaders: ICustomHeaders = {}; if (exportType.jobType === CSV_JOB_TYPE) { @@ -54,7 +61,7 @@ export function getDocumentPayloadFactory( } } - function getCompleted(output: JobDocOutputExecuted, jobType: string, title: string) { + function getCompleted(output: JobDocOutput, jobType: string, title: string) { const exportType = exportTypesRegistry.get((item: ExportTypeType) => item.jobType === jobType); const filename = getTitle(exportType, title); const headers = getReportingHeaders(output, exportType); @@ -70,7 +77,7 @@ export function getDocumentPayloadFactory( }; } - function getFailure(output: JobDocOutputExecuted) { + function getFailure(output: JobDocOutput) { return { statusCode: 500, content: { @@ -78,6 +85,7 @@ export function getDocumentPayloadFactory( reason: output.content, }, contentType: 'application/json', + headers: {}, }; } @@ -90,9 +98,7 @@ export function getDocumentPayloadFactory( }; } - return function getDocumentPayload(doc: { - _source: JobDocExecuted<{ output: JobDocOutputExecuted }>; - }) { + return function getDocumentPayload(doc: JobSource): Payload { const { status, jobtype: jobType, payload: { title } = { title: '' } } = doc._source; const { output } = doc._source; diff --git a/x-pack/legacy/plugins/reporting/server/routes/lib/job_response_handler.js b/x-pack/legacy/plugins/reporting/server/routes/lib/job_response_handler.ts similarity index 65% rename from x-pack/legacy/plugins/reporting/server/routes/lib/job_response_handler.js rename to x-pack/legacy/plugins/reporting/server/routes/lib/job_response_handler.ts index e2da3235461136..3ba7aa30eedcb7 100644 --- a/x-pack/legacy/plugins/reporting/server/routes/lib/job_response_handler.js +++ b/x-pack/legacy/plugins/reporting/server/routes/lib/job_response_handler.ts @@ -4,29 +4,48 @@ * you may not use this file except in compliance with the Elastic License. */ -import boom from 'boom'; +import Boom from 'boom'; +import { ResponseToolkit } from 'hapi'; +import { ServerFacade, ExportTypesRegistry } from '../../../types'; import { jobsQueryFactory } from '../../lib/jobs_query'; import { WHITELISTED_JOB_CONTENT_TYPES } from '../../../common/constants'; import { getDocumentPayloadFactory } from './get_document_payload'; -export function jobResponseHandlerFactory(server, exportTypesRegistry) { +interface JobResponseHandlerParams { + docId: string; +} + +interface JobResponseHandlerOpts { + excludeContent?: boolean; +} + +export function jobResponseHandlerFactory( + server: ServerFacade, + exportTypesRegistry: ExportTypesRegistry +) { const jobsQuery = jobsQueryFactory(server); const getDocumentPayload = getDocumentPayloadFactory(server, exportTypesRegistry); - return function jobResponseHandler(validJobTypes, user, h, params, opts = {}) { + return function jobResponseHandler( + validJobTypes: string[], + user: any, + h: ResponseToolkit, + params: JobResponseHandlerParams, + opts: JobResponseHandlerOpts = {} + ) { const { docId } = params; return jobsQuery.get(user, docId, { includeContent: !opts.excludeContent }).then(doc => { - if (!doc) return boom.notFound(); + if (!doc) return Boom.notFound(); const { jobtype: jobType } = doc._source; if (!validJobTypes.includes(jobType)) { - return boom.unauthorized(`Sorry, you are not authorized to download ${jobType} reports`); + return Boom.unauthorized(`Sorry, you are not authorized to download ${jobType} reports`); } const output = getDocumentPayload(doc); if (!WHITELISTED_JOB_CONTENT_TYPES.includes(output.contentType)) { - return boom.badImplementation( + return Boom.badImplementation( `Unsupported content-type of ${output.contentType} specified by job output` ); } @@ -42,7 +61,7 @@ export function jobResponseHandlerFactory(server, exportTypesRegistry) { }); } - return response; + return response; // Hapi }); }; } diff --git a/x-pack/legacy/plugins/reporting/server/routes/lib/reporting_feature_pre_routing.ts b/x-pack/legacy/plugins/reporting/server/routes/lib/reporting_feature_pre_routing.ts index 6efac818981efa..88c5e4edc12f87 100644 --- a/x-pack/legacy/plugins/reporting/server/routes/lib/reporting_feature_pre_routing.ts +++ b/x-pack/legacy/plugins/reporting/server/routes/lib/reporting_feature_pre_routing.ts @@ -6,12 +6,13 @@ import Boom from 'boom'; import { Legacy } from 'kibana'; -import { ServerFacade } from '../../../types'; +import { Logger, ServerFacade } from '../../../types'; export type GetReportingFeatureIdFn = (request: Legacy.Request) => string; export const reportingFeaturePreRoutingFactory = function reportingFeaturePreRoutingFn( - server: ServerFacade + server: ServerFacade, + logger: Logger ) { const xpackMainPlugin = server.plugins.xpack_main; const pluginId = 'reporting'; @@ -20,7 +21,7 @@ export const reportingFeaturePreRoutingFactory = function reportingFeaturePreRou return function reportingFeaturePreRouting(getReportingFeatureId: GetReportingFeatureIdFn) { return function licensePreRouting(request: Legacy.Request) { const licenseCheckResults = xpackMainPlugin.info.feature(pluginId).getLicenseCheckResults(); - const reportingFeatureId = getReportingFeatureId(request); + const reportingFeatureId = getReportingFeatureId(request) as string; const reportingFeature = licenseCheckResults[reportingFeatureId]; if (!reportingFeature.showLinks || !reportingFeature.enableLinks) { throw Boom.forbidden(reportingFeature.message); diff --git a/x-pack/legacy/plugins/reporting/server/routes/lib/route_config_factories.ts b/x-pack/legacy/plugins/reporting/server/routes/lib/route_config_factories.ts index caf24bf64f6023..25c08261490d56 100644 --- a/x-pack/legacy/plugins/reporting/server/routes/lib/route_config_factories.ts +++ b/x-pack/legacy/plugins/reporting/server/routes/lib/route_config_factories.ts @@ -6,7 +6,7 @@ import Joi from 'joi'; import { CSV_FROM_SAVEDOBJECT_JOB_TYPE } from '../../../common/constants'; -import { ServerFacade } from '../../../types'; +import { ServerFacade, Logger } from '../../../types'; import { authorizedUserPreRoutingFactory } from './authorized_user_pre_routing'; import { reportingFeaturePreRoutingFactory } from './reporting_feature_pre_routing'; import { GetReportingFeatureIdFn } from './reporting_feature_pre_routing'; @@ -25,9 +25,12 @@ export type GetRouteConfigFactoryFn = ( getFeatureId?: GetReportingFeatureIdFn ) => RouteConfigFactory; -export function getRouteConfigFactoryReportingPre(server: ServerFacade): GetRouteConfigFactoryFn { - const authorizedUserPreRouting = authorizedUserPreRoutingFactory(server); - const reportingFeaturePreRouting = reportingFeaturePreRoutingFactory(server); +export function getRouteConfigFactoryReportingPre( + server: ServerFacade, + logger: Logger +): GetRouteConfigFactoryFn { + const authorizedUserPreRouting = authorizedUserPreRoutingFactory(server, logger); + const reportingFeaturePreRouting = reportingFeaturePreRoutingFactory(server, logger); return (getFeatureId?: GetReportingFeatureIdFn): RouteConfigFactory => { const preRouting: any[] = [{ method: authorizedUserPreRouting, assign: 'user' }]; @@ -42,8 +45,8 @@ export function getRouteConfigFactoryReportingPre(server: ServerFacade): GetRout }; } -export function getRouteOptionsCsv(server: ServerFacade) { - const getRouteConfig = getRouteConfigFactoryReportingPre(server); +export function getRouteOptionsCsv(server: ServerFacade, logger: Logger) { + const getRouteConfig = getRouteConfigFactoryReportingPre(server, logger); return { ...getRouteConfig(() => CSV_FROM_SAVEDOBJECT_JOB_TYPE), validate: { @@ -63,9 +66,12 @@ export function getRouteOptionsCsv(server: ServerFacade) { }; } -export function getRouteConfigFactoryManagementPre(server: ServerFacade): GetRouteConfigFactoryFn { - const authorizedUserPreRouting = authorizedUserPreRoutingFactory(server); - const reportingFeaturePreRouting = reportingFeaturePreRoutingFactory(server); +export function getRouteConfigFactoryManagementPre( + server: ServerFacade, + logger: Logger +): GetRouteConfigFactoryFn { + const authorizedUserPreRouting = authorizedUserPreRoutingFactory(server, logger); + const reportingFeaturePreRouting = reportingFeaturePreRoutingFactory(server, logger); const managementPreRouting = reportingFeaturePreRouting(() => 'management'); return (): RouteConfigFactory => { @@ -83,8 +89,11 @@ export function getRouteConfigFactoryManagementPre(server: ServerFacade): GetRou // TOC at the end of the PDF, but it's sending multiple cookies and causing our auth to fail with a 401. // Additionally, the range-request doesn't alleviate any performance issues on the server as the entire // download is loaded into memory. -export function getRouteConfigFactoryDownloadPre(server: ServerFacade): GetRouteConfigFactoryFn { - const getManagementRouteConfig = getRouteConfigFactoryManagementPre(server); +export function getRouteConfigFactoryDownloadPre( + server: ServerFacade, + logger: Logger +): GetRouteConfigFactoryFn { + const getManagementRouteConfig = getRouteConfigFactoryManagementPre(server, logger); return (): RouteConfigFactory => ({ ...getManagementRouteConfig(), tags: [API_TAG], diff --git a/x-pack/legacy/plugins/reporting/types.d.ts b/x-pack/legacy/plugins/reporting/types.d.ts index 47f384250dd537..6d769c0d7b717f 100644 --- a/x-pack/legacy/plugins/reporting/types.d.ts +++ b/x-pack/legacy/plugins/reporting/types.d.ts @@ -74,7 +74,6 @@ export type ServerFacade = LegacySetup; export type ReportingPluginSpecOptions = Legacy.PluginSpecOptions; export type EnqueueJobFn = ( - parentLogger: LevelLogger, exportTypeId: string, jobParams: JobParamsType, user: string, @@ -200,18 +199,6 @@ export interface JobDocPayload { type: string | null; } -export interface JobDocOutput { - content: string; // encoded content - contentType: string; -} - -export interface JobDocExecuted { - jobtype: string; - output: JobDocOutputExecuted; - payload: JobDocPayload; - status: string; // completed, failed, etc -} - export interface JobSource { _id: string; _source: { @@ -222,21 +209,9 @@ export interface JobSource { }; } -/* - * A snake_cased field is the only significant difference in structure of - * JobDocOutputExecuted vs JobDocOutput. - * - * JobDocOutput is the structure of the object returned by getDocumentPayload - * - * data in the _source fields of the - * Reporting index. - * - * The ESQueueWorker internals have executed job objects returned with this - * structure. See `_formatOutput` in reporting/server/lib/esqueue/worker.js - */ -export interface JobDocOutputExecuted { - content_type: string; // vs `contentType` above - content: string | null; // defaultOutput is null +export interface JobDocOutput { + content_type: string; + content: string | null; max_size_reached: boolean; size: number; } @@ -279,7 +254,7 @@ export type ImmediateExecuteFn = ( jobId: null, job: JobDocPayload, request: RequestFacade -) => Promise; +) => Promise; export interface ESQueueWorkerOptions { kibanaName: string; @@ -292,7 +267,7 @@ export interface ESQueueWorkerOptions { type GenericWorkerFn = ( jobSource: JobSource, ...workerRestArgs: any[] -) => void | Promise; +) => void | Promise; export interface ESQueueInstance { registerWorker: ( @@ -302,9 +277,13 @@ export interface ESQueueInstance { ) => ESQueueWorker; } -export type CreateJobFactory = (server: ServerFacade) => CreateJobFnType; +export type CreateJobFactory = ( + server: ServerFacade, + logger: LevelLogger +) => CreateJobFnType; export type ExecuteJobFactory = ( server: ServerFacade, + logger: LevelLogger, opts: { browserDriverFactory: HeadlessChromiumDriverFactory; } From 5daed94c303980fbf622b1a9e4164fe0dd727011 Mon Sep 17 00:00:00 2001 From: Anton Dosov Date: Thu, 23 Jan 2020 21:45:11 +0100 Subject: [PATCH 27/72] [Filters] Incorrect result, when calling setFilters() with multiple duplicates between app and global filters (#55591) --- .../filter_manager/filter_manager.test.ts | 26 +++++++++++++++++++ .../query/filter_manager/filter_manager.ts | 13 ++++++---- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/plugins/data/public/query/filter_manager/filter_manager.test.ts b/src/plugins/data/public/query/filter_manager/filter_manager.test.ts index 7857e2989bda65..3f31749ee71f34 100644 --- a/src/plugins/data/public/query/filter_manager/filter_manager.test.ts +++ b/src/plugins/data/public/query/filter_manager/filter_manager.test.ts @@ -170,6 +170,32 @@ describe('filter_manager', () => { expect(fetchStub).toBeCalledTimes(0); expect(updateStub).toBeCalledTimes(1); }); + + test('should merge multiple conflicting app filters', async function() { + filterManager.addFilters(readyFilters, true); + const appFilter1 = _.cloneDeep(readyFilters[1]); + appFilter1.meta.negate = true; + appFilter1.$state = { + store: esFilters.FilterStateStore.APP_STATE, + }; + const appFilter2 = _.cloneDeep(readyFilters[2]); + appFilter2.meta.negate = true; + appFilter2.$state = { + store: esFilters.FilterStateStore.APP_STATE, + }; + + const globalFilters = filterManager.getFilters(); + filterManager.setFilters([...globalFilters, appFilter1, appFilter2]); + + // global filters are taking precedence over same app filters when setting + const res = filterManager.getFilters(); + expect(res).toHaveLength(3); + expect( + res.filter(function(filter) { + return filter.$state && filter.$state.store === esFilters.FilterStateStore.GLOBAL_STATE; + }).length + ).toBe(3); + }); }); describe('add filters', () => { diff --git a/src/plugins/data/public/query/filter_manager/filter_manager.ts b/src/plugins/data/public/query/filter_manager/filter_manager.ts index f7d0dddd5bf039..18bb619f6a1370 100644 --- a/src/plugins/data/public/query/filter_manager/filter_manager.ts +++ b/src/plugins/data/public/query/filter_manager/filter_manager.ts @@ -45,20 +45,23 @@ export class FilterManager { const appFilters = partitionedFilters.appFilters; // existing globalFilters should be mutated by appFilters + // ignore original appFilters which are already inside globalFilters + const cleanedAppFilters: esFilters.Filter[] = []; _.each(appFilters, function(filter, i) { const match = _.find(globalFilters, function(globalFilter) { return compareFilters(globalFilter, filter); }); - // no match, do nothing - if (!match) return; + // no match, do continue with app filter + if (!match) { + return cleanedAppFilters.push(filter); + } - // matching filter in globalState, update global and remove from appState + // matching filter in globalState, update global and don't add from appState _.assign(match.meta, filter.meta); - appFilters.splice(i, 1); }); - return FilterManager.mergeFilters(appFilters, globalFilters); + return FilterManager.mergeFilters(cleanedAppFilters, globalFilters); } private static mergeFilters( From 5a15ad123df10f1c26908382d8535697970db7ee Mon Sep 17 00:00:00 2001 From: Thomas Neirynck Date: Thu, 23 Jan 2020 15:56:11 -0500 Subject: [PATCH 28/72] [Maps] use style-prop methods to determine state (#55607) --- .../sources/es_geo_grid_source/es_geo_grid_source.js | 8 +++++++- .../styles/vector/components/color/dynamic_color_form.js | 4 ++-- .../styles/vector/components/label/dynamic_label_form.js | 3 +-- .../components/orientation/dynamic_orientation_form.js | 3 +-- .../styles/vector/components/size/dynamic_size_form.js | 3 +-- .../styles/vector/properties/dynamic_style_property.js | 4 ++++ 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/x-pack/legacy/plugins/maps/public/layers/sources/es_geo_grid_source/es_geo_grid_source.js b/x-pack/legacy/plugins/maps/public/layers/sources/es_geo_grid_source/es_geo_grid_source.js index 8c394e71b3a78f..6adb5dd568e23b 100644 --- a/x-pack/legacy/plugins/maps/public/layers/sources/es_geo_grid_source/es_geo_grid_source.js +++ b/x-pack/legacy/plugins/maps/public/layers/sources/es_geo_grid_source/es_geo_grid_source.js @@ -24,7 +24,12 @@ import { RENDER_AS } from './render_as'; import { CreateSourceEditor } from './create_source_editor'; import { UpdateSourceEditor } from './update_source_editor'; import { GRID_RESOLUTION } from '../../grid_resolution'; -import { SOURCE_DATA_ID_ORIGIN, ES_GEO_GRID, COUNT_PROP_NAME } from '../../../../common/constants'; +import { + SOURCE_DATA_ID_ORIGIN, + ES_GEO_GRID, + COUNT_PROP_NAME, + COLOR_MAP_TYPE, +} from '../../../../common/constants'; import { i18n } from '@kbn/i18n'; import { getDataSourceLabel } from '../../../../common/i18n_getters'; import { AbstractESAggSource } from '../es_agg_source'; @@ -251,6 +256,7 @@ export class ESGeoGridSource extends AbstractESAggSource { origin: SOURCE_DATA_ID_ORIGIN, }, color: COLOR_GRADIENTS[0].value, + type: COLOR_MAP_TYPE.ORDINAL, }, }, [VECTOR_STYLES.LINE_COLOR]: { diff --git a/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/color/dynamic_color_form.js b/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/color/dynamic_color_form.js index ba5621b8efadfd..5491d5d567f842 100644 --- a/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/color/dynamic_color_form.js +++ b/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/color/dynamic_color_form.js @@ -55,7 +55,7 @@ export function DynamicColorForm({ return null; } - if (styleOptions.type === COLOR_MAP_TYPE.ORDINAL) { + if (styleProperty.isOrdinal()) { return ( diff --git a/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/label/dynamic_label_form.js b/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/label/dynamic_label_form.js index bad13b487cc295..7ad541efe0ab71 100644 --- a/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/label/dynamic_label_form.js +++ b/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/label/dynamic_label_form.js @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import _ from 'lodash'; import React from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { FieldSelect } from '../field_select'; @@ -27,7 +26,7 @@ export function DynamicLabelForm({ diff --git a/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/orientation/dynamic_orientation_form.js b/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/orientation/dynamic_orientation_form.js index e0b7e7b2865a27..df0ae6513f8ed8 100644 --- a/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/orientation/dynamic_orientation_form.js +++ b/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/orientation/dynamic_orientation_form.js @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import _ from 'lodash'; import React from 'react'; import { FieldSelect } from '../field_select'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; @@ -30,7 +29,7 @@ export function DynamicOrientationForm({ diff --git a/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/size/dynamic_size_form.js b/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/size/dynamic_size_form.js index 8b069cd53b731a..141a9410177905 100644 --- a/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/size/dynamic_size_form.js +++ b/x-pack/legacy/plugins/maps/public/layers/styles/vector/components/size/dynamic_size_form.js @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import _ from 'lodash'; import React, { Fragment } from 'react'; import { FieldSelect } from '../field_select'; import { SizeRangeSelector } from './size_range_selector'; @@ -50,7 +49,7 @@ export function DynamicSizeForm({ diff --git a/x-pack/legacy/plugins/maps/public/layers/styles/vector/properties/dynamic_style_property.js b/x-pack/legacy/plugins/maps/public/layers/styles/vector/properties/dynamic_style_property.js index 98e87b0305b447..37db54389866d4 100644 --- a/x-pack/legacy/plugins/maps/public/layers/styles/vector/properties/dynamic_style_property.js +++ b/x-pack/legacy/plugins/maps/public/layers/styles/vector/properties/dynamic_style_property.js @@ -32,6 +32,10 @@ export class DynamicStyleProperty extends AbstractStyleProperty { return this._field; } + getFieldName() { + return this._field ? this._field.getName() : ''; + } + getComputedFieldName() { if (!this.isComplete()) { return null; From 6fcf3f00053162b01a6116a51490c24ad6fdd685 Mon Sep 17 00:00:00 2001 From: Brian Seeders Date: Thu, 23 Jan 2020 16:58:13 -0500 Subject: [PATCH 29/72] Skip flaky custom appRoute tests --- .../plugin_functional/test_suites/core_plugins/rendering.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/plugin_functional/test_suites/core_plugins/rendering.ts b/test/plugin_functional/test_suites/core_plugins/rendering.ts index e30d81eedd985b..643964999017fc 100644 --- a/test/plugin_functional/test_suites/core_plugins/rendering.ts +++ b/test/plugin_functional/test_suites/core_plugins/rendering.ts @@ -136,7 +136,8 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider expect(await exists('renderingHeader')).to.be(false); }); - it('navigates between standard application and one with custom appRoute', async () => { + // Flaky: https://github.com/elastic/kibana/issues/55750 + it.skip('navigates between standard application and one with custom appRoute', async () => { await navigateTo('/'); await find.waitForElementStale(await findLoadingMessage()); @@ -159,7 +160,8 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider ).to.eql(['/app/app_status', '/render/core', '/app/app_status']); }); - it('navigates between applications with custom appRoutes', async () => { + // Flaky: https://github.com/elastic/kibana/issues/55736 + it.skip('navigates between applications with custom appRoutes', async () => { await navigateTo('/'); await find.waitForElementStale(await findLoadingMessage()); From e39ef65c4cfe7f71734f30d1c991715640b02ac9 Mon Sep 17 00:00:00 2001 From: Peter Schretlen Date: Thu, 23 Jan 2020 17:00:14 -0500 Subject: [PATCH 30/72] Add developer docs for built-in pagerduty and webhook actions. Add TOC. (#55352) --- x-pack/legacy/plugins/alerting/README.md | 62 +++++-- x-pack/plugins/actions/README.md | 208 +++++++++++++++++++---- 2 files changed, 226 insertions(+), 44 deletions(-) diff --git a/x-pack/legacy/plugins/alerting/README.md b/x-pack/legacy/plugins/alerting/README.md index d5e9dcb76caa4a..4de45fe96a400c 100644 --- a/x-pack/legacy/plugins/alerting/README.md +++ b/x-pack/legacy/plugins/alerting/README.md @@ -6,6 +6,38 @@ The Kibana alerting plugin provides a common place to set up alerts. You can: - List the types of registered alerts - Perform CRUD actions on alerts +---- + +Table of Contents + +- [Kibana alerting](#kibana-alerting) + - [Terminology](#terminology) + - [Usage](#usage) + - [Limitations](#limitations) + - [Alert types](#alert-types) + - [Methods](#methods) + - [Executor](#executor) + - [Example](#example) + - [RESTful API](#restful-api) + - [`POST /api/alert`: Create alert](#post-apialert-create-alert) + - [`DELETE /api/alert/{id}`: Delete alert](#delete-apialertid-delete-alert) + - [`GET /api/alert/_find`: Find alerts](#get-apialertfind-find-alerts) + - [`GET /api/alert/{id}`: Get alert](#get-apialertid-get-alert) + - [`GET /api/alert/types`: List alert types](#get-apialerttypes-list-alert-types) + - [`PUT /api/alert/{id}`: Update alert](#put-apialertid-update-alert) + - [`POST /api/alert/{id}/_enable`: Enable an alert](#post-apialertidenable-enable-an-alert) + - [`POST /api/alert/{id}/_disable`: Disable an alert](#post-apialertiddisable-disable-an-alert) + - [`POST /api/alert/{id}/_mute_all`: Mute all alert instances](#post-apialertidmuteall-mute-all-alert-instances) + - [`POST /api/alert/{alertId}/alert_instance/{alertInstanceId}/_mute`: Mute alert instance](#post-apialertalertidalertinstancealertinstanceidmute-mute-alert-instance) + - [`POST /api/alert/{id}/_unmute_all`: Unmute all alert instances](#post-apialertidunmuteall-unmute-all-alert-instances) + - [`POST /api/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute`: Unmute an alert instance](#post-apialertalertidalertinstancealertinstanceidunmute-unmute-an-alert-instance) + - [`POST /api/alert/{id}/_update_api_key`: Update alert API key](#post-apialertidupdateapikey-update-alert-api-key) + - [Schedule Formats](#schedule-formats) + - [Alert instance factory](#alert-instance-factory) + - [Templating actions](#templating-actions) + - [Examples](#examples) + + ## Terminology **Alert Type**: A function that takes parameters and executes actions to alert instances. @@ -205,7 +237,7 @@ server.plugins.alerting.setup.registerType({ Using an alert type requires you to create an alert that will contain parameters and actions for a given alert type. See below for CRUD operations using the API. -#### `POST /api/alert`: Create alert +### `POST /api/alert`: Create alert Payload: @@ -219,7 +251,7 @@ Payload: |params|The parameters to pass in to the alert type executor `params` value. This will also validate against the alert type params validator if defined.|object| |actions|Array of the following:
- `group` (string): We support grouping actions in the scenario of escalations or different types of alert instances. If you don't need this, feel free to use `default` as a value.
- `id` (string): The id of the action saved object to execute.
- `params` (object): The map to the `params` the action type will receive. In order to help apply context to strings, we handle them as mustache templates and pass in a default set of context. (see templating actions).|array| -#### `DELETE /api/alert/{id}`: Delete alert +### `DELETE /api/alert/{id}`: Delete alert Params: @@ -227,13 +259,13 @@ Params: |---|---|---| |id|The id of the alert you're trying to delete.|string| -#### `GET /api/alert/_find`: Find alerts +### `GET /api/alert/_find`: Find alerts Params: See the saved objects API documentation for find. All the properties are the same except you cannot pass in `type`. -#### `GET /api/alert/{id}`: Get alert +### `GET /api/alert/{id}`: Get alert Params: @@ -241,11 +273,11 @@ Params: |---|---|---| |id|The id of the alert you're trying to get.|string| -#### `GET /api/alert/types`: List alert types +### `GET /api/alert/types`: List alert types No parameters. -#### `PUT /api/alert/{id}`: Update alert +### `PUT /api/alert/{id}`: Update alert Params: @@ -263,7 +295,7 @@ Payload: |params|The parameters to pass in to the alert type executor `params` value. This will also validate against the alert type params validator if defined.|object| |actions|Array of the following:
- `group` (string): We support grouping actions in the scenario of escalations or different types of alert instances. If you don't need this, feel free to use `default` as a value.
- `id` (string): The id of the action saved object to execute.
- `params` (object): There map to the `params` the action type will receive. In order to help apply context to strings, we handle them as mustache templates and pass in a default set of context. (see templating actions).|array| -#### `POST /api/alert/{id}/_enable`: Enable an alert +### `POST /api/alert/{id}/_enable`: Enable an alert Params: @@ -271,7 +303,7 @@ Params: |---|---|---| |id|The id of the alert you're trying to enable.|string| -#### `POST /api/alert/{id}/_disable`: Disable an alert +### `POST /api/alert/{id}/_disable`: Disable an alert Params: @@ -279,7 +311,7 @@ Params: |---|---|---| |id|The id of the alert you're trying to disable.|string| -#### `POST /api/alert/{id}/_mute_all`: Mute all alert instances +### `POST /api/alert/{id}/_mute_all`: Mute all alert instances Params: @@ -287,7 +319,7 @@ Params: |---|---|---| |id|The id of the alert you're trying to mute all alert instances for.|string| -#### `POST /api/alert/{alertId}/alert_instance/{alertInstanceId}/_mute`: Mute alert instance +### `POST /api/alert/{alertId}/alert_instance/{alertInstanceId}/_mute`: Mute alert instance Params: @@ -296,7 +328,7 @@ Params: |alertId|The id of the alert you're trying to mute an instance for.|string| |alertInstanceId|The instance id of the alert instance you're trying to mute.|string| -#### `POST /api/alert/{id}/_unmute_all`: Unmute all alert instances +### `POST /api/alert/{id}/_unmute_all`: Unmute all alert instances Params: @@ -304,7 +336,7 @@ Params: |---|---|---| |id|The id of the alert you're trying to unmute all alert instances for.|string| -#### `POST /api/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute`: Unmute an alert instance +### `POST /api/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute`: Unmute an alert instance Params: @@ -313,13 +345,13 @@ Params: |alertId|The id of the alert you're trying to unmute an instance for.|string| |alertInstanceId|The instance id of the alert instance you're trying to unmute.|string| -#### `POST /api/alert/{id}/_update_api_key`: Update alert API key +### `POST /api/alert/{id}/_update_api_key`: Update alert API key |Property|Description|Type| |---|---|---| |id|The id of the alert you're trying to update the API key for. System will use user in request context to generate an API key for.|string| -##### Schedule Formats +## Schedule Formats A schedule is structured such that the key specifies the format you wish to use and its value specifies the schedule. We currently support the _Interval format_ which specifies the interval in seconds, minutes, hours or days at which the alert should execute. @@ -347,7 +379,7 @@ There needs to be a way to map alert context into action parameters. For this, w When an alert instance executes, the first argument is the `group` of actions to execute and the second is the context the alert exposes to templates. We iterate through each action params attributes recursively and render templates if they are a string. Templates have access to the `context` (provided by second argument of `.scheduleActions(...)` on an alert instance) and the alert instance's `state` (provided by the most recent `replaceState` call on an alert instance) as well as `alertId` and `alertInstanceId`. -### Examples +## Examples The following code would be within an alert type. As you can see `cpuUsage ` will replace the state of the alert instance and `server` is the context for the alert instance to execute. The difference between the two is `cpuUsage ` will be accessible at the next execution. diff --git a/x-pack/plugins/actions/README.md b/x-pack/plugins/actions/README.md index 31a847a249e2a5..aa6f665e35255f 100644 --- a/x-pack/plugins/actions/README.md +++ b/x-pack/plugins/actions/README.md @@ -1,4 +1,4 @@ -# Kibana actions +# Kibana Actions The Kibana actions plugin provides a framework to create executable actions. You can: @@ -10,6 +10,60 @@ The Kibana actions plugin provides a framework to create executable actions. You - Execute an action, passing it a parameter object. - Perform CRUD operations on actions. +----- + + +Table of Contents + +- [Kibana Actions](#kibana-actions) + - [Terminology](#terminology) + - [Usage](#usage) + - [Kibana Actions Configuration](#kibana-actions-configuration) + - [Configuration Options](#configuration-options) + - [Whitelisting Built-in Action Types](#whitelisting-built-in-action-types) + - [Configuration Utilities](#configuration-utilities) + - [Action types](#action-types) + - [Methods](#methods) + - [Executor](#executor) + - [Example](#example) + - [RESTful API](#restful-api) + - [`POST /api/action`: Create action](#post-apiaction-create-action) + - [`DELETE /api/action/{id}`: Delete action](#delete-apiactionid-delete-action) + - [`GET /api/action/_find`: Find actions](#get-apiactionfind-find-actions) + - [`GET /api/action/{id}`: Get action](#get-apiactionid-get-action) + - [`GET /api/action/types`: List action types](#get-apiactiontypes-list-action-types) + - [`PUT /api/action/{id}`: Update action](#put-apiactionid-update-action) + - [`POST /api/action/{id}/_execute`: Execute action](#post-apiactionidexecute-execute-action) + - [Firing actions](#firing-actions) + - [Example](#example-1) +- [Built-in Action Types](#built-in-action-types) + - [Server log](#server-log) + - [`config`](#config) + - [`secrets`](#secrets) + - [`params`](#params) + - [Email](#email) + - [`config`](#config-1) + - [`secrets`](#secrets-1) + - [`params`](#params-1) + - [Slack](#slack) + - [`config`](#config-2) + - [`secrets`](#secrets-2) + - [`params`](#params-2) + - [Index](#index) + - [`config`](#config-3) + - [`secrets`](#secrets-3) + - [`params`](#params-3) + - [Webhook](#webhook) + - [`config`](#config-4) + - [`secrets`](#secrets-4) + - [`params`](#params-4) + - [PagerDuty](#pagerduty) + - [`config`](#config-5) + - [`secrets`](#secrets-5) + - [`params`](#params-5) +- [Command Line Utility](#command-line-utility) + + ## Terminology **Action Type**: A programatically defined integration with another service, with an expected set of configuration and parameters properties, typically defined with a schema. Plugins can add new @@ -99,7 +153,7 @@ The built-in email action type provides a good example of creating an action typ Using an action type requires an action to be created that will contain and encrypt configuration for a given action type. See below for CRUD operations using the API. -#### `POST /api/action`: Create action +### `POST /api/action`: Create action Payload: @@ -110,7 +164,7 @@ Payload: |config|The configuration the action type expects. See related action type to see what attributes are expected. This will also validate against the action type if config validation is defined.|object| |secrets|The secrets the action type expects. See related action type to see what attributes are expected. This will also validate against the action type if secrets validation is defined.|object| -#### `DELETE /api/action/{id}`: Delete action +### `DELETE /api/action/{id}`: Delete action Params: @@ -118,13 +172,13 @@ Params: |---|---|---| |id|The id of the action you're trying to delete.|string| -#### `GET /api/action/_find`: Find actions +### `GET /api/action/_find`: Find actions Params: See the [saved objects API documentation for find](https://www.elastic.co/guide/en/kibana/master/saved-objects-api-find.html). All the properties are the same except that you cannot pass in `type`. -#### `GET /api/action/{id}`: Get action +### `GET /api/action/{id}`: Get action Params: @@ -132,11 +186,11 @@ Params: |---|---|---| |id|The id of the action you're trying to get.|string| -#### `GET /api/action/types`: List action types +### `GET /api/action/types`: List action types No parameters. -#### `PUT /api/action/{id}`: Update action +### `PUT /api/action/{id}`: Update action Params: @@ -152,7 +206,7 @@ Payload: |config|The configuration the action type expects. See related action type to see what attributes are expected. This will also validate against the action type if config validation is defined.|object| |secrets|The secrets the action type expects. See related action type to see what attributes are expected. This will also validate against the action type if secrets validation is defined.|object| -#### `POST /api/action/{id}/_execute`: Execute action +### `POST /api/action/{id}/_execute`: Execute action Params: @@ -181,7 +235,7 @@ The following table describes the properties of the `options` object. |spaceId|The space id the action is within.|string| |apiKey|The Elasticsearch API key to use for context. (Note: only required and used when security is enabled).|string| -### Example +## Example This example makes action `3c5b2bd4-5424-4e4b-8cf5-c0a58c762cc5` send an email. The action plugin will load the saved object and find what action type to call with `params`. @@ -202,33 +256,45 @@ server.plugins.actions.execute({ Kibana ships with a set of built-in action types: -- server log: logs messages to the Kibana log using `server.log()` -- email: send an email -- slack: post a message to a slack channel -- index: index document(s) into elasticsearch +|Type|Id|Description| +|---|---|---| +|[Server log](#server-log)|`.log`|Logs messages to the Kibana log using `server.log()`| +|[Email](#email)|`.email`|Sends an email using SMTP| +|[Slack](#slack)|`.slack`|Posts a message to a slack channel| +|[Index](#index)|`.index`|Indexes document(s) into Elasticsearch| +|[Webhook](#webhook)|`.webhook`|Send a payload to a web service using HTTP POST or PUT| +|[PagerDuty](#pagerduty)|`.pagerduty`|Trigger, resolve, or acknowlege an incident to a PagerDuty service| -## server log, action id: `.log` +---- +## Server log + +ID: `.log` The params properties are modelled after the arguments to the [Hapi.server.log()](https://hapijs.com/api#-serverlogtags-data-timestamp) function. -#### config properties +### `config` -|Property|Description|Type| -|---|---|---| -|-|This action has no config properties.|-| +This action has no `config` properties. -#### params properties +### `secrets` + +This action type has no `secrets` properties. + +### `params` |Property|Description|Type| |---|---|---| |message|The message to log.|string| |tags|Tags associated with the message to log.|string[] _(optional)_| -## email, action id: `.email` +---- +## Email + +ID: `.email` This action type uses [nodemailer](https://nodemailer.com/about/) to send emails. -#### config properties +### `config` Either the property `service` must be provided, or the `host` and `port` properties must be provided. If `service` is provided, `host`, `port` and `secure` are ignored. For more information on the `gmail` service value specifically, see the [nodemailer gmail documentation](https://nodemailer.com/usage/using-gmail/). @@ -242,11 +308,16 @@ The `from` field can be specified as in typical `"user@host-name"` format, or as |host|host name of the service provider|string _(optional)_| |port|port number of the service provider|number _(optional)_| |secure|whether to use TLS with the service provider|boolean _(optional)_| +|from|the from address for all emails sent with this action type|string| + +### `secrets` + +|Property|Description|Type| +|---|---|---| |user|userid to use with the service provider|string| |password|password to use with the service provider|string| -|from|the from address for all emails sent with this action type|string| -#### params properties +### `params` There must be at least one entry in the `to`, `cc` and `bcc` arrays. @@ -262,34 +333,49 @@ The `to`, `cc`, and `bcc` array entries can be in the same format as the `from` |subject|the subject line of the email|string| |message|the message text|string| -## slack, action id: `.slack` +---- + +## Slack + +ID: `.slack` This action type interfaces with the [Slack Incoming Webhooks feature](https://api.slack.com/incoming-webhooks). Currently the params property `message` will be used as the `text` property of the Slack incoming message. Additional function may be provided later. -#### config properties +### `config` + +This action type has no `config` properties. + +### `secrets` |Property|Description|Type| |---|---|---| |webhookUrl|the url of the Slack incoming webhook|string| -#### params properties +### `params` |Property|Description|Type| |---|---|---| |message|the message text|string| +---- + +## Index -## index, action id: `.index` +ID: `.index` The config and params properties are modelled after the [Watcher Index Action](https://www.elastic.co/guide/en/elasticsearch/reference/master/actions-index.html). The index can be set in the config or params, and if set in config, then the index set in the params will be ignored. -#### config properties +### `config` |Property|Description|Type| |---|---|---| |index|The Elasticsearch index to index into.|string _(optional)_| -#### params properties +### `secrets` + +This action type has no `secrets` properties. + +### `params` |Property|Description|Type| |---|---|---| @@ -299,6 +385,70 @@ The config and params properties are modelled after the [Watcher Index Action](h |refresh|Setting of the refresh policy for the write request|boolean _(optional)_| |body|The documument body/bodies to index.|object or object[]| +---- +## Webhook + +ID: `.webhook` + +The webhook action uses [axios](https://github.com/axios/axios) to send a POST or PUT request to a web service. + +### `config` + +|Property|Description|Type| +|---|---|---| +|url|Request URL|string| +|method|HTTP request method, either `post`_(default)_ or `put`|string _(optional)_| +|headers|Key-value pairs of the headers to send with the request|object, keys and values are strings _(optional)_| + +### `secrets` + +|Property|Description|Type| +|---|---|---| +|user|Username for HTTP Basic authentication|string| +|password|Password for HTTP Basic authentication|string| + +### `params` + +|Property|Description|Type| +|---|---|---| +|body|The HTTP request body|string _(optional)_| + +---- + +## PagerDuty + +ID: `.pagerduty` + +The PagerDuty action uses the [V2 Events API](https://v2.developer.pagerduty.com/docs/events-api-v2) to trigger, acknowlege, and resolve PagerDuty alerts. + +### `config` + +|Property|Description|Type| +|---|---|---| +|apiUrl|PagerDuty event URL. Defaults to `https://events.pagerduty.com/v2/enqueue`|string _(optional)_| + +### `secrets` + +|Property|Description|Type| +|---|---|---| +|routingKey|This is the 32 character PagerDuty Integration Key for an integration on a service or on a global ruleset.|string| + +### `params` + +|Property|Description|Type| +|---|---|---| +|eventAction|One of `trigger` _(default)_, `resolve`, or `acknowlege`. See [event action](https://v2.developer.pagerduty.com/docs/events-api-v2#event-action) for more details.| string _(optional)_| +|dedupKey|All actions sharing this key will be associated with the same PagerDuty alert. Used to correlate trigger and resolution. Defaults to `action:`. The maximum length is **255** characters. See [alert deduplication](https://v2.developer.pagerduty.com/docs/events-api-v2#alert-de-duplication) for details. | string _(optional)_| +|summary|A text summary of the event, defaults to `No summary provided`. The maximum length is **1024** characters. | string _(optional)_| +|source|The affected system, preferably a hostname or fully qualified domain name. Defaults to `Kibana Action `.| string _(optional)_| +|severity|The perceived severity of on the affected system. This can be one of `critical`, `error`, `warning` or `info`_(default)_.| string _(optional)_| +|timestamp|An [ISO-8601 format date-time](https://v2.developer.pagerduty.com/v2/docs/types#datetime), indicating the time the event was detected or generated.| string _(optional)_| +|component|The component of the source machine that is responsible for the event, for example `mysql` or `eth0`.| string _(optional)_| +|group|Logical grouping of components of a service, for example `app-stack`.| string _(optional)_| +|class|The class/type of the event, for example `ping failure` or `cpu load`.| string _(optional)_| + +For more details see [PagerDuty v2 event parameters](https://v2.developer.pagerduty.com/v2/docs/send-an-event-events-api-v2). + # Command Line Utility The [`kbn-action`](https://github.com/pmuellr/kbn-action) tool can be used to send HTTP requests to the Actions plugin. For instance, to create a Slack action from the `.slack` Action Type, use the following command: From 1e91775a7f7202088b456721beb99342be8a0ade Mon Sep 17 00:00:00 2001 From: patrykkopycinski Date: Fri, 24 Jan 2020 00:11:13 +0100 Subject: [PATCH 31/72] [SIEM] Overview Page - Expand Winlogbeat Stats (#55696) --- .../siem/cypress/fixtures/overview.json | 3 +- .../integration/lib/overview/selectors.ts | 13 ++++-- .../__snapshots__/index.test.tsx.snap | 42 ++++++++++++++++--- .../overview/overview_host_stats/index.tsx | 21 ++++++++-- .../page/overview/overview_host_stats/mock.ts | 3 +- .../public/components/page/overview/types.ts | 3 +- .../overview/overview_host/index.gql_query.ts | 3 +- .../siem/public/graphql/introspection.json | 10 ++++- .../plugins/siem/public/graphql/types.ts | 8 +++- .../server/graphql/overview/schema.gql.ts | 3 +- .../plugins/siem/server/graphql/types.ts | 19 +++++++-- .../lib/overview/elastic_adapter.test.ts | 6 ++- .../lib/overview/elasticsearch_adapter.ts | 11 ++++- .../plugins/siem/server/lib/overview/mock.ts | 12 +++++- .../siem/server/lib/overview/query.dsl.ts | 18 +++++++- .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 1 - .../apis/siem/overview_host.ts | 3 +- 18 files changed, 147 insertions(+), 33 deletions(-) diff --git a/x-pack/legacy/plugins/siem/cypress/fixtures/overview.json b/x-pack/legacy/plugins/siem/cypress/fixtures/overview.json index cc1996909562d2..893661a6930434 100644 --- a/x-pack/legacy/plugins/siem/cypress/fixtures/overview.json +++ b/x-pack/legacy/plugins/siem/cypress/fixtures/overview.json @@ -29,7 +29,8 @@ "endgameRegistry": 396, "endgameSecurity": 397, "filebeatSystemModule": 890, - "winlogbeat": 100, + "winlogbeatSecurity": 70, + "winlogbeatMWSysmonOperational": 30, "__typename": "OverviewHostData" }, "__typename": "Source" diff --git a/x-pack/legacy/plugins/siem/cypress/integration/lib/overview/selectors.ts b/x-pack/legacy/plugins/siem/cypress/integration/lib/overview/selectors.ts index a8af321ff9832d..95facc89744009 100644 --- a/x-pack/legacy/plugins/siem/cypress/integration/lib/overview/selectors.ts +++ b/x-pack/legacy/plugins/siem/cypress/integration/lib/overview/selectors.ts @@ -61,9 +61,13 @@ export const STAT_USER = { value: '789', domId: '[data-test-subj="host-stat-auditbeatUser"]', }; -export const STAT_WINLOGBEAT = { - value: '100', - domId: '[data-test-subj="host-stat-winlogbeat"]', +export const STAT_WINLOGBEAT_SECURITY = { + value: '70', + domId: '[data-test-subj="host-stat-winlogbeatSecurity"]', +}; +export const STAT_WINLOGBEAT_MWSYSMON_OPERATIONAL = { + value: '30', + domId: '[data-test-subj="host-stat-winlogbeatMWSysmonOperational"]', }; export const HOST_STATS = [ @@ -81,7 +85,8 @@ export const HOST_STATS = [ STAT_PACKAGE, STAT_PROCESS, STAT_USER, - STAT_WINLOGBEAT, + STAT_WINLOGBEAT_SECURITY, + STAT_WINLOGBEAT_MWSYSMON_OPERATIONAL, ]; // Network Stats diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/__snapshots__/index.test.tsx.snap b/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/__snapshots__/index.test.tsx.snap index ac4d3036046b32..ea2e8d90b89dce 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/__snapshots__/index.test.tsx.snap +++ b/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/__snapshots__/index.test.tsx.snap @@ -602,7 +602,7 @@ exports[`Overview Host Stat Data rendering it renders the default OverviewHostSt > + + + + + + + + + + + + id: 'filebeatSystemModule', }, { - count: data.winlogbeat ?? 0, + count: data.winlogbeatSecurity ?? 0, title: ( - + + ), + id: 'winlogbeatSecurity', + }, + { + count: data.winlogbeatMWSysmonOperational ?? 0, + title: ( + ), - id: 'winlogbeat', + id: 'winlogbeatMWSysmonOperational', }, ]; @@ -182,7 +195,7 @@ const hostStatGroups: StatGroup[] = [ defaultMessage="Winlogbeat" /> ), - statIds: ['winlogbeat'], + statIds: ['winlogbeatSecurity', 'winlogbeatMWSysmonOperational'], }, ]; diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/mock.ts b/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/mock.ts index c7adb13657760c..60e653caab8c10 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/mock.ts +++ b/x-pack/legacy/plugins/siem/public/components/page/overview/overview_host_stats/mock.ts @@ -22,6 +22,7 @@ export const mockData: { OverviewHost: OverviewHostData } = { endgameRegistry: 39161718, endgameSecurity: 39202122, filebeatSystemModule: 568, - winlogbeat: 296999, + winlogbeatSecurity: 195929, + winlogbeatMWSysmonOperational: 101070, }, }; diff --git a/x-pack/legacy/plugins/siem/public/components/page/overview/types.ts b/x-pack/legacy/plugins/siem/public/components/page/overview/types.ts index 9333aa386dbc06..e260f2843692dd 100644 --- a/x-pack/legacy/plugins/siem/public/components/page/overview/types.ts +++ b/x-pack/legacy/plugins/siem/public/components/page/overview/types.ts @@ -28,7 +28,8 @@ export type OverviewStatId = | 'packetbeatDNS' | 'packetbeatFlow' | 'packetbeatTLS' - | 'winlogbeat'; + | 'winlogbeatSecurity' + | 'winlogbeatMWSysmonOperational'; export interface FormattedStat { count: number; diff --git a/x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.gql_query.ts b/x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.gql_query.ts index 76f061a0a33d0b..6f17bf6915aa45 100644 --- a/x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.gql_query.ts +++ b/x-pack/legacy/plugins/siem/public/containers/overview/overview_host/index.gql_query.ts @@ -31,7 +31,8 @@ export const overviewHostQuery = gql` endgameRegistry endgameSecurity filebeatSystemModule - winlogbeat + winlogbeatSecurity + winlogbeatMWSysmonOperational inspect @include(if: $inspect) { dsl response diff --git a/x-pack/legacy/plugins/siem/public/graphql/introspection.json b/x-pack/legacy/plugins/siem/public/graphql/introspection.json index 7b9842fa2c2bce..35599827ffe42d 100644 --- a/x-pack/legacy/plugins/siem/public/graphql/introspection.json +++ b/x-pack/legacy/plugins/siem/public/graphql/introspection.json @@ -9291,7 +9291,15 @@ "deprecationReason": null }, { - "name": "winlogbeat", + "name": "winlogbeatSecurity", + "description": "", + "args": [], + "type": { "kind": "SCALAR", "name": "Float", "ofType": null }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "winlogbeatMWSysmonOperational", "description": "", "args": [], "type": { "kind": "SCALAR", "name": "Float", "ofType": null }, diff --git a/x-pack/legacy/plugins/siem/public/graphql/types.ts b/x-pack/legacy/plugins/siem/public/graphql/types.ts index b13e295a8e1683..4b6825268403cb 100644 --- a/x-pack/legacy/plugins/siem/public/graphql/types.ts +++ b/x-pack/legacy/plugins/siem/public/graphql/types.ts @@ -1847,7 +1847,9 @@ export interface OverviewHostData { filebeatSystemModule?: Maybe; - winlogbeat?: Maybe; + winlogbeatSecurity?: Maybe; + + winlogbeatMWSysmonOperational?: Maybe; inspect?: Maybe; } @@ -4029,7 +4031,9 @@ export namespace GetOverviewHostQuery { filebeatSystemModule: Maybe; - winlogbeat: Maybe; + winlogbeatSecurity: Maybe; + + winlogbeatMWSysmonOperational: Maybe; inspect: Maybe; }; diff --git a/x-pack/legacy/plugins/siem/server/graphql/overview/schema.gql.ts b/x-pack/legacy/plugins/siem/server/graphql/overview/schema.gql.ts index bbb93ac42b6da1..7ab4f9fdb18d6c 100644 --- a/x-pack/legacy/plugins/siem/server/graphql/overview/schema.gql.ts +++ b/x-pack/legacy/plugins/siem/server/graphql/overview/schema.gql.ts @@ -35,7 +35,8 @@ export const overviewSchema = gql` endgameRegistry: Float endgameSecurity: Float filebeatSystemModule: Float - winlogbeat: Float + winlogbeatSecurity: Float + winlogbeatMWSysmonOperational: Float inspect: Inspect } diff --git a/x-pack/legacy/plugins/siem/server/graphql/types.ts b/x-pack/legacy/plugins/siem/server/graphql/types.ts index 4a2119b6f76313..bc7486777b9906 100644 --- a/x-pack/legacy/plugins/siem/server/graphql/types.ts +++ b/x-pack/legacy/plugins/siem/server/graphql/types.ts @@ -1849,7 +1849,9 @@ export interface OverviewHostData { filebeatSystemModule?: Maybe; - winlogbeat?: Maybe; + winlogbeatSecurity?: Maybe; + + winlogbeatMWSysmonOperational?: Maybe; inspect?: Maybe; } @@ -7831,7 +7833,13 @@ export namespace OverviewHostDataResolvers { filebeatSystemModule?: FilebeatSystemModuleResolver, TypeParent, TContext>; - winlogbeat?: WinlogbeatResolver, TypeParent, TContext>; + winlogbeatSecurity?: WinlogbeatSecurityResolver, TypeParent, TContext>; + + winlogbeatMWSysmonOperational?: WinlogbeatMwSysmonOperationalResolver< + Maybe, + TypeParent, + TContext + >; inspect?: InspectResolver, TypeParent, TContext>; } @@ -7906,7 +7914,12 @@ export namespace OverviewHostDataResolvers { Parent = OverviewHostData, TContext = SiemContext > = Resolver; - export type WinlogbeatResolver< + export type WinlogbeatSecurityResolver< + R = Maybe, + Parent = OverviewHostData, + TContext = SiemContext + > = Resolver; + export type WinlogbeatMwSysmonOperationalResolver< R = Maybe, Parent = OverviewHostData, TContext = SiemContext diff --git a/x-pack/legacy/plugins/siem/server/lib/overview/elastic_adapter.test.ts b/x-pack/legacy/plugins/siem/server/lib/overview/elastic_adapter.test.ts index d904219c76531c..29035f4539be89 100644 --- a/x-pack/legacy/plugins/siem/server/lib/overview/elastic_adapter.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/overview/elastic_adapter.test.ts @@ -143,7 +143,8 @@ describe('Siem Overview elasticsearch_adapter', () => { mockNoDataResponse.aggregations.system_module.process_count.doc_count = 0; mockNoDataResponse.aggregations.system_module.user_count.doc_count = 0; mockNoDataResponse.aggregations.system_module.filebeat_count.doc_count = 0; - mockNoDataResponse.aggregations.winlog_count.doc_count = 0; + mockNoDataResponse.aggregations.winlog_module.security_event_count.doc_count = 0; + mockNoDataResponse.aggregations.winlog_module.mwsysmon_operational_event_count.doc_count = 0; const mockCallWithRequest = jest.fn(); mockCallWithRequest.mockResolvedValue(mockNoDataResponse); const mockFramework: FrameworkAdapter = { @@ -181,7 +182,8 @@ describe('Siem Overview elasticsearch_adapter', () => { endgameRegistry: 0, endgameSecurity: 0, filebeatSystemModule: 0, - winlogbeat: 0, + winlogbeatSecurity: 0, + winlogbeatMWSysmonOperational: 0, }); }); }); diff --git a/x-pack/legacy/plugins/siem/server/lib/overview/elasticsearch_adapter.ts b/x-pack/legacy/plugins/siem/server/lib/overview/elasticsearch_adapter.ts index b6b56fab484025..982b47110c5135 100644 --- a/x-pack/legacy/plugins/siem/server/lib/overview/elasticsearch_adapter.ts +++ b/x-pack/legacy/plugins/siem/server/lib/overview/elasticsearch_adapter.ts @@ -117,7 +117,16 @@ export class ElasticsearchOverviewAdapter implements OverviewAdapter { 'aggregations.system_module.filebeat_count.doc_count', response ), - winlogbeat: getOr(null, 'aggregations.winlog_count.doc_count', response), + winlogbeatSecurity: getOr( + null, + 'aggregations.winlog_module.security_event_count.doc_count', + response + ), + winlogbeatMWSysmonOperational: getOr( + null, + 'aggregations.winlog_module.mwsysmon_operational_event_count.doc_count', + response + ), }; } } diff --git a/x-pack/legacy/plugins/siem/server/lib/overview/mock.ts b/x-pack/legacy/plugins/siem/server/lib/overview/mock.ts index d2de5853879f85..6196f45029313e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/overview/mock.ts +++ b/x-pack/legacy/plugins/siem/server/lib/overview/mock.ts @@ -137,7 +137,14 @@ export const mockResponseHost = { user_count: { doc_count: 1979 }, filebeat_count: { doc_count: 225 }, }, - winlog_count: { doc_count: 737 }, + winlog_module: { + security_event_count: { + doc_count: 523, + }, + mwsysmon_operational_event_count: { + doc_count: 214, + }, + }, }, }; @@ -160,5 +167,6 @@ export const mockResultHost = { endgameRegistry: 896, endgameSecurity: 897, filebeatSystemModule: 225, - winlogbeat: 737, + winlogbeatSecurity: 523, + winlogbeatMWSysmonOperational: 214, }; diff --git a/x-pack/legacy/plugins/siem/server/lib/overview/query.dsl.ts b/x-pack/legacy/plugins/siem/server/lib/overview/query.dsl.ts index 55af5505e7dce3..30656c011ee21d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/overview/query.dsl.ts +++ b/x-pack/legacy/plugins/siem/server/lib/overview/query.dsl.ts @@ -203,12 +203,28 @@ export const buildOverviewHostQuery = ({ }, }, }, - winlog_count: { + winlog_module: { filter: { term: { 'agent.type': 'winlogbeat', }, }, + aggs: { + mwsysmon_operational_event_count: { + filter: { + term: { + 'winlog.channel': 'Microsoft-Windows-Sysmon/Operational', + }, + }, + }, + security_event_count: { + filter: { + term: { + 'winlog.channel': 'Security', + }, + }, + }, + }, }, system_module: { filter: { diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 1c0c44540781d9..842e59aedc7a6b 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -11343,7 +11343,6 @@ "xpack.siem.overview.startedText.docsLinkText": "ドキュメンテーション", "xpack.siem.overview.startedText.siemSolutionLinkText": "SIEM ソリューション", "xpack.siem.overview.startedTitle": "はじめて使う", - "xpack.siem.overview.winlogbeatTitle": "Winlogbeat", "xpack.siem.pages.fourohfour.noContentFoundDescription": "コンテンツがありません", "xpack.siem.paginatedTable.rowsButtonLabel": "ページごとの行数", "xpack.siem.paginatedTable.showingSubtitle": "表示中", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 9500b1ce887a6d..07cd663d12bbb8 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -11342,7 +11342,6 @@ "xpack.siem.overview.startedText.docsLinkText": "文档", "xpack.siem.overview.startedText.siemSolutionLinkText": "SIEM 解决方案", "xpack.siem.overview.startedTitle": "入门", - "xpack.siem.overview.winlogbeatTitle": "Winlogbeat", "xpack.siem.pages.fourohfour.noContentFoundDescription": "未找到任何内容", "xpack.siem.paginatedTable.rowsButtonLabel": "每页行数", "xpack.siem.paginatedTable.showingSubtitle": "显示", diff --git a/x-pack/test/api_integration/apis/siem/overview_host.ts b/x-pack/test/api_integration/apis/siem/overview_host.ts index f23d9047f97e95..d32eeaec884fa9 100644 --- a/x-pack/test/api_integration/apis/siem/overview_host.ts +++ b/x-pack/test/api_integration/apis/siem/overview_host.ts @@ -35,7 +35,8 @@ export default function({ getService }: FtrProviderContext) { endgameRegistry: 1, endgameSecurity: 4, filebeatSystemModule: 0, - winlogbeat: 1, + winlogbeatSecurity: 0, + winlogbeatMWSysmonOperational: 0, __typename: 'OverviewHostData', }; From ac0953e08b4cc6225965dff010c5d38e68ea3be4 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Fri, 24 Jan 2020 06:23:53 +0100 Subject: [PATCH 32/72] [Discover] Change default sort handling for index patterns without timefield (#54427) Default sort is no longer in state. There's now a separate function to provide default sort for ES and UI, in case the user didn't actively select a field to sort by --- .../__tests__/doc_table/lib/get_sort.js | 39 +++++++++---------- .../discover/np_ready/angular/discover.js | 20 ++++++---- .../doc_table/components/table_header.ts | 1 + .../components/table_header/helpers.tsx | 2 +- .../table_header/table_header.test.tsx | 1 + .../components/table_header/table_header.tsx | 7 +++- .../table_header/table_header_column.tsx | 2 +- .../angular/doc_table/lib/get_default_sort.ts | 37 ++++++++++++++++++ .../angular/doc_table/lib/get_sort.js | 13 +++---- .../lib/get_sort_for_search_source.ts | 18 ++++++--- .../np_ready/embeddable/search_embeddable.ts | 6 ++- .../functional/apps/discover/_shared_links.js | 2 +- 12 files changed, 103 insertions(+), 45 deletions(-) create mode 100644 src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/lib/get_default_sort.ts diff --git a/src/legacy/core_plugins/kibana/public/discover/__tests__/doc_table/lib/get_sort.js b/src/legacy/core_plugins/kibana/public/discover/__tests__/doc_table/lib/get_sort.js index d9fdcc48608d22..d5485bca33cf50 100644 --- a/src/legacy/core_plugins/kibana/public/discover/__tests__/doc_table/lib/get_sort.js +++ b/src/legacy/core_plugins/kibana/public/discover/__tests__/doc_table/lib/get_sort.js @@ -23,7 +23,6 @@ import ngMock from 'ng_mock'; import { getSort } from '../../../np_ready/angular/doc_table/lib/get_sort'; import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern'; -const defaultSort = [{ time: 'desc' }]; let indexPattern; describe('docTable', function() { @@ -51,26 +50,26 @@ describe('docTable', function() { expect(getSort([{ bytes: 'desc' }], indexPattern)).to.eql([{ bytes: 'desc' }]); }); - it('should sort by the default when passed an unsortable field', function() { - expect(getSort(['non-sortable', 'asc'], indexPattern)).to.eql(defaultSort); - expect(getSort(['lol_nope', 'asc'], indexPattern)).to.eql(defaultSort); + it('should return an empty array when passed an unsortable field', function() { + expect(getSort(['non-sortable', 'asc'], indexPattern)).to.eql([]); + expect(getSort(['lol_nope', 'asc'], indexPattern)).to.eql([]); delete indexPattern.timeFieldName; - expect(getSort(['non-sortable', 'asc'], indexPattern)).to.eql([{ _score: 'desc' }]); + expect(getSort(['non-sortable', 'asc'], indexPattern)).to.eql([]); }); - it('should sort in reverse chrono order otherwise on time based patterns', function() { - expect(getSort([], indexPattern)).to.eql(defaultSort); - expect(getSort(['foo'], indexPattern)).to.eql(defaultSort); - expect(getSort({ foo: 'bar' }, indexPattern)).to.eql(defaultSort); + it('should return an empty array ', function() { + expect(getSort([], indexPattern)).to.eql([]); + expect(getSort(['foo'], indexPattern)).to.eql([]); + expect(getSort({ foo: 'bar' }, indexPattern)).to.eql([]); }); - it('should sort by score on non-time patterns', function() { + it('should return an empty array on non-time patterns', function() { delete indexPattern.timeFieldName; - expect(getSort([], indexPattern)).to.eql([{ _score: 'desc' }]); - expect(getSort(['foo'], indexPattern)).to.eql([{ _score: 'desc' }]); - expect(getSort({ foo: 'bar' }, indexPattern)).to.eql([{ _score: 'desc' }]); + expect(getSort([], indexPattern)).to.eql([]); + expect(getSort(['foo'], indexPattern)).to.eql([]); + expect(getSort({ foo: 'bar' }, indexPattern)).to.eql([]); }); }); @@ -87,19 +86,19 @@ describe('docTable', function() { expect(getSort.array([{ bytes: 'desc' }], indexPattern)).to.eql([['bytes', 'desc']]); }); - it('should sort by the default when passed an unsortable field', function() { - expect(getSort.array([{ 'non-sortable': 'asc' }], indexPattern)).to.eql([['time', 'desc']]); - expect(getSort.array([{ lol_nope: 'asc' }], indexPattern)).to.eql([['time', 'desc']]); + it('should sort by an empty array when an unsortable field is given', function() { + expect(getSort.array([{ 'non-sortable': 'asc' }], indexPattern)).to.eql([]); + expect(getSort.array([{ lol_nope: 'asc' }], indexPattern)).to.eql([]); delete indexPattern.timeFieldName; - expect(getSort.array([{ 'non-sortable': 'asc' }], indexPattern)).to.eql([['_score', 'desc']]); + expect(getSort.array([{ 'non-sortable': 'asc' }], indexPattern)).to.eql([]); }); - it('should sort by the default when passed an empty sort', () => { - expect(getSort.array([], indexPattern)).to.eql([['time', 'desc']]); + it('should return an empty array when passed an empty sort array', () => { + expect(getSort.array([], indexPattern)).to.eql([]); delete indexPattern.timeFieldName; - expect(getSort.array([], indexPattern)).to.eql([['_score', 'desc']]); + expect(getSort.array([], indexPattern)).to.eql([]); }); }); }); diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js index cde0b5d27bdc54..7924307d007cb9 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js @@ -486,7 +486,14 @@ function discoverController( const { searchFields, selectFields } = await getSharingDataFields(); searchSource.setField('fields', searchFields); - searchSource.setField('sort', getSortForSearchSource($state.sort, $scope.indexPattern)); + searchSource.setField( + 'sort', + getSortForSearchSource( + $state.sort, + $scope.indexPattern, + config.get('discover:sort:defaultOrder') + ) + ); searchSource.setField('highlight', null); searchSource.setField('highlightAll', null); searchSource.setField('aggs', null); @@ -517,11 +524,7 @@ function discoverController( language: localStorage.get('kibana.userQueryLanguage') || config.get('search:queryLanguage'), }, - sort: getSort.array( - savedSearch.sort, - $scope.indexPattern, - config.get('discover:sort:defaultOrder') - ), + sort: getSort.array(savedSearch.sort, $scope.indexPattern), columns: savedSearch.columns.length > 0 ? savedSearch.columns : config.get('defaultColumns').slice(), index: $scope.indexPattern.id, @@ -934,7 +937,10 @@ function discoverController( const { indexPattern, searchSource } = $scope; searchSource .setField('size', $scope.opts.sampleSize) - .setField('sort', getSortForSearchSource($state.sort, indexPattern)) + .setField( + 'sort', + getSortForSearchSource($state.sort, indexPattern, config.get('discover:sort:defaultOrder')) + ) .setField('query', !$state.query ? null : $state.query) .setField('filter', filterManager.getFilters()); }); diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header.ts b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header.ts index a5cb9180333a4a..32174984c1dfb4 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header.ts +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header.ts @@ -37,6 +37,7 @@ export function createTableHeaderDirective(reactDirective: any, config: IUiSetti { hideTimeColumn: config.get('doc_table:hideTimeColumn'), isShortDots: config.get('shortDots:enable'), + defaultSortOrder: config.get('discover:sort:defaultOrder'), } ); } diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/helpers.tsx b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/helpers.tsx index 13833d724967a0..990ace32e64491 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/helpers.tsx +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/helpers.tsx @@ -20,7 +20,7 @@ import { IndexPattern } from '../../../../../kibana_services'; // @ts-ignore import { shortenDottedString } from '../../../../../../../common/utils/shorten_dotted_string'; -export type SortOrder = [string, 'asc' | 'desc']; +export type SortOrder = [string, string]; export interface ColumnProps { name: string; displayName: string; diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.test.tsx b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.test.tsx index ef3d4ecc4b18fc..b201bea26503ea 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.test.tsx +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.test.tsx @@ -59,6 +59,7 @@ function getMockProps(props = {}) { indexPattern: getMockIndexPattern(), hideTimeColumn: false, columns: ['first', 'middle', 'last'], + defaultSortOrder: 'desc', sortOrder: [['time', 'asc']] as SortOrder[], isShortDots: true, onRemoveColumn: jest.fn(), diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.tsx b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.tsx index 17b961dbe68326..2ca53d5a34b039 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.tsx +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/components/table_header/table_header.tsx @@ -21,9 +21,11 @@ import { IndexPattern } from '../../../../../kibana_services'; // @ts-ignore import { TableHeaderColumn } from './table_header_column'; import { SortOrder, getDisplayedColumns } from './helpers'; +import { getDefaultSort } from '../../lib/get_default_sort'; interface Props { columns: string[]; + defaultSortOrder: string; hideTimeColumn: boolean; indexPattern: IndexPattern; isShortDots: boolean; @@ -35,6 +37,7 @@ interface Props { export function TableHeader({ columns, + defaultSortOrder, hideTimeColumn, indexPattern, isShortDots, @@ -53,7 +56,9 @@ export function TableHeader({ = { desc: 'fa fa-sort-down', asc: 'fa fa-sort-up', '': 'fa fa-sort', diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/lib/get_default_sort.ts b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/lib/get_default_sort.ts new file mode 100644 index 00000000000000..634e3cfec3a0bd --- /dev/null +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/lib/get_default_sort.ts @@ -0,0 +1,37 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { IndexPattern } from '../../../../kibana_services'; +// @ts-ignore +import { isSortable } from './get_sort'; +import { SortOrder } from '../components/table_header/helpers'; + +/** + * use in case the user didn't manually sort. + * the default sort is returned depending of the index pattern + */ +export function getDefaultSort( + indexPattern: IndexPattern, + defaultSortOrder: string = 'desc' +): SortOrder[] { + if (indexPattern.timeFieldName && isSortable(indexPattern.timeFieldName, indexPattern)) { + return [[indexPattern.timeFieldName, defaultSortOrder]]; + } else { + return [['_score', defaultSortOrder]]; + } +} diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/lib/get_sort.js b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/lib/get_sort.js index 0da53f088e7626..ce32fdaeda2375 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/lib/get_sort.js +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/lib/get_sort.js @@ -19,7 +19,7 @@ import _ from 'lodash'; -function isSortable(field, indexPattern) { +export function isSortable(field, indexPattern) { return indexPattern.fields.getByName(field) && indexPattern.fields.getByName(field).sortable; } @@ -41,7 +41,7 @@ function createSortObject(sortPair, indexPattern) { * @param {object} indexPattern used for determining default sort * @returns {object} a sort object suitable for returning to elasticsearch */ -export function getSort(sort, indexPattern, defaultSortOrder = 'desc') { +export function getSort(sort, indexPattern) { let sortObjects; if (Array.isArray(sort)) { sortObjects = _.compact(sort.map(sortPair => createSortObject(sortPair, indexPattern))); @@ -49,15 +49,12 @@ export function getSort(sort, indexPattern, defaultSortOrder = 'desc') { if (!_.isEmpty(sortObjects)) { return sortObjects; - } else if (indexPattern.timeFieldName && isSortable(indexPattern.timeFieldName, indexPattern)) { - return [{ [indexPattern.timeFieldName]: defaultSortOrder }]; - } else { - return [{ _score: 'desc' }]; } + return []; } -getSort.array = function(sort, indexPattern, defaultSortOrder) { - return getSort(sort, indexPattern, defaultSortOrder).map(sortPair => +getSort.array = function(sort, indexPattern) { + return getSort(sort, indexPattern).map(sortPair => _(sortPair) .pairs() .pop() diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/lib/get_sort_for_search_source.ts b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/lib/get_sort_for_search_source.ts index 26bba4589cf6a5..62a44d30adfd55 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/lib/get_sort_for_search_source.ts +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/doc_table/lib/get_sort_for_search_source.ts @@ -19,16 +19,24 @@ import { IndexPattern } from '../../../../kibana_services'; import { SortOrder } from '../components/table_header/helpers'; import { getSort } from './get_sort'; +import { getDefaultSort } from './get_default_sort'; /** - * prepares sort for search source, that's sending the request to ES - * handles the special case when there's sorting by date_nanos typed fields - * the addon of the numeric_type guarantees the right sort order - * when there are indices with date and indices with date_nanos field + * Prepares sort for search source, that's sending the request to ES + * - Adds default sort if necessary + * - Handles the special case when there's sorting by date_nanos typed fields + * the addon of the numeric_type guarantees the right sort order + * when there are indices with date and indices with date_nanos field */ -export function getSortForSearchSource(sort?: SortOrder[], indexPattern?: IndexPattern) { +export function getSortForSearchSource( + sort?: SortOrder[], + indexPattern?: IndexPattern, + defaultDirection: 'asc' | 'desc' = 'desc' +) { if (!sort || !indexPattern) { return []; + } else if (Array.isArray(sort) && sort.length === 0) { + sort = getDefaultSort(indexPattern, defaultDirection); } const { timeFieldName } = indexPattern; return getSort(sort, indexPattern).map((sortPair: Record) => { diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/embeddable/search_embeddable.ts b/src/legacy/core_plugins/kibana/public/discover/np_ready/embeddable/search_embeddable.ts index 3aa8dea816694f..c840f1fbd87ed1 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/embeddable/search_embeddable.ts +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/embeddable/search_embeddable.ts @@ -266,7 +266,11 @@ export class SearchEmbeddable extends Embeddable searchSource.setField('size', getServices().uiSettings.get('discover:sampleSize')); searchSource.setField( 'sort', - getSortForSearchSource(this.searchScope.sort, this.searchScope.indexPattern) + getSortForSearchSource( + this.searchScope.sort, + this.searchScope.indexPattern, + getServices().uiSettings.get('discover:sort:defaultOrder') + ) ); // Log request to inspector diff --git a/test/functional/apps/discover/_shared_links.js b/test/functional/apps/discover/_shared_links.js index 291e46e308ee94..d7160a39679b70 100644 --- a/test/functional/apps/discover/_shared_links.js +++ b/test/functional/apps/discover/_shared_links.js @@ -88,7 +88,7 @@ export default function({ getService, getPageObjects }) { ":(from:'2015-09-19T06:31:44.000Z',to:'2015-09" + "-23T18:31:44.000Z'))&_a=(columns:!(_source),index:'logstash-" + "*',interval:auto,query:(language:kuery,query:'')" + - ",sort:!(!('@timestamp',desc)))"; + ',sort:!())'; const actualUrl = await PageObjects.share.getSharedUrl(); // strip the timestamp out of each URL expect(actualUrl.replace(/_t=\d{13}/, '_t=TIMESTAMP')).to.be( From e67cc8514aa7aeb2e5a54bc1af2a61da19470fe3 Mon Sep 17 00:00:00 2001 From: spalger Date: Thu, 23 Jan 2020 23:32:10 -0700 Subject: [PATCH 33/72] Revert "[csp] allow blob styles when running from source (#54991)" This reverts commit 375f0b42a7b449cc5d0b73f15595f40de8fa998b. --- ...lugin-server.coresetup.getstartservices.md | 34 +++++----- .../server/kibana-plugin-server.coresetup.md | 64 +++++++++---------- ...kibana-plugin-server.cspconfig.default.md} | 6 +- .../server/kibana-plugin-server.cspconfig.md | 2 +- .../server/kibana-plugin-server.icspconfig.md | 1 - ...rver.icspconfig.ruleschangedfromdefault.md | 13 ---- .../src/kbn_client/kbn_client_status.ts | 6 -- packages/kbn-pm/dist/index.js | 4 -- src/core/server/config/env.mock.ts | 29 --------- src/core/server/csp/csp_config.test.ts | 47 ++++++-------- src/core/server/csp/csp_config.ts | 31 ++------- src/core/server/http/http_config.ts | 5 +- src/core/server/http/http_service.mock.ts | 3 +- src/core/server/http/http_service.ts | 2 +- src/core/server/http/http_tools.test.ts | 7 +- src/core/server/legacy/legacy_service.ts | 4 +- src/core/server/mocks.ts | 3 +- src/core/server/server.api.md | 7 +- .../csp_usage_collector/csp_collector.test.ts | 6 +- .../lib/csp_usage_collector/csp_collector.ts | 9 +-- .../status/routes/api/register_status.js | 3 - test/api_integration/apis/general/csp.js | 4 +- .../apis/implicit_flow/oidc_auth.ts | 8 +-- .../apis/security/saml_login.ts | 8 +-- x-pack/test/saml_api_integration/config.ts | 1 - 25 files changed, 96 insertions(+), 211 deletions(-) rename docs/development/core/server/{kibana-plugin-server.cspconfig.ruleschangedfromdefault.md => kibana-plugin-server.cspconfig.default.md} (56%) delete mode 100644 docs/development/core/server/kibana-plugin-server.icspconfig.ruleschangedfromdefault.md delete mode 100644 src/core/server/config/env.mock.ts diff --git a/docs/development/core/server/kibana-plugin-server.coresetup.getstartservices.md b/docs/development/core/server/kibana-plugin-server.coresetup.getstartservices.md index 589529cf2a7f79..b05d28899f9d23 100644 --- a/docs/development/core/server/kibana-plugin-server.coresetup.getstartservices.md +++ b/docs/development/core/server/kibana-plugin-server.coresetup.getstartservices.md @@ -1,17 +1,17 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md) > [getStartServices](./kibana-plugin-server.coresetup.getstartservices.md) - -## CoreSetup.getStartServices() method - -Allows plugins to get access to APIs available in start inside async handlers. Promise will not resolve until Core and plugin dependencies have completed `start`. This should only be used inside handlers registered during `setup` that will only be executed after `start` lifecycle. - -Signature: - -```typescript -getStartServices(): Promise<[CoreStart, TPluginsStart]>; -``` -Returns: - -`Promise<[CoreStart, TPluginsStart]>` - + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md) > [getStartServices](./kibana-plugin-server.coresetup.getstartservices.md) + +## CoreSetup.getStartServices() method + +Allows plugins to get access to APIs available in start inside async handlers. Promise will not resolve until Core and plugin dependencies have completed `start`. This should only be used inside handlers registered during `setup` that will only be executed after `start` lifecycle. + +Signature: + +```typescript +getStartServices(): Promise<[CoreStart, TPluginsStart]>; +``` +Returns: + +`Promise<[CoreStart, TPluginsStart]>` + diff --git a/docs/development/core/server/kibana-plugin-server.coresetup.md b/docs/development/core/server/kibana-plugin-server.coresetup.md index 325f7216122b58..c36d649837e8a8 100644 --- a/docs/development/core/server/kibana-plugin-server.coresetup.md +++ b/docs/development/core/server/kibana-plugin-server.coresetup.md @@ -1,32 +1,32 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md) - -## CoreSetup interface - -Context passed to the plugins `setup` method. - -Signature: - -```typescript -export interface CoreSetup -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [capabilities](./kibana-plugin-server.coresetup.capabilities.md) | CapabilitiesSetup | [CapabilitiesSetup](./kibana-plugin-server.capabilitiessetup.md) | -| [context](./kibana-plugin-server.coresetup.context.md) | ContextSetup | [ContextSetup](./kibana-plugin-server.contextsetup.md) | -| [elasticsearch](./kibana-plugin-server.coresetup.elasticsearch.md) | ElasticsearchServiceSetup | [ElasticsearchServiceSetup](./kibana-plugin-server.elasticsearchservicesetup.md) | -| [http](./kibana-plugin-server.coresetup.http.md) | HttpServiceSetup | [HttpServiceSetup](./kibana-plugin-server.httpservicesetup.md) | -| [savedObjects](./kibana-plugin-server.coresetup.savedobjects.md) | SavedObjectsServiceSetup | [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) | -| [uiSettings](./kibana-plugin-server.coresetup.uisettings.md) | UiSettingsServiceSetup | [UiSettingsServiceSetup](./kibana-plugin-server.uisettingsservicesetup.md) | -| [uuid](./kibana-plugin-server.coresetup.uuid.md) | UuidServiceSetup | [UuidServiceSetup](./kibana-plugin-server.uuidservicesetup.md) | - -## Methods - -| Method | Description | -| --- | --- | -| [getStartServices()](./kibana-plugin-server.coresetup.getstartservices.md) | Allows plugins to get access to APIs available in start inside async handlers. Promise will not resolve until Core and plugin dependencies have completed start. This should only be used inside handlers registered during setup that will only be executed after start lifecycle. | - + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md) + +## CoreSetup interface + +Context passed to the plugins `setup` method. + +Signature: + +```typescript +export interface CoreSetup +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [capabilities](./kibana-plugin-server.coresetup.capabilities.md) | CapabilitiesSetup | [CapabilitiesSetup](./kibana-plugin-server.capabilitiessetup.md) | +| [context](./kibana-plugin-server.coresetup.context.md) | ContextSetup | [ContextSetup](./kibana-plugin-server.contextsetup.md) | +| [elasticsearch](./kibana-plugin-server.coresetup.elasticsearch.md) | ElasticsearchServiceSetup | [ElasticsearchServiceSetup](./kibana-plugin-server.elasticsearchservicesetup.md) | +| [http](./kibana-plugin-server.coresetup.http.md) | HttpServiceSetup | [HttpServiceSetup](./kibana-plugin-server.httpservicesetup.md) | +| [savedObjects](./kibana-plugin-server.coresetup.savedobjects.md) | SavedObjectsServiceSetup | [SavedObjectsServiceSetup](./kibana-plugin-server.savedobjectsservicesetup.md) | +| [uiSettings](./kibana-plugin-server.coresetup.uisettings.md) | UiSettingsServiceSetup | [UiSettingsServiceSetup](./kibana-plugin-server.uisettingsservicesetup.md) | +| [uuid](./kibana-plugin-server.coresetup.uuid.md) | UuidServiceSetup | [UuidServiceSetup](./kibana-plugin-server.uuidservicesetup.md) | + +## Methods + +| Method | Description | +| --- | --- | +| [getStartServices()](./kibana-plugin-server.coresetup.getstartservices.md) | Allows plugins to get access to APIs available in start inside async handlers. Promise will not resolve until Core and plugin dependencies have completed start. This should only be used inside handlers registered during setup that will only be executed after start lifecycle. | + diff --git a/docs/development/core/server/kibana-plugin-server.cspconfig.ruleschangedfromdefault.md b/docs/development/core/server/kibana-plugin-server.cspconfig.default.md similarity index 56% rename from docs/development/core/server/kibana-plugin-server.cspconfig.ruleschangedfromdefault.md rename to docs/development/core/server/kibana-plugin-server.cspconfig.default.md index 3320785935b212..56e6cf35cdd136 100644 --- a/docs/development/core/server/kibana-plugin-server.cspconfig.ruleschangedfromdefault.md +++ b/docs/development/core/server/kibana-plugin-server.cspconfig.default.md @@ -1,11 +1,11 @@ -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [CspConfig](./kibana-plugin-server.cspconfig.md) > [rulesChangedFromDefault](./kibana-plugin-server.cspconfig.ruleschangedfromdefault.md) +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [CspConfig](./kibana-plugin-server.cspconfig.md) > [DEFAULT](./kibana-plugin-server.cspconfig.default.md) -## CspConfig.rulesChangedFromDefault property +## CspConfig.DEFAULT property Signature: ```typescript -readonly rulesChangedFromDefault: boolean; +static readonly DEFAULT: CspConfig; ``` diff --git a/docs/development/core/server/kibana-plugin-server.cspconfig.md b/docs/development/core/server/kibana-plugin-server.cspconfig.md index 6f12d64676ce96..7e491cb0df9120 100644 --- a/docs/development/core/server/kibana-plugin-server.cspconfig.md +++ b/docs/development/core/server/kibana-plugin-server.cspconfig.md @@ -20,9 +20,9 @@ The constructor for this class is marked as internal. Third-party code should no | Property | Modifiers | Type | Description | | --- | --- | --- | --- | +| [DEFAULT](./kibana-plugin-server.cspconfig.default.md) | static | CspConfig | | | [header](./kibana-plugin-server.cspconfig.header.md) | | string | | | [rules](./kibana-plugin-server.cspconfig.rules.md) | | string[] | | -| [rulesChangedFromDefault](./kibana-plugin-server.cspconfig.ruleschangedfromdefault.md) | | boolean | | | [strict](./kibana-plugin-server.cspconfig.strict.md) | | boolean | | | [warnLegacyBrowsers](./kibana-plugin-server.cspconfig.warnlegacybrowsers.md) | | boolean | | diff --git a/docs/development/core/server/kibana-plugin-server.icspconfig.md b/docs/development/core/server/kibana-plugin-server.icspconfig.md index 00107d561873fe..fb8188386a3766 100644 --- a/docs/development/core/server/kibana-plugin-server.icspconfig.md +++ b/docs/development/core/server/kibana-plugin-server.icspconfig.md @@ -18,7 +18,6 @@ export interface ICspConfig | --- | --- | --- | | [header](./kibana-plugin-server.icspconfig.header.md) | string | The CSP rules in a formatted directives string for use in a Content-Security-Policy header. | | [rules](./kibana-plugin-server.icspconfig.rules.md) | string[] | The CSP rules used for Kibana. | -| [rulesChangedFromDefault](./kibana-plugin-server.icspconfig.ruleschangedfromdefault.md) | boolean | Flag indicating that the configuraion changes the csp rules from the defaults | | [strict](./kibana-plugin-server.icspconfig.strict.md) | boolean | Specify whether browsers that do not support CSP should be able to use Kibana. Use true to block and false to allow. | | [warnLegacyBrowsers](./kibana-plugin-server.icspconfig.warnlegacybrowsers.md) | boolean | Specify whether users with legacy browsers should be warned about their lack of Kibana security compliance. | diff --git a/docs/development/core/server/kibana-plugin-server.icspconfig.ruleschangedfromdefault.md b/docs/development/core/server/kibana-plugin-server.icspconfig.ruleschangedfromdefault.md deleted file mode 100644 index 427c07d2d1e4d1..00000000000000 --- a/docs/development/core/server/kibana-plugin-server.icspconfig.ruleschangedfromdefault.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ICspConfig](./kibana-plugin-server.icspconfig.md) > [rulesChangedFromDefault](./kibana-plugin-server.icspconfig.ruleschangedfromdefault.md) - -## ICspConfig.rulesChangedFromDefault property - -Flag indicating that the configuraion changes the csp rules from the defaults - -Signature: - -```typescript -readonly rulesChangedFromDefault: boolean; -``` diff --git a/packages/kbn-dev-utils/src/kbn_client/kbn_client_status.ts b/packages/kbn-dev-utils/src/kbn_client/kbn_client_status.ts index 3775aecb2db095..22baf4a3304168 100644 --- a/packages/kbn-dev-utils/src/kbn_client/kbn_client_status.ts +++ b/packages/kbn-dev-utils/src/kbn_client/kbn_client_status.ts @@ -32,7 +32,6 @@ interface Status { interface ApiResponseStatus { name: string; uuid: string; - running_from_source?: true; version: { number: string; build_hash: string; @@ -59,11 +58,6 @@ export class KbnClientStatus { }); } - public async isDistributable() { - const status = await this.get(); - return !status.running_from_source; - } - /** * Get the overall/merged state */ diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index 364b91a30841ca..8bded9d403c215 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -43639,10 +43639,6 @@ class KbnClientStatus { path: 'api/status', }); } - async isDistributable() { - const status = await this.get(); - return !status.running_from_source; - } /** * Get the overall/merged state */ diff --git a/src/core/server/config/env.mock.ts b/src/core/server/config/env.mock.ts deleted file mode 100644 index f9b4e0732c1cb6..00000000000000 --- a/src/core/server/config/env.mock.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { Env } from './env'; - -export function createMockEnv(options: { dist?: boolean } = {}): Env { - return { - // required by CspConfig - packageInfo: { - dist: options.dist ?? true, - }, - } as any; -} diff --git a/src/core/server/csp/csp_config.test.ts b/src/core/server/csp/csp_config.test.ts index 15cddc6fccd342..45fa8445791b07 100644 --- a/src/core/server/csp/csp_config.test.ts +++ b/src/core/server/csp/csp_config.test.ts @@ -18,7 +18,6 @@ */ import { CspConfig } from '.'; -import { createMockEnv } from '../config/env.mock'; // CSP rules aren't strictly additive, so any change can potentially expand or // restrict the policy in a way we consider a breaking change. For that reason, @@ -34,10 +33,23 @@ import { createMockEnv } from '../config/env.mock'; // the nature of a change in defaults during a PR review. describe('CspConfig', () => { - test('defaults from config', () => { - const cspConfig = new CspConfig(createMockEnv()); + test('DEFAULT', () => { + expect(CspConfig.DEFAULT).toMatchInlineSnapshot(` + CspConfig { + "header": "script-src 'unsafe-eval' 'self'; worker-src blob: 'self'; style-src 'unsafe-inline' 'self'", + "rules": Array [ + "script-src 'unsafe-eval' 'self'", + "worker-src blob: 'self'", + "style-src 'unsafe-inline' 'self'", + ], + "strict": true, + "warnLegacyBrowsers": true, + } + `); + }); - expect(cspConfig).toMatchInlineSnapshot(` + test('defaults from config', () => { + expect(new CspConfig()).toMatchInlineSnapshot(` CspConfig { "header": "script-src 'unsafe-eval' 'self'; worker-src blob: 'self'; style-src 'unsafe-inline' 'self'", "rules": Array [ @@ -45,7 +57,6 @@ describe('CspConfig', () => { "worker-src blob: 'self'", "style-src 'unsafe-inline' 'self'", ], - "rulesChangedFromDefault": false, "strict": true, "warnLegacyBrowsers": true, } @@ -53,9 +64,7 @@ describe('CspConfig', () => { }); test('creates from partial config', () => { - const cspConfig = new CspConfig(createMockEnv(), { strict: false, warnLegacyBrowsers: false }); - - expect(cspConfig).toMatchInlineSnapshot(` + expect(new CspConfig({ strict: false, warnLegacyBrowsers: false })).toMatchInlineSnapshot(` CspConfig { "header": "script-src 'unsafe-eval' 'self'; worker-src blob: 'self'; style-src 'unsafe-inline' 'self'", "rules": Array [ @@ -63,7 +72,6 @@ describe('CspConfig', () => { "worker-src blob: 'self'", "style-src 'unsafe-inline' 'self'", ], - "rulesChangedFromDefault": false, "strict": false, "warnLegacyBrowsers": false, } @@ -71,7 +79,7 @@ describe('CspConfig', () => { }); test('computes header from rules', () => { - const cspConfig = new CspConfig(createMockEnv(), { rules: ['alpha', 'beta', 'gamma'] }); + const cspConfig = new CspConfig({ rules: ['alpha', 'beta', 'gamma'] }); expect(cspConfig).toMatchInlineSnapshot(` CspConfig { @@ -81,25 +89,6 @@ describe('CspConfig', () => { "beta", "gamma", ], - "rulesChangedFromDefault": true, - "strict": true, - "warnLegacyBrowsers": true, - } - `); - }); - - test(`includes blob: style-src if env indicates we're running from source`, () => { - const cspConfig = new CspConfig(createMockEnv({ dist: false })); - - expect(cspConfig).toMatchInlineSnapshot(` - CspConfig { - "header": "script-src 'unsafe-eval' 'self'; worker-src blob: 'self'; style-src blob: 'unsafe-inline' 'self'", - "rules": Array [ - "script-src 'unsafe-eval' 'self'", - "worker-src blob: 'self'", - "style-src blob: 'unsafe-inline' 'self'", - ], - "rulesChangedFromDefault": false, "strict": true, "warnLegacyBrowsers": true, } diff --git a/src/core/server/csp/csp_config.ts b/src/core/server/csp/csp_config.ts index 592a7209f43642..bb57702a4a2414 100644 --- a/src/core/server/csp/csp_config.ts +++ b/src/core/server/csp/csp_config.ts @@ -18,7 +18,6 @@ */ import { config } from './config'; -import { Env } from '../config'; const DEFAULT_CONFIG = Object.freeze(config.schema.validate({})); @@ -49,12 +48,6 @@ export interface ICspConfig { * in a `Content-Security-Policy` header. */ readonly header: string; - - /** - * Flag indicating that the configuraion changes the csp - * rules from the defaults - */ - readonly rulesChangedFromDefault: boolean; } /** @@ -62,37 +55,23 @@ export interface ICspConfig { * @public */ export class CspConfig implements ICspConfig { + static readonly DEFAULT = new CspConfig(); + public readonly rules: string[]; public readonly strict: boolean; public readonly warnLegacyBrowsers: boolean; public readonly header: string; - public readonly rulesChangedFromDefault: boolean; /** * Returns the default CSP configuration when passed with no config * @internal */ - constructor(env: Env, rawCspConfig?: Partial>) { + constructor(rawCspConfig: Partial> = {}) { const source = { ...DEFAULT_CONFIG, ...rawCspConfig }; - this.rules = source.rules.map(rule => { - // if we receive an env, and it indicates that this isn't a distributable, add `blob:` to the style csp rules - if (env && !env.packageInfo.dist && rule.startsWith('style-src ')) { - return rule.replace(/^style-src /, 'style-src blob: '); - } - - return rule; - }); + this.rules = source.rules; this.strict = source.strict; this.warnLegacyBrowsers = source.warnLegacyBrowsers; - this.header = this.rules.join('; '); - - // only check to see if the csp values are customized when `rawCspConfig` was received. - if (!rawCspConfig) { - this.rulesChangedFromDefault = false; - } else { - const defaultCsp = new CspConfig(env); - this.rulesChangedFromDefault = defaultCsp.header !== this.header; - } + this.header = source.rules.join('; '); } } diff --git a/src/core/server/http/http_config.ts b/src/core/server/http/http_config.ts index b249dbb5b6a042..73f44f3c5ab5ce 100644 --- a/src/core/server/http/http_config.ts +++ b/src/core/server/http/http_config.ts @@ -22,7 +22,6 @@ import { hostname } from 'os'; import { CspConfigType, CspConfig, ICspConfig } from '../csp'; import { SslConfig, sslSchema } from './ssl_config'; -import { Env } from '../config'; const validBasePathRegex = /(^$|^\/.*[^\/]$)/; const uuidRegexp = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i; @@ -149,7 +148,7 @@ export class HttpConfig { /** * @internal */ - constructor(rawHttpConfig: HttpConfigType, rawCspConfig: CspConfigType, env: Env) { + constructor(rawHttpConfig: HttpConfigType, rawCspConfig: CspConfigType) { this.autoListen = rawHttpConfig.autoListen; this.host = rawHttpConfig.host; this.port = rawHttpConfig.port; @@ -163,7 +162,7 @@ export class HttpConfig { this.rewriteBasePath = rawHttpConfig.rewriteBasePath; this.ssl = new SslConfig(rawHttpConfig.ssl || {}); this.compression = rawHttpConfig.compression; - this.csp = new CspConfig(env, rawCspConfig); + this.csp = new CspConfig(rawCspConfig); this.xsrf = rawHttpConfig.xsrf; } } diff --git a/src/core/server/http/http_service.mock.ts b/src/core/server/http/http_service.mock.ts index 7fc2f5d9908248..6db1ca80ab4370 100644 --- a/src/core/server/http/http_service.mock.ts +++ b/src/core/server/http/http_service.mock.ts @@ -21,7 +21,6 @@ import { Server } from 'hapi'; import { CspConfig } from '../csp'; import { mockRouter } from './router/router.mock'; import { configMock } from '../config/config.mock'; -import { createMockEnv } from '../config/env.mock'; import { InternalHttpServiceSetup } from './types'; import { HttpService } from './http_service'; import { OnPreAuthToolkit } from './lifecycle/on_pre_auth'; @@ -62,7 +61,7 @@ const createSetupContractMock = () => { registerOnPreResponse: jest.fn(), createRouter: jest.fn().mockImplementation(() => mockRouter.create({})), basePath: createBasePathMock(), - csp: new CspConfig(createMockEnv()), + csp: CspConfig.DEFAULT, auth: { get: jest.fn(), isAuthenticated: jest.fn(), diff --git a/src/core/server/http/http_service.ts b/src/core/server/http/http_service.ts index 8a86667a1a6bc1..ae9d53f9fd3db2 100644 --- a/src/core/server/http/http_service.ts +++ b/src/core/server/http/http_service.ts @@ -70,7 +70,7 @@ export class HttpService implements CoreService(httpConfig.path), configService.atPath(cspConfig.path), - ]).pipe(map(([http, csp]) => new HttpConfig(http, csp, env))); + ]).pipe(map(([http, csp]) => new HttpConfig(http, csp))); this.httpServer = new HttpServer(logger, 'Kibana'); this.httpsRedirectServer = new HttpsRedirectServer(logger.get('http', 'redirect', 'server')); } diff --git a/src/core/server/http/http_tools.test.ts b/src/core/server/http/http_tools.test.ts index d552339f1ea1c8..c1322a5aa94dbd 100644 --- a/src/core/server/http/http_tools.test.ts +++ b/src/core/server/http/http_tools.test.ts @@ -29,7 +29,6 @@ import { defaultValidationErrorHandler, HapiValidationError, getServerOptions } import { HttpServer } from './http_server'; import { HttpConfig, config } from './http_config'; import { Router } from './router'; -import { createMockEnv } from '../config/env.mock'; import { loggingServiceMock } from '../logging/logging_service.mock'; import { ByteSizeValue } from '@kbn/config-schema'; @@ -121,8 +120,7 @@ describe('getServerOptions', () => { certificate: 'some-certificate-path', }, }), - {} as any, - createMockEnv() + {} as any ); expect(getServerOptions(httpConfig).tls).toMatchInlineSnapshot(` @@ -151,8 +149,7 @@ describe('getServerOptions', () => { clientAuthentication: 'required', }, }), - {} as any, - createMockEnv() + {} as any ); expect(getServerOptions(httpConfig).tls).toMatchInlineSnapshot(` diff --git a/src/core/server/legacy/legacy_service.ts b/src/core/server/legacy/legacy_service.ts index ca1204f0ac05ce..0cb717e3832aac 100644 --- a/src/core/server/legacy/legacy_service.ts +++ b/src/core/server/legacy/legacy_service.ts @@ -86,7 +86,7 @@ export class LegacyService implements CoreService { public legacyInternals?: ILegacyInternals; constructor(private readonly coreContext: CoreContext) { - const { logger, configService, env } = coreContext; + const { logger, configService } = coreContext; this.log = logger.get('legacy-service'); this.devConfig$ = configService @@ -95,7 +95,7 @@ export class LegacyService implements CoreService { this.httpConfig$ = combineLatest( configService.atPath(httpConfig.path), configService.atPath(cspConfig.path) - ).pipe(map(([http, csp]) => new HttpConfig(http, csp, env))); + ).pipe(map(([http, csp]) => new HttpConfig(http, csp))); } public async discoverPlugins(): Promise { diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts index 846c2e4d8c5072..c0a8973d98a548 100644 --- a/src/core/server/mocks.ts +++ b/src/core/server/mocks.ts @@ -33,7 +33,6 @@ import { capabilitiesServiceMock } from './capabilities/capabilities_service.moc export { httpServerMock } from './http/http_server.mocks'; export { sessionStorageMock } from './http/cookie_session_storage.mocks'; export { configServiceMock } from './config/config_service.mock'; -import { createMockEnv } from './config/env.mock'; export { elasticsearchServiceMock } from './elasticsearch/elasticsearch_service.mock'; export { httpServiceMock } from './http/http_service.mock'; export { loggingServiceMock } from './logging/logging_service.mock'; @@ -98,7 +97,7 @@ function createCoreSetupMock() { registerOnPostAuth: httpService.registerOnPostAuth, registerOnPreResponse: httpService.registerOnPreResponse, basePath: httpService.basePath, - csp: new CspConfig(createMockEnv()), + csp: CspConfig.DEFAULT, isTlsEnabled: httpService.isTlsEnabled, createRouter: jest.fn(), registerRouteHandlerContext: jest.fn(), diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index 629e6a881199be..a179e1f35a937f 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -583,14 +583,14 @@ export interface CoreStart { // @public export class CspConfig implements ICspConfig { // @internal - constructor(env: Env, rawCspConfig?: Partial>); + constructor(rawCspConfig?: Partial>); + // (undocumented) + static readonly DEFAULT: CspConfig; // (undocumented) readonly header: string; // (undocumented) readonly rules: string[]; // (undocumented) - readonly rulesChangedFromDefault: boolean; - // (undocumented) readonly strict: boolean; // (undocumented) readonly warnLegacyBrowsers: boolean; @@ -774,7 +774,6 @@ export type IContextProvider, TContextName export interface ICspConfig { readonly header: string; readonly rules: string[]; - readonly rulesChangedFromDefault: boolean; readonly strict: boolean; readonly warnLegacyBrowsers: boolean; } diff --git a/src/legacy/core_plugins/kibana/server/lib/csp_usage_collector/csp_collector.test.ts b/src/legacy/core_plugins/kibana/server/lib/csp_usage_collector/csp_collector.test.ts index 584621a1ce13fb..395cb605878328 100644 --- a/src/legacy/core_plugins/kibana/server/lib/csp_usage_collector/csp_collector.test.ts +++ b/src/legacy/core_plugins/kibana/server/lib/csp_usage_collector/csp_collector.test.ts @@ -18,8 +18,6 @@ */ import { CspConfig, ICspConfig } from '../../../../../../core/server'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { createMockEnv } from '../../../../../../core/server/config/env.mock'; import { createCspCollector } from './csp_collector'; const createMockKbnServer = () => ({ @@ -27,7 +25,7 @@ const createMockKbnServer = () => ({ setup: { core: { http: { - csp: new CspConfig(createMockEnv()), + csp: new CspConfig(), }, }, }, @@ -38,7 +36,7 @@ describe('csp collector', () => { let kbnServer: ReturnType; function updateCsp(config: Partial) { - kbnServer.newPlatform.setup.core.http.csp = new CspConfig(createMockEnv(), config); + kbnServer.newPlatform.setup.core.http.csp = new CspConfig(config); } beforeEach(() => { diff --git a/src/legacy/core_plugins/kibana/server/lib/csp_usage_collector/csp_collector.ts b/src/legacy/core_plugins/kibana/server/lib/csp_usage_collector/csp_collector.ts index dce4c7fe6fefc7..6622ed4bef478e 100644 --- a/src/legacy/core_plugins/kibana/server/lib/csp_usage_collector/csp_collector.ts +++ b/src/legacy/core_plugins/kibana/server/lib/csp_usage_collector/csp_collector.ts @@ -18,6 +18,7 @@ */ import { Server } from 'hapi'; +import { CspConfig } from '../../../../../../core/server'; import { UsageCollectionSetup } from '../../../../../../plugins/usage_collection/server'; export function createCspCollector(server: Server) { @@ -25,11 +26,7 @@ export function createCspCollector(server: Server) { type: 'csp', isReady: () => true, async fetch() { - const { - strict, - warnLegacyBrowsers, - rulesChangedFromDefault, - } = server.newPlatform.setup.core.http.csp; + const { strict, warnLegacyBrowsers, header } = server.newPlatform.setup.core.http.csp; return { strict, @@ -37,7 +34,7 @@ export function createCspCollector(server: Server) { // It's important that we do not send the value of csp.header here as it // can be customized with values that can be identifiable to given // installs, such as URLs - rulesChangedFromDefault, + rulesChangedFromDefault: header !== CspConfig.DEFAULT.header, }; }, }; diff --git a/src/legacy/server/status/routes/api/register_status.js b/src/legacy/server/status/routes/api/register_status.js index 55bf81f2c5f9a8..259a00667810f8 100644 --- a/src/legacy/server/status/routes/api/register_status.js +++ b/src/legacy/server/status/routes/api/register_status.js @@ -18,7 +18,6 @@ */ import { wrapAuthConfig } from '../../wrap_auth_config'; -import { IS_KIBANA_DISTRIBUTABLE } from '../../../../utils/artifact_type'; const matchSnapshot = /-SNAPSHOT$/; @@ -36,8 +35,6 @@ export function registerStatusApi(kbnServer, server, config) { return { name: config.get('server.name'), uuid: config.get('server.uuid'), - // flag to help tests know that kibana is running from source, not included in distributable response - ...(IS_KIBANA_DISTRIBUTABLE ? {} : { running_from_source: true }), version: { number: config.get('pkg.version').replace(matchSnapshot, ''), build_hash: config.get('pkg.buildSha'), diff --git a/test/api_integration/apis/general/csp.js b/test/api_integration/apis/general/csp.js index 38893c371fb52b..8c191703070d85 100644 --- a/test/api_integration/apis/general/csp.js +++ b/test/api_integration/apis/general/csp.js @@ -21,7 +21,6 @@ import expect from '@kbn/expect'; export default function({ getService }) { const supertest = getService('supertest'); - const kibanaServer = getService('kibanaServer'); describe('csp smoke test', () => { it('app response sends content security policy headers', async () => { @@ -37,12 +36,11 @@ export default function({ getService }) { }) ); - const isDist = await kibanaServer.status.isDistributable(); const entries = Array.from(parsed.entries()); expect(entries).to.eql([ ['script-src', ["'unsafe-eval'", "'self'"]], ['worker-src', ['blob:', "'self'"]], - ['style-src', [...(isDist ? [] : ['blob:']), "'unsafe-inline'", "'self'"]], + ['style-src', ["'unsafe-inline'", "'self'"]], ]); }); }); diff --git a/x-pack/test/oidc_api_integration/apis/implicit_flow/oidc_auth.ts b/x-pack/test/oidc_api_integration/apis/implicit_flow/oidc_auth.ts index 87979ca643a190..1f5a64835416aa 100644 --- a/x-pack/test/oidc_api_integration/apis/implicit_flow/oidc_auth.ts +++ b/x-pack/test/oidc_api_integration/apis/implicit_flow/oidc_auth.ts @@ -15,7 +15,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function({ getService }: FtrProviderContext) { const supertest = getService('supertestWithoutAuth'); const config = getService('config'); - const kibanaServer = getService('kibanaServer'); describe('OpenID Connect Implicit Flow authentication', () => { describe('finishing handshake', () => { @@ -57,17 +56,12 @@ export default function({ getService }: FtrProviderContext) { }); await (dom.window as Record).__isScriptExecuted__; - const isDist = await kibanaServer.status.isDistributable(); // Check that proxy page is returned with proper headers. expect(response.headers['content-type']).to.be('text/html; charset=utf-8'); expect(response.headers['cache-control']).to.be('private, no-cache, no-store'); expect(response.headers['content-security-policy']).to.be( - [ - `script-src 'unsafe-eval' 'self';`, - `worker-src blob: 'self';`, - `style-src ${isDist ? '' : 'blob: '}'unsafe-inline' 'self'`, - ].join(' ') + `script-src 'unsafe-eval' 'self'; worker-src blob: 'self'; style-src 'unsafe-inline' 'self'` ); // Check that script that forwards URL fragment worked correctly. diff --git a/x-pack/test/saml_api_integration/apis/security/saml_login.ts b/x-pack/test/saml_api_integration/apis/security/saml_login.ts index d4de4d601a36c4..0436d59906ea87 100644 --- a/x-pack/test/saml_api_integration/apis/security/saml_login.ts +++ b/x-pack/test/saml_api_integration/apis/security/saml_login.ts @@ -17,7 +17,6 @@ export default function({ getService }: FtrProviderContext) { const randomness = getService('randomness'); const supertest = getService('supertestWithoutAuth'); const config = getService('config'); - const kibanaServer = getService('kibanaServer'); const kibanaServerConfig = config.get('servers.kibana'); @@ -138,17 +137,12 @@ export default function({ getService }: FtrProviderContext) { }); await (dom.window as Record).__isScriptExecuted__; - const isDist = await kibanaServer.status.isDistributable(); // Check that proxy page is returned with proper headers. expect(response.headers['content-type']).to.be('text/html; charset=utf-8'); expect(response.headers['cache-control']).to.be('private, no-cache, no-store'); expect(response.headers['content-security-policy']).to.be( - [ - `script-src 'unsafe-eval' 'self';`, - `worker-src blob: 'self';`, - `style-src ${isDist ? '' : 'blob: '}'unsafe-inline' 'self'`, - ].join(' ') + `script-src 'unsafe-eval' 'self'; worker-src blob: 'self'; style-src 'unsafe-inline' 'self'` ); // Check that script that forwards URL fragment worked correctly. diff --git a/x-pack/test/saml_api_integration/config.ts b/x-pack/test/saml_api_integration/config.ts index 1d83f374e966c6..6ea29b0d9e56e3 100644 --- a/x-pack/test/saml_api_integration/config.ts +++ b/x-pack/test/saml_api_integration/config.ts @@ -20,7 +20,6 @@ export default async function({ readConfigFile }: FtrConfigProviderContext) { testFiles: [require.resolve('./apis')], servers: xPackAPITestsConfig.get('servers'), services: { - kibanaServer: kibanaAPITestsConfig.get('services.kibanaServer'), randomness: kibanaAPITestsConfig.get('services.randomness'), legacyEs: kibanaAPITestsConfig.get('services.legacyEs'), supertestWithoutAuth: xPackAPITestsConfig.get('services.supertestWithoutAuth'), From 2f1628784ab42372b93b8cab320d26c8baa9a9d0 Mon Sep 17 00:00:00 2001 From: Mikhail Shustov Date: Fri, 24 Jan 2020 07:54:06 +0100 Subject: [PATCH 34/72] [NP] add platform main principles (#53866) * add platform main principles * update docs * unify styles * remove guidelines. principles should cover this * Apply suggestions from code review Co-Authored-By: Josh Dover * Apply suggestions from code review Co-Authored-By: Rudolf Meijering * address comments Co-authored-by: Josh Dover Co-authored-by: Rudolf Meijering --- src/core/PRINCIPLES.md | 47 ++++++++++++++++++++++++++++++++++++++++++ src/core/TESTING.md | 5 ----- 2 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 src/core/PRINCIPLES.md diff --git a/src/core/PRINCIPLES.md b/src/core/PRINCIPLES.md new file mode 100644 index 00000000000000..fa832a59a3b12d --- /dev/null +++ b/src/core/PRINCIPLES.md @@ -0,0 +1,47 @@ +## Common dictionary +Plugin - a piece of software expressing specific subject of the business unit within the code. + +Platform - functionality required to run all the Kibana plugins. + +## New platform principles +### Explicit business domains separation +The plugins code should be structured on the top level to reflect business units. +```js +// GOOD +src/plugins + - apm + - server + - public + - search + .. +// BAD +src/plugins + - server + - apm + - search +``` +### Explicit dependencies +Each plugin should declare dependencies on the other plugins explicitly. Plugins cannot have circular dependencies. Plugins shouldn't access runtime objects, HTTP endpoints, DOM nodes, etc. created by a third party plugin without declaring a dependency on this plugin. +```json +"requiredPlugins": ["search"], +"optionalPlugins": ["apm"], +``` +### Explicit API declaration +Each plugin has to define an explicit API. Any other API's that has not been declared explicitly as public should be considered private. HTTP endpoints belonging to other plugins are considered private. Plugins should expose a JavaScript client on top of these HTTP endpoints for other plugins to consume. +```js +// GOOD +deps.plugin.getData(); +// BAD. +`GET /api/plugin/data` +``` +### Encapsulated state +Each plugin encapsulates its internal state. It doesn't rely on any kind of global state. Plugins provide an internal state via explicit API, reflecting the dynamic nature of the state (an event bus, observables, getter/setter functions). A plugin can change other plugin state by calling its public API method. +```js +// GOOD +deps.plugin.getData(); +deps.plugin.data$.subscribe(); +deps.plugin.setAddress('...'); +// BAD. +deps.plugin._data; +deps.plugin.data = '...'; +``` diff --git a/src/core/TESTING.md b/src/core/TESTING.md index 6139820d02a14a..467110b3874b8b 100644 --- a/src/core/TESTING.md +++ b/src/core/TESTING.md @@ -247,8 +247,3 @@ _How to test against specific plugin APIs (eg. data plugin)_ ## Plugin Contracts _How to test your plugin's exposed API_ - -Guidelines: -- Plugins should never interact with other plugins' REST API directly -- Plugins should interact with other plugins via JavaScript contracts -- Exposed contracts need to be well tested to ensure breaking changes are detected easily From 14a559bfc45f48c6104012f6b68d5a793396d574 Mon Sep 17 00:00:00 2001 From: Maryia Lapata Date: Fri, 24 Jan 2020 10:45:46 +0300 Subject: [PATCH 35/72] [Discover] DocViews uses local angular (#55389) * DocViews uses local angular * Clean up * Create embeddableInjector only when it's used * Revert occasional changes * Update unit test Co-authored-by: Elastic Machine --- .../kibana/public/discover/kibana_services.ts | 1 - .../kibana/public/discover/legacy.ts | 7 +-- .../np_ready/doc_views/doc_views_helpers.tsx | 23 +++++---- .../np_ready/doc_views/doc_views_registry.ts | 7 +-- .../np_ready/doc_views/doc_views_types.ts | 2 - .../embeddable/search_embeddable_factory.ts | 12 +++-- .../kibana/public/discover/plugin.ts | 48 ++++++++++++------- 7 files changed, 54 insertions(+), 46 deletions(-) diff --git a/src/legacy/core_plugins/kibana/public/discover/kibana_services.ts b/src/legacy/core_plugins/kibana/public/discover/kibana_services.ts index d2eefba2cecdd9..eb39bdd3ad84b1 100644 --- a/src/legacy/core_plugins/kibana/public/discover/kibana_services.ts +++ b/src/legacy/core_plugins/kibana/public/discover/kibana_services.ts @@ -99,6 +99,5 @@ export { } from '../../../../../plugins/data/public'; export { ElasticSearchHit } from './np_ready/doc_views/doc_views_types'; export { Adapters } from 'ui/inspector/types'; -export { Chrome, IInjector } from 'ui/chrome'; export { registerTimefilterWithGlobalStateFactory } from 'ui/timefilter/setup_router'; export { FieldName } from 'ui/directives/field_name/field_name'; diff --git a/src/legacy/core_plugins/kibana/public/discover/legacy.ts b/src/legacy/core_plugins/kibana/public/discover/legacy.ts index 2ec64177156f9e..ff44fbbe115d50 100644 --- a/src/legacy/core_plugins/kibana/public/discover/legacy.ts +++ b/src/legacy/core_plugins/kibana/public/discover/legacy.ts @@ -16,17 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -import chrome from 'ui/chrome'; + import { PluginInitializerContext } from 'kibana/public'; import { npSetup, npStart } from 'ui/new_platform'; import { plugin } from './index'; -// Legacy compatiblity part - to be removed at cutover, replaced by a kibana.json file +// Legacy compatibility part - to be removed at cutover, replaced by a kibana.json file export const pluginInstance = plugin({} as PluginInitializerContext); export const setup = pluginInstance.setup(npSetup.core, { ...npSetup.plugins, - __LEGACY: { - chrome, - }, }); export const start = pluginInstance.start(npStart.core, npStart.plugins); diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/doc_views/doc_views_helpers.tsx b/src/legacy/core_plugins/kibana/public/discover/np_ready/doc_views/doc_views_helpers.tsx index fb4f0c6056a832..b9932da0523f8f 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/doc_views/doc_views_helpers.tsx +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/doc_views/doc_views_helpers.tsx @@ -16,17 +16,13 @@ * specific language governing permissions and limitations * under the License. */ + +import { auto, IController } from 'angular'; import React from 'react'; import { render } from 'react-dom'; import angular, { ICompileService } from 'angular'; -import { - DocViewRenderProps, - AngularScope, - AngularController, - AngularDirective, -} from './doc_views_types'; +import { DocViewRenderProps, AngularScope, AngularDirective } from './doc_views_types'; import { DocViewerError } from '../components/doc_viewer/doc_viewer_render_error'; -import { Chrome } from '../../kibana_services'; /** * Compiles and injects the give angular template into the given dom node @@ -36,10 +32,10 @@ export async function injectAngularElement( domNode: Element, template: string, scopeProps: DocViewRenderProps, - Controller: AngularController, - chrome: Chrome + Controller: IController, + getInjector: () => Promise ): Promise<() => void> { - const $injector = await chrome.dangerouslyGetActiveInjector(); + const $injector = await getInjector(); const rootScope: AngularScope = $injector.get('$rootScope'); const $compile: ICompileService = $injector.get('$compile'); const newScope = Object.assign(rootScope.$new(), scopeProps); @@ -69,7 +65,10 @@ export async function injectAngularElement( * Converts a given legacy angular directive to a render function * for usage in a react component. Note that the rendering is async */ -export function convertDirectiveToRenderFn(directive: AngularDirective, chrome: Chrome) { +export function convertDirectiveToRenderFn( + directive: AngularDirective, + getInjector: () => Promise +) { return (domNode: Element, props: DocViewRenderProps) => { let rejected = false; @@ -78,7 +77,7 @@ export function convertDirectiveToRenderFn(directive: AngularDirective, chrome: directive.template, props, directive.controller, - chrome + getInjector ); cleanupFnPromise.catch(e => { rejected = true; diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/doc_views/doc_views_registry.ts b/src/legacy/core_plugins/kibana/public/discover/np_ready/doc_views/doc_views_registry.ts index 1952ec3af2f6cd..91acf1c7ac4aef 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/doc_views/doc_views_registry.ts +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/doc_views/doc_views_registry.ts @@ -16,14 +16,15 @@ * specific language governing permissions and limitations * under the License. */ + +import { auto } from 'angular'; import { convertDirectiveToRenderFn } from './doc_views_helpers'; import { DocView, DocViewInput, ElasticSearchHit, DocViewInputFn } from './doc_views_types'; -import { Chrome } from '../../kibana_services'; export class DocViewsRegistry { private docViews: DocView[] = []; - constructor(private legacyChrome: Chrome) {} + constructor(private getInjector: () => Promise) {} /** * Extends and adds the given doc view to the registry array @@ -32,7 +33,7 @@ export class DocViewsRegistry { const docView = typeof docViewRaw === 'function' ? docViewRaw() : docViewRaw; if (docView.directive) { // convert angular directive to render function for backwards compatibility - docView.render = convertDirectiveToRenderFn(docView.directive, this.legacyChrome); + docView.render = convertDirectiveToRenderFn(docView.directive, this.getInjector); } if (typeof docView.shouldShow !== 'function') { docView.shouldShow = () => true; diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/doc_views/doc_views_types.ts b/src/legacy/core_plugins/kibana/public/discover/np_ready/doc_views/doc_views_types.ts index 92e18e7ea7b888..a7828f9f0e7ed1 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/doc_views/doc_views_types.ts +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/doc_views/doc_views_types.ts @@ -27,8 +27,6 @@ export interface AngularDirective { export type AngularScope = IScope; -export type AngularController = (scope: AngularScope) => void; - export type ElasticSearchHit = Record>; export interface FieldMapping { diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/embeddable/search_embeddable_factory.ts b/src/legacy/core_plugins/kibana/public/discover/np_ready/embeddable/search_embeddable_factory.ts index 3226b3af93cee6..842ef2bf9c825e 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/embeddable/search_embeddable_factory.ts +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/embeddable/search_embeddable_factory.ts @@ -16,9 +16,11 @@ * specific language governing permissions and limitations * under the License. */ + +import { auto } from 'angular'; import { i18n } from '@kbn/i18n'; import { TExecuteTriggerActions } from 'src/plugins/ui_actions/public'; -import { getServices, IInjector } from '../../kibana_services'; +import { getServices } from '../../kibana_services'; import { EmbeddableFactory, ErrorEmbeddable, @@ -36,13 +38,13 @@ export class SearchEmbeddableFactory extends EmbeddableFactory< SearchEmbeddable > { public readonly type = SEARCH_EMBEDDABLE_TYPE; - private $injector: IInjector | null; - private getInjector: () => Promise | null; + private $injector: auto.IInjectorService | null; + private getInjector: () => Promise | null; public isEditable: () => boolean; constructor( private readonly executeTriggerActions: TExecuteTriggerActions, - getInjector: () => Promise, + getInjector: () => Promise, isEditable: () => boolean ) { super({ @@ -77,7 +79,7 @@ export class SearchEmbeddableFactory extends EmbeddableFactory< if (!this.$injector) { this.$injector = await this.getInjector(); } - const $injector = this.$injector as IInjector; + const $injector = this.$injector as auto.IInjectorService; const $compile = $injector.get('$compile'); const $rootScope = $injector.get('$rootScope'); diff --git a/src/legacy/core_plugins/kibana/public/discover/plugin.ts b/src/legacy/core_plugins/kibana/public/discover/plugin.ts index 8f1eb7ef755597..0897f62574e935 100644 --- a/src/legacy/core_plugins/kibana/public/discover/plugin.ts +++ b/src/legacy/core_plugins/kibana/public/discover/plugin.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; import { AppMountParameters, CoreSetup, CoreStart, Plugin } from 'kibana/public'; -import angular from 'angular'; +import angular, { auto } from 'angular'; import { IUiActionsSetup, IUiActionsStart } from 'src/plugins/ui_actions/public'; import { DataPublicPluginStart } from 'src/plugins/data/public'; import { registerFeature } from './np_ready/register_feature'; import './kibana_services'; import { IEmbeddableStart, IEmbeddableSetup } from '../../../../../plugins/embeddable/public'; import { getInnerAngularModule, getInnerAngularModuleEmbeddable } from './get_inner_angular'; -import { Chrome, setAngularModule, setServices } from './kibana_services'; +import { setAngularModule, setServices } from './kibana_services'; import { NavigationPublicPluginStart as NavigationStart } from '../../../../../plugins/navigation/public'; import { EuiUtilsStart } from '../../../../../plugins/eui_utils/public'; import { buildServices } from './build_services'; @@ -50,9 +50,6 @@ export interface DiscoverSetupPlugins { uiActions: IUiActionsSetup; embeddable: IEmbeddableSetup; kibana_legacy: KibanaLegacySetup; - __LEGACY: { - chrome: Chrome; - }; home: HomePublicPluginSetup; } export interface DiscoverStartPlugins { @@ -76,15 +73,18 @@ export class DiscoverPlugin implements Plugin { private servicesInitialized: boolean = false; private innerAngularInitialized: boolean = false; private docViewsRegistry: DocViewsRegistry | null = null; + private embeddableInjector: auto.IInjectorService | null = null; + private getEmbeddableInjector: (() => Promise) | null = null; /** * why are those functions public? they are needed for some mocha tests * can be removed once all is Jest */ public initializeInnerAngular?: () => void; - public initializeServices?: () => void; + public initializeServices?: () => Promise<{ core: CoreStart; plugins: DiscoverStartPlugins }>; setup(core: CoreSetup, plugins: DiscoverSetupPlugins): DiscoverSetup { - this.docViewsRegistry = new DocViewsRegistry(plugins.__LEGACY.chrome); + this.getEmbeddableInjector = this.getInjector.bind(this); + this.docViewsRegistry = new DocViewsRegistry(this.getEmbeddableInjector); this.docViewsRegistry.addDocView({ title: i18n.translate('kbn.discover.docViews.table.tableTitle', { defaultMessage: 'Table', @@ -113,6 +113,7 @@ export class DiscoverPlugin implements Plugin { } await this.initializeServices(); await this.initializeInnerAngular(); + const { renderApp } = await import('./np_ready/application'); return renderApp(innerAngularName, params.element); }, @@ -141,11 +142,13 @@ export class DiscoverPlugin implements Plugin { this.initializeServices = async () => { if (this.servicesInitialized) { - return; + return { core, plugins }; } const services = await buildServices(core, plugins, this.docViewsRegistry!); setServices(services); this.servicesInitialized = true; + + return { core, plugins }; }; this.registerEmbeddable(core, plugins); @@ -156,22 +159,31 @@ export class DiscoverPlugin implements Plugin { */ private async registerEmbeddable(core: CoreStart, plugins: DiscoverStartPlugins) { const { SearchEmbeddableFactory } = await import('./np_ready/embeddable'); - const getInjector = async () => { - if (!this.initializeServices) { - throw Error('Discover plugin registerEmbeddable: initializeServices is undefined'); - } - await this.initializeServices(); - getInnerAngularModuleEmbeddable(embeddableAngularName, core, plugins); - const mountpoint = document.createElement('div'); - return angular.bootstrap(mountpoint, [embeddableAngularName]); - }; const isEditable = () => core.application.capabilities.discover.save as boolean; + if (!this.getEmbeddableInjector) { + throw Error('Discover plugin method getEmbeddableInjector is undefined'); + } + const factory = new SearchEmbeddableFactory( plugins.uiActions.executeTriggerActions, - getInjector, + this.getEmbeddableInjector, isEditable ); plugins.embeddable.registerEmbeddableFactory(factory.type, factory); } + + private async getInjector() { + if (!this.embeddableInjector) { + if (!this.initializeServices) { + throw Error('Discover plugin getEmbeddableInjector: initializeServices is undefined'); + } + const { core, plugins } = await this.initializeServices(); + getInnerAngularModuleEmbeddable(embeddableAngularName, core, plugins); + const mountpoint = document.createElement('div'); + this.embeddableInjector = angular.bootstrap(mountpoint, [embeddableAngularName]); + } + + return this.embeddableInjector; + } } From d25d1bd84e6db02ddc6059a00e5a04b027edf719 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Fri, 24 Jan 2020 09:13:17 +0100 Subject: [PATCH 36/72] [Uptime] Clean Url to remove undefined/empty query params (#55386) * fix usage of useParams * update code * update defaults * update snaps --- .../common/constants/client_defaults.ts | 15 ++++++-- .../common/constants/context_defaults.ts | 16 --------- .../most_recent_error.test.tsx.snap | 2 +- .../monitor_list_drawer/most_recent_error.tsx | 2 +- .../contexts/uptime_settings_context.tsx | 12 ++++--- .../stringify_url_params.test.ts.snap | 2 ++ .../__tests__/stringify_url_params.test.ts | 22 ++++++++++++ .../public/lib/helper/stringify_url_params.ts | 36 +++++++++++++++++-- .../plugins/uptime/public/pages/overview.tsx | 7 +--- .../uptime/public/pages/page_header.tsx | 8 +++-- .../legacy/plugins/uptime/public/routes.tsx | 2 +- 11 files changed, 88 insertions(+), 36 deletions(-) diff --git a/x-pack/legacy/plugins/uptime/common/constants/client_defaults.ts b/x-pack/legacy/plugins/uptime/common/constants/client_defaults.ts index e991e0c6b82e11..d8a3ef8d7cbbb1 100644 --- a/x-pack/legacy/plugins/uptime/common/constants/client_defaults.ts +++ b/x-pack/legacy/plugins/uptime/common/constants/client_defaults.ts @@ -8,17 +8,28 @@ export const CLIENT_DEFAULTS = { ABSOLUTE_DATE_RANGE_START: 0, // 15 minutes ABSOLUTE_DATE_RANGE_END: 1000 * 60 * 15, - // 60 seconds + /** + * The application auto refreshes every 60s by default. + */ AUTOREFRESH_INTERVAL: 60 * 1000, - // polling defaults to "on" + /** + * The application's autorefresh feature is enabled. + */ AUTOREFRESH_IS_PAUSED: false, + COMMONLY_USED_DATE_RANGES: [ { start: 'now/d', end: 'now', label: 'Today' }, { start: 'now/w', end: 'now', label: 'Week to date' }, { start: 'now/M', end: 'now', label: 'Month to date' }, { start: 'now/y', end: 'now', label: 'Year to date' }, ], + /** + * The beginning of the default date range is 15m ago. + */ DATE_RANGE_START: 'now-15m', + /** + * The end of the default date range is now. + */ DATE_RANGE_END: 'now', FILTERS: '', MONITOR_LIST_PAGE_INDEX: 0, diff --git a/x-pack/legacy/plugins/uptime/common/constants/context_defaults.ts b/x-pack/legacy/plugins/uptime/common/constants/context_defaults.ts index 4c32769d73e847..e0f0333bb8cfd8 100644 --- a/x-pack/legacy/plugins/uptime/common/constants/context_defaults.ts +++ b/x-pack/legacy/plugins/uptime/common/constants/context_defaults.ts @@ -10,26 +10,10 @@ import { SortOrder, CursorDirection } from '../graphql/types'; * The Uptime UI utilizes a settings context, the defaults for which are stored here. */ export const CONTEXT_DEFAULTS = { - /** - * The application's autorefresh feature is enabled. - */ - AUTOREFRESH_IS_PAUSED: true, - /** - * The application autorefreshes every 10s by default. - */ - AUTOREFRESH_INTERVAL: 10000, /** * The application cannot assume a basepath. */ BASE_PATH: '', - /** - * The beginning of the default date range is 15m ago. - */ - DATE_RANGE_START: 'now-15m', - /** - * The end of the default date range is now. - */ - DATE_RANGE_END: 'now', CURSOR_PAGINATION: { cursorDirection: CursorDirection.AFTER, diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/__snapshots__/most_recent_error.test.tsx.snap b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/__snapshots__/most_recent_error.test.tsx.snap index 389afa27fd21fe..0a280ac6b24b8c 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/__snapshots__/most_recent_error.test.tsx.snap +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/__snapshots__/most_recent_error.test.tsx.snap @@ -21,7 +21,7 @@ Array [ > Get https://expired.badssl.com: x509: certificate has expired or is not yet valid diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/most_recent_error.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/most_recent_error.tsx index c2df9253ec8dcf..036882b49359f4 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/most_recent_error.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/most_recent_error.tsx @@ -33,7 +33,7 @@ export const MostRecentError = ({ error, monitorId, timestamp }: MostRecentError const [getUrlParams] = useUrlParams(); const { absoluteDateRangeStart, absoluteDateRangeEnd, ...params } = getUrlParams(); params.selectedPingStatus = 'down'; - const linkParameters = stringifyUrlParams(params); + const linkParameters = stringifyUrlParams(params, true); const timestampStr = timestamp ? moment(new Date(timestamp).valueOf()).fromNow() : ''; diff --git a/x-pack/legacy/plugins/uptime/public/contexts/uptime_settings_context.tsx b/x-pack/legacy/plugins/uptime/public/contexts/uptime_settings_context.tsx index 4b3abb46ac1e4a..9f508497035620 100644 --- a/x-pack/legacy/plugins/uptime/public/contexts/uptime_settings_context.tsx +++ b/x-pack/legacy/plugins/uptime/public/contexts/uptime_settings_context.tsx @@ -5,10 +5,10 @@ */ import React, { createContext, useMemo } from 'react'; -import { useParams } from 'react-router-dom'; import { UptimeAppProps } from '../uptime_app'; -import { CONTEXT_DEFAULTS } from '../../common/constants'; +import { CLIENT_DEFAULTS, CONTEXT_DEFAULTS } from '../../common/constants'; import { CommonlyUsedRange } from '../components/functional/uptime_date_picker'; +import { useUrlParams } from '../hooks'; export interface UptimeSettingsContextValues { basePath: string; @@ -20,7 +20,9 @@ export interface UptimeSettingsContextValues { commonlyUsedRanges?: CommonlyUsedRange[]; } -const { BASE_PATH, DATE_RANGE_START, DATE_RANGE_END } = CONTEXT_DEFAULTS; +const { BASE_PATH } = CONTEXT_DEFAULTS; + +const { DATE_RANGE_START, DATE_RANGE_END } = CLIENT_DEFAULTS; /** * These are default values for the context. These defaults are typically @@ -39,7 +41,9 @@ export const UptimeSettingsContext = createContext(defaultContext); export const UptimeSettingsContextProvider: React.FC = ({ children, ...props }) => { const { basePath, isApmAvailable, isInfraAvailable, isLogsAvailable, commonlyUsedRanges } = props; - const { dateRangeStart, dateRangeEnd } = useParams(); + const [getUrlParams] = useUrlParams(); + + const { dateRangeStart, dateRangeEnd } = getUrlParams(); const value = useMemo(() => { return { diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/__snapshots__/stringify_url_params.test.ts.snap b/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/__snapshots__/stringify_url_params.test.ts.snap index 57add60bebe9ad..31f5ceff7d0463 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/__snapshots__/stringify_url_params.test.ts.snap +++ b/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/__snapshots__/stringify_url_params.test.ts.snap @@ -1,3 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`stringifyUrlParams creates expected string value 1`] = `"?autorefreshInterval=50000&autorefreshIsPaused=false&dateRangeStart=now-15m&dateRangeEnd=now&filters=monitor.id%3A%20bar&search=monitor.id%3A%20foo&selectedPingStatus=down&statusFilter=up"`; + +exports[`stringifyUrlParams creates expected string value when ignore empty is true 1`] = `"?autorefreshInterval=50000&filters=monitor.id%3A%20bar"`; diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/stringify_url_params.test.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/stringify_url_params.test.ts index 4c999680fa53e2..a2f9b29c4ff584 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/stringify_url_params.test.ts +++ b/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/stringify_url_params.test.ts @@ -20,4 +20,26 @@ describe('stringifyUrlParams', () => { }); expect(result).toMatchSnapshot(); }); + + it('creates expected string value when ignore empty is true', () => { + const result = stringifyUrlParams( + { + autorefreshInterval: 50000, + autorefreshIsPaused: false, + dateRangeStart: 'now-15m', + dateRangeEnd: 'now', + filters: 'monitor.id: bar', + search: undefined, + selectedPingStatus: undefined, + statusFilter: '', + pagination: undefined, + }, + true + ); + expect(result).toMatchSnapshot(); + + expect(result.includes('pagination')).toBeFalsy(); + expect(result.includes('search')).toBeFalsy(); + expect(result.includes('selectedPingStatus')).toBeFalsy(); + }); }); diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/stringify_url_params.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/stringify_url_params.ts index f1e90691267086..7d00a27d69032d 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/helper/stringify_url_params.ts +++ b/x-pack/legacy/plugins/uptime/public/lib/helper/stringify_url_params.ts @@ -5,6 +5,38 @@ */ import qs from 'querystring'; -import { UptimeUrlParams } from './url_params/get_supported_url_params'; +import { UptimeUrlParams } from './url_params'; +import { CLIENT_DEFAULTS } from '../../../common/constants'; -export const stringifyUrlParams = (params: Partial) => `?${qs.stringify(params)}`; +const { + AUTOREFRESH_INTERVAL, + AUTOREFRESH_IS_PAUSED, + DATE_RANGE_START, + DATE_RANGE_END, +} = CLIENT_DEFAULTS; + +export const stringifyUrlParams = (params: Partial, ignoreEmpty = false) => { + if (ignoreEmpty) { + Object.keys(params).forEach((key: string) => { + // @ts-ignore + const val = params[key]; + if (val == null || val === '') { + // @ts-ignore + delete params[key]; + } + if (key === 'dateRangeStart' && val === DATE_RANGE_START) { + delete params[key]; + } + if (key === 'dateRangeEnd' && val === DATE_RANGE_END) { + delete params[key]; + } + if (key === 'autorefreshIsPaused' && val === AUTOREFRESH_IS_PAUSED) { + delete params[key]; + } + if (key === 'autorefreshInterval' && val === AUTOREFRESH_INTERVAL) { + delete params[key]; + } + }); + } + return `?${qs.stringify(params)}`; +}; diff --git a/x-pack/legacy/plugins/uptime/public/pages/overview.tsx b/x-pack/legacy/plugins/uptime/public/pages/overview.tsx index 1c14d971120be0..36abee673b6829 100644 --- a/x-pack/legacy/plugins/uptime/public/pages/overview.tsx +++ b/x-pack/legacy/plugins/uptime/public/pages/overview.tsx @@ -33,11 +33,6 @@ interface OverviewPageProps { type Props = OverviewPageProps; -export type UptimeSearchBarQueryChangeHandler = (queryChangedEvent: { - query?: { text: string }; - queryText?: string; -}) => void; - const EuiFlexItemStyled = styled(EuiFlexItem)` && { min-width: 598px; @@ -109,7 +104,7 @@ export const OverviewPage = ({ autocomplete, setBreadcrumbs }: Props) => { statusFilter, }; - const linkParameters = stringifyUrlParams(params); + const linkParameters = stringifyUrlParams(params, true); return ( diff --git a/x-pack/legacy/plugins/uptime/public/pages/page_header.tsx b/x-pack/legacy/plugins/uptime/public/pages/page_header.tsx index d341a22bc583b3..e8705a2eb8eb32 100644 --- a/x-pack/legacy/plugins/uptime/public/pages/page_header.tsx +++ b/x-pack/legacy/plugins/uptime/public/pages/page_header.tsx @@ -7,7 +7,7 @@ import { EuiTitle, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; -import { useRouteMatch, useParams } from 'react-router-dom'; +import { useRouteMatch } from 'react-router-dom'; import { i18n } from '@kbn/i18n'; import { UptimeDatePicker } from '../components/functional/uptime_date_picker'; import { AppState } from '../state'; @@ -17,6 +17,7 @@ import { stringifyUrlParams } from '../lib/helper/stringify_url_params'; import { getTitle } from '../lib/helper/get_title'; import { UMUpdateBreadcrumbs } from '../lib/lib'; import { MONITOR_ROUTE } from '../routes'; +import { useUrlParams } from '../hooks'; interface PageHeaderProps { monitorStatus?: any; @@ -28,7 +29,8 @@ export const PageHeaderComponent = ({ monitorStatus, setBreadcrumbs }: PageHeade path: MONITOR_ROUTE, }); - const { absoluteDateRangeStart, absoluteDateRangeEnd, ...params } = useParams(); + const [getUrlParams] = useUrlParams(); + const { absoluteDateRangeStart, absoluteDateRangeEnd, ...params } = getUrlParams(); const headingText = i18n.translate('xpack.uptime.overviewPage.headerText', { defaultMessage: 'Overview', @@ -52,7 +54,7 @@ export const PageHeaderComponent = ({ monitorStatus, setBreadcrumbs }: PageHeade useEffect(() => { if (monitorPage) { if (headerText) { - setBreadcrumbs(getMonitorPageBreadcrumb(headerText, stringifyUrlParams(params))); + setBreadcrumbs(getMonitorPageBreadcrumb(headerText, stringifyUrlParams(params, true))); } } else { setBreadcrumbs(getOverviewPageBreadcrumbs()); diff --git a/x-pack/legacy/plugins/uptime/public/routes.tsx b/x-pack/legacy/plugins/uptime/public/routes.tsx index 028f2d5958325a..07bba5163922e6 100644 --- a/x-pack/legacy/plugins/uptime/public/routes.tsx +++ b/x-pack/legacy/plugins/uptime/public/routes.tsx @@ -10,7 +10,7 @@ import { MonitorPage, OverviewPage, NotFoundPage } from './pages'; import { DataPublicPluginStart } from '../../../../../src/plugins/data/public'; import { UMUpdateBreadcrumbs } from './lib/lib'; -export const MONITOR_ROUTE = '/monitor/:monitorId/:location?'; +export const MONITOR_ROUTE = '/monitor/:monitorId?'; export const OVERVIEW_ROUTE = '/'; interface RouterProps { From d3151327de1b637991aecdc0bd6b214b677d8b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loix?= Date: Fri, 24 Jan 2020 14:52:46 +0530 Subject: [PATCH 37/72] Fix text highlight in search result (#55695) --- .../app/components/mappings_editor/lib/search_fields.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/search_fields.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/search_fields.tsx index 807bf233b0da0a..5a277073c5f1a3 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/search_fields.tsx +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/lib/search_fields.tsx @@ -125,6 +125,7 @@ const getJSXdisplayFromMeta = ( const charIndex = path.lastIndexOf(stringMatch!); const startString = path.substr(0, charIndex); const endString = path.substr(charIndex + stringMatch!.length); + display = ( {startString} @@ -164,7 +165,7 @@ const getSearchMetadata = (searchData: SearchData, fieldData: FieldData): Search .sort((a, b) => b![0].length - a![0].length); if (arrayMatch.length) { - stringMatch = arrayMatch[0]![0].toLowerCase(); + stringMatch = arrayMatch[0]![0]; } } @@ -244,7 +245,7 @@ export const searchFields = (term: string, fields: NormalizedFields['byId']): Se field, metadata: getSearchMetadata(searchData, { name: field.source.name, - path: field.path.join(' > ').toLowerCase(), + path: field.path.join(' > '), type: field.source.type, }), })) From d40269c748bbfc793c08c0a74dd1b404a689f96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez?= Date: Fri, 24 Jan 2020 11:16:11 +0100 Subject: [PATCH 38/72] Fix the scale of the search markers (#55731) The search markers where placed on the minimap using a different scale than the density chart and time ruler. That made the log stream jump to unexpected time positions when the user clicked on a search marker. This also fixes an problem where the search markers didn't move alongside the rest of the minimap when the user dragged and dropped it. --- .../logging/log_minimap/log_minimap.tsx | 19 +++++++++---------- .../logging/log_minimap/search_markers.tsx | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/x-pack/legacy/plugins/infra/public/components/logging/log_minimap/log_minimap.tsx b/x-pack/legacy/plugins/infra/public/components/logging/log_minimap/log_minimap.tsx index ad47d17fe3db9c..75d8c5a47d32dd 100644 --- a/x-pack/legacy/plugins/infra/public/components/logging/log_minimap/log_minimap.tsx +++ b/x-pack/legacy/plugins/infra/public/components/logging/log_minimap/log_minimap.tsx @@ -215,6 +215,15 @@ export class LogMinimap extends React.Component + + {highlightedInterval ? ( ) : null} - - - { .range([0, height]); return ( - + {buckets.map(bucket => ( Date: Fri, 24 Jan 2020 11:22:31 +0100 Subject: [PATCH 39/72] [ML] Singel Metric Viewer: Fix full refresh check. (#55726) Fixes the check whether to do a full refresh of the page or not. lastRefresh was mistakenly part of the check. This fixes keeping the flyout open for rules editing. --- .../application/timeseriesexplorer/timeseriesexplorer.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js b/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js index 02cb2e3f4e25a5..44b9fbc71f71ae 100644 --- a/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js +++ b/x-pack/legacy/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js @@ -965,16 +965,15 @@ export class TimeSeriesExplorer extends React.Component { !isEqual(previousProps.lastRefresh, this.props.lastRefresh) || !isEqual(previousProps.selectedDetectorIndex, this.props.selectedDetectorIndex) || !isEqual(previousProps.selectedEntities, this.props.selectedEntities) || - !isEqual(previousProps.selectedForecastId, this.props.selectedForecastId) || + previousProps.selectedForecastId !== this.props.selectedForecastId || previousProps.selectedJobId !== this.props.selectedJobId ) { const fullRefresh = previousProps === undefined || !isEqual(previousProps.bounds, this.props.bounds) || - !isEqual(previousProps.lastRefresh, this.props.lastRefresh) || !isEqual(previousProps.selectedDetectorIndex, this.props.selectedDetectorIndex) || !isEqual(previousProps.selectedEntities, this.props.selectedEntities) || - !isEqual(previousProps.selectedForecastId, this.props.selectedForecastId) || + previousProps.selectedForecastId !== this.props.selectedForecastId || previousProps.selectedJobId !== this.props.selectedJobId; this.loadSingleMetricData(fullRefresh); } From fee22e8d94177202b84bb1225133de36f0903049 Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Fri, 24 Jan 2020 11:25:55 +0100 Subject: [PATCH 40/72] [ML] Anomaly Explorer: Fix view by selection when filter is active. (#55717) Fixes the view-by selection when a KQL filter gets active and restores previous behavior: - If the filter includes AND view-by switches to Job ID. - Otherwise the view-by selection switches to the first available option present in the KQL filter - Additionally, the view-by dropdown options get filtered down to the options present in the KQL filter --- .../explorer_reducer/set_influencer_filter_settings.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/x-pack/legacy/plugins/ml/public/application/explorer/reducers/explorer_reducer/set_influencer_filter_settings.ts b/x-pack/legacy/plugins/ml/public/application/explorer/reducers/explorer_reducer/set_influencer_filter_settings.ts index 8d083a396582aa..0d84179c572d2b 100644 --- a/x-pack/legacy/plugins/ml/public/application/explorer/reducers/explorer_reducer/set_influencer_filter_settings.ts +++ b/x-pack/legacy/plugins/ml/public/application/explorer/reducers/explorer_reducer/set_influencer_filter_settings.ts @@ -23,17 +23,20 @@ export function setInfluencerFilterSettings( const { selectedCells, viewBySwimlaneOptions } = state; let selectedViewByFieldName = state.viewBySwimlaneFieldName; + const filteredViewBySwimlaneOptions = viewBySwimlaneOptions.filter(d => + filteredFields.includes(d) + ); // if it's an AND filter set view by swimlane to job ID as the others will have no results - if (isAndOperator && selectedCells === null) { + if (isAndOperator && selectedCells === undefined) { selectedViewByFieldName = VIEW_BY_JOB_LABEL; } else { // Set View by dropdown to first relevant fieldName based on incoming filter if there's no cell selection already // or if selected cell is from overall swimlane as this won't include an additional influencer filter for (let i = 0; i < filteredFields.length; i++) { if ( - viewBySwimlaneOptions.includes(filteredFields[i]) && - (selectedCells === null || (selectedCells && selectedCells.type === 'overall')) + filteredViewBySwimlaneOptions.includes(filteredFields[i]) && + (selectedCells === undefined || (selectedCells && selectedCells.type === 'overall')) ) { selectedViewByFieldName = filteredFields[i]; break; @@ -53,5 +56,6 @@ export function setInfluencerFilterSettings( selectedViewByFieldName === VIEW_BY_JOB_LABEL || filteredFields.includes(selectedViewByFieldName) === false, viewBySwimlaneFieldName: selectedViewByFieldName, + viewBySwimlaneOptions: filteredViewBySwimlaneOptions, }; } From 43a7aa7fc0769cf109cf2282f9a214dd758da749 Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Fri, 24 Jan 2020 12:26:25 +0100 Subject: [PATCH 41/72] [Console] Remove z-index from editor panes and move it to the resizer (#55813) * Remove z-index from editor panes and move it to the resizer * Update comment --- .../console/public/np_ready/application/styles/_app.scss | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/legacy/core_plugins/console/public/np_ready/application/styles/_app.scss b/src/legacy/core_plugins/console/public/np_ready/application/styles/_app.scss index b89a43f7455a54..3b6297f9cdbff7 100644 --- a/src/legacy/core_plugins/console/public/np_ready/application/styles/_app.scss +++ b/src/legacy/core_plugins/console/public/np_ready/application/styles/_app.scss @@ -27,9 +27,6 @@ // Required on IE11 to render ace editor correctly after first input. position: relative; - // Give the aria selection border priority when the divider is selected - z-index: 0; - &__spinner { width: 100%; } @@ -38,8 +35,6 @@ .conApp__output { display: flex; flex: 1 1 1px; - // Give the aria selection border priority when the divider is selected - z-index: -1; } .conApp__textAreaLabelHack, @@ -76,6 +71,8 @@ .conApp__resizer { @include kbnResizer; + // Give the aria selection border priority when the divider is selected on IE11 and Chrome + z-index: $euiZLevel1; } // SASSTODO: This component seems to not be used anymore? From 6984cf1711371d86b1ad8d7abcafc751a105743c Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Fri, 24 Jan 2020 13:10:59 +0100 Subject: [PATCH 42/72] Move SplitPanel to kibana_react (#55529) * split_panel component -> kibana_react * Update useEffect for console warning * `console` -> `kibana-react` i18n namespace * Update when warning about children is emitted in split panel component Co-authored-by: Elastic Machine --- .../np_ready/application/components/index.ts | 1 - .../application/containers/editor/editor.tsx | 2 +- .../vis/editors/default/default_editor.tsx | 5 +---- src/plugins/kibana_react/public/index.ts | 1 + .../__snapshots__/split_panel.test.tsx.snap | 0 .../public}/split_panel/components/resizer.tsx | 2 +- .../public}/split_panel/containers/panel.tsx | 0 .../split_panel/containers/panel_container.tsx | 17 +++++++++++++++-- .../public}/split_panel/context.tsx | 0 .../kibana_react/public}/split_panel/index.ts | 0 .../public}/split_panel/registry.ts | 4 ---- .../public}/split_panel/split_panel.test.tsx | 0 12 files changed, 19 insertions(+), 13 deletions(-) rename src/{legacy/core_plugins/console/public/np_ready/application/components => plugins/kibana_react/public}/split_panel/__snapshots__/split_panel.test.tsx.snap (100%) rename src/{legacy/core_plugins/console/public/np_ready/application/components => plugins/kibana_react/public}/split_panel/components/resizer.tsx (94%) rename src/{legacy/core_plugins/console/public/np_ready/application/components => plugins/kibana_react/public}/split_panel/containers/panel.tsx (100%) rename src/{legacy/core_plugins/console/public/np_ready/application/components => plugins/kibana_react/public}/split_panel/containers/panel_container.tsx (89%) rename src/{legacy/core_plugins/console/public/np_ready/application/components => plugins/kibana_react/public}/split_panel/context.tsx (100%) rename src/{legacy/core_plugins/console/public/np_ready/application/components => plugins/kibana_react/public}/split_panel/index.ts (100%) rename src/{legacy/core_plugins/console/public/np_ready/application/components => plugins/kibana_react/public}/split_panel/registry.ts (92%) rename src/{legacy/core_plugins/console/public/np_ready/application/components => plugins/kibana_react/public}/split_panel/split_panel.test.tsx (100%) diff --git a/src/legacy/core_plugins/console/public/np_ready/application/components/index.ts b/src/legacy/core_plugins/console/public/np_ready/application/components/index.ts index 4669e210e7c2d8..eccde899a2640c 100644 --- a/src/legacy/core_plugins/console/public/np_ready/application/components/index.ts +++ b/src/legacy/core_plugins/console/public/np_ready/application/components/index.ts @@ -17,7 +17,6 @@ * under the License. */ -export * from './split_panel'; export { SomethingWentWrongCallout } from './something_went_wrong_callout'; export { TopNavMenuItem, TopNavMenu } from './top_nav_menu'; export { ConsoleMenu } from './console_menu'; diff --git a/src/legacy/core_plugins/console/public/np_ready/application/containers/editor/editor.tsx b/src/legacy/core_plugins/console/public/np_ready/application/containers/editor/editor.tsx index 7be1382760eb91..b42d791e5acd8e 100644 --- a/src/legacy/core_plugins/console/public/np_ready/application/containers/editor/editor.tsx +++ b/src/legacy/core_plugins/console/public/np_ready/application/containers/editor/editor.tsx @@ -21,7 +21,7 @@ import React, { useCallback } from 'react'; import { debounce } from 'lodash'; import { EditorContentSpinner } from '../../components'; -import { Panel, PanelsContainer } from '../../components/split_panel'; +import { Panel, PanelsContainer } from '../../../../../../../../plugins/kibana_react/public'; import { Editor as EditorUI, EditorOutput } from './legacy/console_editor'; import { StorageKeys } from '../../../services'; import { useEditorReadContext, useServicesContext } from '../../contexts'; diff --git a/src/legacy/ui/public/vis/editors/default/default_editor.tsx b/src/legacy/ui/public/vis/editors/default/default_editor.tsx index 3e99bb83d224f6..efe5a79cd027e0 100644 --- a/src/legacy/ui/public/vis/editors/default/default_editor.tsx +++ b/src/legacy/ui/public/vis/editors/default/default_editor.tsx @@ -23,10 +23,7 @@ import { start as embeddables } from '../../../../../core_plugins/embeddable_api import { EditorRenderProps } from '../../../../../core_plugins/kibana/public/visualize/np_ready/types'; import { VisualizeEmbeddable } from '../../../../../core_plugins/visualizations/public/embeddable'; import { VisualizeEmbeddableFactory } from '../../../../../core_plugins/visualizations/public/embeddable/visualize_embeddable_factory'; -import { - PanelsContainer, - Panel, -} from '../../../../../core_plugins/console/public/np_ready/application/components/split_panel'; +import { PanelsContainer, Panel } from '../../../../../../plugins/kibana_react/public'; import './vis_type_agg_filter'; import { DefaultEditorSideBar } from './components/sidebar'; diff --git a/src/plugins/kibana_react/public/index.ts b/src/plugins/kibana_react/public/index.ts index cfe89f16e99dd5..81f2e694e8e5b5 100644 --- a/src/plugins/kibana_react/public/index.ts +++ b/src/plugins/kibana_react/public/index.ts @@ -25,5 +25,6 @@ export * from './overlays'; export * from './ui_settings'; export * from './field_icon'; export * from './table_list_view'; +export * from './split_panel'; export { useUrlTracker } from './use_url_tracker'; export { toMountPoint } from './util'; diff --git a/src/legacy/core_plugins/console/public/np_ready/application/components/split_panel/__snapshots__/split_panel.test.tsx.snap b/src/plugins/kibana_react/public/split_panel/__snapshots__/split_panel.test.tsx.snap similarity index 100% rename from src/legacy/core_plugins/console/public/np_ready/application/components/split_panel/__snapshots__/split_panel.test.tsx.snap rename to src/plugins/kibana_react/public/split_panel/__snapshots__/split_panel.test.tsx.snap diff --git a/src/legacy/core_plugins/console/public/np_ready/application/components/split_panel/components/resizer.tsx b/src/plugins/kibana_react/public/split_panel/components/resizer.tsx similarity index 94% rename from src/legacy/core_plugins/console/public/np_ready/application/components/split_panel/components/resizer.tsx rename to src/plugins/kibana_react/public/split_panel/components/resizer.tsx index 67fe92b7eb03a2..306db4c7d9a638 100644 --- a/src/legacy/core_plugins/console/public/np_ready/application/components/split_panel/components/resizer.tsx +++ b/src/plugins/kibana_react/public/split_panel/components/resizer.tsx @@ -35,7 +35,7 @@ export function Resizer(props: Props) {

} titleSize="xs" body={i18n.NO_RULES_BODY} /> + ); + }, []); + return ( <> ( <> - {rulesInstalled != null && rulesInstalled > 0 && ( + {((rulesCustomInstalled && rulesCustomInstalled > 0) || + (rulesInstalled != null && rulesInstalled > 0)) && ( - + )} - {isInitialLoad && isEmpty(tableData) && ( + {isInitialLoad && ( )} - {isGlobalLoading && !isEmpty(tableData) && ( + {isGlobalLoading && !isEmpty(tableData) && !isInitialLoad && ( )} - {isEmpty(tableData) && prePackagedRuleStatus === 'ruleNotInstalled' && ( - - )} - {!isEmpty(tableData) && ( + {rulesCustomInstalled != null && + rulesCustomInstalled === 0 && + prePackagedRuleStatus === 'ruleNotInstalled' && ( + + )} + {showRulesTable({ isInitialLoad, rulesCustomInstalled, rulesInstalled }) && ( <> @@ -304,24 +318,7 @@ export const AllRules = React.memo( isSelectable={!hasNoPermissions ?? false} itemId="id" items={tableData} - noItemsMessage={ - {i18n.NO_RULES}} - titleSize="xs" - body={i18n.NO_RULES_BODY} - actions={ - - {i18n.ADD_NEW_RULE} - - } - /> - } + noItemsMessage={emptyPrompt} onChange={tableOnChangeCallback} pagination={{ pageIndex: pagination.page - 1, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/reducer.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/reducer.ts index 74ce8f2847faa3..3634a16cbf6ac3 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/reducer.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/reducer.ts @@ -31,9 +31,13 @@ export type Action = | { type: 'setExportPayload'; exportPayload?: Rule[] } | { type: 'setSelected'; selectedItems: TableData[] } | { type: 'updateLoading'; ids: string[]; isLoading: boolean } - | { type: 'updateRules'; rules: Rule[]; appendRuleId?: string; pagination?: PaginationOptions } - | { type: 'updatePagination'; pagination: PaginationOptions } - | { type: 'updateFilterOptions'; filterOptions: FilterOptions } + | { type: 'updateRules'; rules: Rule[]; pagination?: PaginationOptions } + | { type: 'updatePagination'; pagination: Partial } + | { + type: 'updateFilterOptions'; + filterOptions: Partial; + pagination: Partial; + } | { type: 'failure' }; export const allRulesReducer = (state: State, action: Action): State => { @@ -56,18 +60,10 @@ export const allRulesReducer = (state: State, action: Action): State => { } const ruleIds = state.rules.map(r => r.rule_id); - const appendIdx = - action.appendRuleId != null ? state.rules.findIndex(r => r.id === action.appendRuleId) : -1; const updatedRules = action.rules.reverse().reduce((rules, updatedRule) => { let newRules = rules; if (ruleIds.includes(updatedRule.rule_id)) { newRules = newRules.map(r => (updatedRule.rule_id === r.rule_id ? updatedRule : r)); - } else if (appendIdx !== -1) { - newRules = [ - ...newRules.slice(0, appendIdx + 1), - updatedRule, - ...newRules.slice(appendIdx + 1, newRules.length), - ]; } else { newRules = [...newRules, updatedRule]; } @@ -90,25 +86,28 @@ export const allRulesReducer = (state: State, action: Action): State => { rules: updatedRules, tableData: formatRules(updatedRules), selectedItems: updatedSelectedItems, - pagination: { - ...state.pagination, - total: - action.appendRuleId != null - ? state.pagination.total + action.rules.length - : state.pagination.total, - }, }; } case 'updatePagination': { return { ...state, - pagination: action.pagination, + pagination: { + ...state.pagination, + ...action.pagination, + }, }; } case 'updateFilterOptions': { return { ...state, - filterOptions: action.filterOptions, + filterOptions: { + ...state.filterOptions, + ...action.filterOptions, + }, + pagination: { + ...state.pagination, + ...action.pagination, + }, }; } case 'deleteRules': { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.tsx index daf519f5af6958..c54a2e8d49844d 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/rules_table_filters/rules_table_filters.tsx @@ -21,6 +21,8 @@ import { TagsFilterPopover } from './tags_filter_popover'; interface RulesTableFiltersProps { onFilterChanged: (filterOptions: Partial) => void; + rulesCustomInstalled: number | null; + rulesInstalled: number | null; } /** @@ -29,7 +31,11 @@ interface RulesTableFiltersProps { * * @param onFilterChanged change listener to be notified on filter changes */ -const RulesTableFiltersComponent = ({ onFilterChanged }: RulesTableFiltersProps) => { +const RulesTableFiltersComponent = ({ + onFilterChanged, + rulesCustomInstalled, + rulesInstalled, +}: RulesTableFiltersProps) => { const [filter, setFilter] = useState(''); const [selectedTags, setSelectedTags] = useState([]); const [showCustomRules, setShowCustomRules] = useState(false); @@ -84,13 +90,17 @@ const RulesTableFiltersComponent = ({ onFilterChanged }: RulesTableFiltersProps) withNext > {i18n.ELASTIC_RULES} + {rulesInstalled != null ? ` (${rulesInstalled})` : ''} - {i18n.CUSTOM_RULES} + <> + {i18n.CUSTOM_RULES} + {rulesCustomInstalled != null ? ` (${rulesCustomInstalled})` : ''} + diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/index.tsx index 3406d5bcd6950e..f9103a9d6e081d 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/index.tsx @@ -127,14 +127,6 @@ const RuleDetailsPageComponent: FC = ({ const userHasNoPermissions = canUserCRUD != null && hasManageApiKey != null ? !canUserCRUD || !hasManageApiKey : false; - if ( - isSignalIndexExists != null && - isAuthenticated != null && - (!isSignalIndexExists || !isAuthenticated) - ) { - return ; - } - const title = isLoading === true || rule === null ? : rule.name; const subTitle = useMemo( () => @@ -217,6 +209,10 @@ const RuleDetailsPageComponent: FC = ({ [rule, ruleDetailTab] ); + const indexToAdd = useMemo(() => (signalIndexName == null ? [] : [signalIndexName]), [ + signalIndexName, + ]); + const updateDateRangeCallback = useCallback( (min: number, max: number) => { setAbsoluteRangeDatePicker({ id: 'global', from: min, to: max }); @@ -233,11 +229,19 @@ const RuleDetailsPageComponent: FC = ({ [ruleEnabled, setRuleEnabled] ); + if ( + isSignalIndexExists != null && + isAuthenticated != null && + (!isSignalIndexExists || !isAuthenticated) + ) { + return ; + } + return ( <> {hasIndexWrite != null && !hasIndexWrite && } {userHasNoPermissions && } - + {({ indicesExist, indexPattern }) => { return indicesExistOrDataTemporarilyUnavailable(indicesExist) ? ( diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/index.tsx index 75b1ce71efbb6b..1c0ed34e927938 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/index.tsx @@ -5,14 +5,14 @@ */ import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n/react'; import React, { useCallback, useRef, useState } from 'react'; import { Redirect } from 'react-router-dom'; import { usePrePackagedRules } from '../../../containers/detection_engine/rules'; -import { DETECTION_ENGINE_PAGE_NAME } from '../../../components/link_to/redirect_to_detection_engine'; -import { FormattedRelativePreferenceDate } from '../../../components/formatted_date'; -import { getEmptyTagValue } from '../../../components/empty_value'; +import { + getDetectionEngineUrl, + getCreateRuleUrl, +} from '../../../components/link_to/redirect_to_detection_engine'; import { DetectionEngineHeaderPage } from '../components/detection_engine_header_page'; import { WrapperPage } from '../../../components/wrapper_page'; import { SpyRoute } from '../../../utils/route/spy_routes'; @@ -44,6 +44,7 @@ const RulesPageComponent: React.FC = () => { loading: prePackagedRuleLoading, loadingCreatePrePackagedRules, refetchPrePackagedRulesStatus, + rulesCustomInstalled, rulesInstalled, rulesNotInstalled, rulesNotUpdated, @@ -62,7 +63,6 @@ const RulesPageComponent: React.FC = () => { const userHasNoPermissions = canUserCRUD != null && hasManageApiKey != null ? !canUserCRUD || !hasManageApiKey : false; - const lastCompletedRun = undefined; const handleCreatePrePackagedRules = useCallback(async () => { if (createPrePackagedRules != null) { @@ -88,7 +88,7 @@ const RulesPageComponent: React.FC = () => { isAuthenticated != null && (!isSignalIndexExists || !isAuthenticated) ) { - return ; + return ; } return ( @@ -102,22 +102,9 @@ const RulesPageComponent: React.FC = () => { , - }} - /> - ) : ( - getEmptyTagValue() - ) - } title={i18n.PAGE_TITLE} > @@ -159,7 +146,7 @@ const RulesPageComponent: React.FC = () => { @@ -182,6 +169,7 @@ const RulesPageComponent: React.FC = () => { hasNoPermissions={userHasNoPermissions} importCompleteToggle={importCompleteToggle} refetchPrePackagedRulesStatus={handleRefetchPrePackagedRulesStatus} + rulesCustomInstalled={rulesCustomInstalled} rulesInstalled={rulesInstalled} rulesNotInstalled={rulesNotInstalled} rulesNotUpdated={rulesNotUpdated} diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rule_status_route.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rule_status_route.test.ts index 67680a8f86eec2..de7f0fe26cc745 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rule_status_route.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rule_status_route.test.ts @@ -74,26 +74,28 @@ describe('get_prepackaged_rule_status_route', () => { }); describe('payload', () => { - test('0 rules installed, 1 rules not installed, and 1 rule not updated', async () => { + test('0 rules installed, 0 custom rules, 1 rules not installed, and 1 rule not updated', async () => { alertsClient.find.mockResolvedValue(getFindResult()); alertsClient.get.mockResolvedValue(getResult()); actionsClient.create.mockResolvedValue(createActionResult()); alertsClient.create.mockResolvedValue(getResult()); const { payload } = await server.inject(getPrepackagedRulesStatusRequest()); expect(JSON.parse(payload)).toEqual({ + rules_custom_installed: 0, rules_installed: 0, rules_not_installed: 1, rules_not_updated: 0, }); }); - test('1 rule installed, 0 rules not installed, and 1 rule to not updated', async () => { + test('1 rule installed, 1 custom rules, 0 rules not installed, and 1 rule to not updated', async () => { alertsClient.find.mockResolvedValue(getFindResultWithSingleHit()); alertsClient.get.mockResolvedValue(getResult()); actionsClient.create.mockResolvedValue(createActionResult()); alertsClient.create.mockResolvedValue(getResult()); const { payload } = await server.inject(getPrepackagedRulesStatusRequest()); expect(JSON.parse(payload)).toEqual({ + rules_custom_installed: 1, rules_installed: 1, rules_not_installed: 0, rules_not_updated: 1, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts index 0208a209c5eaef..ab6ee8e97a70f7 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts @@ -13,6 +13,7 @@ import { transformError } from '../utils'; import { getPrepackagedRules } from '../../rules/get_prepackaged_rules'; import { getRulesToInstall } from '../../rules/get_rules_to_install'; import { getRulesToUpdate } from '../../rules/get_rules_to_update'; +import { findRules } from '../../rules/find_rules'; import { getExistingPrepackagedRules } from '../../rules/get_existing_prepackaged_rules'; export const createGetPrepackagedRulesStatusRoute = (): Hapi.ServerRoute => { @@ -36,10 +37,19 @@ export const createGetPrepackagedRulesStatusRoute = (): Hapi.ServerRoute => { try { const rulesFromFileSystem = getPrepackagedRules(); + const customRules = await findRules({ + alertsClient, + perPage: 1, + page: 1, + sortField: 'enabled', + sortOrder: 'desc', + filter: 'alert.attributes.tags:"__internal_immutable:false"', + }); const prepackagedRules = await getExistingPrepackagedRules({ alertsClient }); const rulesToInstall = getRulesToInstall(rulesFromFileSystem, prepackagedRules); const rulesToUpdate = getRulesToUpdate(rulesFromFileSystem, prepackagedRules); return { + rules_custom_installed: customRules.total, rules_installed: prepackagedRules.length, rules_not_installed: rulesToInstall.length, rules_not_updated: rulesToUpdate.length, From 0e09e5f455424b871309fc11ee5399b2f66c1311 Mon Sep 17 00:00:00 2001 From: Chris Cowan Date: Fri, 24 Jan 2020 15:44:04 -0600 Subject: [PATCH 63/72] [Metrics UI] Fix Metrics Explorer exception when deleting metric (#55893) --- .../plugins/infra/public/components/metrics_explorer/chart.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/infra/public/components/metrics_explorer/chart.tsx b/x-pack/legacy/plugins/infra/public/components/metrics_explorer/chart.tsx index 9491fe3024f949..6153ebce5e0da8 100644 --- a/x-pack/legacy/plugins/infra/public/components/metrics_explorer/chart.tsx +++ b/x-pack/legacy/plugins/infra/public/components/metrics_explorer/chart.tsx @@ -118,7 +118,7 @@ export const MetricsExplorerChart = ({ )}
- {series.rows.length > 0 ? ( + {metrics.length && series.rows.length > 0 ? ( {metrics.map((metric, id) => ( Date: Fri, 24 Jan 2020 17:03:28 -0500 Subject: [PATCH 64/72] [SIEM] [Detection Engine] Change Status to Last response (#55886) * do not change rule status if rule is enabled/disabled * keep the 'going to run' status when enabling rule --- .../components/rule_status/translations.ts | 2 +- .../detection_engine/rules/update_rules.ts | 31 ++++++------------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/translations.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/translations.ts index e03cc252ad729f..d128696ec7253b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/translations.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/rule_status/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; export const STATUS = i18n.translate('xpack.siem.detectionEngine.ruleStatus.statusDescription', { - defaultMessage: 'Status', + defaultMessage: 'Last response', }); export const STATUS_AT = i18n.translate( diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.ts index d2d3e0a05b7f4b..c4d78e83eebd60 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.ts @@ -170,31 +170,20 @@ export const updateRules = async ({ } ); - const ruleCurrentStatus = savedObjectsClient - ? await savedObjectsClient.find({ - type: ruleStatusSavedObjectType, - perPage: 1, - sortField: 'statusDate', - sortOrder: 'desc', - search: rule.id, - searchFields: ['alertId'], - }) - : null; - if (rule.enabled && enabled === false) { await alertsClient.disable({ id: rule.id }); - // set current status for this rule to null to represent disabled, - // but keep last_success_at / last_failure_at properties intact for - // use on frontend while rule is disabled. - if (ruleCurrentStatus && ruleCurrentStatus.saved_objects.length > 0) { - const currentStatusToDisable = ruleCurrentStatus.saved_objects[0]; - currentStatusToDisable.attributes.status = null; - await savedObjectsClient?.update(ruleStatusSavedObjectType, currentStatusToDisable.id, { - ...currentStatusToDisable.attributes, - }); - } } else if (!rule.enabled && enabled === true) { await alertsClient.enable({ id: rule.id }); + const ruleCurrentStatus = savedObjectsClient + ? await savedObjectsClient.find({ + type: ruleStatusSavedObjectType, + perPage: 1, + sortField: 'statusDate', + sortOrder: 'desc', + search: rule.id, + searchFields: ['alertId'], + }) + : null; // set current status for this rule to be 'going to run' if (ruleCurrentStatus && ruleCurrentStatus.saved_objects.length > 0) { const currentStatusToDisable = ruleCurrentStatus.saved_objects[0]; From 2e6fbc396aecc1e7856062bf8610933bee8fa83f Mon Sep 17 00:00:00 2001 From: igoristic Date: Fri, 24 Jan 2020 17:16:43 -0500 Subject: [PATCH 65/72] Doing fix on master (#55894) --- .../translations/translations/ja-JP.json | 724 +++++++++--------- .../translations/translations/zh-CN.json | 724 +++++++++--------- 2 files changed, 724 insertions(+), 724 deletions(-) diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 07deb1870aa126..d1563ff4a08444 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -1103,307 +1103,6 @@ "kbn.advancedSettings.visualization.tileMap.wmsDefaultsTitle": "デフォルトの WMS プロパティ", "kbn.advancedSettings.visualizeEnableLabsText": "ユーザーが実験的なビジュアライゼーションを作成、表示、編集できるようになります。無効の場合、\n ユーザーは本番準備が整ったビジュアライゼーションのみを利用できます。", "kbn.advancedSettings.visualizeEnableLabsTitle": "実験的なビジュアライゼーションを有効にする", - "home.tutorials.common.auditbeat.cloudInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.auditbeat.premCloudInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.auditbeat.premInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.auditbeatCloudInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.auditbeatCloudInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.auditbeatCloudInstructions.config.debTitle": "構成の変更", - "home.tutorials.common.auditbeatCloudInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.auditbeatCloudInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.auditbeatCloudInstructions.config.osxTitle": "構成の変更", - "home.tutorials.common.auditbeatCloudInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.auditbeatCloudInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.auditbeatCloudInstructions.config.rpmTitle": "構成の変更", - "home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.auditbeatCloudInstructions.config.windowsTitle": "構成の変更", - "home.tutorials.common.auditbeatInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.auditbeatInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.auditbeatInstructions.config.debTitle": "構成の変更", - "home.tutorials.common.auditbeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.auditbeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.auditbeatInstructions.config.osxTitle": "構成の変更", - "home.tutorials.common.auditbeatInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.auditbeatInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.auditbeatInstructions.config.rpmTitle": "構成の変更", - "home.tutorials.common.auditbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.auditbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.auditbeatInstructions.config.windowsTitle": "構成の変更", - "home.tutorials.common.auditbeatInstructions.install.debTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({linkUrl}) をご覧ください。", - "home.tutorials.common.auditbeatInstructions.install.debTextPre": "Auditbeat は初めてですか?[入門ガイド]({linkUrl}) をご覧ください。", - "home.tutorials.common.auditbeatInstructions.install.debTitle": "Auditbeat のダウンロードとインストール", - "home.tutorials.common.auditbeatInstructions.install.osxTextPre": "Auditbeat は初めてですか?[入門ガイド]({linkUrl}) をご覧ください。", - "home.tutorials.common.auditbeatInstructions.install.osxTitle": "Auditbeat のダウンロードとインストール", - "home.tutorials.common.auditbeatInstructions.install.rpmTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({linkUrl}) をご覧ください。", - "home.tutorials.common.auditbeatInstructions.install.rpmTextPre": "Auditbeat は初めてですか?[入門ガイド]({linkUrl}) をご覧ください。", - "home.tutorials.common.auditbeatInstructions.install.rpmTitle": "Auditbeat のダウンロードとインストール", - "home.tutorials.common.auditbeatInstructions.install.windowsTextPost": "{auditbeatPath} ファイルの {propertyName} を Elasticsearch のインストールに設定します。", - "home.tutorials.common.auditbeatInstructions.install.windowsTextPre": "Auditbeat は初めてですか?[入門ガイド]({guideLinkUrl}) をご覧ください。\n 1.[ダウンロード]({auditbeatLinkUrl}) ページから Auditbeat Windows zip ファイルをダウンロードします。\n 2.zip ファイルのコンテンツを {folderPath} に解凍します。\n 3.「{directoryName}」ディレクトリの名前を「Auditbeat」に変更します。\n 4.管理者として PowerShell プロンプトを開きます (PowerShell アイコンを右クリックして「管理者として実行」を選択します)。Windows XP をご使用の場合、PowerShell のダウンロードとインストールが必要な場合があります。\n 5.PowerShell プロンプトで次のコマンドを実行し、Auditbeat を Windows サービスとしてインストールします。", - "home.tutorials.common.auditbeatInstructions.install.windowsTitle": "Auditbeat のダウンロードとインストール", - "home.tutorials.common.auditbeatInstructions.start.debTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.auditbeatInstructions.start.debTitle": "Auditbeat を起動", - "home.tutorials.common.auditbeatInstructions.start.osxTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.auditbeatInstructions.start.osxTitle": "Auditbeat を起動", - "home.tutorials.common.auditbeatInstructions.start.rpmTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.auditbeatInstructions.start.rpmTitle": "Auditbeat を起動", - "home.tutorials.common.auditbeatInstructions.start.windowsTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.auditbeatInstructions.start.windowsTitle": "Auditbeat を起動", - "home.tutorials.common.auditbeatStatusCheck.buttonLabel": "データを確認してください", - "home.tutorials.common.auditbeatStatusCheck.errorText": "まだデータを受信していません", - "home.tutorials.common.auditbeatStatusCheck.successText": "データを受信しました", - "home.tutorials.common.auditbeatStatusCheck.text": "Auditbeat からデータを受け取ったことを確認してください。", - "home.tutorials.common.auditbeatStatusCheck.title": "ステータス", - "home.tutorials.common.filebeat.cloudInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.filebeat.premCloudInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.filebeat.premInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.filebeatCloudInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.filebeatCloudInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.filebeatCloudInstructions.config.debTitle": "構成の変更", - "home.tutorials.common.filebeatCloudInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.filebeatCloudInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.filebeatCloudInstructions.config.osxTitle": "構成の変更", - "home.tutorials.common.filebeatCloudInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.filebeatCloudInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.filebeatCloudInstructions.config.rpmTitle": "構成の変更", - "home.tutorials.common.filebeatCloudInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.filebeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.filebeatCloudInstructions.config.windowsTitle": "構成の変更", - "home.tutorials.common.filebeatEnableInstructions.debTextPost": "「/etc/filebeat/modules.d/{moduleName}.yml」ファイルで設定を変更します。", - "home.tutorials.common.filebeatEnableInstructions.debTitle": "{moduleName} モジュールを有効にし構成します", - "home.tutorials.common.filebeatEnableInstructions.osxTextPost": "「modules.d/{moduleName}.yml」」ファイルで設定を変更します。", - "home.tutorials.common.filebeatEnableInstructions.osxTextPre": "インストールディレクトリから次のファイルを実行します:", - "home.tutorials.common.filebeatEnableInstructions.osxTitle": "{moduleName} モジュールを有効にし構成します", - "home.tutorials.common.filebeatEnableInstructions.rpmTextPost": "「/etc/filebeat/modules.d/{moduleName}.yml」ファイルで設定を変更します。", - "home.tutorials.common.filebeatEnableInstructions.rpmTitle": "{moduleName} モジュールを有効にし構成します", - "home.tutorials.common.filebeatEnableInstructions.windowsTextPost": "「modules.d/{moduleName}.yml」」ファイルで設定を変更します。", - "home.tutorials.common.filebeatEnableInstructions.windowsTextPre": "「{path}」フォルダから次のファイルを実行します:", - "home.tutorials.common.filebeatEnableInstructions.windowsTitle": "{moduleName} モジュールを有効にし構成します", - "home.tutorials.common.filebeatInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.filebeatInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.filebeatInstructions.config.debTitle": "構成の変更", - "home.tutorials.common.filebeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.filebeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.filebeatInstructions.config.osxTitle": "構成の変更", - "home.tutorials.common.filebeatInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.filebeatInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.filebeatInstructions.config.rpmTitle": "構成の変更", - "home.tutorials.common.filebeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.filebeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.filebeatInstructions.config.windowsTitle": "構成の変更", - "home.tutorials.common.filebeatInstructions.install.debTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({linkUrl}) をご覧ください。", - "home.tutorials.common.filebeatInstructions.install.debTextPre": "Filebeat は初めてですか?[入門ガイド]({linkUrl}) をご覧ください。", - "home.tutorials.common.filebeatInstructions.install.debTitle": "Filebeat のダウンロードとインストール", - "home.tutorials.common.filebeatInstructions.install.osxTextPre": "Filebeat は初めてですか?[入門ガイド]({linkUrl}) をご覧ください。", - "home.tutorials.common.filebeatInstructions.install.osxTitle": "Filebeat のダウンロードとインストール", - "home.tutorials.common.filebeatInstructions.install.rpmTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({linkUrl}) をご覧ください。", - "home.tutorials.common.filebeatInstructions.install.rpmTextPre": "Filebeat は初めてですか?[入門ガイド]({linkUrl}) をご覧ください。", - "home.tutorials.common.filebeatInstructions.install.rpmTitle": "Filebeat のダウンロードとインストール", - "home.tutorials.common.filebeatInstructions.install.windowsTextPost": "{filebeatPath} ファイルの {propertyName} を Elasticsearch のインストールに設定します。", - "home.tutorials.common.filebeatInstructions.install.windowsTextPre": "Filebeat は初めてですか?[入門ガイド]({guideLinkUrl}) をご覧ください。\n 1.[ダウンロード]({filebeatLinkUrl}) ページから Filebeat Windows zip ファイルをダウンロードします。\n 2.zip ファイルのコンテンツを {folderPath} に解凍します。\n 3.「{directoryName}」ディレクトリの名前を「Filebeat」に変更します。\n 4.管理者として PowerShell プロンプトを開きます (PowerShell アイコンを右クリックして「管理者として実行」を選択します)。Windows XP をご使用の場合、PowerShell のダウンロードとインストールが必要な場合があります。\n 5.PowerShell プロンプトで次のコマンドを実行し、Filebeat を Windows サービスとしてインストールします。", - "home.tutorials.common.filebeatInstructions.install.windowsTitle": "Filebeat のダウンロードとインストール", - "home.tutorials.common.filebeatInstructions.start.debTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.filebeatInstructions.start.debTitle": "Filebeat を起動します", - "home.tutorials.common.filebeatInstructions.start.osxTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.filebeatInstructions.start.osxTitle": "Filebeat を起動します", - "home.tutorials.common.filebeatInstructions.start.rpmTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.filebeatInstructions.start.rpmTitle": "Filebeat を起動します", - "home.tutorials.common.filebeatInstructions.start.windowsTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.filebeatInstructions.start.windowsTitle": "Filebeat を起動します", - "home.tutorials.common.filebeatStatusCheck.buttonLabel": "データを確認してください", - "home.tutorials.common.filebeatStatusCheck.errorText": "モジュールからまだデータを受け取っていません", - "home.tutorials.common.filebeatStatusCheck.successText": "このモジュールからデータを受け取りました", - "home.tutorials.common.filebeatStatusCheck.text": "Filebeat の「{moduleName}」モジュールからデータを受け取ったことを確認してください。", - "home.tutorials.common.filebeatStatusCheck.title": "モジュールステータス", - "home.tutorials.common.functionbeat.cloudInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.functionbeat.premCloudInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.functionbeat.premInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.functionbeatAWSInstructions.textPost": "「」と「」がアカウント 認証情報で、「us-east-1」が希望の地域です。", - "home.tutorials.common.functionbeatAWSInstructions.textPre": "環境で AWS アカウント認証情報を設定します。", - "home.tutorials.common.functionbeatAWSInstructions.title": "AWS 認証情報の設定", - "home.tutorials.common.functionbeatCloudInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.functionbeatCloudInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.functionbeatCloudInstructions.config.osxTitle": "構成の変更", - "home.tutorials.common.functionbeatCloudInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.functionbeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.functionbeatCloudInstructions.config.windowsTitle": "構成の変更", - "home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTextPost": "「」が投入するロググループの名前で、「」が Functionbeat デプロイのステージングに使用されるが有効な S3 バケット名です。", - "home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTitle": "Cloudwatch ロググループの構成", - "home.tutorials.common.functionbeatEnableOnPremInstructionsOSXLinux.textPre": "「functionbeat.yml」ファイルで設定を変更します。", - "home.tutorials.common.functionbeatEnableOnPremInstructionsWindows.textPre": "{path} ファイルで設定を変更します。", - "home.tutorials.common.functionbeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.functionbeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.functionbeatInstructions.config.osxTitle": "Elastic クラスターの構成", - "home.tutorials.common.functionbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.functionbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.functionbeatInstructions.config.windowsTitle": "構成の変更", - "home.tutorials.common.functionbeatInstructions.deploy.osxTextPre": "これにより Functionbeat が Lambda 関数としてインストールされます「setup」コマンドで Elasticsearch の構成を確認し、Kibana インデックスパターンを読み込みます。通常このコマンドを省いても大丈夫です。", - "home.tutorials.common.functionbeatInstructions.deploy.osxTitle": "Functionbeat を AWS Lambda にデプロイ", - "home.tutorials.common.functionbeatInstructions.deploy.windowsTextPre": "これにより Functionbeat が Lambda 関数としてインストールされます「setup」コマンドで Elasticsearch の構成を確認し、Kibana インデックスパターンを読み込みます。通常このコマンドを省いても大丈夫です。", - "home.tutorials.common.functionbeatInstructions.deploy.windowsTitle": "Functionbeat を AWS Lambda にデプロイ", - "home.tutorials.common.functionbeatInstructions.install.linuxTextPre": "Functionbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", - "home.tutorials.common.functionbeatInstructions.install.linuxTitle": "Functionbeat のダウンロードとインストール", - "home.tutorials.common.functionbeatInstructions.install.osxTextPre": "Functionbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", - "home.tutorials.common.functionbeatInstructions.install.osxTitle": "Functionbeat のダウンロードとインストール", - "home.tutorials.common.functionbeatInstructions.install.windowsTextPre": "Functionbeat は初めてですか?[入門ガイド]({functionbeatLink}) をご覧ください。\n 1.[ダウンロード]({elasticLink}) ページから Functionbeat Windows zip ファイルをダウンロードします。\n 2.zip ファイルのコンテンツを {folderPath} に解凍します。\n 3.{directoryName} ディレクトリの名前を「Functionbeat」に変更します。\n 4.管理者として PowerShell プロンプトを開きます (PowerShell アイコンを右クリックして「管理者として実行」を選択します)。Windows XP をご使用の場合、PowerShell のダウンロードとインストールが必要な場合があります。\n 5.PowerShell プロンプトから、Functionbeat ディレクトリに移動します:", - "home.tutorials.common.functionbeatInstructions.install.windowsTitle": "Functionbeat のダウンロードとインストール", - "home.tutorials.common.functionbeatStatusCheck.buttonLabel": "データを確認してください", - "home.tutorials.common.functionbeatStatusCheck.errorText": "Functionbeat からまだデータを受け取っていません", - "home.tutorials.common.functionbeatStatusCheck.successText": "Functionbeat からデータを受け取りました", - "home.tutorials.common.functionbeatStatusCheck.text": "Functionbeat からデータを受け取ったことを確認してください。", - "home.tutorials.common.functionbeatStatusCheck.title": "Functionbeat ステータス", - "home.tutorials.common.heartbeat.cloudInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.heartbeat.premCloudInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.heartbeat.premInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.heartbeatCloudInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.heartbeatCloudInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.heartbeatCloudInstructions.config.debTitle": "構成の変更", - "home.tutorials.common.heartbeatCloudInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.heartbeatCloudInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.heartbeatCloudInstructions.config.osxTitle": "構成の変更", - "home.tutorials.common.heartbeatCloudInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.heartbeatCloudInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.heartbeatCloudInstructions.config.rpmTitle": "構成の変更", - "home.tutorials.common.heartbeatCloudInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.heartbeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.heartbeatCloudInstructions.config.windowsTitle": "構成の変更", - "home.tutorials.common.heartbeatEnableCloudInstructions.debTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", - "home.tutorials.common.heartbeatEnableCloudInstructions.defaultTextPost": "Heartbeat のモニターの設定の詳細は、[Heartbeat 設定ドキュメント]({configureLink}) をご覧ください。", - "home.tutorials.common.heartbeatEnableCloudInstructions.defaultTitle": "設定の変更 - モニターの追加", - "home.tutorials.common.heartbeatEnableCloudInstructions.osxTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", - "home.tutorials.common.heartbeatEnableCloudInstructions.rpmTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", - "home.tutorials.common.heartbeatEnableCloudInstructions.windowsTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", - "home.tutorials.common.heartbeatEnableOnPremInstructions.debTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", - "home.tutorials.common.heartbeatEnableOnPremInstructions.defaultTextPost": "{hostTemplate} は監視対象の URL です。Heartbeat のモニターの設定の詳細は、[Heartbeat 設定ドキュメント]({configureLink}) をご覧ください。", - "home.tutorials.common.heartbeatEnableOnPremInstructions.defaultTitle": "設定の変更 - モニターの追加", - "home.tutorials.common.heartbeatEnableOnPremInstructions.osxTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", - "home.tutorials.common.heartbeatEnableOnPremInstructions.rpmTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", - "home.tutorials.common.heartbeatEnableOnPremInstructions.windowsTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", - "home.tutorials.common.heartbeatInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.heartbeatInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.heartbeatInstructions.config.debTitle": "構成の変更", - "home.tutorials.common.heartbeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.heartbeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.heartbeatInstructions.config.osxTitle": "構成の変更", - "home.tutorials.common.heartbeatInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.heartbeatInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.heartbeatInstructions.config.rpmTitle": "構成の変更", - "home.tutorials.common.heartbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.heartbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.heartbeatInstructions.config.windowsTitle": "構成の変更", - "home.tutorials.common.heartbeatInstructions.install.debTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({link}) をご覧ください。", - "home.tutorials.common.heartbeatInstructions.install.debTextPre": "Heartbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", - "home.tutorials.common.heartbeatInstructions.install.debTitle": "Heartbeat のダウンロードとインストール", - "home.tutorials.common.heartbeatInstructions.install.osxTextPre": "Heartbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", - "home.tutorials.common.heartbeatInstructions.install.osxTitle": "Heartbeat のダウンロードとインストール", - "home.tutorials.common.heartbeatInstructions.install.rpmTextPre": "Heartbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", - "home.tutorials.common.heartbeatInstructions.install.rpmTitle": "Heartbeat のダウンロードとインストール", - "home.tutorials.common.heartbeatInstructions.install.windowsTextPre": "Heartbeat は初めてですか?[入門ガイド]({heartbeatLink}) をご覧ください。\n 1.[ダウンロード]({elasticLink}) ページから Heartbeat Windows zip ファイルをダウンロードします。\n 2.zip ファイルのコンテンツを {folderPath} に解凍します。\n 3.「{directoryName}」ディレクトリの名前を「Heartbeat」に変更します。\n 4.管理者として PowerShell プロンプトを開きます (PowerShell アイコンを右クリックして「管理者として実行」を選択します)。Windows XP をご使用の場合、PowerShell のダウンロードとインストールが必要な場合があります。\n 5.PowerShell プロンプトで次のコマンドを実行し、Heartbeat を Windows サービスとしてインストールします。", - "home.tutorials.common.heartbeatInstructions.install.windowsTitle": "Heartbeat のダウンロードとインストール", - "home.tutorials.common.heartbeatInstructions.start.debTextPre": "「setup」コマンドで Kibana のインデックスパターンを読み込みます。", - "home.tutorials.common.heartbeatInstructions.start.debTitle": "Heartbeat を起動します", - "home.tutorials.common.heartbeatInstructions.start.osxTextPre": "「setup」コマンドで Kibana のインデックスパターンを読み込みます。", - "home.tutorials.common.heartbeatInstructions.start.osxTitle": "Heartbeat を起動します", - "home.tutorials.common.heartbeatInstructions.start.rpmTextPre": "「setup」コマンドで Kibana のインデックスパターンを読み込みます。", - "home.tutorials.common.heartbeatInstructions.start.rpmTitle": "Heartbeat を起動します", - "home.tutorials.common.heartbeatInstructions.start.windowsTextPre": "「setup」コマンドで Kibana のインデックスパターンを読み込みます。", - "home.tutorials.common.heartbeatInstructions.start.windowsTitle": "Heartbeat を起動します", - "home.tutorials.common.heartbeatStatusCheck.buttonLabel": "データを確認してください", - "home.tutorials.common.heartbeatStatusCheck.errorText": "Heartbeat からまだデータを受け取っていません", - "home.tutorials.common.heartbeatStatusCheck.successText": "Heartbeat からデータを受け取りました", - "home.tutorials.common.heartbeatStatusCheck.text": "Heartbeat からデータを受け取ったことを確認してください。", - "home.tutorials.common.heartbeatStatusCheck.title": "Heartbeat のステータス", - "home.tutorials.common.logstashInstructions.install.java.osxTextPre": "[こちら]({link}) のインストール手順に従ってください。", - "home.tutorials.common.logstashInstructions.install.java.osxTitle": "Java Runtime Environment のダウンロードとインストール", - "home.tutorials.common.logstashInstructions.install.java.windowsTextPre": "[こちら]({link}) のインストール手順に従ってください。", - "home.tutorials.common.logstashInstructions.install.java.windowsTitle": "Java Runtime Environment のダウンロードとインストール", - "home.tutorials.common.logstashInstructions.install.logstash.osxTextPre": "Logstash は初めてですか? [入門ガイド]({link}) をご覧ください。", - "home.tutorials.common.logstashInstructions.install.logstash.osxTitle": "Logstash のダウンロードとインストール", - "home.tutorials.common.logstashInstructions.install.logstash.windowsTextPre": "Logstash は初めてですか? [入門ガイド]({logstashLink}) をご覧ください。\n 1. Logstash Windows zip ファイルを [ダウンロード]({elasticLink}) します。\n 2.zip ファイルのコンテンツを展開します。", - "home.tutorials.common.logstashInstructions.install.logstash.windowsTitle": "Logstash のダウンロードとインストール", - "home.tutorials.common.metricbeat.cloudInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.metricbeat.premCloudInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.metricbeat.premInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.metricbeatCloudInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.metricbeatCloudInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.metricbeatCloudInstructions.config.debTitle": "構成の変更", - "home.tutorials.common.metricbeatCloudInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.metricbeatCloudInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.metricbeatCloudInstructions.config.osxTitle": "構成の変更", - "home.tutorials.common.metricbeatCloudInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.metricbeatCloudInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.metricbeatCloudInstructions.config.rpmTitle": "構成の変更", - "home.tutorials.common.metricbeatCloudInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.metricbeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.metricbeatCloudInstructions.config.windowsTitle": "構成の変更", - "home.tutorials.common.metricbeatEnableInstructions.debTextPost": "「/etc/metricbeat/modules.d/{moduleName}.yml」ファイルで設定を変更します。", - "home.tutorials.common.metricbeatEnableInstructions.debTitle": "{moduleName} モジュールを有効にし構成します", - "home.tutorials.common.metricbeatEnableInstructions.osxTextPost": "「modules.d/{moduleName}.yml」」ファイルで設定を変更します。", - "home.tutorials.common.metricbeatEnableInstructions.osxTextPre": "インストールディレクトリから次のファイルを実行します:", - "home.tutorials.common.metricbeatEnableInstructions.osxTitle": "{moduleName} モジュールを有効にし構成します", - "home.tutorials.common.metricbeatEnableInstructions.rpmTextPost": "「/etc/metricbeat/modules.d/{moduleName}.yml」ファイルで設定を変更します。", - "home.tutorials.common.metricbeatEnableInstructions.rpmTitle": "{moduleName} モジュールを有効にし構成します", - "home.tutorials.common.metricbeatEnableInstructions.windowsTextPost": "「modules.d/{moduleName}.yml」」ファイルで設定を変更します。", - "home.tutorials.common.metricbeatEnableInstructions.windowsTextPre": "「{path}」フォルダから次のファイルを実行します:", - "home.tutorials.common.metricbeatEnableInstructions.windowsTitle": "{moduleName} モジュールを有効にし構成します", - "home.tutorials.common.metricbeatInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.metricbeatInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.metricbeatInstructions.config.debTitle": "構成の変更", - "home.tutorials.common.metricbeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.metricbeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.metricbeatInstructions.config.osxTitle": "構成の変更", - "home.tutorials.common.metricbeatInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.metricbeatInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.metricbeatInstructions.config.rpmTitle": "構成の変更", - "home.tutorials.common.metricbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.metricbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.metricbeatInstructions.config.windowsTitle": "構成の変更", - "home.tutorials.common.metricbeatInstructions.install.debTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({link}) をご覧ください。", - "home.tutorials.common.metricbeatInstructions.install.debTextPre": "Metricbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", - "home.tutorials.common.metricbeatInstructions.install.debTitle": "Metricbeat のダウンロードとインストール", - "home.tutorials.common.metricbeatInstructions.install.osxTextPre": "Metricbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", - "home.tutorials.common.metricbeatInstructions.install.osxTitle": "Metricbeat のダウンロードとインストール", - "home.tutorials.common.metricbeatInstructions.install.rpmTextPre": "Metricbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", - "home.tutorials.common.metricbeatInstructions.install.rpmTitle": "Metricbeat のダウンロードとインストール", - "home.tutorials.common.metricbeatInstructions.install.windowsTextPost": "{path} ファイルの「output.elasticsearch」を Elasticsearch のインストールに設定します。", - "home.tutorials.common.metricbeatInstructions.install.windowsTextPre": "Metricbeat は初めてですか?[入門ガイド]({metricbeatLink}) をご覧ください。\n 1.[ダウンロード]({elasticLink}) ページから Metricbeat Windows zip ファイルをダウンロードします。\n 2.zip ファイルのコンテンツを {folderPath} に解凍します。\n 3.「{directoryName}」ディレクトリの名前を「Metricbeat」に変更します。\n 4.管理者として PowerShell プロンプトを開きます (PowerShell アイコンを右クリックして「管理者として実行」を選択します)。Windows XP をご使用の場合、PowerShell のダウンロードとインストールが必要な場合があります。\n 5.PowerShell プロンプトで次のコマンドを実行し、Metricbeat を Windows サービスとしてインストールします。", - "home.tutorials.common.metricbeatInstructions.install.windowsTitle": "Metricbeat のダウンロードとインストール", - "home.tutorials.common.metricbeatInstructions.start.debTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.metricbeatInstructions.start.debTitle": "Metricbeat を起動します", - "home.tutorials.common.metricbeatInstructions.start.osxTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.metricbeatInstructions.start.osxTitle": "Metricbeat を起動します", - "home.tutorials.common.metricbeatInstructions.start.rpmTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.metricbeatInstructions.start.rpmTitle": "Metricbeat を起動します", - "home.tutorials.common.metricbeatInstructions.start.windowsTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.metricbeatInstructions.start.windowsTitle": "Metricbeat を起動します", - "home.tutorials.common.metricbeatStatusCheck.buttonLabel": "データを確認してください", - "home.tutorials.common.metricbeatStatusCheck.errorText": "モジュールからまだデータを受け取っていません", - "home.tutorials.common.metricbeatStatusCheck.successText": "このモジュールからデータを受け取りました", - "home.tutorials.common.metricbeatStatusCheck.text": "Metricbeat の「{moduleName}」モジュールからデータを受け取ったことを確認してください", - "home.tutorials.common.metricbeatStatusCheck.title": "モジュールステータス", - "home.tutorials.common.premCloudInstructions.option1.textPre": "[Elastic Cloud] ({link}) にアクセスします。アカウントをお持ちでない場合は新規登録してください。14 日間の無料トライアルがご利用いただけます。\n\nElastic Cloud コンソールにログインします\n\nElastic Cloud コンソールで次の手順を実行し、クラスターを作成します。\n 1.「デプロイを作成」、「デプロイ名」の順にクリックします\n 2.必要に応じて他のデプロイオプションを変更します (デフォルトも使い始めるのに有効です)\n 3.「デプロイを作成」をクリックします\n 4.デプロイの作成が完了するまで待ちます\n 5.新規クラウド Kibana インスタンスにアクセスし、Kibana ホームの手順に従います。", - "home.tutorials.common.premCloudInstructions.option1.title": "オプション 1:Elastic Cloud でお試しください", - "home.tutorials.common.premCloudInstructions.option2.textPre": "この Kibana インスタンスをマネージド Elasticsearch インスタンスに対して実行している場合は、手動セットアップを行います。.\n\n「Elasticsearch」エンドポイントを {urlTemplate} として保存し、クラスターの「パスワード」を {passwordTemplate} として保存します。", - "home.tutorials.common.premCloudInstructions.option2.title": "オプション 2:Kibana を Cloud インスタンスに接続", - "home.tutorials.common.winlogbeat.cloudInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.winlogbeat.premCloudInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.winlogbeat.premInstructions.gettingStarted.title": "はじめに", - "home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", - "home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.winlogbeatCloudInstructions.config.windowsTitle": "構成の変更", - "home.tutorials.common.winlogbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", - "home.tutorials.common.winlogbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", - "home.tutorials.common.winlogbeatInstructions.config.windowsTitle": "構成の変更", - "home.tutorials.common.winlogbeatInstructions.install.windowsTextPost": "{path} ファイルの「output.elasticsearch」を Elasticsearch のインストールに設定します。", - "home.tutorials.common.winlogbeatInstructions.install.windowsTextPre": "Winlogbeat は初めてですか?[入門ガイド]({winlogbeatLink}) をご覧ください。\n 1.[ダウンロード]({elasticLink}) ページから Winlogbeat Windows zip ファイルをダウンロードします。\n 2.zip ファイルのコンテンツを {folderPath} に解凍します。\n 3.{directoryName} ディレクトリの名前を「Winlogbeat」に変更します。\n 4.管理者として PowerShell プロンプトを開きます (PowerShell アイコンを右クリックして「管理者として実行」を選択します)。Windows XP をご使用の場合、PowerShell のダウンロードとインストールが必要な場合があります。\n 5.PowerShell プロンプトで次のコマンドを実行し、Winlogbeat を Windows サービスとしてインストールします。", - "home.tutorials.common.winlogbeatInstructions.install.windowsTitle": "Winlogbeat のダウンロードとインストール", - "home.tutorials.common.winlogbeatInstructions.start.windowsTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", - "home.tutorials.common.winlogbeatInstructions.start.windowsTitle": "Winlogbeat を起動", - "home.tutorials.common.winlogbeatStatusCheck.buttonLabel": "データを確認してください", - "home.tutorials.common.winlogbeatStatusCheck.errorText": "まだデータを受信していません", - "home.tutorials.common.winlogbeatStatusCheck.successText": "データを受信しました", - "home.tutorials.common.winlogbeatStatusCheck.text": "Winlogbeat からデータを受け取ったことを確認してください。", - "home.tutorials.common.winlogbeatStatusCheck.title": "モジュールステータス", "kbn.context.breadcrumb": "{indexPatternTitle}#{docId} のコンテキスト", "kbn.context.failedToLoadAnchorDocumentDescription": "別ののドキュメントの読み込みに失敗しました", "kbn.context.failedToLoadAnchorDocumentErrorDescription": "別のドキュメントの読み込みに失敗しました。", @@ -2050,6 +1749,368 @@ "kbn.management.settings.searchBarAriaLabel": "高度な設定を検索", "kbn.management.settings.sectionLabel": "高度な設定", "kbn.managementTitle": "管理", + "kbn.settings.advancedSettings.voiceAnnouncement.searchResultScreenReaderMessage": "{query} を検索しました。{sectionLenght, plural, one {# セクション} other {# セクション}}に{optionLenght, plural, one {# オプション} other { # オプション}}があります。", + "kbn.topNavMenu.openInspectorButtonLabel": "検査", + "kbn.topNavMenu.refreshButtonLabel": "更新", + "kbn.topNavMenu.saveVisualizationButtonLabel": "保存", + "kbn.topNavMenu.shareVisualizationButtonLabel": "共有", + "kbn.visualize.badge.readOnly.text": "読み込み専用", + "kbn.visualize.badge.readOnly.tooltip": "ビジュアライゼーションを保存できません", + "kbn.visualize.createVisualization.noIndexPatternOrSavedSearchIdErrorMessage": "indexPattern または savedSearchId が必要です", + "kbn.visualize.editor.createBreadcrumb": "作成", + "kbn.visualize.experimentalVisInfoText": "このビジュアライゼーションは実験的なものです。", + "kbn.visualize.linkedToSearch.unlinkButtonTooltip": "保存された検索からリンクを解除するにはダブルクリックします", + "kbn.visualize.linkedToSearch.unlinkSuccessNotificationText": "保存された検索「{searchTitle}」からリンクが解除されました", + "kbn.visualize.linkedToSearchInfoText": "保存された検索にリンクされています", + "kbn.visualize.listing.betaTitle": "ベータ", + "kbn.visualize.listing.betaTooltip": "このビジュアライゼーションはベータ段階で、変更される可能性があります。デザインとコードはオフィシャル GA 機能よりも完成度が低く、現状のまま保証なしで提供されています。ベータ機能にはオフィシャル GA 機能の SLA が適用されません", + "kbn.visualize.listing.breadcrumb": "可視化", + "kbn.visualize.listing.createNew.createButtonLabel": "新規ビジュアライゼーションを追加", + "kbn.visualize.listing.createNew.description": "データに基づき異なるビジュアライゼーションを作成できます。", + "kbn.visualize.listing.createNew.title": "最初のビジュアライゼーションの作成", + "kbn.visualize.listing.experimentalTitle": "実験的", + "kbn.visualize.listing.experimentalTooltip": "このビジュアライゼーションは今後のリリースで変更または削除される可能性があり、SLA のサポート対象になりません。", + "kbn.visualize.listing.noItemsMessage": "ビジュアライゼーションがないようです。", + "kbn.visualize.listing.table.entityName": "ビジュアライゼーション", + "kbn.visualize.listing.table.entityNamePlural": "ビジュアライゼーション", + "kbn.visualize.listing.table.listTitle": "ビジュアライゼーション", + "kbn.visualize.listing.table.titleColumnName": "タイトル", + "kbn.visualize.listing.table.typeColumnName": "タイプ", + "kbn.visualize.newVisWizard.betaDescription": "このビジュアライゼーションはベータ段階で、変更される可能性があります。デザインとコードはオフィシャル GA 機能よりも完成度が低く、現状のまま保証なしで提供されています。ベータ機能にはオフィシャル GA 機能の SLA が適用されません", + "kbn.visualize.newVisWizard.betaTitle": "ベータ", + "kbn.visualize.newVisWizard.chooseSourceTitle": "ソースの選択", + "kbn.visualize.newVisWizard.experimentalDescription": "このビジュアライゼーションは実験的なものです。デザインと導入は安定したビジュアライゼーションよりも完成度が低く、変更される可能性があります。", + "kbn.visualize.newVisWizard.experimentalTitle": "実験的", + "kbn.visualize.newVisWizard.experimentalTooltip": "このビジュアライゼーションは今後のリリースで変更または削除される可能性があり、SLA のサポート対象になりません。", + "kbn.visualize.newVisWizard.filterVisTypeAriaLabel": "ビジュアライゼーションのタイプでフィルタリング", + "kbn.visualize.newVisWizard.helpText": "タイプを選択してビジュアライゼーションの作成を始めましょう。", + "kbn.visualize.newVisWizard.helpTextAriaLabel": "タイプを選択してビジュアライゼーションの作成を始めましょう。ESC を押してこのモダルを閉じます。Tab キーを押して次に進みます。", + "kbn.visualize.newVisWizard.newVisTypeTitle": "新規 {visTypeName}", + "kbn.visualize.newVisWizard.resultsFound": "{resultCount} 個の{resultCount, plural, one {タイプ} other {タイプ} } が見つかりました", + "kbn.visualize.newVisWizard.searchSelection.notFoundLabel": "一致するインデックスまたは保存された検索が見つかりませんでした。", + "kbn.visualize.newVisWizard.searchSelection.savedObjectType.indexPattern": "インデックスパターン", + "kbn.visualize.newVisWizard.searchSelection.savedObjectType.search": "保存された検索", + "kbn.visualize.newVisWizard.selectVisType": "ビジュアライゼーションのタイプを選択してください", + "kbn.visualize.newVisWizard.title": "新規ビジュアライゼーション", + "kbn.visualize.newVisWizard.visTypeAliasDescription": "Visualize外でKibanaアプリケーションを開きます。", + "kbn.visualize.newVisWizard.visTypeAliasTitle": "Kibanaアプリケーション", + "kbn.visualize.pageHeading": "{chartName} {chartType} ビジュアライゼーション", + "kbn.visualize.saveDialog.saveAndAddToDashboardButtonLabel": "保存してダッシュボードに追加", + "kbn.visualize.topNavMenu.openInspectorButtonAriaLabel": "ビジュアライゼーションのインスペクターを開く", + "kbn.visualize.topNavMenu.openInspectorDisabledButtonTooltip": "このビジュアライゼーションはインスペクターをサポートしていません。", + "kbn.visualize.topNavMenu.refreshButtonAriaLabel": "更新", + "kbn.visualize.topNavMenu.saveVisualization.failureNotificationText": "「{visTitle}」の保存中にエラーが発生しました", + "kbn.visualize.topNavMenu.saveVisualization.successNotificationText": "「{visTitle}」が保存されました", + "kbn.visualize.topNavMenu.saveVisualizationButtonAriaLabel": "ビジュアライゼーションを保存", + "kbn.visualize.topNavMenu.saveVisualizationDisabledButtonTooltip": "保存する前に変更を適用または破棄", + "kbn.visualize.topNavMenu.shareVisualizationButtonAriaLabel": "ビジュアライゼーションを共有", + "kbn.visualize.visualizeDescription": "ビジュアライゼーションを作成して Elasticsearch インデックスに保存されたデータを集約します。", + "kbn.visualize.visualizeListingBreadcrumbsTitle": "可視化", + "kbn.visualize.visualizeListingDeleteErrorTitle": "ビジュアライゼーションの削除中にエラーが発生", + "kbn.visualize.wizard.step1Breadcrumb": "作成", + "kbn.visualize.wizard.step2Breadcrumb": "作成", + "kbn.visualizeTitle": "可視化", + "home.tutorials.common.auditbeat.cloudInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.auditbeat.premCloudInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.auditbeat.premInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.auditbeatCloudInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.auditbeatCloudInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.auditbeatCloudInstructions.config.debTitle": "構成の変更", + "home.tutorials.common.auditbeatCloudInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.auditbeatCloudInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.auditbeatCloudInstructions.config.osxTitle": "構成の変更", + "home.tutorials.common.auditbeatCloudInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.auditbeatCloudInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.auditbeatCloudInstructions.config.rpmTitle": "構成の変更", + "home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.auditbeatCloudInstructions.config.windowsTitle": "構成の変更", + "home.tutorials.common.auditbeatInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.auditbeatInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.auditbeatInstructions.config.debTitle": "構成の変更", + "home.tutorials.common.auditbeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.auditbeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.auditbeatInstructions.config.osxTitle": "構成の変更", + "home.tutorials.common.auditbeatInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.auditbeatInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.auditbeatInstructions.config.rpmTitle": "構成の変更", + "home.tutorials.common.auditbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.auditbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.auditbeatInstructions.config.windowsTitle": "構成の変更", + "home.tutorials.common.auditbeatInstructions.install.debTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({linkUrl}) をご覧ください。", + "home.tutorials.common.auditbeatInstructions.install.debTextPre": "Auditbeat は初めてですか?[入門ガイド]({linkUrl}) をご覧ください。", + "home.tutorials.common.auditbeatInstructions.install.debTitle": "Auditbeat のダウンロードとインストール", + "home.tutorials.common.auditbeatInstructions.install.osxTextPre": "Auditbeat は初めてですか?[入門ガイド]({linkUrl}) をご覧ください。", + "home.tutorials.common.auditbeatInstructions.install.osxTitle": "Auditbeat のダウンロードとインストール", + "home.tutorials.common.auditbeatInstructions.install.rpmTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({linkUrl}) をご覧ください。", + "home.tutorials.common.auditbeatInstructions.install.rpmTextPre": "Auditbeat は初めてですか?[入門ガイド]({linkUrl}) をご覧ください。", + "home.tutorials.common.auditbeatInstructions.install.rpmTitle": "Auditbeat のダウンロードとインストール", + "home.tutorials.common.auditbeatInstructions.install.windowsTextPost": "{auditbeatPath} ファイルの {propertyName} を Elasticsearch のインストールに設定します。", + "home.tutorials.common.auditbeatInstructions.install.windowsTextPre": "Auditbeat は初めてですか?[入門ガイド]({guideLinkUrl}) をご覧ください。\n 1.[ダウンロード]({auditbeatLinkUrl}) ページから Auditbeat Windows zip ファイルをダウンロードします。\n 2.zip ファイルのコンテンツを {folderPath} に解凍します。\n 3.「{directoryName}」ディレクトリの名前を「Auditbeat」に変更します。\n 4.管理者として PowerShell プロンプトを開きます (PowerShell アイコンを右クリックして「管理者として実行」を選択します)。Windows XP をご使用の場合、PowerShell のダウンロードとインストールが必要な場合があります。\n 5.PowerShell プロンプトで次のコマンドを実行し、Auditbeat を Windows サービスとしてインストールします。", + "home.tutorials.common.auditbeatInstructions.install.windowsTitle": "Auditbeat のダウンロードとインストール", + "home.tutorials.common.auditbeatInstructions.start.debTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.auditbeatInstructions.start.debTitle": "Auditbeat を起動", + "home.tutorials.common.auditbeatInstructions.start.osxTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.auditbeatInstructions.start.osxTitle": "Auditbeat を起動", + "home.tutorials.common.auditbeatInstructions.start.rpmTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.auditbeatInstructions.start.rpmTitle": "Auditbeat を起動", + "home.tutorials.common.auditbeatInstructions.start.windowsTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.auditbeatInstructions.start.windowsTitle": "Auditbeat を起動", + "home.tutorials.common.auditbeatStatusCheck.buttonLabel": "データを確認してください", + "home.tutorials.common.auditbeatStatusCheck.errorText": "まだデータを受信していません", + "home.tutorials.common.auditbeatStatusCheck.successText": "データを受信しました", + "home.tutorials.common.auditbeatStatusCheck.text": "Auditbeat からデータを受け取ったことを確認してください。", + "home.tutorials.common.auditbeatStatusCheck.title": "ステータス", + "home.tutorials.common.filebeat.cloudInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.filebeat.premCloudInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.filebeat.premInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.filebeatCloudInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.filebeatCloudInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.filebeatCloudInstructions.config.debTitle": "構成の変更", + "home.tutorials.common.filebeatCloudInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.filebeatCloudInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.filebeatCloudInstructions.config.osxTitle": "構成の変更", + "home.tutorials.common.filebeatCloudInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.filebeatCloudInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.filebeatCloudInstructions.config.rpmTitle": "構成の変更", + "home.tutorials.common.filebeatCloudInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.filebeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.filebeatCloudInstructions.config.windowsTitle": "構成の変更", + "home.tutorials.common.filebeatEnableInstructions.debTextPost": "「/etc/filebeat/modules.d/{moduleName}.yml」ファイルで設定を変更します。", + "home.tutorials.common.filebeatEnableInstructions.debTitle": "{moduleName} モジュールを有効にし構成します", + "home.tutorials.common.filebeatEnableInstructions.osxTextPost": "「modules.d/{moduleName}.yml」」ファイルで設定を変更します。", + "home.tutorials.common.filebeatEnableInstructions.osxTextPre": "インストールディレクトリから次のファイルを実行します:", + "home.tutorials.common.filebeatEnableInstructions.osxTitle": "{moduleName} モジュールを有効にし構成します", + "home.tutorials.common.filebeatEnableInstructions.rpmTextPost": "「/etc/filebeat/modules.d/{moduleName}.yml」ファイルで設定を変更します。", + "home.tutorials.common.filebeatEnableInstructions.rpmTitle": "{moduleName} モジュールを有効にし構成します", + "home.tutorials.common.filebeatEnableInstructions.windowsTextPost": "「modules.d/{moduleName}.yml」」ファイルで設定を変更します。", + "home.tutorials.common.filebeatEnableInstructions.windowsTextPre": "「{path}」フォルダから次のファイルを実行します:", + "home.tutorials.common.filebeatEnableInstructions.windowsTitle": "{moduleName} モジュールを有効にし構成します", + "home.tutorials.common.filebeatInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.filebeatInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.filebeatInstructions.config.debTitle": "構成の変更", + "home.tutorials.common.filebeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.filebeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.filebeatInstructions.config.osxTitle": "構成の変更", + "home.tutorials.common.filebeatInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.filebeatInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.filebeatInstructions.config.rpmTitle": "構成の変更", + "home.tutorials.common.filebeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.filebeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.filebeatInstructions.config.windowsTitle": "構成の変更", + "home.tutorials.common.filebeatInstructions.install.debTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({linkUrl}) をご覧ください。", + "home.tutorials.common.filebeatInstructions.install.debTextPre": "Filebeat は初めてですか?[入門ガイド]({linkUrl}) をご覧ください。", + "home.tutorials.common.filebeatInstructions.install.debTitle": "Filebeat のダウンロードとインストール", + "home.tutorials.common.filebeatInstructions.install.osxTextPre": "Filebeat は初めてですか?[入門ガイド]({linkUrl}) をご覧ください。", + "home.tutorials.common.filebeatInstructions.install.osxTitle": "Filebeat のダウンロードとインストール", + "home.tutorials.common.filebeatInstructions.install.rpmTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({linkUrl}) をご覧ください。", + "home.tutorials.common.filebeatInstructions.install.rpmTextPre": "Filebeat は初めてですか?[入門ガイド]({linkUrl}) をご覧ください。", + "home.tutorials.common.filebeatInstructions.install.rpmTitle": "Filebeat のダウンロードとインストール", + "home.tutorials.common.filebeatInstructions.install.windowsTextPost": "{filebeatPath} ファイルの {propertyName} を Elasticsearch のインストールに設定します。", + "home.tutorials.common.filebeatInstructions.install.windowsTextPre": "Filebeat は初めてですか?[入門ガイド]({guideLinkUrl}) をご覧ください。\n 1.[ダウンロード]({filebeatLinkUrl}) ページから Filebeat Windows zip ファイルをダウンロードします。\n 2.zip ファイルのコンテンツを {folderPath} に解凍します。\n 3.「{directoryName}」ディレクトリの名前を「Filebeat」に変更します。\n 4.管理者として PowerShell プロンプトを開きます (PowerShell アイコンを右クリックして「管理者として実行」を選択します)。Windows XP をご使用の場合、PowerShell のダウンロードとインストールが必要な場合があります。\n 5.PowerShell プロンプトで次のコマンドを実行し、Filebeat を Windows サービスとしてインストールします。", + "home.tutorials.common.filebeatInstructions.install.windowsTitle": "Filebeat のダウンロードとインストール", + "home.tutorials.common.filebeatInstructions.start.debTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.filebeatInstructions.start.debTitle": "Filebeat を起動します", + "home.tutorials.common.filebeatInstructions.start.osxTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.filebeatInstructions.start.osxTitle": "Filebeat を起動します", + "home.tutorials.common.filebeatInstructions.start.rpmTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.filebeatInstructions.start.rpmTitle": "Filebeat を起動します", + "home.tutorials.common.filebeatInstructions.start.windowsTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.filebeatInstructions.start.windowsTitle": "Filebeat を起動します", + "home.tutorials.common.filebeatStatusCheck.buttonLabel": "データを確認してください", + "home.tutorials.common.filebeatStatusCheck.errorText": "モジュールからまだデータを受け取っていません", + "home.tutorials.common.filebeatStatusCheck.successText": "このモジュールからデータを受け取りました", + "home.tutorials.common.filebeatStatusCheck.text": "Filebeat の「{moduleName}」モジュールからデータを受け取ったことを確認してください。", + "home.tutorials.common.filebeatStatusCheck.title": "モジュールステータス", + "home.tutorials.common.functionbeat.cloudInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.functionbeat.premCloudInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.functionbeat.premInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.functionbeatAWSInstructions.textPost": "「」と「」がアカウント 認証情報で、「us-east-1」が希望の地域です。", + "home.tutorials.common.functionbeatAWSInstructions.textPre": "環境で AWS アカウント認証情報を設定します。", + "home.tutorials.common.functionbeatAWSInstructions.title": "AWS 認証情報の設定", + "home.tutorials.common.functionbeatCloudInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.functionbeatCloudInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.functionbeatCloudInstructions.config.osxTitle": "構成の変更", + "home.tutorials.common.functionbeatCloudInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.functionbeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.functionbeatCloudInstructions.config.windowsTitle": "構成の変更", + "home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTextPost": "「」が投入するロググループの名前で、「」が Functionbeat デプロイのステージングに使用されるが有効な S3 バケット名です。", + "home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTitle": "Cloudwatch ロググループの構成", + "home.tutorials.common.functionbeatEnableOnPremInstructionsOSXLinux.textPre": "「functionbeat.yml」ファイルで設定を変更します。", + "home.tutorials.common.functionbeatEnableOnPremInstructionsWindows.textPre": "{path} ファイルで設定を変更します。", + "home.tutorials.common.functionbeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.functionbeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.functionbeatInstructions.config.osxTitle": "Elastic クラスターの構成", + "home.tutorials.common.functionbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.functionbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.functionbeatInstructions.config.windowsTitle": "構成の変更", + "home.tutorials.common.functionbeatInstructions.deploy.osxTextPre": "これにより Functionbeat が Lambda 関数としてインストールされます「setup」コマンドで Elasticsearch の構成を確認し、Kibana インデックスパターンを読み込みます。通常このコマンドを省いても大丈夫です。", + "home.tutorials.common.functionbeatInstructions.deploy.osxTitle": "Functionbeat を AWS Lambda にデプロイ", + "home.tutorials.common.functionbeatInstructions.deploy.windowsTextPre": "これにより Functionbeat が Lambda 関数としてインストールされます「setup」コマンドで Elasticsearch の構成を確認し、Kibana インデックスパターンを読み込みます。通常このコマンドを省いても大丈夫です。", + "home.tutorials.common.functionbeatInstructions.deploy.windowsTitle": "Functionbeat を AWS Lambda にデプロイ", + "home.tutorials.common.functionbeatInstructions.install.linuxTextPre": "Functionbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", + "home.tutorials.common.functionbeatInstructions.install.linuxTitle": "Functionbeat のダウンロードとインストール", + "home.tutorials.common.functionbeatInstructions.install.osxTextPre": "Functionbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", + "home.tutorials.common.functionbeatInstructions.install.osxTitle": "Functionbeat のダウンロードとインストール", + "home.tutorials.common.functionbeatInstructions.install.windowsTextPre": "Functionbeat は初めてですか?[入門ガイド]({functionbeatLink}) をご覧ください。\n 1.[ダウンロード]({elasticLink}) ページから Functionbeat Windows zip ファイルをダウンロードします。\n 2.zip ファイルのコンテンツを {folderPath} に解凍します。\n 3.{directoryName} ディレクトリの名前を「Functionbeat」に変更します。\n 4.管理者として PowerShell プロンプトを開きます (PowerShell アイコンを右クリックして「管理者として実行」を選択します)。Windows XP をご使用の場合、PowerShell のダウンロードとインストールが必要な場合があります。\n 5.PowerShell プロンプトから、Functionbeat ディレクトリに移動します:", + "home.tutorials.common.functionbeatInstructions.install.windowsTitle": "Functionbeat のダウンロードとインストール", + "home.tutorials.common.functionbeatStatusCheck.buttonLabel": "データを確認してください", + "home.tutorials.common.functionbeatStatusCheck.errorText": "Functionbeat からまだデータを受け取っていません", + "home.tutorials.common.functionbeatStatusCheck.successText": "Functionbeat からデータを受け取りました", + "home.tutorials.common.functionbeatStatusCheck.text": "Functionbeat からデータを受け取ったことを確認してください。", + "home.tutorials.common.functionbeatStatusCheck.title": "Functionbeat ステータス", + "home.tutorials.common.heartbeat.cloudInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.heartbeat.premCloudInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.heartbeat.premInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.heartbeatCloudInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.heartbeatCloudInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.heartbeatCloudInstructions.config.debTitle": "構成の変更", + "home.tutorials.common.heartbeatCloudInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.heartbeatCloudInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.heartbeatCloudInstructions.config.osxTitle": "構成の変更", + "home.tutorials.common.heartbeatCloudInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.heartbeatCloudInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.heartbeatCloudInstructions.config.rpmTitle": "構成の変更", + "home.tutorials.common.heartbeatCloudInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.heartbeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.heartbeatCloudInstructions.config.windowsTitle": "構成の変更", + "home.tutorials.common.heartbeatEnableCloudInstructions.debTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", + "home.tutorials.common.heartbeatEnableCloudInstructions.defaultTextPost": "Heartbeat のモニターの設定の詳細は、[Heartbeat 設定ドキュメント]({configureLink}) をご覧ください。", + "home.tutorials.common.heartbeatEnableCloudInstructions.defaultTitle": "設定の変更 - モニターの追加", + "home.tutorials.common.heartbeatEnableCloudInstructions.osxTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", + "home.tutorials.common.heartbeatEnableCloudInstructions.rpmTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", + "home.tutorials.common.heartbeatEnableCloudInstructions.windowsTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", + "home.tutorials.common.heartbeatEnableOnPremInstructions.debTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", + "home.tutorials.common.heartbeatEnableOnPremInstructions.defaultTextPost": "{hostTemplate} は監視対象の URL です。Heartbeat のモニターの設定の詳細は、[Heartbeat 設定ドキュメント]({configureLink}) をご覧ください。", + "home.tutorials.common.heartbeatEnableOnPremInstructions.defaultTitle": "設定の変更 - モニターの追加", + "home.tutorials.common.heartbeatEnableOnPremInstructions.osxTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", + "home.tutorials.common.heartbeatEnableOnPremInstructions.rpmTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", + "home.tutorials.common.heartbeatEnableOnPremInstructions.windowsTextPre": "「heartbeat.yml」ファイルの「heartbeat.monitors」設定を変更します。", + "home.tutorials.common.heartbeatInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.heartbeatInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.heartbeatInstructions.config.debTitle": "構成の変更", + "home.tutorials.common.heartbeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.heartbeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.heartbeatInstructions.config.osxTitle": "構成の変更", + "home.tutorials.common.heartbeatInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.heartbeatInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.heartbeatInstructions.config.rpmTitle": "構成の変更", + "home.tutorials.common.heartbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.heartbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.heartbeatInstructions.config.windowsTitle": "構成の変更", + "home.tutorials.common.heartbeatInstructions.install.debTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({link}) をご覧ください。", + "home.tutorials.common.heartbeatInstructions.install.debTextPre": "Heartbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", + "home.tutorials.common.heartbeatInstructions.install.debTitle": "Heartbeat のダウンロードとインストール", + "home.tutorials.common.heartbeatInstructions.install.osxTextPre": "Heartbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", + "home.tutorials.common.heartbeatInstructions.install.osxTitle": "Heartbeat のダウンロードとインストール", + "home.tutorials.common.heartbeatInstructions.install.rpmTextPre": "Heartbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", + "home.tutorials.common.heartbeatInstructions.install.rpmTitle": "Heartbeat のダウンロードとインストール", + "home.tutorials.common.heartbeatInstructions.install.windowsTextPre": "Heartbeat は初めてですか?[入門ガイド]({heartbeatLink}) をご覧ください。\n 1.[ダウンロード]({elasticLink}) ページから Heartbeat Windows zip ファイルをダウンロードします。\n 2.zip ファイルのコンテンツを {folderPath} に解凍します。\n 3.「{directoryName}」ディレクトリの名前を「Heartbeat」に変更します。\n 4.管理者として PowerShell プロンプトを開きます (PowerShell アイコンを右クリックして「管理者として実行」を選択します)。Windows XP をご使用の場合、PowerShell のダウンロードとインストールが必要な場合があります。\n 5.PowerShell プロンプトで次のコマンドを実行し、Heartbeat を Windows サービスとしてインストールします。", + "home.tutorials.common.heartbeatInstructions.install.windowsTitle": "Heartbeat のダウンロードとインストール", + "home.tutorials.common.heartbeatInstructions.start.debTextPre": "「setup」コマンドで Kibana のインデックスパターンを読み込みます。", + "home.tutorials.common.heartbeatInstructions.start.debTitle": "Heartbeat を起動します", + "home.tutorials.common.heartbeatInstructions.start.osxTextPre": "「setup」コマンドで Kibana のインデックスパターンを読み込みます。", + "home.tutorials.common.heartbeatInstructions.start.osxTitle": "Heartbeat を起動します", + "home.tutorials.common.heartbeatInstructions.start.rpmTextPre": "「setup」コマンドで Kibana のインデックスパターンを読み込みます。", + "home.tutorials.common.heartbeatInstructions.start.rpmTitle": "Heartbeat を起動します", + "home.tutorials.common.heartbeatInstructions.start.windowsTextPre": "「setup」コマンドで Kibana のインデックスパターンを読み込みます。", + "home.tutorials.common.heartbeatInstructions.start.windowsTitle": "Heartbeat を起動します", + "home.tutorials.common.heartbeatStatusCheck.buttonLabel": "データを確認してください", + "home.tutorials.common.heartbeatStatusCheck.errorText": "Heartbeat からまだデータを受け取っていません", + "home.tutorials.common.heartbeatStatusCheck.successText": "Heartbeat からデータを受け取りました", + "home.tutorials.common.heartbeatStatusCheck.text": "Heartbeat からデータを受け取ったことを確認してください。", + "home.tutorials.common.heartbeatStatusCheck.title": "Heartbeat のステータス", + "home.tutorials.common.logstashInstructions.install.java.osxTextPre": "[こちら]({link}) のインストール手順に従ってください。", + "home.tutorials.common.logstashInstructions.install.java.osxTitle": "Java Runtime Environment のダウンロードとインストール", + "home.tutorials.common.logstashInstructions.install.java.windowsTextPre": "[こちら]({link}) のインストール手順に従ってください。", + "home.tutorials.common.logstashInstructions.install.java.windowsTitle": "Java Runtime Environment のダウンロードとインストール", + "home.tutorials.common.logstashInstructions.install.logstash.osxTextPre": "Logstash は初めてですか? [入門ガイド]({link}) をご覧ください。", + "home.tutorials.common.logstashInstructions.install.logstash.osxTitle": "Logstash のダウンロードとインストール", + "home.tutorials.common.logstashInstructions.install.logstash.windowsTextPre": "Logstash は初めてですか? [入門ガイド]({logstashLink}) をご覧ください。\n 1. Logstash Windows zip ファイルを [ダウンロード]({elasticLink}) します。\n 2.zip ファイルのコンテンツを展開します。", + "home.tutorials.common.logstashInstructions.install.logstash.windowsTitle": "Logstash のダウンロードとインストール", + "home.tutorials.common.metricbeat.cloudInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.metricbeat.premCloudInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.metricbeat.premInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.metricbeatCloudInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.metricbeatCloudInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.metricbeatCloudInstructions.config.debTitle": "構成の変更", + "home.tutorials.common.metricbeatCloudInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.metricbeatCloudInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.metricbeatCloudInstructions.config.osxTitle": "構成の変更", + "home.tutorials.common.metricbeatCloudInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.metricbeatCloudInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.metricbeatCloudInstructions.config.rpmTitle": "構成の変更", + "home.tutorials.common.metricbeatCloudInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.metricbeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.metricbeatCloudInstructions.config.windowsTitle": "構成の変更", + "home.tutorials.common.metricbeatEnableInstructions.debTextPost": "「/etc/metricbeat/modules.d/{moduleName}.yml」ファイルで設定を変更します。", + "home.tutorials.common.metricbeatEnableInstructions.debTitle": "{moduleName} モジュールを有効にし構成します", + "home.tutorials.common.metricbeatEnableInstructions.osxTextPost": "「modules.d/{moduleName}.yml」」ファイルで設定を変更します。", + "home.tutorials.common.metricbeatEnableInstructions.osxTextPre": "インストールディレクトリから次のファイルを実行します:", + "home.tutorials.common.metricbeatEnableInstructions.osxTitle": "{moduleName} モジュールを有効にし構成します", + "home.tutorials.common.metricbeatEnableInstructions.rpmTextPost": "「/etc/metricbeat/modules.d/{moduleName}.yml」ファイルで設定を変更します。", + "home.tutorials.common.metricbeatEnableInstructions.rpmTitle": "{moduleName} モジュールを有効にし構成します", + "home.tutorials.common.metricbeatEnableInstructions.windowsTextPost": "「modules.d/{moduleName}.yml」」ファイルで設定を変更します。", + "home.tutorials.common.metricbeatEnableInstructions.windowsTextPre": "「{path}」フォルダから次のファイルを実行します:", + "home.tutorials.common.metricbeatEnableInstructions.windowsTitle": "{moduleName} モジュールを有効にし構成します", + "home.tutorials.common.metricbeatInstructions.config.debTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.metricbeatInstructions.config.debTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.metricbeatInstructions.config.debTitle": "構成の変更", + "home.tutorials.common.metricbeatInstructions.config.osxTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.metricbeatInstructions.config.osxTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.metricbeatInstructions.config.osxTitle": "構成の変更", + "home.tutorials.common.metricbeatInstructions.config.rpmTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.metricbeatInstructions.config.rpmTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.metricbeatInstructions.config.rpmTitle": "構成の変更", + "home.tutorials.common.metricbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.metricbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.metricbeatInstructions.config.windowsTitle": "構成の変更", + "home.tutorials.common.metricbeatInstructions.install.debTextPost": "32 ビットパッケージをお探しですか?[ダウンロードページ]({link}) をご覧ください。", + "home.tutorials.common.metricbeatInstructions.install.debTextPre": "Metricbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", + "home.tutorials.common.metricbeatInstructions.install.debTitle": "Metricbeat のダウンロードとインストール", + "home.tutorials.common.metricbeatInstructions.install.osxTextPre": "Metricbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", + "home.tutorials.common.metricbeatInstructions.install.osxTitle": "Metricbeat のダウンロードとインストール", + "home.tutorials.common.metricbeatInstructions.install.rpmTextPre": "Metricbeat は初めてですか?[入門ガイド]({link}) をご覧ください。", + "home.tutorials.common.metricbeatInstructions.install.rpmTitle": "Metricbeat のダウンロードとインストール", + "home.tutorials.common.metricbeatInstructions.install.windowsTextPost": "{path} ファイルの「output.elasticsearch」を Elasticsearch のインストールに設定します。", + "home.tutorials.common.metricbeatInstructions.install.windowsTextPre": "Metricbeat は初めてですか?[入門ガイド]({metricbeatLink}) をご覧ください。\n 1.[ダウンロード]({elasticLink}) ページから Metricbeat Windows zip ファイルをダウンロードします。\n 2.zip ファイルのコンテンツを {folderPath} に解凍します。\n 3.「{directoryName}」ディレクトリの名前を「Metricbeat」に変更します。\n 4.管理者として PowerShell プロンプトを開きます (PowerShell アイコンを右クリックして「管理者として実行」を選択します)。Windows XP をご使用の場合、PowerShell のダウンロードとインストールが必要な場合があります。\n 5.PowerShell プロンプトで次のコマンドを実行し、Metricbeat を Windows サービスとしてインストールします。", + "home.tutorials.common.metricbeatInstructions.install.windowsTitle": "Metricbeat のダウンロードとインストール", + "home.tutorials.common.metricbeatInstructions.start.debTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.metricbeatInstructions.start.debTitle": "Metricbeat を起動します", + "home.tutorials.common.metricbeatInstructions.start.osxTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.metricbeatInstructions.start.osxTitle": "Metricbeat を起動します", + "home.tutorials.common.metricbeatInstructions.start.rpmTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.metricbeatInstructions.start.rpmTitle": "Metricbeat を起動します", + "home.tutorials.common.metricbeatInstructions.start.windowsTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.metricbeatInstructions.start.windowsTitle": "Metricbeat を起動します", + "home.tutorials.common.metricbeatStatusCheck.buttonLabel": "データを確認してください", + "home.tutorials.common.metricbeatStatusCheck.errorText": "モジュールからまだデータを受け取っていません", + "home.tutorials.common.metricbeatStatusCheck.successText": "このモジュールからデータを受け取りました", + "home.tutorials.common.metricbeatStatusCheck.text": "Metricbeat の「{moduleName}」モジュールからデータを受け取ったことを確認してください", + "home.tutorials.common.metricbeatStatusCheck.title": "モジュールステータス", + "home.tutorials.common.premCloudInstructions.option1.textPre": "[Elastic Cloud] ({link}) にアクセスします。アカウントをお持ちでない場合は新規登録してください。14 日間の無料トライアルがご利用いただけます。\n\nElastic Cloud コンソールにログインします\n\nElastic Cloud コンソールで次の手順を実行し、クラスターを作成します。\n 1.「デプロイを作成」、「デプロイ名」の順にクリックします\n 2.必要に応じて他のデプロイオプションを変更します (デフォルトも使い始めるのに有効です)\n 3.「デプロイを作成」をクリックします\n 4.デプロイの作成が完了するまで待ちます\n 5.新規クラウド Kibana インスタンスにアクセスし、Kibana ホームの手順に従います。", + "home.tutorials.common.premCloudInstructions.option1.title": "オプション 1:Elastic Cloud でお試しください", + "home.tutorials.common.premCloudInstructions.option2.textPre": "この Kibana インスタンスをマネージド Elasticsearch インスタンスに対して実行している場合は、手動セットアップを行います。.\n\n「Elasticsearch」エンドポイントを {urlTemplate} として保存し、クラスターの「パスワード」を {passwordTemplate} として保存します。", + "home.tutorials.common.premCloudInstructions.option2.title": "オプション 2:Kibana を Cloud インスタンスに接続", + "home.tutorials.common.winlogbeat.cloudInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.winlogbeat.premCloudInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.winlogbeat.premInstructions.gettingStarted.title": "はじめに", + "home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワードです。", + "home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.winlogbeatCloudInstructions.config.windowsTitle": "構成の変更", + "home.tutorials.common.winlogbeatInstructions.config.windowsTextPost": "{passwordTemplate} が「Elastic」ユーザーのパスワード、{esUrlTemplate} が Elasticsearch の URL、{kibanaUrlTemplate} が Kibana の URL です。", + "home.tutorials.common.winlogbeatInstructions.config.windowsTextPre": "{path} を変更して Elastic Cloud への接続情報を設定します:", + "home.tutorials.common.winlogbeatInstructions.config.windowsTitle": "構成の変更", + "home.tutorials.common.winlogbeatInstructions.install.windowsTextPost": "{path} ファイルの「output.elasticsearch」を Elasticsearch のインストールに設定します。", + "home.tutorials.common.winlogbeatInstructions.install.windowsTextPre": "Winlogbeat は初めてですか?[入門ガイド]({winlogbeatLink}) をご覧ください。\n 1.[ダウンロード]({elasticLink}) ページから Winlogbeat Windows zip ファイルをダウンロードします。\n 2.zip ファイルのコンテンツを {folderPath} に解凍します。\n 3.{directoryName} ディレクトリの名前を「Winlogbeat」に変更します。\n 4.管理者として PowerShell プロンプトを開きます (PowerShell アイコンを右クリックして「管理者として実行」を選択します)。Windows XP をご使用の場合、PowerShell のダウンロードとインストールが必要な場合があります。\n 5.PowerShell プロンプトで次のコマンドを実行し、Winlogbeat を Windows サービスとしてインストールします。", + "home.tutorials.common.winlogbeatInstructions.install.windowsTitle": "Winlogbeat のダウンロードとインストール", + "home.tutorials.common.winlogbeatInstructions.start.windowsTextPre": "「setup」コマンドで Kibana のダッシュボードを読み込みます。ダッシュボードが既にセットアップされている場合、このコマンドは省略します。", + "home.tutorials.common.winlogbeatInstructions.start.windowsTitle": "Winlogbeat を起動", + "home.tutorials.common.winlogbeatStatusCheck.buttonLabel": "データを確認してください", + "home.tutorials.common.winlogbeatStatusCheck.errorText": "まだデータを受信していません", + "home.tutorials.common.winlogbeatStatusCheck.successText": "データを受信しました", + "home.tutorials.common.winlogbeatStatusCheck.text": "Winlogbeat からデータを受け取ったことを確認してください。", + "home.tutorials.common.winlogbeatStatusCheck.title": "モジュールステータス", "home.tutorials.aerospikeMetrics.artifacts.application.label": "ディスカバリ", "home.tutorials.aerospikeMetrics.longDescription": "「aerospike」Metricbeat モジュールは、Aerospike から内部メトリックを取得します。 [詳細]({learnMoreLink})。", "home.tutorials.aerospikeMetrics.nameTitle": "Aerospike メトリック", @@ -2304,67 +2365,6 @@ "home.tutorials.zookeeperMetrics.longDescription": "「{moduleName}」Metricbeat モジュールは、Zookeeper サーバーから内部メトリックを取得します。 [詳細]({learnMoreLink})。", "home.tutorials.zookeeperMetrics.nameTitle": "Zookeeper メトリック", "home.tutorials.zookeeperMetrics.shortDescription": "Zookeeper サーバーから内部メトリックを取得します。", - "kbn.settings.advancedSettings.voiceAnnouncement.searchResultScreenReaderMessage": "{query} を検索しました。{sectionLenght, plural, one {# セクション} other {# セクション}}に{optionLenght, plural, one {# オプション} other { # オプション}}があります。", - "kbn.topNavMenu.openInspectorButtonLabel": "検査", - "kbn.topNavMenu.refreshButtonLabel": "更新", - "kbn.topNavMenu.saveVisualizationButtonLabel": "保存", - "kbn.topNavMenu.shareVisualizationButtonLabel": "共有", - "kbn.visualize.badge.readOnly.text": "読み込み専用", - "kbn.visualize.badge.readOnly.tooltip": "ビジュアライゼーションを保存できません", - "kbn.visualize.createVisualization.noIndexPatternOrSavedSearchIdErrorMessage": "indexPattern または savedSearchId が必要です", - "kbn.visualize.editor.createBreadcrumb": "作成", - "kbn.visualize.experimentalVisInfoText": "このビジュアライゼーションは実験的なものです。", - "kbn.visualize.linkedToSearch.unlinkButtonTooltip": "保存された検索からリンクを解除するにはダブルクリックします", - "kbn.visualize.linkedToSearch.unlinkSuccessNotificationText": "保存された検索「{searchTitle}」からリンクが解除されました", - "kbn.visualize.linkedToSearchInfoText": "保存された検索にリンクされています", - "kbn.visualize.listing.betaTitle": "ベータ", - "kbn.visualize.listing.betaTooltip": "このビジュアライゼーションはベータ段階で、変更される可能性があります。デザインとコードはオフィシャル GA 機能よりも完成度が低く、現状のまま保証なしで提供されています。ベータ機能にはオフィシャル GA 機能の SLA が適用されません", - "kbn.visualize.listing.breadcrumb": "可視化", - "kbn.visualize.listing.createNew.createButtonLabel": "新規ビジュアライゼーションを追加", - "kbn.visualize.listing.createNew.description": "データに基づき異なるビジュアライゼーションを作成できます。", - "kbn.visualize.listing.createNew.title": "最初のビジュアライゼーションの作成", - "kbn.visualize.listing.experimentalTitle": "実験的", - "kbn.visualize.listing.experimentalTooltip": "このビジュアライゼーションは今後のリリースで変更または削除される可能性があり、SLA のサポート対象になりません。", - "kbn.visualize.listing.noItemsMessage": "ビジュアライゼーションがないようです。", - "kbn.visualize.listing.table.entityName": "ビジュアライゼーション", - "kbn.visualize.listing.table.entityNamePlural": "ビジュアライゼーション", - "kbn.visualize.listing.table.listTitle": "ビジュアライゼーション", - "kbn.visualize.listing.table.titleColumnName": "タイトル", - "kbn.visualize.listing.table.typeColumnName": "タイプ", - "kbn.visualize.newVisWizard.betaDescription": "このビジュアライゼーションはベータ段階で、変更される可能性があります。デザインとコードはオフィシャル GA 機能よりも完成度が低く、現状のまま保証なしで提供されています。ベータ機能にはオフィシャル GA 機能の SLA が適用されません", - "kbn.visualize.newVisWizard.betaTitle": "ベータ", - "kbn.visualize.newVisWizard.chooseSourceTitle": "ソースの選択", - "kbn.visualize.newVisWizard.experimentalDescription": "このビジュアライゼーションは実験的なものです。デザインと導入は安定したビジュアライゼーションよりも完成度が低く、変更される可能性があります。", - "kbn.visualize.newVisWizard.experimentalTitle": "実験的", - "kbn.visualize.newVisWizard.experimentalTooltip": "このビジュアライゼーションは今後のリリースで変更または削除される可能性があり、SLA のサポート対象になりません。", - "kbn.visualize.newVisWizard.filterVisTypeAriaLabel": "ビジュアライゼーションのタイプでフィルタリング", - "kbn.visualize.newVisWizard.helpText": "タイプを選択してビジュアライゼーションの作成を始めましょう。", - "kbn.visualize.newVisWizard.helpTextAriaLabel": "タイプを選択してビジュアライゼーションの作成を始めましょう。ESC を押してこのモダルを閉じます。Tab キーを押して次に進みます。", - "kbn.visualize.newVisWizard.newVisTypeTitle": "新規 {visTypeName}", - "kbn.visualize.newVisWizard.resultsFound": "{resultCount} 個の{resultCount, plural, one {タイプ} other {タイプ} } が見つかりました", - "kbn.visualize.newVisWizard.searchSelection.notFoundLabel": "一致するインデックスまたは保存された検索が見つかりませんでした。", - "kbn.visualize.newVisWizard.searchSelection.savedObjectType.indexPattern": "インデックスパターン", - "kbn.visualize.newVisWizard.searchSelection.savedObjectType.search": "保存された検索", - "kbn.visualize.newVisWizard.selectVisType": "ビジュアライゼーションのタイプを選択してください", - "kbn.visualize.newVisWizard.title": "新規ビジュアライゼーション", - "kbn.visualize.newVisWizard.visTypeAliasDescription": "Visualize外でKibanaアプリケーションを開きます。", - "kbn.visualize.newVisWizard.visTypeAliasTitle": "Kibanaアプリケーション", - "kbn.visualize.pageHeading": "{chartName} {chartType} ビジュアライゼーション", - "kbn.visualize.saveDialog.saveAndAddToDashboardButtonLabel": "保存してダッシュボードに追加", - "kbn.visualize.topNavMenu.openInspectorButtonAriaLabel": "ビジュアライゼーションのインスペクターを開く", - "kbn.visualize.topNavMenu.openInspectorDisabledButtonTooltip": "このビジュアライゼーションはインスペクターをサポートしていません。", - "kbn.visualize.topNavMenu.refreshButtonAriaLabel": "更新", - "kbn.visualize.topNavMenu.saveVisualization.failureNotificationText": "「{visTitle}」の保存中にエラーが発生しました", - "kbn.visualize.topNavMenu.saveVisualization.successNotificationText": "「{visTitle}」が保存されました", - "kbn.visualize.topNavMenu.saveVisualizationButtonAriaLabel": "ビジュアライゼーションを保存", - "kbn.visualize.topNavMenu.saveVisualizationDisabledButtonTooltip": "保存する前に変更を適用または破棄", - "kbn.visualize.topNavMenu.shareVisualizationButtonAriaLabel": "ビジュアライゼーションを共有", - "kbn.visualize.visualizeDescription": "ビジュアライゼーションを作成して Elasticsearch インデックスに保存されたデータを集約します。", - "kbn.visualize.visualizeListingBreadcrumbsTitle": "可視化", - "kbn.visualize.visualizeListingDeleteErrorTitle": "ビジュアライゼーションの削除中にエラーが発生", - "kbn.visualize.wizard.step1Breadcrumb": "作成", - "kbn.visualize.wizard.step2Breadcrumb": "作成", - "kbn.visualizeTitle": "可視化", "visTypeVislib.area.areaDescription": "折れ線グラフの下の数量を強調します。", "visTypeVislib.area.areaTitle": "エリア", "visTypeVislib.area.countText": "カウント", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 6ebba29e594805..27787a11e43cab 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -1103,307 +1103,6 @@ "kbn.advancedSettings.visualization.tileMap.wmsDefaultsTitle": "默认 WMS 属性", "kbn.advancedSettings.visualizeEnableLabsText": "允许用户创建、查看和编辑实验性可视化。如果禁用,\n 仅被视为生产就绪的可视化可供用户使用。", "kbn.advancedSettings.visualizeEnableLabsTitle": "启用实验性可视化", - "home.tutorials.common.auditbeat.cloudInstructions.gettingStarted.title": "入门", - "home.tutorials.common.auditbeat.premCloudInstructions.gettingStarted.title": "入门", - "home.tutorials.common.auditbeat.premInstructions.gettingStarted.title": "入门", - "home.tutorials.common.auditbeatCloudInstructions.config.debTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.auditbeatCloudInstructions.config.debTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.auditbeatCloudInstructions.config.debTitle": "编辑配置", - "home.tutorials.common.auditbeatCloudInstructions.config.osxTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.auditbeatCloudInstructions.config.osxTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.auditbeatCloudInstructions.config.osxTitle": "编辑配置", - "home.tutorials.common.auditbeatCloudInstructions.config.rpmTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.auditbeatCloudInstructions.config.rpmTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.auditbeatCloudInstructions.config.rpmTitle": "编辑配置", - "home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.auditbeatCloudInstructions.config.windowsTitle": "编辑配置", - "home.tutorials.common.auditbeatInstructions.config.debTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.auditbeatInstructions.config.debTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.auditbeatInstructions.config.debTitle": "编辑配置", - "home.tutorials.common.auditbeatInstructions.config.osxTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.auditbeatInstructions.config.osxTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.auditbeatInstructions.config.osxTitle": "编辑配置", - "home.tutorials.common.auditbeatInstructions.config.rpmTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.auditbeatInstructions.config.rpmTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.auditbeatInstructions.config.rpmTitle": "编辑配置", - "home.tutorials.common.auditbeatInstructions.config.windowsTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.auditbeatInstructions.config.windowsTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.auditbeatInstructions.config.windowsTitle": "编辑配置", - "home.tutorials.common.auditbeatInstructions.install.debTextPost": "寻找 32 位软件包?请参阅[下载页面]({linkUrl})。", - "home.tutorials.common.auditbeatInstructions.install.debTextPre": "首次使用 Auditbeat?请参阅[入门指南]({linkUrl})。", - "home.tutorials.common.auditbeatInstructions.install.debTitle": "下载并安装 Auditbeat", - "home.tutorials.common.auditbeatInstructions.install.osxTextPre": "首次使用 Auditbeat?请参阅[入门指南]({linkUrl})。", - "home.tutorials.common.auditbeatInstructions.install.osxTitle": "下载并安装 Auditbeat", - "home.tutorials.common.auditbeatInstructions.install.rpmTextPost": "寻找 32 位软件包?请参阅[下载页面]({linkUrl})。", - "home.tutorials.common.auditbeatInstructions.install.rpmTextPre": "首次使用 Auditbeat?请参阅[入门指南]({linkUrl})。", - "home.tutorials.common.auditbeatInstructions.install.rpmTitle": "下载并安装 Auditbeat", - "home.tutorials.common.auditbeatInstructions.install.windowsTextPost": "在 {auditbeatPath} 文件中修改 {propertyName} 下的设置以指向您的 Elasticsearch 安装。", - "home.tutorials.common.auditbeatInstructions.install.windowsTextPre": "首次使用 Auditbeat?请参阅[入门指南]({guideLinkUrl})。\n 1.从[下载]({auditbeatLinkUrl})页面下载 Auditbeat Windows zip 文件。\n 2.将 zip 文件的内容解压缩到 {folderPath}。\n 3.将 `{directoryName}` 目录重命名为 `Auditbeat`。\n 4.以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择**以管理员身份运行**)。如果您正在运行 Windows XP,您可能需要下载并安装 PowerShell。\n 5.从 PowerShell 提示符处,运行以下命令以将 Auditbeat 安装为 Windows 服务。", - "home.tutorials.common.auditbeatInstructions.install.windowsTitle": "下载并安装 Auditbeat", - "home.tutorials.common.auditbeatInstructions.start.debTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.auditbeatInstructions.start.debTitle": "启动 Auditbeat", - "home.tutorials.common.auditbeatInstructions.start.osxTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.auditbeatInstructions.start.osxTitle": "启动 Auditbeat", - "home.tutorials.common.auditbeatInstructions.start.rpmTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.auditbeatInstructions.start.rpmTitle": "启动 Auditbeat", - "home.tutorials.common.auditbeatInstructions.start.windowsTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.auditbeatInstructions.start.windowsTitle": "启动 Auditbeat", - "home.tutorials.common.auditbeatStatusCheck.buttonLabel": "检查数据", - "home.tutorials.common.auditbeatStatusCheck.errorText": "尚未接收到数据", - "home.tutorials.common.auditbeatStatusCheck.successText": "已成功接收数据", - "home.tutorials.common.auditbeatStatusCheck.text": "确认从 Auditbeat 收到数据", - "home.tutorials.common.auditbeatStatusCheck.title": "状态", - "home.tutorials.common.filebeat.cloudInstructions.gettingStarted.title": "入门", - "home.tutorials.common.filebeat.premCloudInstructions.gettingStarted.title": "入门", - "home.tutorials.common.filebeat.premInstructions.gettingStarted.title": "入门", - "home.tutorials.common.filebeatCloudInstructions.config.debTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.filebeatCloudInstructions.config.debTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.filebeatCloudInstructions.config.debTitle": "编辑配置", - "home.tutorials.common.filebeatCloudInstructions.config.osxTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.filebeatCloudInstructions.config.osxTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.filebeatCloudInstructions.config.osxTitle": "编辑配置", - "home.tutorials.common.filebeatCloudInstructions.config.rpmTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.filebeatCloudInstructions.config.rpmTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.filebeatCloudInstructions.config.rpmTitle": "编辑配置", - "home.tutorials.common.filebeatCloudInstructions.config.windowsTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.filebeatCloudInstructions.config.windowsTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.filebeatCloudInstructions.config.windowsTitle": "编辑配置", - "home.tutorials.common.filebeatEnableInstructions.debTextPost": "在 `/etc/filebeat/modules.d/{moduleName}.yml` 文件中修改设置。", - "home.tutorials.common.filebeatEnableInstructions.debTitle": "启用和配置 {moduleName} 模块", - "home.tutorials.common.filebeatEnableInstructions.osxTextPost": "在 `modules.d/{moduleName}.yml` 文件中修改设置。", - "home.tutorials.common.filebeatEnableInstructions.osxTextPre": "从安装目录中,运行:", - "home.tutorials.common.filebeatEnableInstructions.osxTitle": "启用和配置 {moduleName} 模块", - "home.tutorials.common.filebeatEnableInstructions.rpmTextPost": "在 `/etc/filebeat/modules.d/{moduleName}.yml` 文件中修改设置。", - "home.tutorials.common.filebeatEnableInstructions.rpmTitle": "启用和配置 {moduleName} 模块", - "home.tutorials.common.filebeatEnableInstructions.windowsTextPost": "在 `modules.d/{moduleName}.yml` 文件中修改设置。", - "home.tutorials.common.filebeatEnableInstructions.windowsTextPre": "从 {path} 文件夹中,运行:", - "home.tutorials.common.filebeatEnableInstructions.windowsTitle": "启用和配置 {moduleName} 模块", - "home.tutorials.common.filebeatInstructions.config.debTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.filebeatInstructions.config.debTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.filebeatInstructions.config.debTitle": "编辑配置", - "home.tutorials.common.filebeatInstructions.config.osxTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.filebeatInstructions.config.osxTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.filebeatInstructions.config.osxTitle": "编辑配置", - "home.tutorials.common.filebeatInstructions.config.rpmTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.filebeatInstructions.config.rpmTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.filebeatInstructions.config.rpmTitle": "编辑配置", - "home.tutorials.common.filebeatInstructions.config.windowsTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.filebeatInstructions.config.windowsTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.filebeatInstructions.config.windowsTitle": "编辑配置", - "home.tutorials.common.filebeatInstructions.install.debTextPost": "寻找 32 位软件包?请参阅[下载页面]({linkUrl})。", - "home.tutorials.common.filebeatInstructions.install.debTextPre": "首次使用 Filebeat?请参阅[入门指南]({linkUrl})。", - "home.tutorials.common.filebeatInstructions.install.debTitle": "下载并安装 Filebeat", - "home.tutorials.common.filebeatInstructions.install.osxTextPre": "首次使用 Filebeat?请参阅[入门指南]({linkUrl})。", - "home.tutorials.common.filebeatInstructions.install.osxTitle": "下载并安装 Filebeat", - "home.tutorials.common.filebeatInstructions.install.rpmTextPost": "寻找 32 位软件包?请参阅[下载页面]({linkUrl})。", - "home.tutorials.common.filebeatInstructions.install.rpmTextPre": "首次使用 Filebeat?请参阅[入门指南]({linkUrl})。", - "home.tutorials.common.filebeatInstructions.install.rpmTitle": "下载并安装 Filebeat", - "home.tutorials.common.filebeatInstructions.install.windowsTextPost": "在 {filebeatPath} 文件中修改 {propertyName} 下的设置以指向您的 Elasticsearch 安装。", - "home.tutorials.common.filebeatInstructions.install.windowsTextPre": "首次使用 Filebeat?请参阅[入门指南]({guideLinkUrl})。\n 1.从[下载]({filebeatLinkUrl})页面下载 Filebeat Windows zip 文件。\n 2.将 zip 文件的内容解压缩到 {folderPath}。\n 3.将 `{directoryName}` 目录重命名为 `Filebeat`。\n 4.以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择**以管理员身份运行**)。如果您正在运行 Windows XP,您可能需要下载并安装 PowerShell。\n 5.从 PowerShell 提示符处,运行以下命令以将 Filebeat 安装为 Windows 服务。", - "home.tutorials.common.filebeatInstructions.install.windowsTitle": "下载并安装 Filebeat", - "home.tutorials.common.filebeatInstructions.start.debTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.filebeatInstructions.start.debTitle": "启动 Filebeat", - "home.tutorials.common.filebeatInstructions.start.osxTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.filebeatInstructions.start.osxTitle": "启动 Filebeat", - "home.tutorials.common.filebeatInstructions.start.rpmTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.filebeatInstructions.start.rpmTitle": "启动 Filebeat", - "home.tutorials.common.filebeatInstructions.start.windowsTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.filebeatInstructions.start.windowsTitle": "启动 Filebeat", - "home.tutorials.common.filebeatStatusCheck.buttonLabel": "检查数据", - "home.tutorials.common.filebeatStatusCheck.errorText": "尚未从此模块收到任何数据", - "home.tutorials.common.filebeatStatusCheck.successText": "从此模块成功收到数据", - "home.tutorials.common.filebeatStatusCheck.text": "确认已从 Filebeat `{moduleName}` 模块成功收到数据", - "home.tutorials.common.filebeatStatusCheck.title": "模块状态", - "home.tutorials.common.functionbeat.cloudInstructions.gettingStarted.title": "入门", - "home.tutorials.common.functionbeat.premCloudInstructions.gettingStarted.title": "入门", - "home.tutorials.common.functionbeat.premInstructions.gettingStarted.title": "入门", - "home.tutorials.common.functionbeatAWSInstructions.textPost": "其中 `` 和 `` 是您的帐户凭据,`us-east-1` 是所需的地区。", - "home.tutorials.common.functionbeatAWSInstructions.textPre": "在环境中设置您的 AWS 帐户凭据:", - "home.tutorials.common.functionbeatAWSInstructions.title": "设置 AWS 凭据", - "home.tutorials.common.functionbeatCloudInstructions.config.osxTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.functionbeatCloudInstructions.config.osxTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.functionbeatCloudInstructions.config.osxTitle": "编辑配置", - "home.tutorials.common.functionbeatCloudInstructions.config.windowsTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.functionbeatCloudInstructions.config.windowsTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.functionbeatCloudInstructions.config.windowsTitle": "编辑配置", - "home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTextPost": "其中 `` 是要采集的日志组名称,`` 是将用于暂存 Functionbeat 部署的有效 S3 存储桶名称。", - "home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTitle": "配置 Cloudwatch 日志组", - "home.tutorials.common.functionbeatEnableOnPremInstructionsOSXLinux.textPre": "在 `functionbeat.yml` 文件中修改设置。", - "home.tutorials.common.functionbeatEnableOnPremInstructionsWindows.textPre": "在 {path} 文件中修改设置。", - "home.tutorials.common.functionbeatInstructions.config.osxTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.functionbeatInstructions.config.osxTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.functionbeatInstructions.config.osxTitle": "配置 Elastic 集群", - "home.tutorials.common.functionbeatInstructions.config.windowsTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.functionbeatInstructions.config.windowsTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.functionbeatInstructions.config.windowsTitle": "编辑配置", - "home.tutorials.common.functionbeatInstructions.deploy.osxTextPre": "这会将 Functionbeat 安装为 Lambda 函数。`setup` 命令检查 Elasticsearch 配置并加载 Kibana 索引模式。通常可省略此命令。", - "home.tutorials.common.functionbeatInstructions.deploy.osxTitle": "将 Functionbeat 部署到 AWS Lambda", - "home.tutorials.common.functionbeatInstructions.deploy.windowsTextPre": "这会将 Functionbeat 安装为 Lambda 函数。`setup` 命令检查 Elasticsearch 配置并加载 Kibana 索引模式。通常可省略此命令。", - "home.tutorials.common.functionbeatInstructions.deploy.windowsTitle": "将 Functionbeat 部署到 AWS Lambda", - "home.tutorials.common.functionbeatInstructions.install.linuxTextPre": "首次使用 Functionbeat?请参阅[入门指南]({link})。", - "home.tutorials.common.functionbeatInstructions.install.linuxTitle": "下载并安装 Functionbeat", - "home.tutorials.common.functionbeatInstructions.install.osxTextPre": "首次使用 Functionbeat?请参阅[入门指南]({link})。", - "home.tutorials.common.functionbeatInstructions.install.osxTitle": "下载并安装 Functionbeat", - "home.tutorials.common.functionbeatInstructions.install.windowsTextPre": "首次使用 Functionbeat?请参阅[入门指南]({functionbeatLink})。\n 1.从[下载]({elasticLink})页面下载 Functionbeat Windows zip 文件。\n 2.将 zip 文件的内容解压缩到 {folderPath}。\n 3.将 {directoryName} 目录重命名为 `Functionbeat`。\n 4.以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择**以管理员身份运行**)。如果您正在运行 Windows XP,您可能需要下载并安装 PowerShell。\n 5.从 PowerShell 提示符下,前往 Functionbeat 目录:", - "home.tutorials.common.functionbeatInstructions.install.windowsTitle": "下载并安装 Functionbeat", - "home.tutorials.common.functionbeatStatusCheck.buttonLabel": "检查数据", - "home.tutorials.common.functionbeatStatusCheck.errorText": "尚未从 Functionbeat 收到任何数据", - "home.tutorials.common.functionbeatStatusCheck.successText": "从 Functionbeat 成功收到数据", - "home.tutorials.common.functionbeatStatusCheck.text": "确认从 Functionbeat 收到数据", - "home.tutorials.common.functionbeatStatusCheck.title": "Functionbeat 状态", - "home.tutorials.common.heartbeat.cloudInstructions.gettingStarted.title": "入门", - "home.tutorials.common.heartbeat.premCloudInstructions.gettingStarted.title": "入门", - "home.tutorials.common.heartbeat.premInstructions.gettingStarted.title": "入门", - "home.tutorials.common.heartbeatCloudInstructions.config.debTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.heartbeatCloudInstructions.config.debTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.heartbeatCloudInstructions.config.debTitle": "编辑配置", - "home.tutorials.common.heartbeatCloudInstructions.config.osxTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.heartbeatCloudInstructions.config.osxTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.heartbeatCloudInstructions.config.osxTitle": "编辑配置", - "home.tutorials.common.heartbeatCloudInstructions.config.rpmTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.heartbeatCloudInstructions.config.rpmTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.heartbeatCloudInstructions.config.rpmTitle": "编辑配置", - "home.tutorials.common.heartbeatCloudInstructions.config.windowsTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.heartbeatCloudInstructions.config.windowsTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.heartbeatCloudInstructions.config.windowsTitle": "编辑配置", - "home.tutorials.common.heartbeatEnableCloudInstructions.debTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", - "home.tutorials.common.heartbeatEnableCloudInstructions.defaultTextPost": "有关如何在 Heartbeat 中配置监测的详细信息,请参阅 [Heartbeat 配置文档]({configureLink})", - "home.tutorials.common.heartbeatEnableCloudInstructions.defaultTitle": "编辑配置 - 添加监测", - "home.tutorials.common.heartbeatEnableCloudInstructions.osxTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", - "home.tutorials.common.heartbeatEnableCloudInstructions.rpmTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", - "home.tutorials.common.heartbeatEnableCloudInstructions.windowsTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", - "home.tutorials.common.heartbeatEnableOnPremInstructions.debTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", - "home.tutorials.common.heartbeatEnableOnPremInstructions.defaultTextPost": "其中 {hostTemplate} 是受监测 URL。有关如何在 Heartbeat 中配置监测的详细信息,请参阅 [Heartbeat 配置文档]({configureLink})", - "home.tutorials.common.heartbeatEnableOnPremInstructions.defaultTitle": "编辑配置 - 添加监测", - "home.tutorials.common.heartbeatEnableOnPremInstructions.osxTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", - "home.tutorials.common.heartbeatEnableOnPremInstructions.rpmTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", - "home.tutorials.common.heartbeatEnableOnPremInstructions.windowsTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", - "home.tutorials.common.heartbeatInstructions.config.debTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.heartbeatInstructions.config.debTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.heartbeatInstructions.config.debTitle": "编辑配置", - "home.tutorials.common.heartbeatInstructions.config.osxTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.heartbeatInstructions.config.osxTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.heartbeatInstructions.config.osxTitle": "编辑配置", - "home.tutorials.common.heartbeatInstructions.config.rpmTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.heartbeatInstructions.config.rpmTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.heartbeatInstructions.config.rpmTitle": "编辑配置", - "home.tutorials.common.heartbeatInstructions.config.windowsTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.heartbeatInstructions.config.windowsTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.heartbeatInstructions.config.windowsTitle": "编辑配置", - "home.tutorials.common.heartbeatInstructions.install.debTextPost": "寻找 32 位软件包?请参阅[下载页面]({link})。", - "home.tutorials.common.heartbeatInstructions.install.debTextPre": "首次使用 Heartbeat?请参阅[入门指南]({link})。", - "home.tutorials.common.heartbeatInstructions.install.debTitle": "下载并安装 Heartbeat", - "home.tutorials.common.heartbeatInstructions.install.osxTextPre": "首次使用 Heartbeat?请参阅[入门指南]({link})。", - "home.tutorials.common.heartbeatInstructions.install.osxTitle": "下载并安装 Heartbeat", - "home.tutorials.common.heartbeatInstructions.install.rpmTextPre": "首次使用 Heartbeat?请参阅[入门指南]({link})。", - "home.tutorials.common.heartbeatInstructions.install.rpmTitle": "下载并安装 Heartbeat", - "home.tutorials.common.heartbeatInstructions.install.windowsTextPre": "首次使用 Heartbeat?请参阅[入门指南]({heartbeatLink})。\n 1.从[下载]({elasticLink})页面下载 Heartbeat Windows zip 文件。\n 2.将 zip 文件的内容解压缩到 {folderPath}。\n 3.将 {directoryName} 目录重命名为 `Heartbeat`。\n 4.以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择**以管理员身份运行**)。如果您正在运行 Windows XP,您可能需要下载并安装 PowerShell。\n 5.从 PowerShell 提示符处,运行以下命令以将 Heartbeat 安装为 Windows 服务。", - "home.tutorials.common.heartbeatInstructions.install.windowsTitle": "下载并安装 Heartbeat", - "home.tutorials.common.heartbeatInstructions.start.debTextPre": "`setup` 命令加载 Kibana 索引模式。", - "home.tutorials.common.heartbeatInstructions.start.debTitle": "启动 Heartbeat", - "home.tutorials.common.heartbeatInstructions.start.osxTextPre": "`setup` 命令加载 Kibana 索引模式。", - "home.tutorials.common.heartbeatInstructions.start.osxTitle": "启动 Heartbeat", - "home.tutorials.common.heartbeatInstructions.start.rpmTextPre": "`setup` 命令加载 Kibana 索引模式。", - "home.tutorials.common.heartbeatInstructions.start.rpmTitle": "启动 Heartbeat", - "home.tutorials.common.heartbeatInstructions.start.windowsTextPre": "`setup` 命令加载 Kibana 索引模式。", - "home.tutorials.common.heartbeatInstructions.start.windowsTitle": "启动 Heartbeat", - "home.tutorials.common.heartbeatStatusCheck.buttonLabel": "检查数据", - "home.tutorials.common.heartbeatStatusCheck.errorText": "尚未从 Heartbeat 收到任何数据", - "home.tutorials.common.heartbeatStatusCheck.successText": "从 Heartbeat 成功收到数据", - "home.tutorials.common.heartbeatStatusCheck.text": "确认从 Heartbeat 收到数据", - "home.tutorials.common.heartbeatStatusCheck.title": "Heartbeat 状态", - "home.tutorials.common.logstashInstructions.install.java.osxTextPre": "按照[此处]({link})的安装说明执行操作。", - "home.tutorials.common.logstashInstructions.install.java.osxTitle": "下载并安装 Java Runtime Environment", - "home.tutorials.common.logstashInstructions.install.java.windowsTextPre": "按照[此处]({link})的安装说明执行操作。", - "home.tutorials.common.logstashInstructions.install.java.windowsTitle": "下载并安装 Java Runtime Environment", - "home.tutorials.common.logstashInstructions.install.logstash.osxTextPre": "首次使用 Logstash? 请参阅[入门指南]({link})。", - "home.tutorials.common.logstashInstructions.install.logstash.osxTitle": "下载并安装 Logstash", - "home.tutorials.common.logstashInstructions.install.logstash.windowsTextPre": "首次使用 Logstash? 请参阅[入门指南]({logstashLink})。\n 1. [下载]({elasticLink}) Logstash Windows zip 文件。\n 2.解压缩 zip 文件的内容。", - "home.tutorials.common.logstashInstructions.install.logstash.windowsTitle": "下载并安装 Logstash", - "home.tutorials.common.metricbeat.cloudInstructions.gettingStarted.title": "入门", - "home.tutorials.common.metricbeat.premCloudInstructions.gettingStarted.title": "入门", - "home.tutorials.common.metricbeat.premInstructions.gettingStarted.title": "入门", - "home.tutorials.common.metricbeatCloudInstructions.config.debTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.metricbeatCloudInstructions.config.debTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.metricbeatCloudInstructions.config.debTitle": "编辑配置", - "home.tutorials.common.metricbeatCloudInstructions.config.osxTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.metricbeatCloudInstructions.config.osxTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.metricbeatCloudInstructions.config.osxTitle": "编辑配置", - "home.tutorials.common.metricbeatCloudInstructions.config.rpmTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.metricbeatCloudInstructions.config.rpmTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.metricbeatCloudInstructions.config.rpmTitle": "编辑配置", - "home.tutorials.common.metricbeatCloudInstructions.config.windowsTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.metricbeatCloudInstructions.config.windowsTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.metricbeatCloudInstructions.config.windowsTitle": "编辑配置", - "home.tutorials.common.metricbeatEnableInstructions.debTextPost": "在 `/etc/metricbeat/modules.d/{moduleName}.yml` 文件中修改设置。", - "home.tutorials.common.metricbeatEnableInstructions.debTitle": "启用和配置 {moduleName} 模块", - "home.tutorials.common.metricbeatEnableInstructions.osxTextPost": "在 `modules.d/{moduleName}.yml` 文件中修改设置。", - "home.tutorials.common.metricbeatEnableInstructions.osxTextPre": "从安装目录中,运行:", - "home.tutorials.common.metricbeatEnableInstructions.osxTitle": "启用和配置 {moduleName} 模块", - "home.tutorials.common.metricbeatEnableInstructions.rpmTextPost": "在 `/etc/metricbeat/modules.d/{moduleName}.yml` 文件中修改设置。", - "home.tutorials.common.metricbeatEnableInstructions.rpmTitle": "启用和配置 {moduleName} 模块", - "home.tutorials.common.metricbeatEnableInstructions.windowsTextPost": "在 `modules.d/{moduleName}.yml` 文件中修改设置。", - "home.tutorials.common.metricbeatEnableInstructions.windowsTextPre": "从 {path} 文件夹中,运行:", - "home.tutorials.common.metricbeatEnableInstructions.windowsTitle": "启用和配置 {moduleName} 模块", - "home.tutorials.common.metricbeatInstructions.config.debTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.metricbeatInstructions.config.debTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.metricbeatInstructions.config.debTitle": "编辑配置", - "home.tutorials.common.metricbeatInstructions.config.osxTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.metricbeatInstructions.config.osxTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.metricbeatInstructions.config.osxTitle": "编辑配置", - "home.tutorials.common.metricbeatInstructions.config.rpmTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.metricbeatInstructions.config.rpmTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.metricbeatInstructions.config.rpmTitle": "编辑配置", - "home.tutorials.common.metricbeatInstructions.config.windowsTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.metricbeatInstructions.config.windowsTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.metricbeatInstructions.config.windowsTitle": "编辑配置", - "home.tutorials.common.metricbeatInstructions.install.debTextPost": "寻找 32 位软件包?请参阅[下载页面]({link})。", - "home.tutorials.common.metricbeatInstructions.install.debTextPre": "首次使用 Metricbeat?请参阅[入门指南]({link})。", - "home.tutorials.common.metricbeatInstructions.install.debTitle": "下载并安装 Metricbeat", - "home.tutorials.common.metricbeatInstructions.install.osxTextPre": "首次使用 Metricbeat?请参阅[入门指南]({link})。", - "home.tutorials.common.metricbeatInstructions.install.osxTitle": "下载并安装 Metricbeat", - "home.tutorials.common.metricbeatInstructions.install.rpmTextPre": "首次使用 Metricbeat?请参阅[入门指南]({link})。", - "home.tutorials.common.metricbeatInstructions.install.rpmTitle": "下载并安装 Metricbeat", - "home.tutorials.common.metricbeatInstructions.install.windowsTextPost": "在 {path} 文件中修改 `output.elasticsearch` 下的设置以指向您的 Elasticsearch 安装。", - "home.tutorials.common.metricbeatInstructions.install.windowsTextPre": "首次使用 Metricbeat?请参阅[入门指南]({metricbeatLink})。\n 1.从[下载]({elasticLink})页面下载 Metricbeat Windows zip 文件。\n 2.将 zip 文件的内容解压缩到 {folderPath}。\n 3.将 {directoryName} 目录重命名为 `Metricbeat`。\n 4.以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择**以管理员身份运行**)。如果您正在运行 Windows XP,您可能需要下载并安装 PowerShell。\n 5.从 PowerShell 提示符处,运行以下命令以将 Metricbeat 安装为 Windows 服务。", - "home.tutorials.common.metricbeatInstructions.install.windowsTitle": "下载并安装 Metricbeat", - "home.tutorials.common.metricbeatInstructions.start.debTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.metricbeatInstructions.start.debTitle": "启动 Metricbeat", - "home.tutorials.common.metricbeatInstructions.start.osxTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.metricbeatInstructions.start.osxTitle": "启动 Metricbeat", - "home.tutorials.common.metricbeatInstructions.start.rpmTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.metricbeatInstructions.start.rpmTitle": "启动 Metricbeat", - "home.tutorials.common.metricbeatInstructions.start.windowsTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.metricbeatInstructions.start.windowsTitle": "启动 Metricbeat", - "home.tutorials.common.metricbeatStatusCheck.buttonLabel": "检查数据", - "home.tutorials.common.metricbeatStatusCheck.errorText": "尚未从此模块收到任何数据", - "home.tutorials.common.metricbeatStatusCheck.successText": "从此模块成功收到数据", - "home.tutorials.common.metricbeatStatusCheck.text": "确认从 Metricbeat `{moduleName}` 模块收到数据", - "home.tutorials.common.metricbeatStatusCheck.title": "模块状态", - "home.tutorials.common.premCloudInstructions.option1.textPre": "前往 [Elastic Cloud]({link})。如果您还没有帐户,请注册。免费试用 14 天。\n\n登录至 Elastic Cloud 控制台\n\n如要创建集群,请在 Elastic Cloud 控制台中:\n 1.选择**创建部署**,然后指定**部署名称**\n 2.根据需要修改其他部署选项(或者不修改,默认值可帮助您快速入门)\n 3.单击**创建部署**\n 4.等候部署创建完成\n 5.前往新的 Cloud Kibana 实例,然后按照 Kibana 主页上的说明执行操作", - "home.tutorials.common.premCloudInstructions.option1.title": "选项 1:在 Elastic Cloud 中尝试", - "home.tutorials.common.premCloudInstructions.option2.textPre": "如果基于托管式 Elasticsearch 实例运行此 Kibana 实例,请继续手动设置。\n\n针对您的记录,分别将 **Elasticsearch** 终端节点另存为 {urlTemplate}将集群**密码**另存为 {passwordTemplate}", - "home.tutorials.common.premCloudInstructions.option2.title": "选项 2:将本地 Kibana 连接到 Cloud 实例", - "home.tutorials.common.winlogbeat.cloudInstructions.gettingStarted.title": "入门", - "home.tutorials.common.winlogbeat.premCloudInstructions.gettingStarted.title": "入门", - "home.tutorials.common.winlogbeat.premInstructions.gettingStarted.title": "入门", - "home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", - "home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", - "home.tutorials.common.winlogbeatCloudInstructions.config.windowsTitle": "编辑配置", - "home.tutorials.common.winlogbeatInstructions.config.windowsTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", - "home.tutorials.common.winlogbeatInstructions.config.windowsTextPre": "修改 {path} 以设置连接信息:", - "home.tutorials.common.winlogbeatInstructions.config.windowsTitle": "编辑配置", - "home.tutorials.common.winlogbeatInstructions.install.windowsTextPost": "在 {path} 文件中修改 `output.elasticsearch` 下的设置以指向您的 Elasticsearch 安装。", - "home.tutorials.common.winlogbeatInstructions.install.windowsTextPre": "首次使用 Winlogbeat?请参阅[入门指南]({winlogbeatLink})。\n 1.从[下载]({elasticLink})页面下载 Winlogbeat Windows zip 文件。\n 2.将 zip 文件的内容解压缩到 {folderPath}。\n 3.将 {directoryName} 目录重命名为 `Winlogbeat`。\n 4.以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择**以管理员身份运行**)。如果您正在运行 Windows XP,您可能需要下载并安装 PowerShell。\n 5.从 PowerShell 提示符处,运行以下命令以将 Winlogbeat 安装为 Windows 服务。", - "home.tutorials.common.winlogbeatInstructions.install.windowsTitle": "下载并安装 Winlogbeat", - "home.tutorials.common.winlogbeatInstructions.start.windowsTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", - "home.tutorials.common.winlogbeatInstructions.start.windowsTitle": "启动 Winlogbeat", - "home.tutorials.common.winlogbeatStatusCheck.buttonLabel": "检查数据", - "home.tutorials.common.winlogbeatStatusCheck.errorText": "尚未接收到数据", - "home.tutorials.common.winlogbeatStatusCheck.successText": "已成功接收数据", - "home.tutorials.common.winlogbeatStatusCheck.text": "确认从 Winlogbeat 收到数据", - "home.tutorials.common.winlogbeatStatusCheck.title": "模块状态", "kbn.context.breadcrumb": "{indexPatternTitle}#{docId} 的上下文", "kbn.context.failedToLoadAnchorDocumentDescription": "无法加载该定位点文档", "kbn.context.failedToLoadAnchorDocumentErrorDescription": "无法加载定位点文档。", @@ -2050,6 +1749,368 @@ "kbn.management.settings.searchBarAriaLabel": "搜索高级设置", "kbn.management.settings.sectionLabel": "高级设置", "kbn.managementTitle": "管理", + "kbn.settings.advancedSettings.voiceAnnouncement.searchResultScreenReaderMessage": "您已搜索 {query}。{sectionLenght, plural, one {# 个部分} other {# 个部分}}中有 {optionLenght, plural, one {# 个选项} other {# 个选项}}", + "kbn.topNavMenu.openInspectorButtonLabel": "检查", + "kbn.topNavMenu.refreshButtonLabel": "刷新", + "kbn.topNavMenu.saveVisualizationButtonLabel": "保存", + "kbn.topNavMenu.shareVisualizationButtonLabel": "共享", + "kbn.visualize.badge.readOnly.text": "只读", + "kbn.visualize.badge.readOnly.tooltip": "无法保存可视化", + "kbn.visualize.createVisualization.noIndexPatternOrSavedSearchIdErrorMessage": "必须提供 indexPattern 或 savedSearchId", + "kbn.visualize.editor.createBreadcrumb": "创建", + "kbn.visualize.experimentalVisInfoText": "此可视化标记为“实验”。", + "kbn.visualize.linkedToSearch.unlinkButtonTooltip": "双击可取消与“已保存搜索”的链接", + "kbn.visualize.linkedToSearch.unlinkSuccessNotificationText": "取消与已保存搜索 “{searchTitle}” 的链接", + "kbn.visualize.linkedToSearchInfoText": "链接到“已保存搜索”", + "kbn.visualize.listing.betaTitle": "公测版", + "kbn.visualize.listing.betaTooltip": "此可视化为公测版,可能会进行更改。设计和代码相对于正式发行版功能还不够成熟,将按原样提供,且不提供任何保证。公测版功能不受正式发行版功能支持 SLA 的约束", + "kbn.visualize.listing.breadcrumb": "可视化", + "kbn.visualize.listing.createNew.createButtonLabel": "新建可视化", + "kbn.visualize.listing.createNew.description": "可以根据您的数据创建不同的可视化。", + "kbn.visualize.listing.createNew.title": "创建首个可视化", + "kbn.visualize.listing.experimentalTitle": "实验性", + "kbn.visualize.listing.experimentalTooltip": "未来版本可能会更改或删除此可视化,其不受支持 SLA 的约束。", + "kbn.visualize.listing.noItemsMessage": "看起来您还没有任何可视化。", + "kbn.visualize.listing.table.entityName": "可视化", + "kbn.visualize.listing.table.entityNamePlural": "可视化", + "kbn.visualize.listing.table.listTitle": "可视化", + "kbn.visualize.listing.table.titleColumnName": "标题", + "kbn.visualize.listing.table.typeColumnName": "类型", + "kbn.visualize.newVisWizard.betaDescription": "此可视化为公测版,可能会进行更改。设计和代码相对于正式发行版功能还不够成熟,将按原样提供,且不提供任何保证。公测版功能不受正式发行版功能支持 SLA 的约束", + "kbn.visualize.newVisWizard.betaTitle": "公测版", + "kbn.visualize.newVisWizard.chooseSourceTitle": "选择源", + "kbn.visualize.newVisWizard.experimentalDescription": "这是实验性可视化。与稳定的可视化相比,其设计和实现均不够成熟,可能会随时发生更改。", + "kbn.visualize.newVisWizard.experimentalTitle": "实验性", + "kbn.visualize.newVisWizard.experimentalTooltip": "未来版本可能会更改或删除此可视化,其不受支持 SLA 的约束。", + "kbn.visualize.newVisWizard.filterVisTypeAriaLabel": "筛留可视化类型", + "kbn.visualize.newVisWizard.helpText": "通过为该可视化选择类型,来开始创建您的可视化。", + "kbn.visualize.newVisWizard.helpTextAriaLabel": "通过为该可视化选择类型,来开始创建您的可视化。按 Esc 键关闭此模式。按 Tab 键继续。", + "kbn.visualize.newVisWizard.newVisTypeTitle": "新建{visTypeName}", + "kbn.visualize.newVisWizard.resultsFound": "找到了 {resultCount} 个{resultCount, plural, one {类型} other {类型} }", + "kbn.visualize.newVisWizard.searchSelection.notFoundLabel": "未找到匹配的索引或已保存搜索。", + "kbn.visualize.newVisWizard.searchSelection.savedObjectType.indexPattern": "索引模式", + "kbn.visualize.newVisWizard.searchSelection.savedObjectType.search": "已保存搜索", + "kbn.visualize.newVisWizard.selectVisType": "选择可视化类型", + "kbn.visualize.newVisWizard.title": "新建可视化", + "kbn.visualize.newVisWizard.visTypeAliasDescription": "打开 Visualize 外部的 Kibana 应用程序。", + "kbn.visualize.newVisWizard.visTypeAliasTitle": "Kibana 应用程序", + "kbn.visualize.pageHeading": "{chartName} {chartType}可视化", + "kbn.visualize.saveDialog.saveAndAddToDashboardButtonLabel": "保存并添加到仪表板", + "kbn.visualize.topNavMenu.openInspectorButtonAriaLabel": "打开检查器查看可视化", + "kbn.visualize.topNavMenu.openInspectorDisabledButtonTooltip": "此可视化不支持任何检查器。", + "kbn.visualize.topNavMenu.refreshButtonAriaLabel": "刷新", + "kbn.visualize.topNavMenu.saveVisualization.failureNotificationText": "保存 “{visTitle}” 时出错", + "kbn.visualize.topNavMenu.saveVisualization.successNotificationText": "已保存“{visTitle}”", + "kbn.visualize.topNavMenu.saveVisualizationButtonAriaLabel": "保存可视化", + "kbn.visualize.topNavMenu.saveVisualizationDisabledButtonTooltip": "应用或放弃所做更改,然后保存", + "kbn.visualize.topNavMenu.shareVisualizationButtonAriaLabel": "共享可视化", + "kbn.visualize.visualizeDescription": "创建可视化并聚合存储在 Elasticsearch 索引中的数据。", + "kbn.visualize.visualizeListingBreadcrumbsTitle": "可视化", + "kbn.visualize.visualizeListingDeleteErrorTitle": "删除可视化时出错", + "kbn.visualize.wizard.step1Breadcrumb": "创建", + "kbn.visualize.wizard.step2Breadcrumb": "创建", + "kbn.visualizeTitle": "可视化", + "home.tutorials.common.auditbeat.cloudInstructions.gettingStarted.title": "入门", + "home.tutorials.common.auditbeat.premCloudInstructions.gettingStarted.title": "入门", + "home.tutorials.common.auditbeat.premInstructions.gettingStarted.title": "入门", + "home.tutorials.common.auditbeatCloudInstructions.config.debTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.auditbeatCloudInstructions.config.debTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.auditbeatCloudInstructions.config.debTitle": "编辑配置", + "home.tutorials.common.auditbeatCloudInstructions.config.osxTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.auditbeatCloudInstructions.config.osxTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.auditbeatCloudInstructions.config.osxTitle": "编辑配置", + "home.tutorials.common.auditbeatCloudInstructions.config.rpmTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.auditbeatCloudInstructions.config.rpmTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.auditbeatCloudInstructions.config.rpmTitle": "编辑配置", + "home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.auditbeatCloudInstructions.config.windowsTitle": "编辑配置", + "home.tutorials.common.auditbeatInstructions.config.debTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.auditbeatInstructions.config.debTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.auditbeatInstructions.config.debTitle": "编辑配置", + "home.tutorials.common.auditbeatInstructions.config.osxTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.auditbeatInstructions.config.osxTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.auditbeatInstructions.config.osxTitle": "编辑配置", + "home.tutorials.common.auditbeatInstructions.config.rpmTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.auditbeatInstructions.config.rpmTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.auditbeatInstructions.config.rpmTitle": "编辑配置", + "home.tutorials.common.auditbeatInstructions.config.windowsTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.auditbeatInstructions.config.windowsTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.auditbeatInstructions.config.windowsTitle": "编辑配置", + "home.tutorials.common.auditbeatInstructions.install.debTextPost": "寻找 32 位软件包?请参阅[下载页面]({linkUrl})。", + "home.tutorials.common.auditbeatInstructions.install.debTextPre": "首次使用 Auditbeat?请参阅[入门指南]({linkUrl})。", + "home.tutorials.common.auditbeatInstructions.install.debTitle": "下载并安装 Auditbeat", + "home.tutorials.common.auditbeatInstructions.install.osxTextPre": "首次使用 Auditbeat?请参阅[入门指南]({linkUrl})。", + "home.tutorials.common.auditbeatInstructions.install.osxTitle": "下载并安装 Auditbeat", + "home.tutorials.common.auditbeatInstructions.install.rpmTextPost": "寻找 32 位软件包?请参阅[下载页面]({linkUrl})。", + "home.tutorials.common.auditbeatInstructions.install.rpmTextPre": "首次使用 Auditbeat?请参阅[入门指南]({linkUrl})。", + "home.tutorials.common.auditbeatInstructions.install.rpmTitle": "下载并安装 Auditbeat", + "home.tutorials.common.auditbeatInstructions.install.windowsTextPost": "在 {auditbeatPath} 文件中修改 {propertyName} 下的设置以指向您的 Elasticsearch 安装。", + "home.tutorials.common.auditbeatInstructions.install.windowsTextPre": "首次使用 Auditbeat?请参阅[入门指南]({guideLinkUrl})。\n 1.从[下载]({auditbeatLinkUrl})页面下载 Auditbeat Windows zip 文件。\n 2.将 zip 文件的内容解压缩到 {folderPath}。\n 3.将 `{directoryName}` 目录重命名为 `Auditbeat`。\n 4.以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择**以管理员身份运行**)。如果您正在运行 Windows XP,您可能需要下载并安装 PowerShell。\n 5.从 PowerShell 提示符处,运行以下命令以将 Auditbeat 安装为 Windows 服务。", + "home.tutorials.common.auditbeatInstructions.install.windowsTitle": "下载并安装 Auditbeat", + "home.tutorials.common.auditbeatInstructions.start.debTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.auditbeatInstructions.start.debTitle": "启动 Auditbeat", + "home.tutorials.common.auditbeatInstructions.start.osxTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.auditbeatInstructions.start.osxTitle": "启动 Auditbeat", + "home.tutorials.common.auditbeatInstructions.start.rpmTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.auditbeatInstructions.start.rpmTitle": "启动 Auditbeat", + "home.tutorials.common.auditbeatInstructions.start.windowsTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.auditbeatInstructions.start.windowsTitle": "启动 Auditbeat", + "home.tutorials.common.auditbeatStatusCheck.buttonLabel": "检查数据", + "home.tutorials.common.auditbeatStatusCheck.errorText": "尚未接收到数据", + "home.tutorials.common.auditbeatStatusCheck.successText": "已成功接收数据", + "home.tutorials.common.auditbeatStatusCheck.text": "确认从 Auditbeat 收到数据", + "home.tutorials.common.auditbeatStatusCheck.title": "状态", + "home.tutorials.common.filebeat.cloudInstructions.gettingStarted.title": "入门", + "home.tutorials.common.filebeat.premCloudInstructions.gettingStarted.title": "入门", + "home.tutorials.common.filebeat.premInstructions.gettingStarted.title": "入门", + "home.tutorials.common.filebeatCloudInstructions.config.debTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.filebeatCloudInstructions.config.debTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.filebeatCloudInstructions.config.debTitle": "编辑配置", + "home.tutorials.common.filebeatCloudInstructions.config.osxTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.filebeatCloudInstructions.config.osxTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.filebeatCloudInstructions.config.osxTitle": "编辑配置", + "home.tutorials.common.filebeatCloudInstructions.config.rpmTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.filebeatCloudInstructions.config.rpmTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.filebeatCloudInstructions.config.rpmTitle": "编辑配置", + "home.tutorials.common.filebeatCloudInstructions.config.windowsTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.filebeatCloudInstructions.config.windowsTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.filebeatCloudInstructions.config.windowsTitle": "编辑配置", + "home.tutorials.common.filebeatEnableInstructions.debTextPost": "在 `/etc/filebeat/modules.d/{moduleName}.yml` 文件中修改设置。", + "home.tutorials.common.filebeatEnableInstructions.debTitle": "启用和配置 {moduleName} 模块", + "home.tutorials.common.filebeatEnableInstructions.osxTextPost": "在 `modules.d/{moduleName}.yml` 文件中修改设置。", + "home.tutorials.common.filebeatEnableInstructions.osxTextPre": "从安装目录中,运行:", + "home.tutorials.common.filebeatEnableInstructions.osxTitle": "启用和配置 {moduleName} 模块", + "home.tutorials.common.filebeatEnableInstructions.rpmTextPost": "在 `/etc/filebeat/modules.d/{moduleName}.yml` 文件中修改设置。", + "home.tutorials.common.filebeatEnableInstructions.rpmTitle": "启用和配置 {moduleName} 模块", + "home.tutorials.common.filebeatEnableInstructions.windowsTextPost": "在 `modules.d/{moduleName}.yml` 文件中修改设置。", + "home.tutorials.common.filebeatEnableInstructions.windowsTextPre": "从 {path} 文件夹中,运行:", + "home.tutorials.common.filebeatEnableInstructions.windowsTitle": "启用和配置 {moduleName} 模块", + "home.tutorials.common.filebeatInstructions.config.debTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.filebeatInstructions.config.debTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.filebeatInstructions.config.debTitle": "编辑配置", + "home.tutorials.common.filebeatInstructions.config.osxTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.filebeatInstructions.config.osxTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.filebeatInstructions.config.osxTitle": "编辑配置", + "home.tutorials.common.filebeatInstructions.config.rpmTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.filebeatInstructions.config.rpmTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.filebeatInstructions.config.rpmTitle": "编辑配置", + "home.tutorials.common.filebeatInstructions.config.windowsTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.filebeatInstructions.config.windowsTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.filebeatInstructions.config.windowsTitle": "编辑配置", + "home.tutorials.common.filebeatInstructions.install.debTextPost": "寻找 32 位软件包?请参阅[下载页面]({linkUrl})。", + "home.tutorials.common.filebeatInstructions.install.debTextPre": "首次使用 Filebeat?请参阅[入门指南]({linkUrl})。", + "home.tutorials.common.filebeatInstructions.install.debTitle": "下载并安装 Filebeat", + "home.tutorials.common.filebeatInstructions.install.osxTextPre": "首次使用 Filebeat?请参阅[入门指南]({linkUrl})。", + "home.tutorials.common.filebeatInstructions.install.osxTitle": "下载并安装 Filebeat", + "home.tutorials.common.filebeatInstructions.install.rpmTextPost": "寻找 32 位软件包?请参阅[下载页面]({linkUrl})。", + "home.tutorials.common.filebeatInstructions.install.rpmTextPre": "首次使用 Filebeat?请参阅[入门指南]({linkUrl})。", + "home.tutorials.common.filebeatInstructions.install.rpmTitle": "下载并安装 Filebeat", + "home.tutorials.common.filebeatInstructions.install.windowsTextPost": "在 {filebeatPath} 文件中修改 {propertyName} 下的设置以指向您的 Elasticsearch 安装。", + "home.tutorials.common.filebeatInstructions.install.windowsTextPre": "首次使用 Filebeat?请参阅[入门指南]({guideLinkUrl})。\n 1.从[下载]({filebeatLinkUrl})页面下载 Filebeat Windows zip 文件。\n 2.将 zip 文件的内容解压缩到 {folderPath}。\n 3.将 `{directoryName}` 目录重命名为 `Filebeat`。\n 4.以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择**以管理员身份运行**)。如果您正在运行 Windows XP,您可能需要下载并安装 PowerShell。\n 5.从 PowerShell 提示符处,运行以下命令以将 Filebeat 安装为 Windows 服务。", + "home.tutorials.common.filebeatInstructions.install.windowsTitle": "下载并安装 Filebeat", + "home.tutorials.common.filebeatInstructions.start.debTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.filebeatInstructions.start.debTitle": "启动 Filebeat", + "home.tutorials.common.filebeatInstructions.start.osxTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.filebeatInstructions.start.osxTitle": "启动 Filebeat", + "home.tutorials.common.filebeatInstructions.start.rpmTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.filebeatInstructions.start.rpmTitle": "启动 Filebeat", + "home.tutorials.common.filebeatInstructions.start.windowsTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.filebeatInstructions.start.windowsTitle": "启动 Filebeat", + "home.tutorials.common.filebeatStatusCheck.buttonLabel": "检查数据", + "home.tutorials.common.filebeatStatusCheck.errorText": "尚未从此模块收到任何数据", + "home.tutorials.common.filebeatStatusCheck.successText": "从此模块成功收到数据", + "home.tutorials.common.filebeatStatusCheck.text": "确认已从 Filebeat `{moduleName}` 模块成功收到数据", + "home.tutorials.common.filebeatStatusCheck.title": "模块状态", + "home.tutorials.common.functionbeat.cloudInstructions.gettingStarted.title": "入门", + "home.tutorials.common.functionbeat.premCloudInstructions.gettingStarted.title": "入门", + "home.tutorials.common.functionbeat.premInstructions.gettingStarted.title": "入门", + "home.tutorials.common.functionbeatAWSInstructions.textPost": "其中 `` 和 `` 是您的帐户凭据,`us-east-1` 是所需的地区。", + "home.tutorials.common.functionbeatAWSInstructions.textPre": "在环境中设置您的 AWS 帐户凭据:", + "home.tutorials.common.functionbeatAWSInstructions.title": "设置 AWS 凭据", + "home.tutorials.common.functionbeatCloudInstructions.config.osxTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.functionbeatCloudInstructions.config.osxTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.functionbeatCloudInstructions.config.osxTitle": "编辑配置", + "home.tutorials.common.functionbeatCloudInstructions.config.windowsTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.functionbeatCloudInstructions.config.windowsTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.functionbeatCloudInstructions.config.windowsTitle": "编辑配置", + "home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTextPost": "其中 `` 是要采集的日志组名称,`` 是将用于暂存 Functionbeat 部署的有效 S3 存储桶名称。", + "home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTitle": "配置 Cloudwatch 日志组", + "home.tutorials.common.functionbeatEnableOnPremInstructionsOSXLinux.textPre": "在 `functionbeat.yml` 文件中修改设置。", + "home.tutorials.common.functionbeatEnableOnPremInstructionsWindows.textPre": "在 {path} 文件中修改设置。", + "home.tutorials.common.functionbeatInstructions.config.osxTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.functionbeatInstructions.config.osxTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.functionbeatInstructions.config.osxTitle": "配置 Elastic 集群", + "home.tutorials.common.functionbeatInstructions.config.windowsTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.functionbeatInstructions.config.windowsTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.functionbeatInstructions.config.windowsTitle": "编辑配置", + "home.tutorials.common.functionbeatInstructions.deploy.osxTextPre": "这会将 Functionbeat 安装为 Lambda 函数。`setup` 命令检查 Elasticsearch 配置并加载 Kibana 索引模式。通常可省略此命令。", + "home.tutorials.common.functionbeatInstructions.deploy.osxTitle": "将 Functionbeat 部署到 AWS Lambda", + "home.tutorials.common.functionbeatInstructions.deploy.windowsTextPre": "这会将 Functionbeat 安装为 Lambda 函数。`setup` 命令检查 Elasticsearch 配置并加载 Kibana 索引模式。通常可省略此命令。", + "home.tutorials.common.functionbeatInstructions.deploy.windowsTitle": "将 Functionbeat 部署到 AWS Lambda", + "home.tutorials.common.functionbeatInstructions.install.linuxTextPre": "首次使用 Functionbeat?请参阅[入门指南]({link})。", + "home.tutorials.common.functionbeatInstructions.install.linuxTitle": "下载并安装 Functionbeat", + "home.tutorials.common.functionbeatInstructions.install.osxTextPre": "首次使用 Functionbeat?请参阅[入门指南]({link})。", + "home.tutorials.common.functionbeatInstructions.install.osxTitle": "下载并安装 Functionbeat", + "home.tutorials.common.functionbeatInstructions.install.windowsTextPre": "首次使用 Functionbeat?请参阅[入门指南]({functionbeatLink})。\n 1.从[下载]({elasticLink})页面下载 Functionbeat Windows zip 文件。\n 2.将 zip 文件的内容解压缩到 {folderPath}。\n 3.将 {directoryName} 目录重命名为 `Functionbeat`。\n 4.以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择**以管理员身份运行**)。如果您正在运行 Windows XP,您可能需要下载并安装 PowerShell。\n 5.从 PowerShell 提示符下,前往 Functionbeat 目录:", + "home.tutorials.common.functionbeatInstructions.install.windowsTitle": "下载并安装 Functionbeat", + "home.tutorials.common.functionbeatStatusCheck.buttonLabel": "检查数据", + "home.tutorials.common.functionbeatStatusCheck.errorText": "尚未从 Functionbeat 收到任何数据", + "home.tutorials.common.functionbeatStatusCheck.successText": "从 Functionbeat 成功收到数据", + "home.tutorials.common.functionbeatStatusCheck.text": "确认从 Functionbeat 收到数据", + "home.tutorials.common.functionbeatStatusCheck.title": "Functionbeat 状态", + "home.tutorials.common.heartbeat.cloudInstructions.gettingStarted.title": "入门", + "home.tutorials.common.heartbeat.premCloudInstructions.gettingStarted.title": "入门", + "home.tutorials.common.heartbeat.premInstructions.gettingStarted.title": "入门", + "home.tutorials.common.heartbeatCloudInstructions.config.debTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.heartbeatCloudInstructions.config.debTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.heartbeatCloudInstructions.config.debTitle": "编辑配置", + "home.tutorials.common.heartbeatCloudInstructions.config.osxTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.heartbeatCloudInstructions.config.osxTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.heartbeatCloudInstructions.config.osxTitle": "编辑配置", + "home.tutorials.common.heartbeatCloudInstructions.config.rpmTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.heartbeatCloudInstructions.config.rpmTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.heartbeatCloudInstructions.config.rpmTitle": "编辑配置", + "home.tutorials.common.heartbeatCloudInstructions.config.windowsTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.heartbeatCloudInstructions.config.windowsTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.heartbeatCloudInstructions.config.windowsTitle": "编辑配置", + "home.tutorials.common.heartbeatEnableCloudInstructions.debTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", + "home.tutorials.common.heartbeatEnableCloudInstructions.defaultTextPost": "有关如何在 Heartbeat 中配置监测的详细信息,请参阅 [Heartbeat 配置文档]({configureLink})", + "home.tutorials.common.heartbeatEnableCloudInstructions.defaultTitle": "编辑配置 - 添加监测", + "home.tutorials.common.heartbeatEnableCloudInstructions.osxTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", + "home.tutorials.common.heartbeatEnableCloudInstructions.rpmTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", + "home.tutorials.common.heartbeatEnableCloudInstructions.windowsTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", + "home.tutorials.common.heartbeatEnableOnPremInstructions.debTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", + "home.tutorials.common.heartbeatEnableOnPremInstructions.defaultTextPost": "其中 {hostTemplate} 是受监测 URL。有关如何在 Heartbeat 中配置监测的详细信息,请参阅 [Heartbeat 配置文档]({configureLink})", + "home.tutorials.common.heartbeatEnableOnPremInstructions.defaultTitle": "编辑配置 - 添加监测", + "home.tutorials.common.heartbeatEnableOnPremInstructions.osxTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", + "home.tutorials.common.heartbeatEnableOnPremInstructions.rpmTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", + "home.tutorials.common.heartbeatEnableOnPremInstructions.windowsTextPre": "在 `heartbeat.yml` 文件中编辑 `heartbeat.monitors` 设置。", + "home.tutorials.common.heartbeatInstructions.config.debTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.heartbeatInstructions.config.debTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.heartbeatInstructions.config.debTitle": "编辑配置", + "home.tutorials.common.heartbeatInstructions.config.osxTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.heartbeatInstructions.config.osxTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.heartbeatInstructions.config.osxTitle": "编辑配置", + "home.tutorials.common.heartbeatInstructions.config.rpmTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.heartbeatInstructions.config.rpmTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.heartbeatInstructions.config.rpmTitle": "编辑配置", + "home.tutorials.common.heartbeatInstructions.config.windowsTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.heartbeatInstructions.config.windowsTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.heartbeatInstructions.config.windowsTitle": "编辑配置", + "home.tutorials.common.heartbeatInstructions.install.debTextPost": "寻找 32 位软件包?请参阅[下载页面]({link})。", + "home.tutorials.common.heartbeatInstructions.install.debTextPre": "首次使用 Heartbeat?请参阅[入门指南]({link})。", + "home.tutorials.common.heartbeatInstructions.install.debTitle": "下载并安装 Heartbeat", + "home.tutorials.common.heartbeatInstructions.install.osxTextPre": "首次使用 Heartbeat?请参阅[入门指南]({link})。", + "home.tutorials.common.heartbeatInstructions.install.osxTitle": "下载并安装 Heartbeat", + "home.tutorials.common.heartbeatInstructions.install.rpmTextPre": "首次使用 Heartbeat?请参阅[入门指南]({link})。", + "home.tutorials.common.heartbeatInstructions.install.rpmTitle": "下载并安装 Heartbeat", + "home.tutorials.common.heartbeatInstructions.install.windowsTextPre": "首次使用 Heartbeat?请参阅[入门指南]({heartbeatLink})。\n 1.从[下载]({elasticLink})页面下载 Heartbeat Windows zip 文件。\n 2.将 zip 文件的内容解压缩到 {folderPath}。\n 3.将 {directoryName} 目录重命名为 `Heartbeat`。\n 4.以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择**以管理员身份运行**)。如果您正在运行 Windows XP,您可能需要下载并安装 PowerShell。\n 5.从 PowerShell 提示符处,运行以下命令以将 Heartbeat 安装为 Windows 服务。", + "home.tutorials.common.heartbeatInstructions.install.windowsTitle": "下载并安装 Heartbeat", + "home.tutorials.common.heartbeatInstructions.start.debTextPre": "`setup` 命令加载 Kibana 索引模式。", + "home.tutorials.common.heartbeatInstructions.start.debTitle": "启动 Heartbeat", + "home.tutorials.common.heartbeatInstructions.start.osxTextPre": "`setup` 命令加载 Kibana 索引模式。", + "home.tutorials.common.heartbeatInstructions.start.osxTitle": "启动 Heartbeat", + "home.tutorials.common.heartbeatInstructions.start.rpmTextPre": "`setup` 命令加载 Kibana 索引模式。", + "home.tutorials.common.heartbeatInstructions.start.rpmTitle": "启动 Heartbeat", + "home.tutorials.common.heartbeatInstructions.start.windowsTextPre": "`setup` 命令加载 Kibana 索引模式。", + "home.tutorials.common.heartbeatInstructions.start.windowsTitle": "启动 Heartbeat", + "home.tutorials.common.heartbeatStatusCheck.buttonLabel": "检查数据", + "home.tutorials.common.heartbeatStatusCheck.errorText": "尚未从 Heartbeat 收到任何数据", + "home.tutorials.common.heartbeatStatusCheck.successText": "从 Heartbeat 成功收到数据", + "home.tutorials.common.heartbeatStatusCheck.text": "确认从 Heartbeat 收到数据", + "home.tutorials.common.heartbeatStatusCheck.title": "Heartbeat 状态", + "home.tutorials.common.logstashInstructions.install.java.osxTextPre": "按照[此处]({link})的安装说明执行操作。", + "home.tutorials.common.logstashInstructions.install.java.osxTitle": "下载并安装 Java Runtime Environment", + "home.tutorials.common.logstashInstructions.install.java.windowsTextPre": "按照[此处]({link})的安装说明执行操作。", + "home.tutorials.common.logstashInstructions.install.java.windowsTitle": "下载并安装 Java Runtime Environment", + "home.tutorials.common.logstashInstructions.install.logstash.osxTextPre": "首次使用 Logstash? 请参阅[入门指南]({link})。", + "home.tutorials.common.logstashInstructions.install.logstash.osxTitle": "下载并安装 Logstash", + "home.tutorials.common.logstashInstructions.install.logstash.windowsTextPre": "首次使用 Logstash? 请参阅[入门指南]({logstashLink})。\n 1. [下载]({elasticLink}) Logstash Windows zip 文件。\n 2.解压缩 zip 文件的内容。", + "home.tutorials.common.logstashInstructions.install.logstash.windowsTitle": "下载并安装 Logstash", + "home.tutorials.common.metricbeat.cloudInstructions.gettingStarted.title": "入门", + "home.tutorials.common.metricbeat.premCloudInstructions.gettingStarted.title": "入门", + "home.tutorials.common.metricbeat.premInstructions.gettingStarted.title": "入门", + "home.tutorials.common.metricbeatCloudInstructions.config.debTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.metricbeatCloudInstructions.config.debTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.metricbeatCloudInstructions.config.debTitle": "编辑配置", + "home.tutorials.common.metricbeatCloudInstructions.config.osxTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.metricbeatCloudInstructions.config.osxTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.metricbeatCloudInstructions.config.osxTitle": "编辑配置", + "home.tutorials.common.metricbeatCloudInstructions.config.rpmTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.metricbeatCloudInstructions.config.rpmTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.metricbeatCloudInstructions.config.rpmTitle": "编辑配置", + "home.tutorials.common.metricbeatCloudInstructions.config.windowsTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.metricbeatCloudInstructions.config.windowsTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.metricbeatCloudInstructions.config.windowsTitle": "编辑配置", + "home.tutorials.common.metricbeatEnableInstructions.debTextPost": "在 `/etc/metricbeat/modules.d/{moduleName}.yml` 文件中修改设置。", + "home.tutorials.common.metricbeatEnableInstructions.debTitle": "启用和配置 {moduleName} 模块", + "home.tutorials.common.metricbeatEnableInstructions.osxTextPost": "在 `modules.d/{moduleName}.yml` 文件中修改设置。", + "home.tutorials.common.metricbeatEnableInstructions.osxTextPre": "从安装目录中,运行:", + "home.tutorials.common.metricbeatEnableInstructions.osxTitle": "启用和配置 {moduleName} 模块", + "home.tutorials.common.metricbeatEnableInstructions.rpmTextPost": "在 `/etc/metricbeat/modules.d/{moduleName}.yml` 文件中修改设置。", + "home.tutorials.common.metricbeatEnableInstructions.rpmTitle": "启用和配置 {moduleName} 模块", + "home.tutorials.common.metricbeatEnableInstructions.windowsTextPost": "在 `modules.d/{moduleName}.yml` 文件中修改设置。", + "home.tutorials.common.metricbeatEnableInstructions.windowsTextPre": "从 {path} 文件夹中,运行:", + "home.tutorials.common.metricbeatEnableInstructions.windowsTitle": "启用和配置 {moduleName} 模块", + "home.tutorials.common.metricbeatInstructions.config.debTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.metricbeatInstructions.config.debTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.metricbeatInstructions.config.debTitle": "编辑配置", + "home.tutorials.common.metricbeatInstructions.config.osxTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.metricbeatInstructions.config.osxTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.metricbeatInstructions.config.osxTitle": "编辑配置", + "home.tutorials.common.metricbeatInstructions.config.rpmTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.metricbeatInstructions.config.rpmTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.metricbeatInstructions.config.rpmTitle": "编辑配置", + "home.tutorials.common.metricbeatInstructions.config.windowsTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.metricbeatInstructions.config.windowsTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.metricbeatInstructions.config.windowsTitle": "编辑配置", + "home.tutorials.common.metricbeatInstructions.install.debTextPost": "寻找 32 位软件包?请参阅[下载页面]({link})。", + "home.tutorials.common.metricbeatInstructions.install.debTextPre": "首次使用 Metricbeat?请参阅[入门指南]({link})。", + "home.tutorials.common.metricbeatInstructions.install.debTitle": "下载并安装 Metricbeat", + "home.tutorials.common.metricbeatInstructions.install.osxTextPre": "首次使用 Metricbeat?请参阅[入门指南]({link})。", + "home.tutorials.common.metricbeatInstructions.install.osxTitle": "下载并安装 Metricbeat", + "home.tutorials.common.metricbeatInstructions.install.rpmTextPre": "首次使用 Metricbeat?请参阅[入门指南]({link})。", + "home.tutorials.common.metricbeatInstructions.install.rpmTitle": "下载并安装 Metricbeat", + "home.tutorials.common.metricbeatInstructions.install.windowsTextPost": "在 {path} 文件中修改 `output.elasticsearch` 下的设置以指向您的 Elasticsearch 安装。", + "home.tutorials.common.metricbeatInstructions.install.windowsTextPre": "首次使用 Metricbeat?请参阅[入门指南]({metricbeatLink})。\n 1.从[下载]({elasticLink})页面下载 Metricbeat Windows zip 文件。\n 2.将 zip 文件的内容解压缩到 {folderPath}。\n 3.将 {directoryName} 目录重命名为 `Metricbeat`。\n 4.以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择**以管理员身份运行**)。如果您正在运行 Windows XP,您可能需要下载并安装 PowerShell。\n 5.从 PowerShell 提示符处,运行以下命令以将 Metricbeat 安装为 Windows 服务。", + "home.tutorials.common.metricbeatInstructions.install.windowsTitle": "下载并安装 Metricbeat", + "home.tutorials.common.metricbeatInstructions.start.debTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.metricbeatInstructions.start.debTitle": "启动 Metricbeat", + "home.tutorials.common.metricbeatInstructions.start.osxTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.metricbeatInstructions.start.osxTitle": "启动 Metricbeat", + "home.tutorials.common.metricbeatInstructions.start.rpmTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.metricbeatInstructions.start.rpmTitle": "启动 Metricbeat", + "home.tutorials.common.metricbeatInstructions.start.windowsTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.metricbeatInstructions.start.windowsTitle": "启动 Metricbeat", + "home.tutorials.common.metricbeatStatusCheck.buttonLabel": "检查数据", + "home.tutorials.common.metricbeatStatusCheck.errorText": "尚未从此模块收到任何数据", + "home.tutorials.common.metricbeatStatusCheck.successText": "从此模块成功收到数据", + "home.tutorials.common.metricbeatStatusCheck.text": "确认从 Metricbeat `{moduleName}` 模块收到数据", + "home.tutorials.common.metricbeatStatusCheck.title": "模块状态", + "home.tutorials.common.premCloudInstructions.option1.textPre": "前往 [Elastic Cloud]({link})。如果您还没有帐户,请注册。免费试用 14 天。\n\n登录至 Elastic Cloud 控制台\n\n如要创建集群,请在 Elastic Cloud 控制台中:\n 1.选择**创建部署**,然后指定**部署名称**\n 2.根据需要修改其他部署选项(或者不修改,默认值可帮助您快速入门)\n 3.单击**创建部署**\n 4.等候部署创建完成\n 5.前往新的 Cloud Kibana 实例,然后按照 Kibana 主页上的说明执行操作", + "home.tutorials.common.premCloudInstructions.option1.title": "选项 1:在 Elastic Cloud 中尝试", + "home.tutorials.common.premCloudInstructions.option2.textPre": "如果基于托管式 Elasticsearch 实例运行此 Kibana 实例,请继续手动设置。\n\n针对您的记录,分别将 **Elasticsearch** 终端节点另存为 {urlTemplate}将集群**密码**另存为 {passwordTemplate}", + "home.tutorials.common.premCloudInstructions.option2.title": "选项 2:将本地 Kibana 连接到 Cloud 实例", + "home.tutorials.common.winlogbeat.cloudInstructions.gettingStarted.title": "入门", + "home.tutorials.common.winlogbeat.premCloudInstructions.gettingStarted.title": "入门", + "home.tutorials.common.winlogbeat.premInstructions.gettingStarted.title": "入门", + "home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPost": "其中 {passwordTemplate} 是 `elastic` 用户的密码。", + "home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPre": "修改 {path} 以设置 Elastic Cloud 的连接信息:", + "home.tutorials.common.winlogbeatCloudInstructions.config.windowsTitle": "编辑配置", + "home.tutorials.common.winlogbeatInstructions.config.windowsTextPost": "其中,{passwordTemplate} 是 `elastic` 用户的密码,{esUrlTemplate} 是 Elasticsearch 的 URL,{kibanaUrlTemplate} 是 Kibana 的 URL。", + "home.tutorials.common.winlogbeatInstructions.config.windowsTextPre": "修改 {path} 以设置连接信息:", + "home.tutorials.common.winlogbeatInstructions.config.windowsTitle": "编辑配置", + "home.tutorials.common.winlogbeatInstructions.install.windowsTextPost": "在 {path} 文件中修改 `output.elasticsearch` 下的设置以指向您的 Elasticsearch 安装。", + "home.tutorials.common.winlogbeatInstructions.install.windowsTextPre": "首次使用 Winlogbeat?请参阅[入门指南]({winlogbeatLink})。\n 1.从[下载]({elasticLink})页面下载 Winlogbeat Windows zip 文件。\n 2.将 zip 文件的内容解压缩到 {folderPath}。\n 3.将 {directoryName} 目录重命名为 `Winlogbeat`。\n 4.以管理员身份打开 PowerShell 提示符(右键单击 PowerShell 图标,然后选择**以管理员身份运行**)。如果您正在运行 Windows XP,您可能需要下载并安装 PowerShell。\n 5.从 PowerShell 提示符处,运行以下命令以将 Winlogbeat 安装为 Windows 服务。", + "home.tutorials.common.winlogbeatInstructions.install.windowsTitle": "下载并安装 Winlogbeat", + "home.tutorials.common.winlogbeatInstructions.start.windowsTextPre": "`setup` 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。", + "home.tutorials.common.winlogbeatInstructions.start.windowsTitle": "启动 Winlogbeat", + "home.tutorials.common.winlogbeatStatusCheck.buttonLabel": "检查数据", + "home.tutorials.common.winlogbeatStatusCheck.errorText": "尚未接收到数据", + "home.tutorials.common.winlogbeatStatusCheck.successText": "已成功接收数据", + "home.tutorials.common.winlogbeatStatusCheck.text": "确认从 Winlogbeat 收到数据", + "home.tutorials.common.winlogbeatStatusCheck.title": "模块状态", "home.tutorials.aerospikeMetrics.artifacts.application.label": "Discover", "home.tutorials.aerospikeMetrics.longDescription": "Metricbeat 模块 `aerospike` 从 Aerospike 提取内部指标。[了解详情]({learnMoreLink})。", "home.tutorials.aerospikeMetrics.nameTitle": "Aerospike 指标", @@ -2304,67 +2365,6 @@ "home.tutorials.zookeeperMetrics.longDescription": "Metricbeat 模块 `{moduleName}` 从 Zookeeper 服务器提取内部指标。[了解详情]({learnMoreLink})。", "home.tutorials.zookeeperMetrics.nameTitle": "Zookeeper 指标", "home.tutorials.zookeeperMetrics.shortDescription": "从 Zookeeper 服务器提取内部指标。", - "kbn.settings.advancedSettings.voiceAnnouncement.searchResultScreenReaderMessage": "您已搜索 {query}。{sectionLenght, plural, one {# 个部分} other {# 个部分}}中有 {optionLenght, plural, one {# 个选项} other {# 个选项}}", - "kbn.topNavMenu.openInspectorButtonLabel": "检查", - "kbn.topNavMenu.refreshButtonLabel": "刷新", - "kbn.topNavMenu.saveVisualizationButtonLabel": "保存", - "kbn.topNavMenu.shareVisualizationButtonLabel": "共享", - "kbn.visualize.badge.readOnly.text": "只读", - "kbn.visualize.badge.readOnly.tooltip": "无法保存可视化", - "kbn.visualize.createVisualization.noIndexPatternOrSavedSearchIdErrorMessage": "必须提供 indexPattern 或 savedSearchId", - "kbn.visualize.editor.createBreadcrumb": "创建", - "kbn.visualize.experimentalVisInfoText": "此可视化标记为“实验”。", - "kbn.visualize.linkedToSearch.unlinkButtonTooltip": "双击可取消与“已保存搜索”的链接", - "kbn.visualize.linkedToSearch.unlinkSuccessNotificationText": "取消与已保存搜索 “{searchTitle}” 的链接", - "kbn.visualize.linkedToSearchInfoText": "链接到“已保存搜索”", - "kbn.visualize.listing.betaTitle": "公测版", - "kbn.visualize.listing.betaTooltip": "此可视化为公测版,可能会进行更改。设计和代码相对于正式发行版功能还不够成熟,将按原样提供,且不提供任何保证。公测版功能不受正式发行版功能支持 SLA 的约束", - "kbn.visualize.listing.breadcrumb": "可视化", - "kbn.visualize.listing.createNew.createButtonLabel": "新建可视化", - "kbn.visualize.listing.createNew.description": "可以根据您的数据创建不同的可视化。", - "kbn.visualize.listing.createNew.title": "创建首个可视化", - "kbn.visualize.listing.experimentalTitle": "实验性", - "kbn.visualize.listing.experimentalTooltip": "未来版本可能会更改或删除此可视化,其不受支持 SLA 的约束。", - "kbn.visualize.listing.noItemsMessage": "看起来您还没有任何可视化。", - "kbn.visualize.listing.table.entityName": "可视化", - "kbn.visualize.listing.table.entityNamePlural": "可视化", - "kbn.visualize.listing.table.listTitle": "可视化", - "kbn.visualize.listing.table.titleColumnName": "标题", - "kbn.visualize.listing.table.typeColumnName": "类型", - "kbn.visualize.newVisWizard.betaDescription": "此可视化为公测版,可能会进行更改。设计和代码相对于正式发行版功能还不够成熟,将按原样提供,且不提供任何保证。公测版功能不受正式发行版功能支持 SLA 的约束", - "kbn.visualize.newVisWizard.betaTitle": "公测版", - "kbn.visualize.newVisWizard.chooseSourceTitle": "选择源", - "kbn.visualize.newVisWizard.experimentalDescription": "这是实验性可视化。与稳定的可视化相比,其设计和实现均不够成熟,可能会随时发生更改。", - "kbn.visualize.newVisWizard.experimentalTitle": "实验性", - "kbn.visualize.newVisWizard.experimentalTooltip": "未来版本可能会更改或删除此可视化,其不受支持 SLA 的约束。", - "kbn.visualize.newVisWizard.filterVisTypeAriaLabel": "筛留可视化类型", - "kbn.visualize.newVisWizard.helpText": "通过为该可视化选择类型,来开始创建您的可视化。", - "kbn.visualize.newVisWizard.helpTextAriaLabel": "通过为该可视化选择类型,来开始创建您的可视化。按 Esc 键关闭此模式。按 Tab 键继续。", - "kbn.visualize.newVisWizard.newVisTypeTitle": "新建{visTypeName}", - "kbn.visualize.newVisWizard.resultsFound": "找到了 {resultCount} 个{resultCount, plural, one {类型} other {类型} }", - "kbn.visualize.newVisWizard.searchSelection.notFoundLabel": "未找到匹配的索引或已保存搜索。", - "kbn.visualize.newVisWizard.searchSelection.savedObjectType.indexPattern": "索引模式", - "kbn.visualize.newVisWizard.searchSelection.savedObjectType.search": "已保存搜索", - "kbn.visualize.newVisWizard.selectVisType": "选择可视化类型", - "kbn.visualize.newVisWizard.title": "新建可视化", - "kbn.visualize.newVisWizard.visTypeAliasDescription": "打开 Visualize 外部的 Kibana 应用程序。", - "kbn.visualize.newVisWizard.visTypeAliasTitle": "Kibana 应用程序", - "kbn.visualize.pageHeading": "{chartName} {chartType}可视化", - "kbn.visualize.saveDialog.saveAndAddToDashboardButtonLabel": "保存并添加到仪表板", - "kbn.visualize.topNavMenu.openInspectorButtonAriaLabel": "打开检查器查看可视化", - "kbn.visualize.topNavMenu.openInspectorDisabledButtonTooltip": "此可视化不支持任何检查器。", - "kbn.visualize.topNavMenu.refreshButtonAriaLabel": "刷新", - "kbn.visualize.topNavMenu.saveVisualization.failureNotificationText": "保存 “{visTitle}” 时出错", - "kbn.visualize.topNavMenu.saveVisualization.successNotificationText": "已保存“{visTitle}”", - "kbn.visualize.topNavMenu.saveVisualizationButtonAriaLabel": "保存可视化", - "kbn.visualize.topNavMenu.saveVisualizationDisabledButtonTooltip": "应用或放弃所做更改,然后保存", - "kbn.visualize.topNavMenu.shareVisualizationButtonAriaLabel": "共享可视化", - "kbn.visualize.visualizeDescription": "创建可视化并聚合存储在 Elasticsearch 索引中的数据。", - "kbn.visualize.visualizeListingBreadcrumbsTitle": "可视化", - "kbn.visualize.visualizeListingDeleteErrorTitle": "删除可视化时出错", - "kbn.visualize.wizard.step1Breadcrumb": "创建", - "kbn.visualize.wizard.step2Breadcrumb": "创建", - "kbn.visualizeTitle": "可视化", "visTypeVislib.area.areaDescription": "突出折线图下方的数量", "visTypeVislib.area.areaTitle": "面积图", "visTypeVislib.area.countText": "计数", From 1bb59af44a5c4a595f9d589e012734952d529a5b Mon Sep 17 00:00:00 2001 From: Josh Dover Date: Fri, 24 Jan 2020 15:20:09 -0700 Subject: [PATCH 66/72] Add isSystemRequest support to Kibana Platform (#53734) --- ...na-plugin-public.httperrorrequest.error.md | 11 -- .../kibana-plugin-public.httperrorrequest.md | 20 -- ...-plugin-public.httperrorrequest.request.md | 11 -- ...a-plugin-public.httperrorresponse.error.md | 11 -- .../kibana-plugin-public.httperrorresponse.md | 19 -- ...ugin-public.httpfetchoptions.asresponse.md | 2 +- ...public.httpfetchoptions.assystemrequest.md | 13 ++ .../kibana-plugin-public.httpfetchoptions.md | 3 +- ...-plugin-public.httpfetchoptionswithpath.md | 20 ++ ...in-public.httpfetchoptionswithpath.path.md | 11 ++ .../kibana-plugin-public.httphandler.md | 2 +- .../kibana-plugin-public.httpheadersinit.md | 1 + .../kibana-plugin-public.httpinterceptor.md | 2 +- ...a-plugin-public.httpinterceptor.request.md | 6 +- ...gin-public.httpinterceptor.requesterror.md | 6 +- ...-plugin-public.httpinterceptor.response.md | 6 +- ...in-public.httpinterceptor.responseerror.md | 6 +- ...ublic.httpinterceptorrequesterror.error.md | 11 ++ ...ttpinterceptorrequesterror.fetchoptions.md | 11 ++ ...ugin-public.httpinterceptorrequesterror.md | 20 ++ ...blic.httpinterceptorresponseerror.error.md | 11 ++ ...gin-public.httpinterceptorresponseerror.md | 20 ++ ...ic.httpinterceptorresponseerror.request.md | 11 ++ ...kibana-plugin-public.httpresponse.body.md} | 4 +- ...plugin-public.httpresponse.fetchoptions.md | 13 ++ .../kibana-plugin-public.httpresponse.md | 22 +++ ...ana-plugin-public.httpresponse.request.md} | 4 +- ...na-plugin-public.httpresponse.response.md} | 4 +- .../kibana-plugin-public.ihttpresponse.md | 21 -- .../core/public/kibana-plugin-public.md | 11 +- ...in-server.kibanarequest.issystemrequest.md | 13 ++ .../kibana-plugin-server.kibanarequest.md | 1 + packages/kbn-utility-types/index.ts | 17 +- src/core/public/http/fetch.test.ts | 180 ++++++++++++++++-- src/core/public/http/fetch.ts | 104 +++++++--- src/core/public/http/intercept.ts | 51 +++-- src/core/public/http/response.ts | 40 ---- src/core/public/http/types.ts | 70 +++++-- src/core/public/index.ts | 7 +- src/core/public/public.api.md | 71 ++++--- src/core/server/http/router/request.test.ts | 51 +++++ src/core/server/http/router/request.ts | 9 + src/core/server/server.api.md | 1 + .../kibana/server/lib/system_api.js | 1 + src/legacy/ui/public/kfetch/kfetch.ts | 1 + .../search/sync_search_strategy.test.ts | 6 +- .../public/search/sync_search_strategy.ts | 14 +- .../plugins/core_plugin_b/public/plugin.tsx | 14 +- .../plugins/core_plugin_b/server/plugin.ts | 10 + .../core_plugins/server_plugins.ts | 10 + .../test_suites/core_plugins/ui_plugins.ts | 24 ++- .../indexpattern_plugin/datapanel.test.tsx | 20 +- .../public/indexpattern_plugin/loader.test.ts | 4 +- .../lens/public/indexpattern_plugin/loader.ts | 3 +- .../reporting/public/lib/job_queue_client.ts | 10 +- .../lib/__tests__/replace_injected_vars.js | 1 + .../plugins/licensing/public/plugin.test.ts | 6 +- x-pack/plugins/licensing/public/plugin.ts | 7 +- .../authentication/authentication_service.ts | 2 +- .../roles/edit_role/edit_role_page.test.tsx | 4 +- .../management/roles/roles_api_client.test.ts | 2 +- .../public/session/session_timeout.tsx | 3 +- .../session_timeout_http_interceptor.test.ts | 8 +- .../session_timeout_http_interceptor.ts | 16 +- .../unauthorized_response_http_interceptor.ts | 7 +- 65 files changed, 757 insertions(+), 344 deletions(-) delete mode 100644 docs/development/core/public/kibana-plugin-public.httperrorrequest.error.md delete mode 100644 docs/development/core/public/kibana-plugin-public.httperrorrequest.md delete mode 100644 docs/development/core/public/kibana-plugin-public.httperrorrequest.request.md delete mode 100644 docs/development/core/public/kibana-plugin-public.httperrorresponse.error.md delete mode 100644 docs/development/core/public/kibana-plugin-public.httperrorresponse.md create mode 100644 docs/development/core/public/kibana-plugin-public.httpfetchoptions.assystemrequest.md create mode 100644 docs/development/core/public/kibana-plugin-public.httpfetchoptionswithpath.md create mode 100644 docs/development/core/public/kibana-plugin-public.httpfetchoptionswithpath.path.md create mode 100644 docs/development/core/public/kibana-plugin-public.httpinterceptorrequesterror.error.md create mode 100644 docs/development/core/public/kibana-plugin-public.httpinterceptorrequesterror.fetchoptions.md create mode 100644 docs/development/core/public/kibana-plugin-public.httpinterceptorrequesterror.md create mode 100644 docs/development/core/public/kibana-plugin-public.httpinterceptorresponseerror.error.md create mode 100644 docs/development/core/public/kibana-plugin-public.httpinterceptorresponseerror.md create mode 100644 docs/development/core/public/kibana-plugin-public.httpinterceptorresponseerror.request.md rename docs/development/core/public/{kibana-plugin-public.ihttpresponse.body.md => kibana-plugin-public.httpresponse.body.md} (61%) create mode 100644 docs/development/core/public/kibana-plugin-public.httpresponse.fetchoptions.md create mode 100644 docs/development/core/public/kibana-plugin-public.httpresponse.md rename docs/development/core/public/{kibana-plugin-public.ihttpresponse.request.md => kibana-plugin-public.httpresponse.request.md} (58%) rename docs/development/core/public/{kibana-plugin-public.ihttpresponse.response.md => kibana-plugin-public.httpresponse.response.md} (60%) delete mode 100644 docs/development/core/public/kibana-plugin-public.ihttpresponse.md create mode 100644 docs/development/core/server/kibana-plugin-server.kibanarequest.issystemrequest.md delete mode 100644 src/core/public/http/response.ts diff --git a/docs/development/core/public/kibana-plugin-public.httperrorrequest.error.md b/docs/development/core/public/kibana-plugin-public.httperrorrequest.error.md deleted file mode 100644 index a8b511f889cdf5..00000000000000 --- a/docs/development/core/public/kibana-plugin-public.httperrorrequest.error.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpErrorRequest](./kibana-plugin-public.httperrorrequest.md) > [error](./kibana-plugin-public.httperrorrequest.error.md) - -## HttpErrorRequest.error property - -Signature: - -```typescript -error: Error; -``` diff --git a/docs/development/core/public/kibana-plugin-public.httperrorrequest.md b/docs/development/core/public/kibana-plugin-public.httperrorrequest.md deleted file mode 100644 index e28d092eda71d7..00000000000000 --- a/docs/development/core/public/kibana-plugin-public.httperrorrequest.md +++ /dev/null @@ -1,20 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpErrorRequest](./kibana-plugin-public.httperrorrequest.md) - -## HttpErrorRequest interface - - -Signature: - -```typescript -export interface HttpErrorRequest -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [error](./kibana-plugin-public.httperrorrequest.error.md) | Error | | -| [request](./kibana-plugin-public.httperrorrequest.request.md) | Request | | - diff --git a/docs/development/core/public/kibana-plugin-public.httperrorrequest.request.md b/docs/development/core/public/kibana-plugin-public.httperrorrequest.request.md deleted file mode 100644 index 7a94eeb91bbc81..00000000000000 --- a/docs/development/core/public/kibana-plugin-public.httperrorrequest.request.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpErrorRequest](./kibana-plugin-public.httperrorrequest.md) > [request](./kibana-plugin-public.httperrorrequest.request.md) - -## HttpErrorRequest.request property - -Signature: - -```typescript -request: Request; -``` diff --git a/docs/development/core/public/kibana-plugin-public.httperrorresponse.error.md b/docs/development/core/public/kibana-plugin-public.httperrorresponse.error.md deleted file mode 100644 index 59eee87cb70ba7..00000000000000 --- a/docs/development/core/public/kibana-plugin-public.httperrorresponse.error.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpErrorResponse](./kibana-plugin-public.httperrorresponse.md) > [error](./kibana-plugin-public.httperrorresponse.error.md) - -## HttpErrorResponse.error property - -Signature: - -```typescript -error: Error | IHttpFetchError; -``` diff --git a/docs/development/core/public/kibana-plugin-public.httperrorresponse.md b/docs/development/core/public/kibana-plugin-public.httperrorresponse.md deleted file mode 100644 index 5b1ee898a444d6..00000000000000 --- a/docs/development/core/public/kibana-plugin-public.httperrorresponse.md +++ /dev/null @@ -1,19 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpErrorResponse](./kibana-plugin-public.httperrorresponse.md) - -## HttpErrorResponse interface - - -Signature: - -```typescript -export interface HttpErrorResponse extends IHttpResponse -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [error](./kibana-plugin-public.httperrorresponse.error.md) | Error | IHttpFetchError | | - diff --git a/docs/development/core/public/kibana-plugin-public.httpfetchoptions.asresponse.md b/docs/development/core/public/kibana-plugin-public.httpfetchoptions.asresponse.md index 250cf83309b3c4..207ddf205c88af 100644 --- a/docs/development/core/public/kibana-plugin-public.httpfetchoptions.asresponse.md +++ b/docs/development/core/public/kibana-plugin-public.httpfetchoptions.asresponse.md @@ -4,7 +4,7 @@ ## HttpFetchOptions.asResponse property -When `true` the return type of [HttpHandler](./kibana-plugin-public.httphandler.md) will be an [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) with detailed request and response information. When `false`, the return type will just be the parsed response body. Defaults to `false`. +When `true` the return type of [HttpHandler](./kibana-plugin-public.httphandler.md) will be an [HttpResponse](./kibana-plugin-public.httpresponse.md) with detailed request and response information. When `false`, the return type will just be the parsed response body. Defaults to `false`. Signature: diff --git a/docs/development/core/public/kibana-plugin-public.httpfetchoptions.assystemrequest.md b/docs/development/core/public/kibana-plugin-public.httpfetchoptions.assystemrequest.md new file mode 100644 index 00000000000000..7243d318df6fc9 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.httpfetchoptions.assystemrequest.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpFetchOptions](./kibana-plugin-public.httpfetchoptions.md) > [asSystemRequest](./kibana-plugin-public.httpfetchoptions.assystemrequest.md) + +## HttpFetchOptions.asSystemRequest property + +Whether or not the request should include the "system request" header to differentiate an end user request from Kibana internal request. Can be read on the server-side using KibanaRequest\#isSystemRequest. Defaults to `false`. + +Signature: + +```typescript +asSystemRequest?: boolean; +``` diff --git a/docs/development/core/public/kibana-plugin-public.httpfetchoptions.md b/docs/development/core/public/kibana-plugin-public.httpfetchoptions.md index 6a0c4a8a7f1379..403a1ea7ee4e83 100644 --- a/docs/development/core/public/kibana-plugin-public.httpfetchoptions.md +++ b/docs/development/core/public/kibana-plugin-public.httpfetchoptions.md @@ -16,7 +16,8 @@ export interface HttpFetchOptions extends HttpRequestInit | Property | Type | Description | | --- | --- | --- | -| [asResponse](./kibana-plugin-public.httpfetchoptions.asresponse.md) | boolean | When true the return type of [HttpHandler](./kibana-plugin-public.httphandler.md) will be an [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) with detailed request and response information. When false, the return type will just be the parsed response body. Defaults to false. | +| [asResponse](./kibana-plugin-public.httpfetchoptions.asresponse.md) | boolean | When true the return type of [HttpHandler](./kibana-plugin-public.httphandler.md) will be an [HttpResponse](./kibana-plugin-public.httpresponse.md) with detailed request and response information. When false, the return type will just be the parsed response body. Defaults to false. | +| [asSystemRequest](./kibana-plugin-public.httpfetchoptions.assystemrequest.md) | boolean | Whether or not the request should include the "system request" header to differentiate an end user request from Kibana internal request. Can be read on the server-side using KibanaRequest\#isSystemRequest. Defaults to false. | | [headers](./kibana-plugin-public.httpfetchoptions.headers.md) | HttpHeadersInit | Headers to send with the request. See [HttpHeadersInit](./kibana-plugin-public.httpheadersinit.md). | | [prependBasePath](./kibana-plugin-public.httpfetchoptions.prependbasepath.md) | boolean | Whether or not the request should automatically prepend the basePath. Defaults to true. | | [query](./kibana-plugin-public.httpfetchoptions.query.md) | HttpFetchQuery | The query string for an HTTP request. See [HttpFetchQuery](./kibana-plugin-public.httpfetchquery.md). | diff --git a/docs/development/core/public/kibana-plugin-public.httpfetchoptionswithpath.md b/docs/development/core/public/kibana-plugin-public.httpfetchoptionswithpath.md new file mode 100644 index 00000000000000..adccca83f5bb4e --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.httpfetchoptionswithpath.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpFetchOptionsWithPath](./kibana-plugin-public.httpfetchoptionswithpath.md) + +## HttpFetchOptionsWithPath interface + +Similar to [HttpFetchOptions](./kibana-plugin-public.httpfetchoptions.md) but with the URL path included. + +Signature: + +```typescript +export interface HttpFetchOptionsWithPath extends HttpFetchOptions +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [path](./kibana-plugin-public.httpfetchoptionswithpath.path.md) | string | | + diff --git a/docs/development/core/public/kibana-plugin-public.httpfetchoptionswithpath.path.md b/docs/development/core/public/kibana-plugin-public.httpfetchoptionswithpath.path.md new file mode 100644 index 00000000000000..9341fd2f7693a7 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.httpfetchoptionswithpath.path.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpFetchOptionsWithPath](./kibana-plugin-public.httpfetchoptionswithpath.md) > [path](./kibana-plugin-public.httpfetchoptionswithpath.path.md) + +## HttpFetchOptionsWithPath.path property + +Signature: + +```typescript +path: string; +``` diff --git a/docs/development/core/public/kibana-plugin-public.httphandler.md b/docs/development/core/public/kibana-plugin-public.httphandler.md index 89458c4743cd6e..42a6942eedef06 100644 --- a/docs/development/core/public/kibana-plugin-public.httphandler.md +++ b/docs/development/core/public/kibana-plugin-public.httphandler.md @@ -4,7 +4,7 @@ ## HttpHandler interface -A function for making an HTTP requests to Kibana's backend. See [HttpFetchOptions](./kibana-plugin-public.httpfetchoptions.md) for options and [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) for the response. +A function for making an HTTP requests to Kibana's backend. See [HttpFetchOptions](./kibana-plugin-public.httpfetchoptions.md) for options and [HttpResponse](./kibana-plugin-public.httpresponse.md) for the response. Signature: diff --git a/docs/development/core/public/kibana-plugin-public.httpheadersinit.md b/docs/development/core/public/kibana-plugin-public.httpheadersinit.md index 15877a55fcddc8..28177909972db1 100644 --- a/docs/development/core/public/kibana-plugin-public.httpheadersinit.md +++ b/docs/development/core/public/kibana-plugin-public.httpheadersinit.md @@ -4,6 +4,7 @@ ## HttpHeadersInit interface +Headers to append to the request. Any headers that begin with `kbn-` are considered private to Core and will cause [HttpHandler](./kibana-plugin-public.httphandler.md) to throw an error. Signature: diff --git a/docs/development/core/public/kibana-plugin-public.httpinterceptor.md b/docs/development/core/public/kibana-plugin-public.httpinterceptor.md index cf7288a492ebb2..a00a7ab0854fba 100644 --- a/docs/development/core/public/kibana-plugin-public.httpinterceptor.md +++ b/docs/development/core/public/kibana-plugin-public.httpinterceptor.md @@ -16,7 +16,7 @@ export interface HttpInterceptor | Method | Description | | --- | --- | -| [request(request, controller)](./kibana-plugin-public.httpinterceptor.request.md) | Define an interceptor to be executed before a request is sent. | +| [request(fetchOptions, controller)](./kibana-plugin-public.httpinterceptor.request.md) | Define an interceptor to be executed before a request is sent. | | [requestError(httpErrorRequest, controller)](./kibana-plugin-public.httpinterceptor.requesterror.md) | Define an interceptor to be executed if a request interceptor throws an error or returns a rejected Promise. | | [response(httpResponse, controller)](./kibana-plugin-public.httpinterceptor.response.md) | Define an interceptor to be executed after a response is received. | | [responseError(httpErrorResponse, controller)](./kibana-plugin-public.httpinterceptor.responseerror.md) | Define an interceptor to be executed if a response interceptor throws an error or returns a rejected Promise. | diff --git a/docs/development/core/public/kibana-plugin-public.httpinterceptor.request.md b/docs/development/core/public/kibana-plugin-public.httpinterceptor.request.md index 4254e4aa8950c1..d1d559916b36d2 100644 --- a/docs/development/core/public/kibana-plugin-public.httpinterceptor.request.md +++ b/docs/development/core/public/kibana-plugin-public.httpinterceptor.request.md @@ -9,17 +9,17 @@ Define an interceptor to be executed before a request is sent. Signature: ```typescript -request?(request: Request, controller: IHttpInterceptController): Promise | Request | void; +request?(fetchOptions: Readonly, controller: IHttpInterceptController): MaybePromise> | void; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| request | Request | | +| fetchOptions | Readonly<HttpFetchOptionsWithPath> | | | controller | IHttpInterceptController | | Returns: -`Promise | Request | void` +`MaybePromise> | void` diff --git a/docs/development/core/public/kibana-plugin-public.httpinterceptor.requesterror.md b/docs/development/core/public/kibana-plugin-public.httpinterceptor.requesterror.md index af9b8641e74736..fc661d88bf1afd 100644 --- a/docs/development/core/public/kibana-plugin-public.httpinterceptor.requesterror.md +++ b/docs/development/core/public/kibana-plugin-public.httpinterceptor.requesterror.md @@ -9,17 +9,17 @@ Define an interceptor to be executed if a request interceptor throws an error or Signature: ```typescript -requestError?(httpErrorRequest: HttpErrorRequest, controller: IHttpInterceptController): Promise | Request | void; +requestError?(httpErrorRequest: HttpInterceptorRequestError, controller: IHttpInterceptController): MaybePromise> | void; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| httpErrorRequest | HttpErrorRequest | | +| httpErrorRequest | HttpInterceptorRequestError | | | controller | IHttpInterceptController | | Returns: -`Promise | Request | void` +`MaybePromise> | void` diff --git a/docs/development/core/public/kibana-plugin-public.httpinterceptor.response.md b/docs/development/core/public/kibana-plugin-public.httpinterceptor.response.md index 3a67dcbad3119b..95cf78dd6f8d16 100644 --- a/docs/development/core/public/kibana-plugin-public.httpinterceptor.response.md +++ b/docs/development/core/public/kibana-plugin-public.httpinterceptor.response.md @@ -9,17 +9,17 @@ Define an interceptor to be executed after a response is received. Signature: ```typescript -response?(httpResponse: IHttpResponse, controller: IHttpInterceptController): Promise | IHttpResponseInterceptorOverrides | void; +response?(httpResponse: HttpResponse, controller: IHttpInterceptController): MaybePromise | void; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| httpResponse | IHttpResponse | | +| httpResponse | HttpResponse | | | controller | IHttpInterceptController | | Returns: -`Promise | IHttpResponseInterceptorOverrides | void` +`MaybePromise | void` diff --git a/docs/development/core/public/kibana-plugin-public.httpinterceptor.responseerror.md b/docs/development/core/public/kibana-plugin-public.httpinterceptor.responseerror.md index 476ceba649d402..50e943bc93b073 100644 --- a/docs/development/core/public/kibana-plugin-public.httpinterceptor.responseerror.md +++ b/docs/development/core/public/kibana-plugin-public.httpinterceptor.responseerror.md @@ -9,17 +9,17 @@ Define an interceptor to be executed if a response interceptor throws an error o Signature: ```typescript -responseError?(httpErrorResponse: HttpErrorResponse, controller: IHttpInterceptController): Promise | IHttpResponseInterceptorOverrides | void; +responseError?(httpErrorResponse: HttpInterceptorResponseError, controller: IHttpInterceptController): MaybePromise | void; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| httpErrorResponse | HttpErrorResponse | | +| httpErrorResponse | HttpInterceptorResponseError | | | controller | IHttpInterceptController | | Returns: -`Promise | IHttpResponseInterceptorOverrides | void` +`MaybePromise | void` diff --git a/docs/development/core/public/kibana-plugin-public.httpinterceptorrequesterror.error.md b/docs/development/core/public/kibana-plugin-public.httpinterceptorrequesterror.error.md new file mode 100644 index 00000000000000..28fde834d97216 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.httpinterceptorrequesterror.error.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpInterceptorRequestError](./kibana-plugin-public.httpinterceptorrequesterror.md) > [error](./kibana-plugin-public.httpinterceptorrequesterror.error.md) + +## HttpInterceptorRequestError.error property + +Signature: + +```typescript +error: Error; +``` diff --git a/docs/development/core/public/kibana-plugin-public.httpinterceptorrequesterror.fetchoptions.md b/docs/development/core/public/kibana-plugin-public.httpinterceptorrequesterror.fetchoptions.md new file mode 100644 index 00000000000000..79c086224ff10e --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.httpinterceptorrequesterror.fetchoptions.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpInterceptorRequestError](./kibana-plugin-public.httpinterceptorrequesterror.md) > [fetchOptions](./kibana-plugin-public.httpinterceptorrequesterror.fetchoptions.md) + +## HttpInterceptorRequestError.fetchOptions property + +Signature: + +```typescript +fetchOptions: Readonly; +``` diff --git a/docs/development/core/public/kibana-plugin-public.httpinterceptorrequesterror.md b/docs/development/core/public/kibana-plugin-public.httpinterceptorrequesterror.md new file mode 100644 index 00000000000000..4375719e0802b6 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.httpinterceptorrequesterror.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpInterceptorRequestError](./kibana-plugin-public.httpinterceptorrequesterror.md) + +## HttpInterceptorRequestError interface + + +Signature: + +```typescript +export interface HttpInterceptorRequestError +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [error](./kibana-plugin-public.httpinterceptorrequesterror.error.md) | Error | | +| [fetchOptions](./kibana-plugin-public.httpinterceptorrequesterror.fetchoptions.md) | Readonly<HttpFetchOptionsWithPath> | | + diff --git a/docs/development/core/public/kibana-plugin-public.httpinterceptorresponseerror.error.md b/docs/development/core/public/kibana-plugin-public.httpinterceptorresponseerror.error.md new file mode 100644 index 00000000000000..a9bdf41b36868d --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.httpinterceptorresponseerror.error.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpInterceptorResponseError](./kibana-plugin-public.httpinterceptorresponseerror.md) > [error](./kibana-plugin-public.httpinterceptorresponseerror.error.md) + +## HttpInterceptorResponseError.error property + +Signature: + +```typescript +error: Error | IHttpFetchError; +``` diff --git a/docs/development/core/public/kibana-plugin-public.httpinterceptorresponseerror.md b/docs/development/core/public/kibana-plugin-public.httpinterceptorresponseerror.md new file mode 100644 index 00000000000000..49b4b2545a5f30 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.httpinterceptorresponseerror.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpInterceptorResponseError](./kibana-plugin-public.httpinterceptorresponseerror.md) + +## HttpInterceptorResponseError interface + + +Signature: + +```typescript +export interface HttpInterceptorResponseError extends HttpResponse +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [error](./kibana-plugin-public.httpinterceptorresponseerror.error.md) | Error | IHttpFetchError | | +| [request](./kibana-plugin-public.httpinterceptorresponseerror.request.md) | Readonly<Request> | | + diff --git a/docs/development/core/public/kibana-plugin-public.httpinterceptorresponseerror.request.md b/docs/development/core/public/kibana-plugin-public.httpinterceptorresponseerror.request.md new file mode 100644 index 00000000000000..cb6252ceb8e413 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.httpinterceptorresponseerror.request.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpInterceptorResponseError](./kibana-plugin-public.httpinterceptorresponseerror.md) > [request](./kibana-plugin-public.httpinterceptorresponseerror.request.md) + +## HttpInterceptorResponseError.request property + +Signature: + +```typescript +request: Readonly; +``` diff --git a/docs/development/core/public/kibana-plugin-public.ihttpresponse.body.md b/docs/development/core/public/kibana-plugin-public.httpresponse.body.md similarity index 61% rename from docs/development/core/public/kibana-plugin-public.ihttpresponse.body.md rename to docs/development/core/public/kibana-plugin-public.httpresponse.body.md index 2f8710ccdc60ef..3eb167afaa40ec 100644 --- a/docs/development/core/public/kibana-plugin-public.ihttpresponse.body.md +++ b/docs/development/core/public/kibana-plugin-public.httpresponse.body.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) > [body](./kibana-plugin-public.ihttpresponse.body.md) +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpResponse](./kibana-plugin-public.httpresponse.md) > [body](./kibana-plugin-public.httpresponse.body.md) -## IHttpResponse.body property +## HttpResponse.body property Parsed body received, may be undefined if there was an error. diff --git a/docs/development/core/public/kibana-plugin-public.httpresponse.fetchoptions.md b/docs/development/core/public/kibana-plugin-public.httpresponse.fetchoptions.md new file mode 100644 index 00000000000000..65974efe8494ef --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.httpresponse.fetchoptions.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpResponse](./kibana-plugin-public.httpresponse.md) > [fetchOptions](./kibana-plugin-public.httpresponse.fetchoptions.md) + +## HttpResponse.fetchOptions property + +The original [HttpFetchOptionsWithPath](./kibana-plugin-public.httpfetchoptionswithpath.md) used to send this request. + +Signature: + +```typescript +readonly fetchOptions: Readonly; +``` diff --git a/docs/development/core/public/kibana-plugin-public.httpresponse.md b/docs/development/core/public/kibana-plugin-public.httpresponse.md new file mode 100644 index 00000000000000..74097533f6090d --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.httpresponse.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpResponse](./kibana-plugin-public.httpresponse.md) + +## HttpResponse interface + + +Signature: + +```typescript +export interface HttpResponse +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [body](./kibana-plugin-public.httpresponse.body.md) | TResponseBody | Parsed body received, may be undefined if there was an error. | +| [fetchOptions](./kibana-plugin-public.httpresponse.fetchoptions.md) | Readonly<HttpFetchOptionsWithPath> | The original [HttpFetchOptionsWithPath](./kibana-plugin-public.httpfetchoptionswithpath.md) used to send this request. | +| [request](./kibana-plugin-public.httpresponse.request.md) | Readonly<Request> | Raw request sent to Kibana server. | +| [response](./kibana-plugin-public.httpresponse.response.md) | Readonly<Response> | Raw response received, may be undefined if there was an error. | + diff --git a/docs/development/core/public/kibana-plugin-public.ihttpresponse.request.md b/docs/development/core/public/kibana-plugin-public.httpresponse.request.md similarity index 58% rename from docs/development/core/public/kibana-plugin-public.ihttpresponse.request.md rename to docs/development/core/public/kibana-plugin-public.httpresponse.request.md index 12e5405eb5ed43..c2a483033247d6 100644 --- a/docs/development/core/public/kibana-plugin-public.ihttpresponse.request.md +++ b/docs/development/core/public/kibana-plugin-public.httpresponse.request.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) > [request](./kibana-plugin-public.ihttpresponse.request.md) +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpResponse](./kibana-plugin-public.httpresponse.md) > [request](./kibana-plugin-public.httpresponse.request.md) -## IHttpResponse.request property +## HttpResponse.request property Raw request sent to Kibana server. diff --git a/docs/development/core/public/kibana-plugin-public.ihttpresponse.response.md b/docs/development/core/public/kibana-plugin-public.httpresponse.response.md similarity index 60% rename from docs/development/core/public/kibana-plugin-public.ihttpresponse.response.md rename to docs/development/core/public/kibana-plugin-public.httpresponse.response.md index 9d0b4b59a638d7..3a58a3f35012f8 100644 --- a/docs/development/core/public/kibana-plugin-public.ihttpresponse.response.md +++ b/docs/development/core/public/kibana-plugin-public.httpresponse.response.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) > [response](./kibana-plugin-public.ihttpresponse.response.md) +[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpResponse](./kibana-plugin-public.httpresponse.md) > [response](./kibana-plugin-public.httpresponse.response.md) -## IHttpResponse.response property +## HttpResponse.response property Raw response received, may be undefined if there was an error. diff --git a/docs/development/core/public/kibana-plugin-public.ihttpresponse.md b/docs/development/core/public/kibana-plugin-public.ihttpresponse.md deleted file mode 100644 index 5ddce0ba2d0f14..00000000000000 --- a/docs/development/core/public/kibana-plugin-public.ihttpresponse.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-public](./kibana-plugin-public.md) > [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) - -## IHttpResponse interface - - -Signature: - -```typescript -export interface IHttpResponse -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [body](./kibana-plugin-public.ihttpresponse.body.md) | TResponseBody | Parsed body received, may be undefined if there was an error. | -| [request](./kibana-plugin-public.ihttpresponse.request.md) | Readonly<Request> | Raw request sent to Kibana server. | -| [response](./kibana-plugin-public.ihttpresponse.response.md) | Readonly<Response> | Raw response received, may be undefined if there was an error. | - diff --git a/docs/development/core/public/kibana-plugin-public.md b/docs/development/core/public/kibana-plugin-public.md index ad23bfce4f78c2..de6726b34dfabb 100644 --- a/docs/development/core/public/kibana-plugin-public.md +++ b/docs/development/core/public/kibana-plugin-public.md @@ -59,14 +59,16 @@ The plugin integrates with the core system via lifecycle events: `setup` | [ErrorToastOptions](./kibana-plugin-public.errortoastoptions.md) | Options available for [IToasts](./kibana-plugin-public.itoasts.md) APIs. | | [FatalErrorInfo](./kibana-plugin-public.fatalerrorinfo.md) | Represents the message and stack of a fatal Error | | [FatalErrorsSetup](./kibana-plugin-public.fatalerrorssetup.md) | FatalErrors stop the Kibana Public Core and displays a fatal error screen with details about the Kibana build and the error. | -| [HttpErrorRequest](./kibana-plugin-public.httperrorrequest.md) | | -| [HttpErrorResponse](./kibana-plugin-public.httperrorresponse.md) | | | [HttpFetchOptions](./kibana-plugin-public.httpfetchoptions.md) | All options that may be used with a [HttpHandler](./kibana-plugin-public.httphandler.md). | +| [HttpFetchOptionsWithPath](./kibana-plugin-public.httpfetchoptionswithpath.md) | Similar to [HttpFetchOptions](./kibana-plugin-public.httpfetchoptions.md) but with the URL path included. | | [HttpFetchQuery](./kibana-plugin-public.httpfetchquery.md) | | -| [HttpHandler](./kibana-plugin-public.httphandler.md) | A function for making an HTTP requests to Kibana's backend. See [HttpFetchOptions](./kibana-plugin-public.httpfetchoptions.md) for options and [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) for the response. | -| [HttpHeadersInit](./kibana-plugin-public.httpheadersinit.md) | | +| [HttpHandler](./kibana-plugin-public.httphandler.md) | A function for making an HTTP requests to Kibana's backend. See [HttpFetchOptions](./kibana-plugin-public.httpfetchoptions.md) for options and [HttpResponse](./kibana-plugin-public.httpresponse.md) for the response. | +| [HttpHeadersInit](./kibana-plugin-public.httpheadersinit.md) | Headers to append to the request. Any headers that begin with kbn- are considered private to Core and will cause [HttpHandler](./kibana-plugin-public.httphandler.md) to throw an error. | | [HttpInterceptor](./kibana-plugin-public.httpinterceptor.md) | An object that may define global interceptor functions for different parts of the request and response lifecycle. See [IHttpInterceptController](./kibana-plugin-public.ihttpinterceptcontroller.md). | +| [HttpInterceptorRequestError](./kibana-plugin-public.httpinterceptorrequesterror.md) | | +| [HttpInterceptorResponseError](./kibana-plugin-public.httpinterceptorresponseerror.md) | | | [HttpRequestInit](./kibana-plugin-public.httprequestinit.md) | Fetch API options available to [HttpHandler](./kibana-plugin-public.httphandler.md)s. | +| [HttpResponse](./kibana-plugin-public.httpresponse.md) | | | [HttpSetup](./kibana-plugin-public.httpsetup.md) | | | [I18nStart](./kibana-plugin-public.i18nstart.md) | I18nStart.Context is required by any localizable React component from @kbn/i18n and @elastic/eui packages and is supposed to be used as the topmost component for any i18n-compatible React tree. | | [IAnonymousPaths](./kibana-plugin-public.ianonymouspaths.md) | APIs for denoting paths as not requiring authentication | @@ -74,7 +76,6 @@ The plugin integrates with the core system via lifecycle events: `setup` | [IContextContainer](./kibana-plugin-public.icontextcontainer.md) | An object that handles registration of context providers and configuring handlers with context. | | [IHttpFetchError](./kibana-plugin-public.ihttpfetcherror.md) | | | [IHttpInterceptController](./kibana-plugin-public.ihttpinterceptcontroller.md) | Used to halt a request Promise chain in a [HttpInterceptor](./kibana-plugin-public.httpinterceptor.md). | -| [IHttpResponse](./kibana-plugin-public.ihttpresponse.md) | | | [IHttpResponseInterceptorOverrides](./kibana-plugin-public.ihttpresponseinterceptoroverrides.md) | Properties that can be returned by HttpInterceptor.request to override the response. | | [ImageValidation](./kibana-plugin-public.imagevalidation.md) | | | [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) | Client-side client that provides access to the advanced settings stored in elasticsearch. The settings provide control over the behavior of the Kibana application. For example, a user can specify how to display numeric or date fields. Users can adjust the settings via Management UI. [IUiSettingsClient](./kibana-plugin-public.iuisettingsclient.md) | diff --git a/docs/development/core/server/kibana-plugin-server.kibanarequest.issystemrequest.md b/docs/development/core/server/kibana-plugin-server.kibanarequest.issystemrequest.md new file mode 100644 index 00000000000000..f6178d6eee56ec --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.kibanarequest.issystemrequest.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [KibanaRequest](./kibana-plugin-server.kibanarequest.md) > [isSystemRequest](./kibana-plugin-server.kibanarequest.issystemrequest.md) + +## KibanaRequest.isSystemRequest property + +Whether or not the request is a "system request" rather than an application-level request. Can be set on the client using the `HttpFetchOptions#asSystemRequest` option. + +Signature: + +```typescript +readonly isSystemRequest: boolean; +``` diff --git a/docs/development/core/server/kibana-plugin-server.kibanarequest.md b/docs/development/core/server/kibana-plugin-server.kibanarequest.md index 6603de24494d5a..bd02c4b9bc1552 100644 --- a/docs/development/core/server/kibana-plugin-server.kibanarequest.md +++ b/docs/development/core/server/kibana-plugin-server.kibanarequest.md @@ -25,6 +25,7 @@ export declare class KibanaRequestBody | | | [events](./kibana-plugin-server.kibanarequest.events.md) | | KibanaRequestEvents | Request events [KibanaRequestEvents](./kibana-plugin-server.kibanarequestevents.md) | | [headers](./kibana-plugin-server.kibanarequest.headers.md) | | Headers | Readonly copy of incoming request headers. | +| [isSystemRequest](./kibana-plugin-server.kibanarequest.issystemrequest.md) | | boolean | Whether or not the request is a "system request" rather than an application-level request. Can be set on the client using the HttpFetchOptions#asSystemRequest option. | | [params](./kibana-plugin-server.kibanarequest.params.md) | | Params | | | [query](./kibana-plugin-server.kibanarequest.query.md) | | Query | | | [route](./kibana-plugin-server.kibanarequest.route.md) | | RecursiveReadonly<KibanaRequestRoute<Method>> | matched route details | diff --git a/packages/kbn-utility-types/index.ts b/packages/kbn-utility-types/index.ts index 36bbc8cc828735..83a41a52aca381 100644 --- a/packages/kbn-utility-types/index.ts +++ b/packages/kbn-utility-types/index.ts @@ -21,7 +21,17 @@ import { PromiseType } from 'utility-types'; export { $Values, Required, Optional, Class } from 'utility-types'; /** - * Returns wrapped type of a promise. + * A type that may or may not be a `Promise`. + */ +export type MaybePromise = T | Promise; + +/** + * Converts a type to a `Promise`, unless it is already a `Promise`. Useful when proxying the return value of a possibly async function. + */ +export type ShallowPromise = T extends Promise ? Promise : Promise; + +/** + * Returns wrapped type of a `Promise`. */ export type UnwrapPromise> = PromiseType; @@ -39,11 +49,6 @@ export type UnwrapObservable> = T extends Observab ? U : never; -/** - * Converts a type to a `Promise`, unless it is already a `Promise`. Useful when proxying the return value of a possibly async function. - */ -export type ShallowPromise = T extends Promise ? Promise : Promise; - /** * Ensures T is of type X. */ diff --git a/src/core/public/http/fetch.test.ts b/src/core/public/http/fetch.test.ts index adb3d696a962fd..a99b7607d71491 100644 --- a/src/core/public/http/fetch.test.ts +++ b/src/core/public/http/fetch.test.ts @@ -24,7 +24,7 @@ import { join } from 'path'; import { Fetch } from './fetch'; import { BasePath } from './base_path'; -import { IHttpResponse } from './types'; +import { HttpResponse, HttpFetchOptionsWithPath } from './types'; function delay(duration: number) { return new Promise(r => setTimeout(r, duration)); @@ -40,6 +40,19 @@ describe('Fetch', () => { }); describe('http requests', () => { + it('should fail with invalid arguments', async () => { + fetchMock.get('*', {}); + await expect( + fetchInstance.fetch( + // @ts-ignore + { path: '/', headers: { hello: 'world' } }, + { headers: { hello: 'mars' } } + ) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Invalid fetch arguments, must either be (string, object) or (object, undefined), received (object, object)"` + ); + }); + it('should use supplied request method', async () => { fetchMock.post('*', {}); await fetchInstance.fetch('/my/path', { method: 'POST' }); @@ -56,6 +69,15 @@ describe('Fetch', () => { }); }); + it('should not set Content-Type if undefined', async () => { + fetchMock.get('*', {}); + await fetchInstance.fetch('/my/path', { headers: { 'Content-Type': undefined } }); + + expect(fetchMock.lastOptions()!.headers).toMatchObject({ + 'kbn-version': 'VERSION', + }); + }); + it('should use supplied pathname and querystring', async () => { fetchMock.get('*', {}); await fetchInstance.fetch('/my/path', { query: { a: 'b' } }); @@ -69,13 +91,106 @@ describe('Fetch', () => { headers: { myHeader: 'foo' }, }); - expect(fetchMock.lastOptions()!.headers).toEqual({ + expect(fetchMock.lastOptions()!.headers).toMatchObject({ 'content-type': 'application/json', 'kbn-version': 'VERSION', myheader: 'foo', }); }); + it('should not allow overwriting of kbn-version header', async () => { + fetchMock.get('*', {}); + await expect( + fetchInstance.fetch('/my/path', { + headers: { myHeader: 'foo', 'kbn-version': 'CUSTOM!' }, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Invalid fetch headers, headers beginning with \\"kbn-\\" are not allowed: [kbn-version]"` + ); + }); + + it('should not set kbn-system-request header by default', async () => { + fetchMock.get('*', {}); + await fetchInstance.fetch('/my/path', { + headers: { myHeader: 'foo' }, + }); + + expect(fetchMock.lastOptions()!.headers['kbn-system-request']).toBeUndefined(); + }); + + it('should not set kbn-system-request header when asSystemRequest: false', async () => { + fetchMock.get('*', {}); + await fetchInstance.fetch('/my/path', { + headers: { myHeader: 'foo' }, + asSystemRequest: false, + }); + + expect(fetchMock.lastOptions()!.headers['kbn-system-request']).toBeUndefined(); + }); + + it('should set kbn-system-request header when asSystemRequest: true', async () => { + fetchMock.get('*', {}); + await fetchInstance.fetch('/my/path', { + headers: { myHeader: 'foo' }, + asSystemRequest: true, + }); + + expect(fetchMock.lastOptions()!.headers).toMatchObject({ + 'kbn-system-request': 'true', + myheader: 'foo', + }); + }); + + it('should not allow overwriting of kbn-system-request when asSystemRequest: true', async () => { + fetchMock.get('*', {}); + await expect( + fetchInstance.fetch('/my/path', { + headers: { myHeader: 'foo', 'kbn-system-request': 'ANOTHER!' }, + asSystemRequest: true, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Invalid fetch headers, headers beginning with \\"kbn-\\" are not allowed: [kbn-system-request]"` + ); + }); + + it('should not allow overwriting of kbn-system-request when asSystemRequest: false', async () => { + fetchMock.get('*', {}); + await expect( + fetchInstance.fetch('/my/path', { + headers: { myHeader: 'foo', 'kbn-system-request': 'ANOTHER!' }, + asSystemRequest: false, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Invalid fetch headers, headers beginning with \\"kbn-\\" are not allowed: [kbn-system-request]"` + ); + }); + + // Deprecated header used by legacy platform pre-7.7. Remove in 8.x. + it('should not allow overwriting of kbn-system-api when asSystemRequest: true', async () => { + fetchMock.get('*', {}); + await expect( + fetchInstance.fetch('/my/path', { + headers: { myHeader: 'foo', 'kbn-system-api': 'ANOTHER!' }, + asSystemRequest: true, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Invalid fetch headers, headers beginning with \\"kbn-\\" are not allowed: [kbn-system-api]"` + ); + }); + + // Deprecated header used by legacy platform pre-7.7. Remove in 8.x. + it('should not allow overwriting of kbn-system-api when asSystemRequest: false', async () => { + fetchMock.get('*', {}); + await expect( + fetchInstance.fetch('/my/path', { + headers: { myHeader: 'foo', 'kbn-system-api': 'ANOTHER!' }, + asSystemRequest: false, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Invalid fetch headers, headers beginning with \\"kbn-\\" are not allowed: [kbn-system-api]"` + ); + }); + it('should return response', async () => { fetchMock.get('*', { foo: 'bar' }); const json = await fetchInstance.fetch('/my/path'); @@ -121,11 +236,35 @@ describe('Fetch', () => { const response = await fetchInstance.fetch('/my/path', { asResponse: true }); + expect(response.fetchOptions).toMatchObject({ + path: '/my/path', + asResponse: true, + }); expect(response.request).toBeInstanceOf(Request); expect(response.response).toBeInstanceOf(Response); expect(response.body).toEqual({ foo: 'bar' }); }); + it('should expose asSystemRequest: true on detailed response object when asResponse = true', async () => { + fetchMock.get('*', { foo: 'bar' }); + + const response = await fetchInstance.fetch('/my/path', { + asResponse: true, + asSystemRequest: true, + }); + expect(response.fetchOptions.asSystemRequest).toBe(true); + }); + + it('should expose asSystemRequest: false on detailed response object when asResponse = true', async () => { + fetchMock.get('*', { foo: 'bar' }); + + const response = await fetchInstance.fetch('/my/path', { + asResponse: true, + asSystemRequest: false, + }); + expect(response.fetchOptions.asSystemRequest).toBe(false); + }); + it('should reject on network error', async () => { expect.assertions(1); fetchMock.get('*', { status: 500 }); @@ -245,13 +384,18 @@ describe('Fetch', () => { it('should be able to manipulate request instance', async () => { fetchInstance.intercept({ - request(request) { - request.headers.set('Content-Type', 'CustomContentType'); + request(options) { + return { + headers: { + ...options.headers, + 'Content-Type': 'CustomContentType', + }, + }; }, }); fetchInstance.intercept({ - request(request) { - return new Request('/my/route', request); + request() { + return { path: '/my/route' }; }, }); @@ -262,7 +406,7 @@ describe('Fetch', () => { expect(fetchMock.lastOptions()!.headers).toMatchObject({ 'content-type': 'CustomContentType', }); - expect(fetchMock.lastUrl()).toBe('/my/route'); + expect(fetchMock.lastUrl()).toBe('http://localhost/myBase/my/route'); }); it('should call interceptors in correct order', async () => { @@ -402,8 +546,8 @@ describe('Fetch', () => { fetchInstance.intercept({ request: unusedSpy, - requestError({ request }) { - return new Request('/my/route', request); + requestError() { + return { path: '/my/route' }; }, response: usedSpy, }); @@ -423,16 +567,16 @@ describe('Fetch', () => { it('should accumulate request information', async () => { const routes = ['alpha', 'beta', 'gamma']; - const createRequest = jest.fn( - (request: Request) => new Request(`/api/${routes.shift()}`, request) - ); + const createRequest = jest.fn((options: HttpFetchOptionsWithPath) => ({ + path: `/api/${routes.shift()}`, + })); fetchInstance.intercept({ request: createRequest, }); fetchInstance.intercept({ requestError(httpErrorRequest) { - return httpErrorRequest.request; + return httpErrorRequest.fetchOptions; }, }); fetchInstance.intercept({ @@ -450,15 +594,15 @@ describe('Fetch', () => { await expect(fetchInstance.fetch('/my/route')).resolves.toEqual({ foo: 'bar' }); expect(fetchMock.called()).toBe(true); expect(routes.length).toBe(0); - expect(createRequest.mock.calls[0][0].url).toContain('/my/route'); - expect(createRequest.mock.calls[1][0].url).toContain('/api/alpha'); - expect(createRequest.mock.calls[2][0].url).toContain('/api/beta'); + expect(createRequest.mock.calls[0][0].path).toContain('/my/route'); + expect(createRequest.mock.calls[1][0].path).toContain('/api/alpha'); + expect(createRequest.mock.calls[2][0].path).toContain('/api/beta'); expect(fetchMock.lastCall()!.request.url).toContain('/api/gamma'); }); it('should accumulate response information', async () => { const bodies = ['alpha', 'beta', 'gamma']; - const createResponse = jest.fn((httpResponse: IHttpResponse) => ({ + const createResponse = jest.fn((httpResponse: HttpResponse) => ({ body: bodies.shift(), })); @@ -550,7 +694,7 @@ describe('Fetch', () => { fetchInstance.intercept({ requestError(httpErrorRequest) { - return httpErrorRequest.request; + return httpErrorRequest.fetchOptions; }, response: usedSpy, }); diff --git a/src/core/public/http/fetch.ts b/src/core/public/http/fetch.ts index b7ceaed6e56a76..1043b50dff9584 100644 --- a/src/core/public/http/fetch.ts +++ b/src/core/public/http/fetch.ts @@ -20,10 +20,16 @@ import { merge } from 'lodash'; import { format } from 'url'; -import { IBasePath, HttpInterceptor, HttpHandler, HttpFetchOptions, IHttpResponse } from './types'; +import { + IBasePath, + HttpInterceptor, + HttpHandler, + HttpFetchOptions, + HttpResponse, + HttpFetchOptionsWithPath, +} from './types'; import { HttpFetchError } from './http_fetch_error'; import { HttpInterceptController } from './http_intercept_controller'; -import { HttpResponse } from './response'; import { interceptRequest, interceptResponse } from './intercept'; import { HttpInterceptHaltError } from './http_intercept_halt_error'; @@ -60,29 +66,30 @@ export class Fetch { public readonly put = this.shorthand('PUT'); public fetch: HttpHandler = async ( - path: string, - options: HttpFetchOptions = {} + pathOrOptions: string | HttpFetchOptionsWithPath, + options?: HttpFetchOptions ) => { - const initialRequest = this.createRequest(path, options); + const optionsWithPath = validateFetchArguments(pathOrOptions, options); const controller = new HttpInterceptController(); // We wrap the interception in a separate promise to ensure that when // a halt is called we do not resolve or reject, halting handling of the promise. - return new Promise>(async (resolve, reject) => { + return new Promise>(async (resolve, reject) => { try { - const interceptedRequest = await interceptRequest( - initialRequest, + const interceptedOptions = await interceptRequest( + optionsWithPath, this.interceptors, controller ); - const initialResponse = this.fetchResponse(interceptedRequest); + const initialResponse = this.fetchResponse(interceptedOptions); const interceptedResponse = await interceptResponse( + interceptedOptions, initialResponse, this.interceptors, controller ); - if (options.asResponse) { + if (optionsWithPath.asResponse) { resolve(interceptedResponse); } else { resolve(interceptedResponse.body); @@ -95,38 +102,44 @@ export class Fetch { }); }; - private createRequest(path: string, options?: HttpFetchOptions): Request { + private createRequest(options: HttpFetchOptionsWithPath): Request { // Merge and destructure options out that are not applicable to the Fetch API. - const { query, prependBasePath: shouldPrependBasePath, asResponse, ...fetchOptions } = merge( + const { + query, + prependBasePath: shouldPrependBasePath, + asResponse, + asSystemRequest, + ...fetchOptions + } = merge( { method: 'GET', credentials: 'same-origin', prependBasePath: true, + }, + options, + { headers: { - 'kbn-version': this.params.kibanaVersion, 'Content-Type': 'application/json', + ...options.headers, + 'kbn-version': this.params.kibanaVersion, }, - }, - options || {} + } ); const url = format({ - pathname: shouldPrependBasePath ? this.params.basePath.prepend(path) : path, + pathname: shouldPrependBasePath ? this.params.basePath.prepend(options.path) : options.path, query, }); - if ( - options && - options.headers && - 'Content-Type' in options.headers && - options.headers['Content-Type'] === undefined - ) { - delete fetchOptions.headers['Content-Type']; + // Make sure the system request header is only present if `asSystemRequest` is true. + if (asSystemRequest) { + fetchOptions.headers['kbn-system-request'] = 'true'; } return new Request(url, fetchOptions); } - private async fetchResponse(request: Request) { + private async fetchResponse(fetchOptions: HttpFetchOptionsWithPath): Promise> { + const request = this.createRequest(fetchOptions); let response: Response; let body = null; @@ -164,11 +177,46 @@ export class Fetch { throw new HttpFetchError(response.statusText, request, response, body); } - return new HttpResponse({ request, response, body }); + return { fetchOptions, request, response, body }; } - private shorthand(method: string) { - return (path: string, options: HttpFetchOptions = {}) => - this.fetch(path, { ...options, method }); + private shorthand(method: string): HttpHandler { + return (pathOrOptions: string | HttpFetchOptionsWithPath, options?: HttpFetchOptions) => { + const optionsWithPath = validateFetchArguments(pathOrOptions, options); + return this.fetch({ ...optionsWithPath, method }); + }; } } + +/** + * Ensure that the overloaded arguments to `HttpHandler` are valid. + */ +const validateFetchArguments = ( + pathOrOptions: string | HttpFetchOptionsWithPath, + options?: HttpFetchOptions +): HttpFetchOptionsWithPath => { + let fullOptions: HttpFetchOptionsWithPath; + + if (typeof pathOrOptions === 'string' && (typeof options === 'object' || options === undefined)) { + fullOptions = { ...options, path: pathOrOptions }; + } else if (typeof pathOrOptions === 'object' && options === undefined) { + fullOptions = pathOrOptions; + } else { + throw new Error( + `Invalid fetch arguments, must either be (string, object) or (object, undefined), received (${typeof pathOrOptions}, ${typeof options})` + ); + } + + const invalidHeaders = Object.keys(fullOptions.headers ?? {}).filter(headerName => + headerName.startsWith('kbn-') + ); + if (invalidHeaders.length) { + throw new Error( + `Invalid fetch headers, headers beginning with "kbn-" are not allowed: [${invalidHeaders.join( + ',' + )}]` + ); + } + + return fullOptions; +}; diff --git a/src/core/public/http/intercept.ts b/src/core/public/http/intercept.ts index e2a16565c61c43..bacc8748d26808 100644 --- a/src/core/public/http/intercept.ts +++ b/src/core/public/http/intercept.ts @@ -19,28 +19,31 @@ import { HttpInterceptController } from './http_intercept_controller'; import { HttpInterceptHaltError } from './http_intercept_halt_error'; -import { HttpInterceptor, IHttpResponse } from './types'; -import { HttpResponse } from './response'; +import { HttpInterceptor, HttpResponse, HttpFetchOptionsWithPath } from './types'; export async function interceptRequest( - request: Request, + options: HttpFetchOptionsWithPath, interceptors: ReadonlySet, controller: HttpInterceptController -): Promise { - let next = request; +): Promise { + let current: HttpFetchOptionsWithPath; return [...interceptors].reduceRight( (promise, interceptor) => promise.then( - async (current: Request) => { - next = current; + async fetchOptions => { + current = fetchOptions; checkHalt(controller); if (!interceptor.request) { - return current; + return fetchOptions; } - return (await interceptor.request(current, controller)) || current; + const overrides = await interceptor.request(current, controller); + return { + ...current, + ...overrides, + }; }, async error => { checkHalt(controller, error); @@ -49,26 +52,33 @@ export async function interceptRequest( throw error; } - const nextRequest = await interceptor.requestError({ error, request: next }, controller); + const overrides = await interceptor.requestError( + { error, fetchOptions: current }, + controller + ); - if (!nextRequest) { + if (!overrides) { throw error; } - next = nextRequest; - return next; + current = { + ...current, + ...overrides, + }; + return current; } ), - Promise.resolve(request) + Promise.resolve(options) ); } export async function interceptResponse( - responsePromise: Promise, + fetchOptions: HttpFetchOptionsWithPath, + responsePromise: Promise, interceptors: ReadonlySet, controller: HttpInterceptController -): Promise { - let current: IHttpResponse; +): Promise { + let current: HttpResponse; return await [...interceptors].reduce( (promise, interceptor) => @@ -83,10 +93,10 @@ export async function interceptResponse( const interceptorOverrides = (await interceptor.response(httpResponse, controller)) || {}; - return new HttpResponse({ + return { ...httpResponse, ...interceptorOverrides, - }); + }; }, async error => { const request = error.request || (current && current.request); @@ -101,6 +111,7 @@ export async function interceptResponse( const next = await interceptor.responseError( { error, + fetchOptions, request, response: error.response || (current && current.response), body: error.body || (current && current.body), @@ -114,7 +125,7 @@ export async function interceptResponse( throw error; } - return new HttpResponse({ ...next, request }); + return { ...next, request, fetchOptions }; } catch (err) { checkHalt(controller, err); throw err; diff --git a/src/core/public/http/response.ts b/src/core/public/http/response.ts deleted file mode 100644 index 706e7caaca9768..00000000000000 --- a/src/core/public/http/response.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { IHttpResponse } from './types'; - -export class HttpResponse implements IHttpResponse { - public readonly request: Request; - public readonly response?: Response; - public readonly body?: TResponseBody; - - constructor({ - request, - response, - body, - }: { - request: Request; - response?: Response; - body?: TResponseBody; - }) { - this.request = request; - this.response = response; - this.body = body; - } -} diff --git a/src/core/public/http/types.ts b/src/core/public/http/types.ts index 27ffddc79cf653..c38b9da4429438 100644 --- a/src/core/public/http/types.ts +++ b/src/core/public/http/types.ts @@ -18,6 +18,7 @@ */ import { Observable } from 'rxjs'; +import { MaybePromise } from '@kbn/utility-types'; /** @public */ export interface HttpSetup { @@ -110,7 +111,11 @@ export interface IAnonymousPaths { register(path: string): void; } -/** @public */ +/** + * Headers to append to the request. Any headers that begin with `kbn-` are considered private to Core and will cause + * {@link HttpHandler} to throw an error. + * @public + */ export interface HttpHeadersInit { [name: string]: any; } @@ -217,30 +222,54 @@ export interface HttpFetchOptions extends HttpRequestInit { headers?: HttpHeadersInit; /** - * When `true` the return type of {@link HttpHandler} will be an {@link IHttpResponse} with detailed request and + * Whether or not the request should include the "system request" header to differentiate an end user request from + * Kibana internal request. + * Can be read on the server-side using KibanaRequest#isSystemRequest. Defaults to `false`. + */ + asSystemRequest?: boolean; + + /** + * When `true` the return type of {@link HttpHandler} will be an {@link HttpResponse} with detailed request and * response information. When `false`, the return type will just be the parsed response body. Defaults to `false`. */ asResponse?: boolean; } +/** + * Similar to {@link HttpFetchOptions} but with the URL path included. + * @public + */ +export interface HttpFetchOptionsWithPath extends HttpFetchOptions { + /* + * The path on the Kibana server to send the request to. Should not include the basePath. + */ + path: string; +} + /** * A function for making an HTTP requests to Kibana's backend. See {@link HttpFetchOptions} for options and - * {@link IHttpResponse} for the response. + * {@link HttpResponse} for the response. * * @param path the path on the Kibana server to send the request to. Should not include the basePath. * @param options {@link HttpFetchOptions} - * @returns a Promise that resolves to a {@link IHttpResponse} + * @returns a Promise that resolves to a {@link HttpResponse} * @public */ export interface HttpHandler { (path: string, options: HttpFetchOptions & { asResponse: true }): Promise< - IHttpResponse + HttpResponse + >; + (options: HttpFetchOptionsWithPath & { asResponse: true }): Promise< + HttpResponse >; (path: string, options?: HttpFetchOptions): Promise; + (options: HttpFetchOptionsWithPath): Promise; } /** @public */ -export interface IHttpResponse { +export interface HttpResponse { + /** The original {@link HttpFetchOptionsWithPath} used to send this request. */ + readonly fetchOptions: Readonly; /** Raw request sent to Kibana server. */ readonly request: Readonly; /** Raw response received, may be undefined if there was an error. */ @@ -276,12 +305,13 @@ export interface IHttpFetchError extends Error { } /** @public */ -export interface HttpErrorResponse extends IHttpResponse { +export interface HttpInterceptorResponseError extends HttpResponse { + request: Readonly; error: Error | IHttpFetchError; } /** @public */ -export interface HttpErrorRequest { - request: Request; +export interface HttpInterceptorRequestError { + fetchOptions: Readonly; error: Error; } @@ -298,39 +328,39 @@ export interface HttpInterceptor { * @param controller {@link IHttpInterceptController} */ request?( - request: Request, + fetchOptions: Readonly, controller: IHttpInterceptController - ): Promise | Request | void; + ): MaybePromise> | void; /** * Define an interceptor to be executed if a request interceptor throws an error or returns a rejected Promise. - * @param httpErrorRequest {@link HttpErrorRequest} + * @param httpErrorRequest {@link HttpInterceptorRequestError} * @param controller {@link IHttpInterceptController} */ requestError?( - httpErrorRequest: HttpErrorRequest, + httpErrorRequest: HttpInterceptorRequestError, controller: IHttpInterceptController - ): Promise | Request | void; + ): MaybePromise> | void; /** * Define an interceptor to be executed after a response is received. - * @param httpResponse {@link IHttpResponse} + * @param httpResponse {@link HttpResponse} * @param controller {@link IHttpInterceptController} */ response?( - httpResponse: IHttpResponse, + httpResponse: HttpResponse, controller: IHttpInterceptController - ): Promise | IHttpResponseInterceptorOverrides | void; + ): MaybePromise | void; /** * Define an interceptor to be executed if a response interceptor throws an error or returns a rejected Promise. - * @param httpErrorResponse {@link HttpErrorResponse} + * @param httpErrorResponse {@link HttpInterceptorResponseError} * @param controller {@link IHttpInterceptController} */ responseError?( - httpErrorResponse: HttpErrorResponse, + httpErrorResponse: HttpInterceptorResponseError, controller: IHttpInterceptController - ): Promise | IHttpResponseInterceptorOverrides | void; + ): MaybePromise | void; } /** diff --git a/src/core/public/index.ts b/src/core/public/index.ts index c57d35343087ae..6d756e36d7379a 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -143,11 +143,12 @@ export { HttpHeadersInit, HttpRequestInit, HttpFetchOptions, + HttpFetchOptionsWithPath, HttpFetchQuery, - HttpErrorResponse, - HttpErrorRequest, + HttpInterceptorResponseError, + HttpInterceptorRequestError, HttpInterceptor, - IHttpResponse, + HttpResponse, HttpHandler, IBasePath, IAnonymousPaths, diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index a9cea7ae97998d..5e36638516e569 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -9,6 +9,7 @@ import { EuiButtonEmptyProps } from '@elastic/eui'; import { EuiGlobalToastListToast } from '@elastic/eui'; import { ExclusiveUnion } from '@elastic/eui'; import { IconType } from '@elastic/eui'; +import { MaybePromise } from '@kbn/utility-types'; import { Observable } from 'rxjs'; import React from 'react'; import * as Rx from 'rxjs'; @@ -577,28 +578,21 @@ export type HandlerFunction = (context: T, ...args: any[]) => // @public export type HandlerParameters> = T extends (context: any, ...args: infer U) => any ? U : never; -// @public (undocumented) -export interface HttpErrorRequest { - // (undocumented) - error: Error; - // (undocumented) - request: Request; -} - -// @public (undocumented) -export interface HttpErrorResponse extends IHttpResponse { - // (undocumented) - error: Error | IHttpFetchError; -} - // @public export interface HttpFetchOptions extends HttpRequestInit { asResponse?: boolean; + asSystemRequest?: boolean; headers?: HttpHeadersInit; prependBasePath?: boolean; query?: HttpFetchQuery; } +// @public +export interface HttpFetchOptionsWithPath extends HttpFetchOptions { + // (undocumented) + path: string; +} + // @public (undocumented) export interface HttpFetchQuery { // (undocumented) @@ -610,12 +604,18 @@ export interface HttpHandler { // (undocumented) (path: string, options: HttpFetchOptions & { asResponse: true; - }): Promise>; + }): Promise>; + // (undocumented) + (options: HttpFetchOptionsWithPath & { + asResponse: true; + }): Promise>; // (undocumented) (path: string, options?: HttpFetchOptions): Promise; + // (undocumented) + (options: HttpFetchOptionsWithPath): Promise; } -// @public (undocumented) +// @public export interface HttpHeadersInit { // (undocumented) [name: string]: any; @@ -623,10 +623,26 @@ export interface HttpHeadersInit { // @public export interface HttpInterceptor { - request?(request: Request, controller: IHttpInterceptController): Promise | Request | void; - requestError?(httpErrorRequest: HttpErrorRequest, controller: IHttpInterceptController): Promise | Request | void; - response?(httpResponse: IHttpResponse, controller: IHttpInterceptController): Promise | IHttpResponseInterceptorOverrides | void; - responseError?(httpErrorResponse: HttpErrorResponse, controller: IHttpInterceptController): Promise | IHttpResponseInterceptorOverrides | void; + request?(fetchOptions: Readonly, controller: IHttpInterceptController): MaybePromise> | void; + requestError?(httpErrorRequest: HttpInterceptorRequestError, controller: IHttpInterceptController): MaybePromise> | void; + response?(httpResponse: HttpResponse, controller: IHttpInterceptController): MaybePromise | void; + responseError?(httpErrorResponse: HttpInterceptorResponseError, controller: IHttpInterceptController): MaybePromise | void; +} + +// @public (undocumented) +export interface HttpInterceptorRequestError { + // (undocumented) + error: Error; + // (undocumented) + fetchOptions: Readonly; +} + +// @public (undocumented) +export interface HttpInterceptorResponseError extends HttpResponse { + // (undocumented) + error: Error | IHttpFetchError; + // (undocumented) + request: Readonly; } // @public @@ -647,6 +663,14 @@ export interface HttpRequestInit { window?: null; } +// @public (undocumented) +export interface HttpResponse { + readonly body?: TResponseBody; + readonly fetchOptions: Readonly; + readonly request: Readonly; + readonly response?: Readonly; +} + // @public (undocumented) export interface HttpSetup { addLoadingCountSource(countSource$: Observable): void; @@ -718,13 +742,6 @@ export interface IHttpInterceptController { halted: boolean; } -// @public (undocumented) -export interface IHttpResponse { - readonly body?: TResponseBody; - readonly request: Readonly; - readonly response?: Readonly; -} - // @public export interface IHttpResponseInterceptorOverrides { readonly body?: TResponseBody; diff --git a/src/core/server/http/router/request.test.ts b/src/core/server/http/router/request.test.ts index 51162a2c258e91..032027c2344858 100644 --- a/src/core/server/http/router/request.test.ts +++ b/src/core/server/http/router/request.test.ts @@ -66,6 +66,57 @@ describe('KibanaRequest', () => { }); }); + describe('isSytemApi property', () => { + it('is false when no kbn-system-request header is set', () => { + const request = httpServerMock.createRawRequest({ + headers: { custom: 'one' }, + }); + const kibanaRequest = KibanaRequest.from(request); + expect(kibanaRequest.isSystemRequest).toBe(false); + }); + + it('is true when kbn-system-request header is set to true', () => { + const request = httpServerMock.createRawRequest({ + headers: { custom: 'one', 'kbn-system-request': 'true' }, + }); + const kibanaRequest = KibanaRequest.from(request); + expect(kibanaRequest.isSystemRequest).toBe(true); + }); + + it('is false when kbn-system-request header is set to false', () => { + const request = httpServerMock.createRawRequest({ + headers: { custom: 'one', 'kbn-system-request': 'false' }, + }); + const kibanaRequest = KibanaRequest.from(request); + expect(kibanaRequest.isSystemRequest).toBe(false); + }); + + // Remove support for kbn-system-api header in 8.x. Only used by legacy platform. + it('is false when no kbn-system-api header is set', () => { + const request = httpServerMock.createRawRequest({ + headers: { custom: 'one' }, + }); + const kibanaRequest = KibanaRequest.from(request); + expect(kibanaRequest.isSystemRequest).toBe(false); + }); + + it('is true when kbn-system-api header is set to true', () => { + const request = httpServerMock.createRawRequest({ + headers: { custom: 'one', 'kbn-system-api': 'true' }, + }); + const kibanaRequest = KibanaRequest.from(request); + expect(kibanaRequest.isSystemRequest).toBe(true); + }); + + it('is false when kbn-system-api header is set to false', () => { + const request = httpServerMock.createRawRequest({ + headers: { custom: 'one', 'kbn-system-api': 'false' }, + }); + const kibanaRequest = KibanaRequest.from(request); + expect(kibanaRequest.isSystemRequest).toBe(false); + }); + }); + describe('RouteSchema type inferring', () => { it('should work with config-schema', () => { const body = Buffer.from('body!'); diff --git a/src/core/server/http/router/request.ts b/src/core/server/http/router/request.ts index 22fb2d2643d1c7..703571ba53c0a3 100644 --- a/src/core/server/http/router/request.ts +++ b/src/core/server/http/router/request.ts @@ -127,6 +127,11 @@ export class KibanaRequest< * This property will contain a `filtered` copy of request headers. */ public readonly headers: Headers; + /** + * Whether or not the request is a "system request" rather than an application-level request. + * Can be set on the client using the `HttpFetchOptions#asSystemRequest` option. + */ + public readonly isSystemRequest: boolean; /** {@link IKibanaSocket} */ public readonly socket: IKibanaSocket; @@ -147,6 +152,10 @@ export class KibanaRequest< ) { this.url = request.url; this.headers = deepFreeze({ ...request.headers }); + this.isSystemRequest = + request.headers['kbn-system-request'] === 'true' || + // Remove support for `kbn-system-api` in 8.x. Used only by legacy platform. + request.headers['kbn-system-api'] === 'true'; // prevent Symbol exposure via Object.getOwnPropertySymbols() Object.defineProperty(this, requestSymbol, { diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index a179e1f35a937f..446990980fdd79 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -883,6 +883,7 @@ export class KibanaRequest(req: Request, routeSchemas?: RouteValidator | RouteValidatorFullConfig, withoutSecretHeaders?: boolean): KibanaRequest; readonly headers: Headers; + readonly isSystemRequest: boolean; // (undocumented) readonly params: Params; // (undocumented) diff --git a/src/legacy/core_plugins/kibana/server/lib/system_api.js b/src/legacy/core_plugins/kibana/server/lib/system_api.js index 24c901a3db0a48..3e2ab667dd98bf 100644 --- a/src/legacy/core_plugins/kibana/server/lib/system_api.js +++ b/src/legacy/core_plugins/kibana/server/lib/system_api.js @@ -24,6 +24,7 @@ const SYSTEM_API_HEADER_NAME = 'kbn-system-api'; * * @param request HAPI request object * @return true if request is a system API request; false, otherwise + * @deprecated Use KibanaRequest#isSystemApi */ export function isSystemApiRequest(request) { return !!request.headers[SYSTEM_API_HEADER_NAME]; diff --git a/src/legacy/ui/public/kfetch/kfetch.ts b/src/legacy/ui/public/kfetch/kfetch.ts index cb96e03eb13283..02be7a32db2965 100644 --- a/src/legacy/ui/public/kfetch/kfetch.ts +++ b/src/legacy/ui/public/kfetch/kfetch.ts @@ -32,6 +32,7 @@ export interface KFetchQuery { export interface KFetchOptions extends HttpRequestInit { pathname: string; query?: KFetchQuery; + asSystemRequest?: boolean; } export interface KFetchKibanaOptions { diff --git a/src/plugins/data/public/search/sync_search_strategy.test.ts b/src/plugins/data/public/search/sync_search_strategy.test.ts index 2737a4033a015b..cd19c4d84dce14 100644 --- a/src/plugins/data/public/search/sync_search_strategy.test.ts +++ b/src/plugins/data/public/search/sync_search_strategy.test.ts @@ -44,10 +44,8 @@ describe('Sync search strategy', () => { }, {} ); - expect(mockCoreSetup.http.fetch.mock.calls[0][0]).toBe( - `/internal/search/${SYNC_SEARCH_STRATEGY}` - ); - expect(mockCoreSetup.http.fetch.mock.calls[0][1]).toEqual({ + expect(mockCoreSetup.http.fetch.mock.calls[0][0]).toEqual({ + path: `/internal/search/${SYNC_SEARCH_STRATEGY}`, body: JSON.stringify({ serverStrategy: 'SYNC_SEARCH_STRATEGY', }), diff --git a/src/plugins/data/public/search/sync_search_strategy.ts b/src/plugins/data/public/search/sync_search_strategy.ts index 3885a97a98571a..65fe10f39aaa04 100644 --- a/src/plugins/data/public/search/sync_search_strategy.ts +++ b/src/plugins/data/public/search/sync_search_strategy.ts @@ -36,14 +36,12 @@ export const syncSearchStrategyProvider: TSearchStrategyProvider { - const response: Promise = context.core.http.fetch( - `/internal/search/${request.serverStrategy}`, - { - method: 'POST', - body: JSON.stringify(request), - signal: options.signal, - } - ); + const response: Promise = context.core.http.fetch({ + path: `/internal/search/${request.serverStrategy}`, + method: 'POST', + body: JSON.stringify(request), + signal: options.signal, + }); return from(response); }; diff --git a/test/plugin_functional/plugins/core_plugin_b/public/plugin.tsx b/test/plugin_functional/plugins/core_plugin_b/public/plugin.tsx index bda1557bdaf915..39290b066fab7c 100644 --- a/test/plugin_functional/plugins/core_plugin_b/public/plugin.tsx +++ b/test/plugin_functional/plugins/core_plugin_b/public/plugin.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { CoreSetup, Plugin, PluginInitializerContext } from 'kibana/public'; +import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from 'kibana/public'; import { CorePluginAPluginSetup } from '../../core_plugin_a/public/plugin'; declare global { @@ -52,7 +52,17 @@ export class CorePluginBPlugin }; } - public start() {} + public async start(core: CoreStart, deps: {}) { + return { + sendSystemRequest: async (asSystemRequest: boolean) => { + const response = await core.http.post('/core_plugin_b/system_request', { + asSystemRequest, + }); + return `/core_plugin_b/system_request says: "${response}"`; + }, + }; + } + public stop() {} } diff --git a/test/plugin_functional/plugins/core_plugin_b/server/plugin.ts b/test/plugin_functional/plugins/core_plugin_b/server/plugin.ts index 91a4fe89c1c57e..d2bb9222a23fa1 100644 --- a/test/plugin_functional/plugins/core_plugin_b/server/plugin.ts +++ b/test/plugin_functional/plugins/core_plugin_b/server/plugin.ts @@ -54,6 +54,16 @@ export class CorePluginBPlugin implements Plugin { return res.ok({ body: `ID: ${req.query.id} - ${req.body.bar.toUpperCase()}` }); } ); + + router.post( + { + path: '/core_plugin_b/system_request', + validate: false, + }, + async (context, req, res) => { + return res.ok({ body: `System request? ${req.isSystemRequest}` }); + } + ); } public start() {} diff --git a/test/plugin_functional/test_suites/core_plugins/server_plugins.ts b/test/plugin_functional/test_suites/core_plugins/server_plugins.ts index eb232b14589917..f5b45d36944e1d 100644 --- a/test/plugin_functional/test_suites/core_plugins/server_plugins.ts +++ b/test/plugin_functional/test_suites/core_plugins/server_plugins.ts @@ -54,5 +54,15 @@ export default function({ getService }: PluginFunctionalProviderContext) { statusCode: 400, }); }); + + it('sets request.isSystemRequest when kbn-system-request header is set', async () => { + await supertest + .post('/core_plugin_b/system_request') + .set('kbn-xsrf', 'anything') + .set('kbn-system-request', 'true') + .send() + .expect(200) + .expect('System request? true'); + }); }); } diff --git a/test/plugin_functional/test_suites/core_plugins/ui_plugins.ts b/test/plugin_functional/test_suites/core_plugins/ui_plugins.ts index b76463ee767393..82267d73782af0 100644 --- a/test/plugin_functional/test_suites/core_plugins/ui_plugins.ts +++ b/test/plugin_functional/test_suites/core_plugins/ui_plugins.ts @@ -64,7 +64,7 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider }); }); - describe('have env data provided', function describeIndexTests() { + describe('have env data provided', () => { before(async () => { await PageObjects.common.navigateToApp('bar'); }); @@ -75,5 +75,27 @@ export default function({ getService, getPageObjects }: PluginFunctionalProvider expect(envData.packageInfo.version).to.be.a('string'); }); }); + + describe('http fetching', () => { + before(async () => { + await PageObjects.common.navigateToApp('settings'); + }); + + it('should send kbn-system-request header when asSystemRequest: true', async () => { + expect( + await browser.executeAsync(async cb => { + window.__coreProvider.start.plugins.core_plugin_b.sendSystemRequest(true).then(cb); + }) + ).to.be('/core_plugin_b/system_request says: "System request? true"'); + }); + + it('should not send kbn-system-request header when asSystemRequest: false', async () => { + expect( + await browser.executeAsync(async cb => { + window.__coreProvider.start.plugins.core_plugin_b.sendSystemRequest(false).then(cb); + }) + ).to.be('/core_plugin_b/system_request says: "System request? false"'); + }); + }); }); } diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.test.tsx b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.test.tsx index b04bd3a4e9be9d..e8a23b8e053c29 100644 --- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.test.tsx +++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.test.tsx @@ -278,8 +278,8 @@ describe('IndexPattern Data Panel', () => { function testProps() { const setState = jest.fn(); - core.http.get.mockImplementation(async (url: string) => { - const parts = url.split('/'); + core.http.get.mockImplementation(async ({ path }) => { + const parts = path.split('/'); const indexPatternTitle = parts[parts.length - 1]; return { indexPatternTitle: `${indexPatternTitle}_testtitle`, @@ -397,7 +397,8 @@ describe('IndexPattern Data Panel', () => { expect(setState).toHaveBeenCalledTimes(2); expect(core.http.get).toHaveBeenCalledTimes(2); - expect(core.http.get).toHaveBeenCalledWith('/api/lens/existing_fields/a', { + expect(core.http.get).toHaveBeenCalledWith({ + path: '/api/lens/existing_fields/a', query: { fromDate: '2019-01-01', toDate: '2020-01-01', @@ -405,7 +406,8 @@ describe('IndexPattern Data Panel', () => { }, }); - expect(core.http.get).toHaveBeenCalledWith('/api/lens/existing_fields/a', { + expect(core.http.get).toHaveBeenCalledWith({ + path: '/api/lens/existing_fields/a', query: { fromDate: '2019-01-01', toDate: '2020-01-02', @@ -436,7 +438,8 @@ describe('IndexPattern Data Panel', () => { expect(setState).toHaveBeenCalledTimes(2); - expect(core.http.get).toHaveBeenCalledWith('/api/lens/existing_fields/a', { + expect(core.http.get).toHaveBeenCalledWith({ + path: '/api/lens/existing_fields/a', query: { fromDate: '2019-01-01', toDate: '2020-01-01', @@ -444,7 +447,8 @@ describe('IndexPattern Data Panel', () => { }, }); - expect(core.http.get).toHaveBeenCalledWith('/api/lens/existing_fields/b', { + expect(core.http.get).toHaveBeenCalledWith({ + path: '/api/lens/existing_fields/b', query: { fromDate: '2019-01-01', toDate: '2020-01-01', @@ -484,13 +488,13 @@ describe('IndexPattern Data Panel', () => { let overlapCount = 0; const props = testProps(); - core.http.get.mockImplementation((url: string) => { + core.http.get.mockImplementation(({ path }) => { if (queryCount) { ++overlapCount; } ++queryCount; - const parts = url.split('/'); + const parts = path.split('/'); const indexPatternTitle = parts[parts.length - 1]; const result = Promise.resolve({ indexPatternTitle, diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/loader.test.ts b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/loader.test.ts index 6bea13c32830fb..f8961c30d14ee2 100644 --- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/loader.test.ts +++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/loader.test.ts @@ -537,8 +537,8 @@ describe('loader', () => { describe('syncExistingFields', () => { it('should call once for each index pattern', async () => { const setState = jest.fn(); - const fetchJson = jest.fn(async (url: string) => { - const indexPatternTitle = _.last(url.split('/')); + const fetchJson = jest.fn(({ path }: { path: string }) => { + const indexPatternTitle = _.last(path.split('/')); return { indexPatternTitle, existingFieldNames: ['field_1', 'field_2'].map( diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/loader.ts b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/loader.ts index c196cb886e575b..5b994890deb7a9 100644 --- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/loader.ts +++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/loader.ts @@ -234,7 +234,8 @@ export async function syncExistingFields({ query.timeFieldName = pattern.timeFieldName; } - return fetchJson(`${BASE_API_URL}/existing_fields/${pattern.id}`, { + return fetchJson({ + path: `${BASE_API_URL}/existing_fields/${pattern.id}`, query, }) as Promise; }) diff --git a/x-pack/legacy/plugins/reporting/public/lib/job_queue_client.ts b/x-pack/legacy/plugins/reporting/public/lib/job_queue_client.ts index 173a4e31cfef60..0f68c56a18bf69 100644 --- a/x-pack/legacy/plugins/reporting/public/lib/job_queue_client.ts +++ b/x-pack/legacy/plugins/reporting/public/lib/job_queue_client.ts @@ -5,8 +5,6 @@ */ import { kfetch } from 'ui/kfetch'; -// @ts-ignore -import { addSystemApiHeader } from 'ui/system_api'; const API_BASE_URL = '/api/reporting/jobs'; @@ -64,7 +62,7 @@ class JobQueueClient { method: 'GET', pathname: `${API_BASE_URL}/list`, query, - headers: addSystemApiHeader({}), + asSystemRequest: true, }); }; @@ -72,7 +70,7 @@ class JobQueueClient { return kfetch({ method: 'GET', pathname: `${API_BASE_URL}/count`, - headers: addSystemApiHeader({}), + asSystemRequest: true, }); } @@ -80,7 +78,7 @@ class JobQueueClient { return kfetch({ method: 'GET', pathname: `${API_BASE_URL}/output/${jobId}`, - headers: addSystemApiHeader({}), + asSystemRequest: true, }); } @@ -88,7 +86,7 @@ class JobQueueClient { return kfetch({ method: 'GET', pathname: `${API_BASE_URL}/info/${jobId}`, - headers: addSystemApiHeader({}), + asSystemRequest: true, }); } } diff --git a/x-pack/legacy/plugins/xpack_main/server/lib/__tests__/replace_injected_vars.js b/x-pack/legacy/plugins/xpack_main/server/lib/__tests__/replace_injected_vars.js index 55da11221bb101..ae929045cf5709 100644 --- a/x-pack/legacy/plugins/xpack_main/server/lib/__tests__/replace_injected_vars.js +++ b/x-pack/legacy/plugins/xpack_main/server/lib/__tests__/replace_injected_vars.js @@ -16,6 +16,7 @@ const buildRequest = (path = '/app/kibana') => { return { path, route: { settings: {} }, + headers: {}, raw: { req: { socket: {}, diff --git a/x-pack/plugins/licensing/public/plugin.test.ts b/x-pack/plugins/licensing/public/plugin.test.ts index 01545ee8d48b4a..f68e1dcfaf62ba 100644 --- a/x-pack/plugins/licensing/public/plugin.test.ts +++ b/x-pack/plugins/licensing/public/plugin.test.ts @@ -64,10 +64,8 @@ describe('licensing plugin', () => { await refresh(); - expect(coreSetup.http.get.mock.calls[0][1]).toMatchObject({ - headers: { - 'kbn-system-api': 'true', - }, + expect(coreSetup.http.get.mock.calls[0][0]).toMatchObject({ + asSystemRequest: true, }); }); }); diff --git a/x-pack/plugins/licensing/public/plugin.ts b/x-pack/plugins/licensing/public/plugin.ts index 7d2498b0f7ff6e..dab4c4048ce4c4 100644 --- a/x-pack/plugins/licensing/public/plugin.ts +++ b/x-pack/plugins/licensing/public/plugin.ts @@ -132,10 +132,9 @@ export class LicensingPlugin implements Plugin { private fetchLicense = async (core: CoreSetup): Promise => { try { - const response = await core.http.get(this.infoEndpoint, { - headers: { - 'kbn-system-api': 'true', - }, + const response = await core.http.get({ + path: this.infoEndpoint, + asSystemRequest: true, }); return new License({ license: response.license, diff --git a/x-pack/plugins/security/public/authentication/authentication_service.ts b/x-pack/plugins/security/public/authentication/authentication_service.ts index 23c45c88e563a1..2679bc20d6a7d9 100644 --- a/x-pack/plugins/security/public/authentication/authentication_service.ts +++ b/x-pack/plugins/security/public/authentication/authentication_service.ts @@ -23,7 +23,7 @@ export class AuthenticationService { return { async getCurrentUser() { return (await http.get('/internal/security/me', { - headers: { 'kbn-system-api': true }, + asSystemRequest: true, })) as AuthenticatedUser; }, }; diff --git a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx index 2b3d7c811f6de3..e183eae08d1e17 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.test.tsx @@ -155,7 +155,7 @@ function getProps({ const { fatalErrors } = coreMock.createSetup(); const { http, docLinks, notifications } = coreMock.createStart(); - http.get.mockImplementation(async path => { + http.get.mockImplementation(async (path: any) => { if (path === '/api/features') { return buildFeatures(); } @@ -509,7 +509,7 @@ describe('', () => { it('can render if features are not available', async () => { const { http } = coreMock.createStart(); - http.get.mockImplementation(async path => { + http.get.mockImplementation(async (path: any) => { if (path === '/api/features') { const error = { response: { status: 404 } }; throw error; diff --git a/x-pack/plugins/security/public/management/roles/roles_api_client.test.ts b/x-pack/plugins/security/public/management/roles/roles_api_client.test.ts index 75611613684051..21a4f5c9499ec1 100644 --- a/x-pack/plugins/security/public/management/roles/roles_api_client.test.ts +++ b/x-pack/plugins/security/public/management/roles/roles_api_client.test.ts @@ -16,7 +16,7 @@ describe('RolesAPIClient', () => { await rolesAPIClient.saveRole({ role, spacesEnabled }); expect(httpMock.put).toHaveBeenCalledTimes(1); - return JSON.parse(httpMock.put.mock.calls[0][1]?.body as any); + return JSON.parse((httpMock.put.mock.calls[0] as any)[1]?.body as any); } describe('spaces disabled', () => { diff --git a/x-pack/plugins/security/public/session/session_timeout.tsx b/x-pack/plugins/security/public/session/session_timeout.tsx index e237201699b9be..bd6dbad7dbf149 100644 --- a/x-pack/plugins/security/public/session/session_timeout.tsx +++ b/x-pack/plugins/security/public/session/session_timeout.tsx @@ -104,9 +104,8 @@ export class SessionTimeout implements ISessionTimeout { */ private fetchSessionInfoAndResetTimers = async (extend = false) => { const method = extend ? 'POST' : 'GET'; - const headers = extend ? {} : { 'kbn-system-api': 'true' }; try { - const result = await this.http.fetch(SESSION_ROUTE, { method, headers }); + const result = await this.http.fetch(SESSION_ROUTE, { method, asSystemRequest: !extend }); this.handleSessionInfoAndResetTimers(result); diff --git a/x-pack/plugins/security/public/session/session_timeout_http_interceptor.test.ts b/x-pack/plugins/security/public/session/session_timeout_http_interceptor.test.ts index ffbd625590b158..427bdb04f9c61f 100644 --- a/x-pack/plugins/security/public/session/session_timeout_http_interceptor.test.ts +++ b/x-pack/plugins/security/public/session/session_timeout_http_interceptor.test.ts @@ -58,7 +58,7 @@ describe('response', () => { http.intercept(interceptor); fetchMock.mock('*', 200); - await http.fetch('/foo-api', { headers: { 'kbn-system-api': 'true' } }); + await http.fetch('/foo-api', { asSystemRequest: true }); expect(sessionTimeoutMock.extend).not.toHaveBeenCalled(); }); @@ -99,9 +99,9 @@ describe('responseError', () => { http.intercept(interceptor); fetchMock.mock('*', 401); - await expect( - http.fetch('/foo-api', { headers: { 'kbn-system-api': 'true' } }) - ).rejects.toMatchInlineSnapshot(`[Error: Unauthorized]`); + await expect(http.fetch('/foo-api', { asSystemRequest: true })).rejects.toMatchInlineSnapshot( + `[Error: Unauthorized]` + ); expect(sessionTimeoutMock.extend).not.toHaveBeenCalled(); }); diff --git a/x-pack/plugins/security/public/session/session_timeout_http_interceptor.ts b/x-pack/plugins/security/public/session/session_timeout_http_interceptor.ts index 8a2251f3f7f7c0..4033c04378a52f 100644 --- a/x-pack/plugins/security/public/session/session_timeout_http_interceptor.ts +++ b/x-pack/plugins/security/public/session/session_timeout_http_interceptor.ts @@ -6,38 +6,34 @@ import { HttpInterceptor, - HttpErrorResponse, - IHttpResponse, + HttpInterceptorResponseError, + HttpResponse, IAnonymousPaths, } from 'src/core/public'; import { ISessionTimeout } from './session_timeout'; -const isSystemAPIRequest = (request: Request) => { - return request.headers.has('kbn-system-api'); -}; - export class SessionTimeoutHttpInterceptor implements HttpInterceptor { constructor(private sessionTimeout: ISessionTimeout, private anonymousPaths: IAnonymousPaths) {} - response(httpResponse: IHttpResponse) { + response(httpResponse: HttpResponse) { if (this.anonymousPaths.isAnonymous(window.location.pathname)) { return; } - if (isSystemAPIRequest(httpResponse.request)) { + if (httpResponse.fetchOptions.asSystemRequest) { return; } this.sessionTimeout.extend(httpResponse.request.url); } - responseError(httpErrorResponse: HttpErrorResponse) { + responseError(httpErrorResponse: HttpInterceptorResponseError) { if (this.anonymousPaths.isAnonymous(window.location.pathname)) { return; } - if (isSystemAPIRequest(httpErrorResponse.request)) { + if (httpErrorResponse.fetchOptions.asSystemRequest) { return; } diff --git a/x-pack/plugins/security/public/session/unauthorized_response_http_interceptor.ts b/x-pack/plugins/security/public/session/unauthorized_response_http_interceptor.ts index a0ef2fdb86b47e..6b5eadcab74418 100644 --- a/x-pack/plugins/security/public/session/unauthorized_response_http_interceptor.ts +++ b/x-pack/plugins/security/public/session/unauthorized_response_http_interceptor.ts @@ -6,7 +6,7 @@ import { HttpInterceptor, - HttpErrorResponse, + HttpInterceptorResponseError, IHttpInterceptController, IAnonymousPaths, } from 'src/core/public'; @@ -16,7 +16,10 @@ import { SessionExpired } from './session_expired'; export class UnauthorizedResponseHttpInterceptor implements HttpInterceptor { constructor(private sessionExpired: SessionExpired, private anonymousPaths: IAnonymousPaths) {} - responseError(httpErrorResponse: HttpErrorResponse, controller: IHttpInterceptController) { + responseError( + httpErrorResponse: HttpInterceptorResponseError, + controller: IHttpInterceptController + ) { if (this.anonymousPaths.isAnonymous(window.location.pathname)) { return; } From 703a3c22da416efbbef3be4fe98fbfe52174a0d6 Mon Sep 17 00:00:00 2001 From: Josh Dover Date: Fri, 24 Jan 2020 15:24:32 -0700 Subject: [PATCH 67/72] Add @kbn/i18n to @kbn/ui-shared-deps (#55891) * Add @kbn/i18n to @kbn/ui-shared-deps * Use string DI syntax for i18n angular modules --- packages/kbn-i18n/src/angular/directive.ts | 8 +++++++- packages/kbn-i18n/src/angular/filter.ts | 4 +++- packages/kbn-ui-shared-deps/entry.js | 3 +++ packages/kbn-ui-shared-deps/index.js | 3 +++ packages/kbn-ui-shared-deps/package.json | 1 + 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/kbn-i18n/src/angular/directive.ts b/packages/kbn-i18n/src/angular/directive.ts index 8a4b724ec0629b..5d18a25be71f01 100644 --- a/packages/kbn-i18n/src/angular/directive.ts +++ b/packages/kbn-i18n/src/angular/directive.ts @@ -30,7 +30,13 @@ interface I18nScope extends IScope { const HTML_KEY_PREFIX = 'html_'; const PLACEHOLDER_SEPARATOR = '@I18N@'; -export function i18nDirective( +export const i18nDirective: [string, string, typeof i18nDirectiveFn] = [ + 'i18n', + '$sanitize', + i18nDirectiveFn, +]; + +function i18nDirectiveFn( i18n: I18nServiceType, $sanitize: (html: string) => string ): IDirective { diff --git a/packages/kbn-i18n/src/angular/filter.ts b/packages/kbn-i18n/src/angular/filter.ts index 2f7425a9dd8e0d..cc9da0aa51d301 100644 --- a/packages/kbn-i18n/src/angular/filter.ts +++ b/packages/kbn-i18n/src/angular/filter.ts @@ -19,7 +19,9 @@ import { I18nServiceType } from './provider'; -export function i18nFilter(i18n: I18nServiceType) { +export const i18nFilter: [string, typeof i18nFilterFn] = ['i18n', i18nFilterFn]; + +function i18nFilterFn(i18n: I18nServiceType) { return (id: string, { defaultMessage = '', values = {} } = {}) => { return i18n(id, { values, diff --git a/packages/kbn-ui-shared-deps/entry.js b/packages/kbn-ui-shared-deps/entry.js index 7a15c3bb742c0a..9a5fb479276f70 100644 --- a/packages/kbn-ui-shared-deps/entry.js +++ b/packages/kbn-ui-shared-deps/entry.js @@ -30,6 +30,9 @@ export const ElasticEui = require('@elastic/eui'); export const ElasticEuiLibServices = require('@elastic/eui/lib/services'); export const ElasticEuiLightTheme = require('@elastic/eui/dist/eui_theme_light.json'); export const ElasticEuiDarkTheme = require('@elastic/eui/dist/eui_theme_dark.json'); +export const KbnI18n = require('@kbn/i18n'); +export const KbnI18nAngular = require('@kbn/i18n/angular'); +export const KbnI18nReact = require('@kbn/i18n/react'); export const Moment = require('moment'); export const MomentTimezone = require('moment-timezone/moment-timezone'); export const React = require('react'); diff --git a/packages/kbn-ui-shared-deps/index.js b/packages/kbn-ui-shared-deps/index.js index cef25295b35d74..5f5ac3f1c9c2ff 100644 --- a/packages/kbn-ui-shared-deps/index.js +++ b/packages/kbn-ui-shared-deps/index.js @@ -30,6 +30,9 @@ exports.externals = { '@elastic/eui/lib/services': '__kbnSharedDeps__.ElasticEuiLibServices', '@elastic/eui/dist/eui_theme_light.json': '__kbnSharedDeps__.ElasticEuiLightTheme', '@elastic/eui/dist/eui_theme_dark.json': '__kbnSharedDeps__.ElasticEuiDarkTheme', + '@kbn/i18n': '__kbnSharedDeps__.KbnI18n', + '@kbn/i18n/angular': '__kbnSharedDeps__.KbnI18nAngular', + '@kbn/i18n/react': '__kbnSharedDeps__.KbnI18nReact', jquery: '__kbnSharedDeps__.Jquery', moment: '__kbnSharedDeps__.Moment', 'moment-timezone': '__kbnSharedDeps__.MomentTimezone', diff --git a/packages/kbn-ui-shared-deps/package.json b/packages/kbn-ui-shared-deps/package.json index 488f57b01e1687..47a47449927e49 100644 --- a/packages/kbn-ui-shared-deps/package.json +++ b/packages/kbn-ui-shared-deps/package.json @@ -12,6 +12,7 @@ "@elastic/eui": "18.2.1", "@elastic/charts": "^16.1.0", "@kbn/dev-utils": "1.0.0", + "@kbn/i18n": "1.0.0", "@yarnpkg/lockfile": "^1.1.0", "abortcontroller-polyfill": "^1.3.0", "angular": "^1.7.9", From 88ee484f185b0fae180b896310c9ce9b4917398a Mon Sep 17 00:00:00 2001 From: Xavier Mouligneau <189600+XavierM@users.noreply.github.com> Date: Fri, 24 Jan 2020 19:19:58 -0500 Subject: [PATCH 68/72] [SIEM] [BUG] Detections fix additional look back (#55928) * fix time * fix unnecessary export * fix humanize --- .../detection_engine/rules/details/index.tsx | 11 ++++++---- .../pages/detection_engine/rules/helpers.tsx | 22 ++++++++++++++----- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/index.tsx index f9103a9d6e081d..e96d1c1198dd5e 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/details/index.tsx @@ -119,10 +119,13 @@ const RuleDetailsPageComponent: FC = ({ // This is used to re-trigger api rule status when user de/activate rule const [ruleEnabled, setRuleEnabled] = useState(null); const [ruleDetailTab, setRuleDetailTab] = useState(RuleDetailTabs.signals); - const { aboutRuleData, defineRuleData, scheduleRuleData } = getStepsData({ - rule, - detailsView: true, - }); + const { aboutRuleData, defineRuleData, scheduleRuleData } = + rule != null + ? getStepsData({ + rule, + detailsView: true, + }) + : { aboutRuleData: null, defineRuleData: null, scheduleRuleData: null }; const [lastSignals] = useSignalInfo({ ruleId }); const userHasNoPermissions = canUserCRUD != null && hasManageApiKey != null ? !canUserCRUD || !hasManageApiKey : false; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx index 4cbaa38e1febcc..d12d39fdc490a5 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx @@ -4,7 +4,9 @@ * you may not use this file except in compliance with the Elastic License. */ +import dateMath from '@elastic/datemath'; import { get, pick } from 'lodash/fp'; +import moment from 'moment'; import { useLocation } from 'react-router-dom'; import { esFilters } from '../../../../../../../../src/plugins/data/public'; @@ -22,7 +24,7 @@ export const getStepsData = ({ rule, detailsView = false, }: { - rule: Rule | null; + rule: Rule; detailsView?: boolean; }): GetStepsData => { const defineRuleData: DefineStepRule | null = @@ -52,15 +54,25 @@ export const getStepsData = ({ }, } : null; + + const from = dateMath.parse(rule.from) ?? moment(); + const interval = dateMath.parse(`now-${rule.interval}`) ?? moment(); + + const fromDuration = moment.duration(interval.diff(from)); + let fromHumanize = `${Math.floor(fromDuration.asHours())}h`; + + if (fromDuration.asSeconds() < 60) { + fromHumanize = `${Math.floor(fromDuration.asSeconds())}s`; + } else if (fromDuration.asMinutes() < 60) { + fromHumanize = `${Math.floor(fromDuration.asMinutes())}m`; + } + const scheduleRuleData: ScheduleStepRule | null = rule != null ? { isNew: false, ...pick(['enabled', 'interval'], rule), - from: - rule?.meta?.from != null - ? rule.meta.from.replace('now-', '') - : rule.from.replace('now-', ''), + from: fromHumanize, } : null; From cb7c003c343422465c7cd5c87cf042bdd67b5c36 Mon Sep 17 00:00:00 2001 From: Frank Hassanabad Date: Fri, 24 Jan 2020 18:17:22 -0700 Subject: [PATCH 69/72] [SIEM][Detection Engine] Rules content additions ## Summary Rule updates from @randomuserid and team ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. ~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~ ~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~ ~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~ ~~- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~~ ~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~ ### For maintainers ~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~ - [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process) --- .../403_response_to_a_post.json | 15 +++++- .../405_response_method_not_allowed.json | 15 +++++- .../linux_hping_activity.json | 19 +++++-- .../linux_iodine_activity.json | 19 +++++-- .../linux_kernel_module_activity.json | 2 +- .../linux_ldso_process_activity.json | 14 ++++-- .../linux_mknod_activity.json | 17 +++++-- .../linux_netcat_network_connection.json | 19 +++++-- .../linux_nmap_activity.json | 17 +++++-- .../linux_nping_activity.json | 17 +++++-- ...nux_process_started_in_temp_directory.json | 13 ++--- .../linux_shell_activity_by_web_server.json | 6 +-- .../linux_socat_activity.json | 17 +++++-- .../linux_ssh_forwarding.json | 34 +++++++++++-- .../linux_strace_activity.json | 17 +++++-- .../linux_tcpdump_activity.json | 46 +++++++++++++++-- .../linux_whoami_commmand.json | 8 +-- .../network_dns_directly_to_the_internet.json | 35 +++++++++++-- ...fer_protocol_activity_to_the_internet.json | 45 +++++++++++++++-- ...hat_protocol_activity_to_the_internet.json | 45 +++++++++++++++-- .../network_nat_traversal_port_activity.json | 27 ++++++++-- .../network_port_26_activity.json | 49 +++++++++++++++++-- ...rk_port_8000_activity_to_the_internet.json | 31 +++++++++--- ..._to_point_tunneling_protocol_activity.json | 13 +++-- ...k_proxy_port_activity_to_the_internet.json | 30 ++++++++++-- ...te_desktop_protocol_from_the_internet.json | 28 +++++++++-- ...mote_desktop_protocol_to_the_internet.json | 43 ++++++++++++++-- ...mote_procedure_call_from_the_internet.json | 28 +++++++++-- ...remote_procedure_call_to_the_internet.json | 28 +++++++++-- ...file_sharing_activity_to_the_internet.json | 43 ++++++++++++++-- .../network_smtp_to_the_internet.json | 43 ++++++++++++++-- ..._server_port_activity_to_the_internet.json | 11 +++-- ...rk_ssh_secure_shell_from_the_internet.json | 45 +++++++++++++++-- ...work_ssh_secure_shell_to_the_internet.json | 30 ++++++++++-- .../network_telnet_port_activity.json | 43 ++++++++++++++-- .../network_tor_activity_to_the_internet.json | 30 ++++++++++-- ...l_network_computing_from_the_internet.json | 45 +++++++++++++++-- ...ual_network_computing_to_the_internet.json | 30 ++++++++++-- .../prepackaged_rules/null_user_agent.json | 34 ++++++++----- .../prepackaged_rules/sqlmap_user_agent.json | 14 +++++- 40 files changed, 898 insertions(+), 167 deletions(-) diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json index 932f1986045574..b9ca36e009ce50 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json @@ -1,16 +1,27 @@ { - "description": "403 Response to a POST", + "description": "A POST request to web application returned a 403 response which indicates the web application declined to process the request because the action requested was disallowed.", "enabled": false, + "false_positives": [ + "Security scans and tests may result in these errors. Misconfigured or buggy applications may produce large numbers of these errors. If the source is unexpected, or the user is unauthorized, or the request is unusual, these may be suspicious or malicious activity." + ], "filters": [], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "403 Response to a POST", + "max_signals": 33, + "name": "Web Application Suspicious Activity: POST Request Declined", "query": "http.response.status_code:403 and http.request.method:post", + "references": [ + "https://en.wikipedia.org/wiki/HTTP_403" + ], "risk_score": 50, "rule_id": "a87a4e42-1d82-44bd-b0bf-d9b7f91fb89e", "severity": "low", + "tags": [ + "Elastic", + "apm" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json index d4c9a40ddb45f1..c33307b93592b0 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json @@ -1,16 +1,27 @@ { - "description": "405 Response (Method Not Allowed)", + "description": "A request to web application returned a 405 response which indicates the web application declined to process the request because the HTTP method was not allowed for the resource.", "enabled": false, + "false_positives": [ + "Security scans and tests may result in these errors. Misconfigured or buggy applications may produce large numbers of these errors. If the source is unexpected, or the user is unauthorized, or the request is unusual, these may be suspicious or malicious activity." + ], "filters": [], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "405 Response (Method Not Allowed)", + "max_signals": 33, + "name": "Web Application Suspicious Activity: Unauthorized Method", "query": "http.response.status_code:405", + "references": [ + "https://en.wikipedia.org/wiki/HTTP_405" + ], "risk_score": 50, "rule_id": "75ee75d8-c180-481c-ba88-ee50129a6aef", "severity": "low", + "tags": [ + "Elastic", + "apm" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json index b42e4130b688cf..1557f9ff4bb302 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json @@ -1,15 +1,26 @@ { - "description": "Linux: Hping Activity", + "description": "Hping ran on a Linux host. Hping is FOSS command-line packet analyzer and has the ability to construct network packets for a wide variety of network security testing applications including scanning and firewall auditing.", "enabled": false, + "false_positives": [ + "Normal use of hping is uncommon apart from security testing and research. Use by non-security engineers is very uncommon." + ], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "Linux: Hping Activity", + "max_signals": 33, + "name": "Hping Process Activity", "query": "process.name: hping and event.action:executed", - "risk_score": 50, + "references": [ + "https://en.wikipedia.org/wiki/Hping" + ], + "risk_score": 75, "rule_id": "90169566-2260-4824-b8e4-8615c3b4ed52", - "severity": "low", + "severity": "high", + "tags": [ + "Elastic", + "linux" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json index 1eb66c39571d75..83c47d0d5c970c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json @@ -1,15 +1,26 @@ { - "description": "Linux: Iodine Activity", + "description": "Iodine is a tool for tunneling internet protocol version 4 (IPV4) trafic over the DNS protocol in order to circumvent firewalls, network security groups or network access lists while evading detection.", "enabled": false, + "false_positives": [ + "Normal use of Iodine is uncommon apart from security testing and research. Use by non-security engineers is very uncommon." + ], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "Linux: Iodine Activity", + "max_signals": 33, + "name": "Potential DNS Tunneling via Iodine", "query": "process.name: (iodine or iodined) and event.action:executed", - "risk_score": 50, + "references": [ + "https://code.kryo.se/iodine/" + ], + "risk_score": 75, "rule_id": "041d4d41-9589-43e2-ba13-5680af75ebc2", - "severity": "low", + "severity": "high", + "tags": [ + "Elastic", + "linux" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json index d6887f7928dd80..6a448caac89e44 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json @@ -2,7 +2,7 @@ "description": "Identifies loadable kernel module errors, often indicative of potential persistence attempts.", "enabled": false, "false_positives": [ - "Security tools and device drivers may load legitimate kernel modules." + "Security tools and device drivers may run these programs in order to load legitimate kernel modules. Use of these programs by ordinary users is uncommon." ], "from": "now-6m", "immutable": true, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ldso_process_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ldso_process_activity.json index 174e246fa70d98..8e53ee96fd8f3a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ldso_process_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ldso_process_activity.json @@ -1,16 +1,24 @@ { - "description": "Linux ld.so process activity", + "description": "ld.so runs in a privlieged context and can be used to escape restrictive environments by spawning a shell in order to elevate privlieges or move laterally.", "enabled": false, + "false_positives": [ + "ld.so is a dual-use tool that can be used for benign or malicious activity. Some normal use of this command may originate from developers or administrators. Use of ld.so by non-engineers or ordinary users is uncommon." + ], "filters": [], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "Linux ld.so process activity", + "max_signals": 33, + "name": "Ld.so Process Activity", "query": "process.name:ld.so and event.action:executed", - "risk_score": 50, + "risk_score": 25, "rule_id": "3f31a31c-f7cf-4268-a0df-ec1a98099e7f", "severity": "low", + "tags": [ + "Elastic", + "linux" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json index 08940115207413..ea5a6287a8d7c8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json @@ -1,15 +1,26 @@ { - "description": "Linux: Mknod Activity", + "description": "The Linux mknod program is sometimes used in the command paylod of remote command injection (RCI) and other exploits to export a command shell when the traditional version of netcat is not available to the payload.", "enabled": false, + "false_positives": [ + "Mknod is a Linux system program. Some normal use of this program, at varying levels of frequency, may originate from scripts, automation tools and frameworks. Usage by web servers is more likely to be suspicious." + ], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "Linux: Mknod Activity", + "max_signals": 33, + "name": "Mknod Process Activity", "query": "process.name: mknod and event.action:executed", - "risk_score": 50, + "references": [ + "https://pen-testing.sans.org/blog/2013/05/06/netcat-without-e-no-problem" + ], + "risk_score": 25, "rule_id": "61c31c14-507f-4627-8c31-072556b89a9c", "severity": "low", + "tags": [ + "Elastic", + "linux" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json index d324a4f64cbbad..60943512f45ae6 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json @@ -1,15 +1,28 @@ { - "description": "Linux: Netcat Network Connection", + "description": "A netcat process is engaging in network activity on a Linux host. Netcat is often used as a persistence mechanism by exporting a reverse shell or by serving a shell on a listening port. Netcat is also sometimes used for data exfiltation. ", "enabled": false, + "false_positives": [ + "Netcat is a dual-use tool that can be used for benign or malicious activity. Netcat is included in some Linux distributions so its presence is not necessarily suspicious. Some normal use of this program, while uncommon, may originate from scripts, automation tools and frameworks." + ], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "Linux: Netcat Network Activity", + "max_signals": 33, + "name": "Netcat Network Activity", "query": "process.name: (nc or ncat or netcat or netcat.openbsd or netcat.traditional) and event.action: (connected-to or bound-socket or socket_opened)", + "references": [ + "http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet", + "https://www.sans.org/security-resources/sec560/netcat_cheat_sheet_v1.pdf", + "https://en.wikipedia.org/wiki/Netcat" + ], "risk_score": 50, "rule_id": "adb961e0-cb74-42a0-af9e-29fc41f88f5f", - "severity": "low", + "severity": "medium", + "tags": [ + "Elastic", + "linux" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json index cb89fdc6ebbff5..f10d3cf5470e40 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json @@ -1,15 +1,26 @@ { - "description": "Linux: Nmap Activity", + "description": "Nmap ran on a Linux host. Nmap is a FOSS tool for network scanning and security testing. It can map and discover networks and identify listneing services and operating systems. It is sometimes used to gather information in support of exploitation, execution or lateral movement.", "enabled": false, + "false_positives": [ + "Security testing tools and frameworks may run nmap in the course of security auditing. Some normal use of this command may originate from security engineers and network or server administrators. Use of nmap by ordinary users is uncommon." + ], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "Linux: Nmap Activity", + "max_signals": 33, + "name": "Nmap Process Activity", "query": "process.name: nmap", - "risk_score": 50, + "references": [ + "https://en.wikipedia.org/wiki/Nmap" + ], + "risk_score": 25, "rule_id": "c87fca17-b3a9-4e83-b545-f30746c53920", "severity": "low", + "tags": [ + "Elastic", + "linux" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json index b5508c388059cc..ad25602c868979 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json @@ -1,15 +1,26 @@ { - "description": "Linux: Nping Activity", + "description": "Nping ran on a Linux host. Nping is part of the Nmap tool suite and has the ability to construct raw packets for a wide variety of security testing applications including denial of service testing.", "enabled": false, + "false_positives": [ + "Some normal use of this command may originate from security engineers and network or server administrators but this is usually not routine or unannounced. Use of nping by non-engineers or ordinary users is uncommon." + ], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "Linux: Nping Activity", + "max_signals": 33, + "name": "Nping Process Activity", "query": "process.name: nping and event.action:executed", + "references": [ + "https://en.wikipedia.org/wiki/Nmap" + ], "risk_score": 50, "rule_id": "0d69150b-96f8-467c-a86d-a67a3378ce77", - "severity": "low", + "severity": "medium", + "tags": [ + "Elastic", + "linux" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json index 945c8acfe00e45..7f1d2860027a85 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json @@ -2,24 +2,21 @@ "description": "Identifies processes running in a temporary folder. This is sometimes done by adversaries to hide malware.", "enabled": false, "false_positives": [ - "Build systems like Jenkins may start processes in the /tmp directory." + "Build systems like Jenkins may start processes in the /tmp directory. These can be exempted by name or by username." ], "from": "now-6m", "immutable": true, - "index": [ - "auditbeat-*" - ], "interval": "5m", "language": "kuery", "max_signals": 33, "name": "Unusual Process Execution - Temp", "query": "process.working_directory: /tmp and event.action:executed", - "risk_score": 25, + "risk_score": 50, "rule_id": "df959768-b0c9-4d45-988c-5606a2be8e5a", - "severity": "low", + "severity": "medium", "tags": [ - "EIA", - "auditbeat" + "Elastic", + "linux" ], "to": "now", "type": "query", diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json index e8c5942ec5100f..ed8bc30afbfa56 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json @@ -13,7 +13,7 @@ "interval": "5m", "language": "kuery", "max_signals": 33, - "name": "Linux: Shell Activity By Web Server", + "name": "Potential Shell via Web Server", "query": "process.name: bash and (user.name: apache or www) and event.action:executed", "references": [ "https://pentestlab.blog/tag/web-shell/" @@ -22,8 +22,8 @@ "rule_id": "231876e7-4d1f-4d63-a47c-47dd1acdc1cb", "severity": "low", "tags": [ - "EIA", - "auditbeat" + "Elastic", + "linux" ], "threats": [ { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json index 2ea860e0619587..c920bfb7d9a153 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json @@ -1,15 +1,26 @@ { - "description": "Linux: socat activity", + "description": "A Socat process is running on a Linux host. Socat is often used as a persistence mechanism by exporting a reverse shell or by serving a shell on a listening port. Socat is also sometimes used for lateral movement. ", "enabled": false, + "false_positives": [ + "Socat is a dual-use tool that can be used for benign or malicious activity. Some normal use of this program, at varying levels of frequency, may originate from scripts, automation tools and frameworks. Usage by web servers is more likely to be suspicious." + ], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "Linux: Whoami Commmand", + "max_signals": 33, + "name": "Socat Process Activity", "query": "process.name:socat and not process.args:\"-V\" and event.action:executed", + "references": [ + "https://blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys/#method-2-using-socat" + ], "risk_score": 50, "rule_id": "cd4d5754-07e1-41d4-b9a5-ef4ea6a0a126", - "severity": "low", + "severity": "medium", + "tags": [ + "Elastic", + "linux" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ssh_forwarding.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ssh_forwarding.json index 38562320921b4d..d3b71573e03e33 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ssh_forwarding.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ssh_forwarding.json @@ -1,18 +1,44 @@ { - "description": "Detect ssh processes with the `-R` flag which can be used to forward a port on a local system to the local system so that someone on the remote system can connect to the local system. This is often used by attackers to create encrypted tunnels through firewalls for pivoting and persistence.", + "description": "An SSH processes ran with the `-R` flag which can be used to forward a port to a remote destination for purposes of pivoting and persistence. This technique often used to create encrypted tunnels and circumvent firewalls, security groups or network access lists.", "enabled": false, + "false_positives": [ + "Some normal use of this command may originate from usage by engineers as an alternative or ad-hoc remote access solution. Use of this command by non-administrative users is uncommon." + ], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "Linux: SSH Port Forwarding", + "max_signals": 33, + "name": "Potential Lateral Movement via SSH Port Forwarding", "query": "process.name:ssh and process.args:\"-R\" and event.action:executed", "references": [ - " - https://www.ssh.com/ssh/tunneling,https://www.ssh.com/ssh/tunneling/example,https://attack.mitre.org/techniques/T1184/" + "https://www.ssh.com/ssh/tunneling", + "https://www.ssh.com/ssh/tunneling/example" ], "risk_score": 50, "rule_id": "45d256ab-e665-445b-8306-2f83a8db59f8", - "severity": "low", + "severity": "medium", + "tags": [ + "Elastic", + "linux" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0008", + "name": "Lateral Movement", + "reference": "https://attack.mitre.org/tactics/TA0008/" + }, + "techniques": [ + { + "id": "T1184", + "name": "SSH Hijacking", + "reference": "https://attack.mitre.org/techniques/T1184/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json index dc0eae38d20c65..29b4ae17f3108d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json @@ -1,15 +1,26 @@ { - "description": "Linux: Strace Activity", + "description": "Strace runs in a privlieged context and can be used to escape restrictive environments by instantiating a shell in order to elevate privlieges or move laterally.", "enabled": false, + "false_positives": [ + "Strace is a dual-use tool that can be used for benign or malicious activity. Some normal use of this command may originate from developers or SREs engaged in debugging or system call tracing." + ], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "Linux: Strace Activity", + "max_signals": 33, + "name": "Strace Process Activity", "query": "process.name: strace and event.action:executed", - "risk_score": 50, + "references": [ + "https://en.wikipedia.org/wiki/Strace" + ], + "risk_score": 25, "rule_id": "d6450d4e-81c6-46a3-bd94-079886318ed5", "severity": "low", + "tags": [ + "Elastic", + "linux" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json index f7b543fef75f5e..8a3b6f29bb8bff 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json @@ -1,15 +1,55 @@ { - "description": "Linux: Tcpdump Activity", + "description": "The Tcpdump program ran on a Linux host. Tcpdump is a network monitoring or packet 'sniffing' tool that can be used to capture insecure credentials or data in motion. Sniffing can also be used to discover details of network services as a prelude to lateral movement or defense evasion.", "enabled": false, + "false_positives": [ + "Some normal use of this command may originate from server or network administrators engaged in network troubleshooting." + ], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "Linux: Tcpdump Activity", + "max_signals": 33, + "name": "Network Sniffing via Tcpdump", "query": "process.name: tcpdump and event.action:executed", - "risk_score": 50, + "risk_score": 25, "rule_id": "7a137d76-ce3d-48e2-947d-2747796a78c0", "severity": "low", + "tags": [ + "Elastic", + "linux" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0006", + "name": "Credential Access", + "reference": "https://attack.mitre.org/tactics/TA0006/" + }, + "techniques": [ + { + "id": "T1040", + "name": "Network Sniffing", + "reference": "https://attack.mitre.org/techniques/T1040/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0007", + "name": "Discovery", + "reference": "https://attack.mitre.org/tactics/TA0007/" + }, + "techniques": [ + { + "id": "T1040", + "name": "Network Sniffing", + "reference": "https://attack.mitre.org/techniques/T1040/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json index c57e21334b4f76..eecd79c0bca001 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json @@ -12,14 +12,14 @@ "interval": "5m", "language": "kuery", "max_signals": 33, - "name": "Linux: User Discovery Via The Whoami Commmand", + "name": "User Discovery via Whoami", "query": "process.name: whoami and event.action:executed", - "risk_score": 50, + "risk_score": 25, "rule_id": "120559c6-5e24-49f4-9e30-8ffe697df6b9", "severity": "low", "tags": [ - "EIA", - "auditbeat" + "Elastic", + "linux" ], "threats": [ { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json index 1a3c3c003b532c..3b080df89c3355 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json @@ -1,16 +1,43 @@ { - "description": "Network - DNS Directly to the Internet\t", + "description": "This signal detects DNS network traffic logs that indicate an internal network\nclient reaching out to infrastructure on the Internet directly to answer name\nqueries. This activity could be a default or misconfiguration. This impacts\nyour organization's ability to provide enterprise monitoring and logging of DNS\nand opens your network to a variety of abuses or malicious communications.\n", "enabled": false, + "false_positives": [ + "You should apply a filter to this rule to exclude your enterprise nameservers that are expected to reach out to the Internet" + ], "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - DNS Directly to the Internet\t", - "query": "destination.port:53 and not destination.ip: 169.254.169.254/32 and not destination.ip:127.0.0.53/32 and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", + "name": "DNS Activity to the Internet", + "query": "destination.port:53 and (\n network.direction: outbound or (\n source.ip:(10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip:( 169.254.169.254/32 or 127.0.0.53/32 or 10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16 or 224.0.0.251 or ff02\\:\\:fb or 255.255.255.255 )\n )\n)\n", + "references": [ + "https://www.us-cert.gov/ncas/alerts/TA15-240A", + "https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-81-2.pdf" + ], "risk_score": 50, "rule_id": "6ea71ff0-9e95-475b-9506-2580d1ce6154", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json index 99a126f0613ec0..e88f20e39adec4 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json @@ -1,16 +1,51 @@ { - "description": "Network - FTP (File Transfer Protocol) Activity to the Internet\t", + "description": "This signal detects events that may indicate the use of FTP network connections.\nThe File Transfer Protocol (FTP) has been around in its current form since the\n1980's. It can be an efficient and normal procedure on your network to send and\nreceive files. Because it is common and efficient, adversaries will also often\nuse this protocol to exfiltrate data from your network or download new tools.\nAdditionally, FTP is a plaintext protocol which may expose your username and\npassword, if intercepted.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - FTP (File Transfer Protocol) Activity to the Internet\t", - "query": "(destination.port:20 or destination.port:21) and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", - "risk_score": 50, + "name": "FTP (File Transfer Protocol) Activity to the Internet", + "query": "network.transport: tcp and destination.port: (20 or 21) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", + "risk_score": 25, "rule_id": "87ec6396-9ac4-4706-bcf0-2ebb22002f43", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Exfiltration Over Alternative Protocol", + "reference": "https://attack.mitre.org/techniques/T1048/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json index 79814eb552d5ba..183caff8939cd4 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json @@ -1,16 +1,51 @@ { - "description": "Network - IRC (Internet Relay Chat) Protocol Activity to the Internet\t", + "description": "This signal detects events that use common ports for IRC to the Internet. IRC\nis a common protocol that can be used chat and file transfer. This protocol\nalso makes a good candidate for remote control of malware and data transfer in\nand out of a network.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - IRC (Internet Relay Chat) Protocol Activity to the Internet\t", - "query": "(destination.port:20 or destination.port:21) and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", - "risk_score": 50, + "name": "IRC (Internet Relay Chat) Protocol Activity to the Internet", + "query": "network.transport: tcp and destination.port:(6667 or 6697) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", + "risk_score": 25, "rule_id": "c6474c34-4953-447a-903e-9fcb7b6661aa", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Exfiltration Over Alternative Protocol", + "reference": "https://attack.mitre.org/techniques/T1048/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json index d370773e3879f8..110d940743e94c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json @@ -1,16 +1,33 @@ { - "description": "Network - NAT Traversal Port Activity\t", + "description": "This signal detects events that could be describing IPSEC NAT Traversal traffic.\nIPSEC is a VPN technology that allows one system to talk to another using\nencrypted tunnels. NAT Traversal enables these tunnels to communicate over\nthe Internet where one of the sides is behind a NAT router gateway. This may\nbe common on your network, but this technique is also used by threat actors\nto avoid detection.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - NAT Traversal Port Activity\t", - "query": "destination.port:4500", - "risk_score": 50, + "name": "IPSEC NAT Traversal Port Activity", + "query": "network.transport: udp and destination.port: 4500", + "risk_score": 25, "rule_id": "a9cb3641-ff4b-4cdc-a063-b4b8d02a67c7", "severity": "low", + "tags": ["Elastic", "network"], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json index cfdb5e6584ee37..6efbd2494346eb 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json @@ -1,16 +1,55 @@ { - "description": "Network - Port 26 Activity\t", + "description": "This signal detects events that may indicate use of SMTP on TCP port 26. This\nport is commonly used by several popular mail transfer agents to deconflict\nwith the default SMTP port 25. This port has also been used by a malware family\ncalled BadPatch for command and control of Windows systems.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - Port 26 Activity\t", - "query": "destination.port:26", - "risk_score": 50, + "name": "SMTP on Port 26/TCP", + "query": "network.transport: tcp and destination.port: 26", + "references": [ + "https://unit42.paloaltonetworks.com/unit42-badpatch/", + "https://isc.sans.edu/forums/diary/Next+up+whats+up+with+TCP+port+26/25564/" + ], + "risk_score": 25, "rule_id": "d7e62693-aab9-4f66-a21a-3d79ecdd603d", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Exfiltration Over Alternative Protocol", + "reference": "https://attack.mitre.org/techniques/T1048/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json index 5eeda8e094bb97..96c04167dfeca1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json @@ -1,17 +1,36 @@ { - "description": "Network - Port 8000 Activity to the Internet\t", + "description": "TCP Port 8000 is commonly used for development environments of web server\nsoftware. It generally should not be exposed directly to the Internet. If you are\nrunning software like this on the Internet, you should consider placing it behind\na reverse proxy.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - Port 8000 Activity to the Internet\t", - "query": "destination.port:8000 and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", - "risk_score": 50, + "name": "TCP Port 8000 Activity to the Internet", + "query": "network.transport: tcp and destination.port: 8000 and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", + "risk_score": 25, "rule_id": "08d5d7e2-740f-44d8-aeda-e41f4263efaf", "severity": "low", - "to": "now", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json index 7b83966e18e704..61b10ab0f24042 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json @@ -1,16 +1,19 @@ { - "description": "Network - PPTP (Point to Point Tunneling Protocol) Activity\t", + "description": "This signal detects events that may indicate use of a PPTP VPN connection. Some threat actors use these types of connections to tunnel their traffic while avoiding detection.", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - PPTP (Point to Point Tunneling Protocol) Activity\t", - "query": "destination.port:1723", - "risk_score": 50, + "name": "PPTP (Point to Point Tunneling Protocol) Activity", + "query": "network.transport: tcp and destination.port: 1723", + "risk_score": 25, "rule_id": "d2053495-8fe7-4168-b3df-dad844046be3", "severity": "low", + "tags": [ + "Elastic", + "network" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json index 3a55db40504592..60ba2d0a93b895 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json @@ -1,16 +1,36 @@ { - "description": "Network - Proxy Port Activity to the Internet\t", + "description": "This signal detects events that may describe network events of proxy use to the\nInternet. It includes popular HTTP proxy ports and SOCKS proxy ports. Typically\nenvironments will use an internal IP address for a proxy server. It can also\nbe used to circumvent network controls and detection mechanisms.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - Proxy Port Activity to the Internet\t", - "query": "(destination.port:8080 or destination.port:3128) and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", - "risk_score": 50, + "name": "Proxy Port Activity to the Internet", + "query": "network.transport: tcp and destination.port: (3128 or 8080 or 1080) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", + "risk_score": 25, "rule_id": "ad0e5e75-dd89-4875-8d0a-dfdc1828b5f3", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json index e5c1e33470fa47..e03694be5c9a30 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json @@ -1,16 +1,36 @@ { - "description": "Network - RDP (Remote Desktop Protocol) from the Internet\t", + "description": "This signal detects network events that may indicate the use of RDP traffic\nfrom the Internet. RDP is commonly used by system administrators to remotely\ncontrol a system for maintenance or to use shared resources. It should almost\nnever be directly exposed to the Internet, as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - RDP (Remote Desktop Protocol) from the Internet\t", - "query": "(destination.port:8080 or destination.port:3128) and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", + "name": "RDP (Remote Desktop Protocol) from the Internet", + "query": "network.transport: tcp and destination.port: 3389 and (\n network.direction: inbound or (\n not source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n and destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "8c1bdde8-4204-45c0-9e0c-c85ca3902488", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json index 92316f2bb05daf..bfa402624f05a3 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json @@ -1,16 +1,51 @@ { - "description": "Network - RDP (Remote Desktop Protocol) to the Internet\t", + "description": "This signal detects network events that may indicate the use of RDP traffic\nto the Internet. RDP is commonly used by system administrators to remotely\ncontrol a system for maintenance or to use shared resources. It should almost\nnever be directly exposed to the Internet, as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - RDP (Remote Desktop Protocol) to the Internet\t", - "query": "destination.port:3389 and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", + "name": "RDP (Remote Desktop Protocol) to the Internet", + "query": "network.transport: tcp and destination.port: 3389 and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "e56993d2-759c-4120-984c-9ec9bb940fd5", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Exfiltration Over Alternative Protocol", + "reference": "https://attack.mitre.org/techniques/T1048/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json index 69d6d18ced8b9d..5ae41db83fa582 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json @@ -1,16 +1,36 @@ { - "description": "Network - RPC (Remote Procedure Call) from the Internet\t", + "description": "This signal detects network events that may indicate the use of RPC traffic\nfrom the Internet. RPC is commonly used by system administrators to remotely\ncontrol a system for maintenance or to use shared resources. It should almost\nnever be directly exposed to the Internet, as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - RPC (Remote Procedure Call) from the Internet\t", - "query": "destination.port:3389 and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", + "name": "RPC (Remote Procedure Call) from the Internet", + "query": "network.transport: tcp and destination.port: 135 and (\n network.direction: inbound or (\n not source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "143cb236-0956-4f42-a706-814bcaa0cf5a", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json index 1f9a71bab92442..9e0b91ee16d254 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json @@ -1,16 +1,36 @@ { - "description": "Network - RPC (Remote Procedure Call) to the Internet\t", + "description": "This signal detects network events that may indicate the use of RPC traffic\nto the Internet. RPC is commonly used by system administrators to remotely\ncontrol a system for maintenance or to use shared resources. It should almost\nnever be directly exposed to the Internet, as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - RPC (Remote Procedure Call) to the Internet\t", - "query": "destination.port:135 and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", + "name": "RPC (Remote Procedure Call) to the Internet", + "query": "network.transport: tcp and destination.port: 135 and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "32923416-763a-4531-bb35-f33b9232ecdb", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json index 627a89609cc21f..e1a2b98aae4b28 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json @@ -1,16 +1,51 @@ { - "description": "Network - SMB (Windows File Sharing) Activity to the Internet\t", + "description": "This signal detects network events that may indicate the use of Windows\nfile sharing (also called SMB or CIFS) traffic to the Internet. SMB is commonly\nused within networks to share files, printers, and other system resources amongst\ntrusted systems. It should almost never be directly exposed to the Internet, as\nit is frequently targetted and exploited by threat actors as an initial access\nor backdoor vector or for data exfiltration.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - SMB (Windows File Sharing) Activity to the Internet\t", - "query": "(destination.port:139 or destination.port:445) and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", + "name": "SMB (Windows File Sharing) Activity to the Internet", + "query": "network.transport: tcp and destination.port: (139 or 445) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "c82b2bd8-d701-420c-ba43-f11a155b681a", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Exfiltration Over Alternative Protocol", + "reference": "https://attack.mitre.org/techniques/T1048/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json index ff5a61cbe00e67..d763650243bf85 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json @@ -1,16 +1,51 @@ { - "description": "Network - SMTP to the Internet\t", + "description": "This signal detects events that may describe SMTP traffic from internal\nhosts to a host across the Internet. In an enterprise network, there is typically\na dedicate host that is internal that could perform this function. It is also\nfrequently abused by threat actors for command and control or data exfiltration.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - SMTP to the Internet\t", - "query": "destination.port:25 and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", + "name": "SMTP to the Internet", + "query": "network.transport: tcp and destination.port: (25 or 465 or 587) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "67a9beba-830d-4035-bfe8-40b7e28f8ac4", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0010", + "name": "Exfiltration", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Exfiltration Over Alternative Protocol", + "reference": "https://attack.mitre.org/techniques/T1048/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json index eeeb93e12938f0..c52730658f7d29 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json @@ -1,16 +1,19 @@ { - "description": "Network - SQL Server Port Activity to the Internet\t", + "description": "This signal detects events that may describe database traffic\n(MS SQL, Oracle, MySQL, and Postgresql) across the Internet. Databases\nshould almost never be directly exposed to the Internet, as they are\nfrequently targeted by threat actors to gain initial access to network resources.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - SQL Server Port Activity to the Internet\t", - "query": "destination.port:1433 and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", + "name": "SQL Traffic to the Internet", + "query": "network.transport: tcp and destination.port: (1433 or 1521 or 3336 or 5432) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "139c7458-566a-410c-a5cd-f80238d6a5cd", "severity": "low", + "tags": [ + "Elastic", + "network" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json index 11f24626fa0c19..fb28fdcaca3a53 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json @@ -1,16 +1,51 @@ { - "description": "Network - SSH (Secure Shell) from the Internet\t", + "description": "This signal detects network events that may indicate the use of SSH traffic\nfrom the Internet. SSH is commonly used by system administrators to remotely\ncontrol a system using the command line shell. If it is exposed to the Internet,\nit should be done with strong security controls as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - SSH (Secure Shell) from the Internet\t", - "query": "destination.port:22 and not source.ip:10.0.0.0/8 and not source.ip:172.16.0.0/12 and not source.ip:192.168.0.0/16", - "risk_score": 50, + "name": "SSH (Secure Shell) from the Internet", + "query": "network.transport: tcp and destination.port:22 and (\n network.direction: inbound or (\n not source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", + "risk_score": 25, "rule_id": "ea0784f0-a4d7-4fea-ae86-4baaf27a6f17", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0001/" + }, + "techniques": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1190/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json index ded8c005c4462e..4ac8993cae0a8c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json @@ -1,16 +1,36 @@ { - "description": "Network - SSH (Secure Shell) to the Internet\t", + "description": "This signal detects network events that may indicate the use of SSH traffic\nfrom the Internet. SSH is commonly used by system administrators to remotely\ncontrol a system using the command line shell. If it is exposed to the Internet,\nit should be done with strong security controls as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - SSH (Secure Shell) to the Internet\t", - "query": "destination.port:22 and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", - "risk_score": 50, + "name": "SSH (Secure Shell) to the Internet", + "query": "network.transport: tcp and destination.port:22 and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", + "risk_score": 25, "rule_id": "6f1500bc-62d7-4eb9-8601-7485e87da2f4", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json index a48f311163c2da..64310e378d5f14 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json @@ -1,16 +1,51 @@ { - "description": "Network - Telnet Port Activity\t", + "description": "This signal detects network events that may indicate the use of Telnet traffic.\nTelnet is commonly used by system administrators to remotely control older or embeded\nsystems using the command line shell. It should almost never be directly exposed to\nthe Internet, as it is frequently targetted and exploited by threat actors as an\ninitial access or backdoor vector. As a plaintext protocol, it may also expose\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - Telnet Port Activity\t", - "query": "destination.port:23", + "name": "Telnet Port Activity", + "query": "network.transport: tcp and destination.port: 23", "risk_score": 50, "rule_id": "34fde489-94b0-4500-a76f-b8a157cf9269", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json index 713cc7da72e571..3bb70f8bfe6844 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json @@ -1,16 +1,36 @@ { - "description": "Network - Tor Activity to the Internet\t", + "description": "This signal detects network events that may indicate the use of Tor traffic\nto the Internet. Tor is a network protocol that sends traffic through a\nseries of encrypted tunnels used to conceal a user's location and usage.\nTor may be used by threat actors as an alternate communication pathway to\nconceal the actor's indentity and avoid detection.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - Tor Activity to the Internet\t", - "query": "(destination.port:9001 or destination.port:9030) and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", - "risk_score": 50, + "name": "Tor Activity to the Internet", + "query": "network.transport: tcp and destination.port: (9001 or 9030) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", + "risk_score": 25, "rule_id": "7d2c38d7-ede7-4bdf-b140-445906e6c540", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json index 4f1dba808600e4..01519fa40c8205 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json @@ -1,16 +1,51 @@ { - "description": "Network - VNC (Virtual Network Computing) From the Internet\t", + "description": "This signal detects network events that may indicate the use of VNC traffic\nfrom the Internet. VNC is commonly used by system administrators to remotely\ncontrol a system for maintenance or to use shared resources. It should almost\nnever be directly exposed to the Internet, as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - VNC (Virtual Network Computing) From the Internet\t", - "query": "destination.port:5800 and not source.ip:10.0.0.0/8 and not source.ip:172.16.0.0/12 and not source.ip:192.168.0.0/16", - "risk_score": 50, + "name": "VNC (Virtual Network Computing) from the Internet", + "query": "network.transport: tcp and (destination.port >= 5800 and destination.port <= 5810) and (\n network.direction: inbound or (\n not source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", + "risk_score": 25, "rule_id": "5700cb81-df44-46aa-a5d7-337798f53eb8", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0001", + "name": "Initial Access", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1190", + "name": "Exploit Public-Facing Application", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + }, + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json index fd04ae3ae7dee1..94afe98f7807a9 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json @@ -1,16 +1,36 @@ { - "description": "Network - VNC (Virtual Network Computing) To the Internet\t", + "description": "This signal detects network events that may indicate the use of VNC traffic\nfrom the Internet. VNC is commonly used by system administrators to remotely\ncontrol a system for maintenance or to use shared resources. It should almost\nnever be directly exposed to the Internet, as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", "enabled": false, "filters": [], "from": "now-6m", - "immutable": true, "interval": "5m", "language": "kuery", - "name": "Network - VNC (Virtual Network Computing) To the Internet\t", - "query": "destination.port:5800 and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", - "risk_score": 50, + "name": "VNC (Virtual Network Computing) to the Internet", + "query": "network.transport: tcp and (destination.port >= 5800 and destination.port <= 5810) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", + "risk_score": 25, "rule_id": "3ad49c61-7adc-42c1-b788-732eda2f5abf", "severity": "low", + "tags": [ + "Elastic", + "network" + ], + "threats": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0011", + "name": "Command and Control", + "reference": "https://attack.mitre.org/tactics/TA0011/" + }, + "techniques": [ + { + "id": "T1043", + "name": "Commonly Used Port", + "reference": "https://attack.mitre.org/techniques/T1043/" + } + ] + } + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json index d563944171b7ac..b819e61cda7ec8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json @@ -1,22 +1,24 @@ { - "description": "Null user agent", + "description": "A request to a web application server contained no identifying user agent string.", "enabled": false, + "false_positives": [ + "Some normal applications and scripts may contain no user agent. Most legitmate web requests from the Internet contain a user agent string. Requests from web browsers almost always contain a user agent string. If the source is unexpected, or the user is unauthorized, or the request is unusual, these may be suspicious or malicious activity." + ], "filters": [ { - "meta": { - "alias": null, - "negate": true, - "disabled": false, - "type": "exists", - "key": "user_agent.original", - "value": "exists", - "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index" + "$state": { + "store": "appState" }, "exists": { "field": "user_agent.original" }, - "$state": { - "store": "appState" + "meta": { + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "user_agent.original", + "negate": true, + "type": "exists", + "value": "exists" } } ], @@ -24,11 +26,19 @@ "immutable": true, "interval": "5m", "language": "kuery", - "name": "Null user agent", + "max_signals": 33, + "name": "Web Application Suspicious Activity: No User Agent", "query": "url.path: *", + "references": [ + "https://en.wikipedia.org/wiki/User_agent" + ], "risk_score": 50, "rule_id": "43303fd4-4839-4e48-b2b2-803ab060758d", "severity": "low", + "tags": [ + "Elastic", + "apm" + ], "to": "now", "type": "query", "version": 1 diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json index 48cf20bcbacf7e..cb9413b9c108ee 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json @@ -1,16 +1,26 @@ { - "description": "SQLmap user agent", + "description": "This is an example of how to detect an unwanted web client user agent. This search matches the user agent for sqlmap 1.3.11 which is a popular FOSS tool for testing web applications for SQL injection vulnerabilities. ", "enabled": false, + "false_positives": [ + "This signal does not indicate that a SQL injection attack occured, only that the sqlmap tool was used. Security scans and tests may result in these errors. If the source is not an authorized security tester, this is generally suspicious or malicious activity." + ], "filters": [], "from": "now-6m", "immutable": true, "interval": "5m", "language": "kuery", - "name": "SQLmap user agent", + "name": "Web Application Suspicious Activity: sqlmap User Agent", "query": "user_agent.original:\"sqlmap/1.3.11#stable (http://sqlmap.org)\"", + "references": [ + "http://sqlmap.org/" + ], "risk_score": 50, "rule_id": "d49cc73f-7a16-4def-89ce-9fc7127d7820", "severity": "low", + "tags": [ + "Elastic", + "apm" + ], "to": "now", "type": "query", "version": 1 From f4b4695c7b2d30c89308471aef7896964da70616 Mon Sep 17 00:00:00 2001 From: Xavier Mouligneau <189600+XavierM@users.noreply.github.com> Date: Fri, 24 Jan 2020 20:54:15 -0500 Subject: [PATCH 70/72] [SIEM] [BUG] Detections inspect + refresh histogram (#55912) * Fix flow of all rules * fix the multitude http request + fix table timeline re-rendering * add inspect on detections histogram + refresh detections histogram * formatting inspect request&response * Update x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram/index.tsx Co-Authored-By: Garrett Spong * fix type Co-authored-by: Garrett Spong Co-authored-by: Elastic Machine --- .../detection_engine/signals/use_query.tsx | 50 +++++++--- .../signals_histogram_panel/index.tsx | 96 +++++++++++++------ .../signals_histogram/index.tsx | 33 ++++++- .../signals_histogram_panel/types.ts | 9 ++ .../components/signals_info/index.tsx | 2 +- .../detection_engine/detection_engine.tsx | 3 + .../detection_engine/rules/details/index.tsx | 5 +- .../siem/public/pages/overview/overview.tsx | 1 + .../overview/signals_by_category/index.tsx | 18 +++- 9 files changed, 170 insertions(+), 47 deletions(-) diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_query.tsx b/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_query.tsx index fa88a84fb11871..3dc6bac07be341 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_query.tsx +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/signals/use_query.tsx @@ -9,11 +9,16 @@ import React, { SetStateAction, useEffect, useState } from 'react'; import { fetchQuerySignals } from './api'; import { SignalSearchResponse } from './types'; -type Return = [ - boolean, - SignalSearchResponse | null, - React.Dispatch> -]; +type Func = () => void; + +interface Return { + loading: boolean; + data: SignalSearchResponse | null; + setQuery: React.Dispatch>; + response: string; + request: string; + refetch: Func | null; +} /** * Hook for using to get a Signals from the Detection Engine API @@ -21,9 +26,20 @@ type Return = [ * @param initialQuery query dsl object * */ -export const useQuerySignals = (initialQuery: object): Return => { +export const useQuerySignals = ( + initialQuery: object, + indexName?: string | null +): Return => { const [query, setQuery] = useState(initialQuery); - const [signals, setSignals] = useState | null>(null); + const [signals, setSignals] = useState< + Pick, 'data' | 'setQuery' | 'response' | 'request' | 'refetch'> + >({ + data: null, + response: '', + request: '', + setQuery, + refetch: null, + }); const [loading, setLoading] = useState(true); useEffect(() => { @@ -39,11 +55,23 @@ export const useQuerySignals = (initialQuery: object): Return(initialQuery: object): Return void; filters?: esFilters.Filter[]; from: number; query?: Query; legendPosition?: Position; loadingInitial?: boolean; + signalIndexName: string | null; + setQuery: (params: RegisterQuery) => void; showLinkToSignals?: boolean; showTotalSignalsCount?: boolean; stackByOptions?: SignalsHistogramOption[]; @@ -43,11 +50,14 @@ interface SignalsHistogramPanelProps { export const SignalsHistogramPanel = memo( ({ defaultStackByOption = signalsHistogramOptions[0], + deleteQuery, filters, query, from, legendPosition = 'right', loadingInitial = false, + setQuery, + signalIndexName, showLinkToSignals = false, showTotalSignalsCount = false, stackByOptions, @@ -55,12 +65,21 @@ export const SignalsHistogramPanel = memo( title = i18n.HISTOGRAM_HEADER, updateDateRange, }) => { + const [showInspect, setShowInspect] = useState(true); const [defaultNumberFormat] = useUiSetting$(DEFAULT_NUMBER_FORMAT); const [totalSignalsObj, setTotalSignalsObj] = useState(defaultTotalSignalsObj); const [selectedStackByOption, setSelectedStackByOption] = useState( defaultStackByOption ); + useEffect(() => { + return () => { + if (deleteQuery) { + deleteQuery({ id: DETECTIONS_HISTOGRAM_ID }); + } + }; + }, []); + const totalSignals = useMemo( () => i18n.SHOWING_SIGNALS( @@ -77,34 +96,53 @@ export const SignalsHistogramPanel = memo( ); }, []); + const handleOnMouseEnter = useCallback(() => { + if (!showInspect) { + setShowInspect(true); + } + }, [showInspect, setShowInspect]); + const handleOnMouseLeave = useCallback(() => { + if (showInspect) { + setShowInspect(false); + } + }, [showInspect, setShowInspect]); + return ( - - - {stackByOptions && ( - - )} - {showLinkToSignals && ( - {i18n.VIEW_SIGNALS} - )} - + + + + {stackByOptions && ( + + )} + {showLinkToSignals && ( + {i18n.VIEW_SIGNALS} + )} + - - + + + ); } ); diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram/index.tsx index d4db8cc7c37e87..5e1c8aa0951669 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/signals_histogram/index.tsx @@ -21,10 +21,11 @@ import { isEmpty } from 'lodash/fp'; import { useQuerySignals } from '../../../../../containers/detection_engine/signals/use_query'; import { Query } from '../../../../../../../../../../src/plugins/data/common/query'; import { esFilters, esQuery } from '../../../../../../../../../../src/plugins/data/common/es_query'; -import { SignalsAggregation, SignalsTotal } from '../types'; +import { RegisterQuery, SignalsAggregation, SignalsTotal } from '../types'; import { formatSignalsData, getSignalsHistogramQuery } from './helpers'; import { useTheme } from '../../../../../components/charts/common'; import { useKibana } from '../../../../../lib/kibana'; +import { DETECTIONS_HISTOGRAM_ID } from '..'; interface HistogramSignalsProps { filters?: esFilters.Filter[]; @@ -32,6 +33,8 @@ interface HistogramSignalsProps { legendPosition?: Position; loadingInitial: boolean; query?: Query; + registerQuery: (params: RegisterQuery) => void; + signalIndexName: string | null; setTotalSignalsCount: React.Dispatch; stackByField: string; to: number; @@ -46,18 +49,42 @@ export const SignalsHistogram = React.memo( filters, legendPosition = 'right', loadingInitial, + registerQuery, + signalIndexName, setTotalSignalsCount, stackByField, updateDateRange, }) => { - const [isLoadingSignals, signalsData, setQuery] = useQuerySignals<{}, SignalsAggregation>( - getSignalsHistogramQuery(stackByField, from, to, []) + const { + loading: isLoadingSignals, + data: signalsData, + setQuery, + response, + request, + refetch, + } = useQuerySignals<{}, SignalsAggregation>( + getSignalsHistogramQuery(stackByField, from, to, []), + signalIndexName ); const theme = useTheme(); const kibana = useKibana(); const formattedSignalsData = useMemo(() => formatSignalsData(signalsData), [signalsData]); + useEffect(() => { + if (refetch != null && registerQuery != null) { + registerQuery({ + id: DETECTIONS_HISTOGRAM_ID, + inspect: { + dsl: [request], + response: [response], + }, + loading: isLoadingSignals, + refetch, + }); + } + }, [registerQuery, isLoadingSignals, signalsData, response, request, refetch]); + useEffect(() => { setTotalSignalsCount( signalsData?.hits.total ?? { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/types.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/types.ts index 4eb10852450ade..6ef4cecc4ec8b4 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/types.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/types.ts @@ -4,6 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import { inputsModel } from '../../../../store'; + export interface SignalsHistogramOption { text: string; value: string; @@ -38,3 +40,10 @@ export interface SignalsTotal { value: number; relation: string; } + +export interface RegisterQuery { + id: string; + inspect: inputsModel.InspectQuery | null; + loading: boolean; + refetch: inputsModel.Refetch; +} diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_info/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_info/index.tsx index fc1110e3828473..e7cdc3345c031a 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_info/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_info/index.tsx @@ -26,7 +26,7 @@ export const useSignalInfo = ({ ruleId = null }: SignalInfo): Return => { ); - const [loading, signals] = useQuerySignals(buildLastSignalsQuery(ruleId)); + const { loading, data: signals } = useQuerySignals(buildLastSignalsQuery(ruleId)); useEffect(() => { if (signals != null) { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine.tsx index cdc7d335f5fe9d..e49cd2b36c7b89 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/detection_engine.tsx @@ -168,10 +168,13 @@ const DetectionEnginePageComponent: React.FC {tabName === DetectionEngineTab.signals && ( <> = ({ {({ indicesExist, indexPattern }) => { return indicesExistOrDataTemporarilyUnavailable(indicesExist) ? ( - {({ to, from }) => ( + {({ to, from, deleteQuery, setQuery }) => ( @@ -355,9 +355,12 @@ const RuleDetailsPageComponent: FC = ({ = ({ void; filters?: esFilters.Filter[]; from: number; indexPattern: IIndexPattern; @@ -32,7 +33,15 @@ interface Props { } export const SignalsByCategory = React.memo( - ({ filters = NO_FILTERS, from, query = DEFAULT_QUERY, setAbsoluteRangeDatePicker, to }) => { + ({ + deleteQuery, + filters = NO_FILTERS, + from, + query = DEFAULT_QUERY, + setAbsoluteRangeDatePicker, + setQuery, + to, + }) => { const updateDateRangeCallback = useCallback( (min: number, max: number) => { setAbsoluteRangeDatePicker!({ id: 'global', from: min, to: max }); @@ -40,11 +49,16 @@ export const SignalsByCategory = React.memo( [setAbsoluteRangeDatePicker] ); + const { signalIndexName } = useSignalIndex(); + return ( Date: Fri, 24 Jan 2020 22:18:52 -0700 Subject: [PATCH 71/72] [SIEM][Detection Engine] Critical blocker rule changes and ECS changes ## Summary * Changes ECS `techniques` to the word `technique` as `techniques` is incorrect ECS and incorrect mapping and without this our product could crash * Changes ECS `threats` to the word `threat` as `threats` is incorrect ECS and incorrect mapping and without this our product could crash * Added histogram mapping for `signal.rule.threat.tactic.name` as that was missing * Added `Elastic` and removed `EIA` for tags * Updates unit tests * Cleans up rules by removing extra characters and removing fields not required. * Adds concrete index'es as this was a critical breaking bug * Fixes issues with imports where imports could change an immutable from false to true and suddenly cause out of band immutables to occur. ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. ~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~ ~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~ ~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~ - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios ~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~ ### For maintainers ~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~ - [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process) --- .../detection_engine/rules/types.ts | 4 +- .../siem/public/graphql/introspection.json | 2 +- .../plugins/siem/public/graphql/types.ts | 2 +- .../signals_histogram_panel/config.ts | 1 + .../mitre/mitre_tactics_techniques.ts | 2 +- .../rules/all/__mocks__/mock.ts | 6 +- .../components/description_step/helpers.tsx | 25 ++-- .../components/description_step/index.tsx | 10 +- .../components/description_step/types.ts | 4 +- .../rules/components/mitre/helpers.ts | 4 +- .../rules/components/mitre/index.tsx | 16 +-- .../rules/components/mitre/translations.ts | 2 +- .../step_about_rule/default_value.ts | 6 +- .../components/step_about_rule/index.tsx | 6 +- .../components/step_about_rule/schema.tsx | 4 +- .../detection_engine/rules/create/helpers.ts | 20 +-- .../pages/detection_engine/rules/helpers.tsx | 4 +- .../pages/detection_engine/rules/types.ts | 6 +- .../overview/signals_by_category/index.tsx | 2 +- .../siem/server/graphql/ecs/schema.gql.ts | 2 +- .../plugins/siem/server/graphql/types.ts | 6 +- .../routes/__mocks__/request_responses.ts | 12 +- .../routes/index/signals_mapping.json | 34 ++++- .../routes/rules/create_rules_bulk_route.ts | 4 +- .../routes/rules/create_rules_route.ts | 4 +- .../routes/rules/import_rules_route.ts | 6 +- .../routes/rules/update_rules_bulk_route.ts | 4 +- .../routes/rules/update_rules_route.ts | 4 +- .../routes/rules/utils.test.ts | 56 ++++---- .../detection_engine/routes/rules/utils.ts | 2 +- .../add_prepackaged_rules_schema.test.ts | 133 ++++-------------- .../schemas/add_prepackaged_rules_schema.ts | 14 +- .../schemas/create_rules_schema.test.ts | 44 +++--- .../routes/schemas/create_rules_schema.ts | 4 +- .../schemas/import_rules_schema.test.ts | 85 +++++++---- .../routes/schemas/import_rules_schema.ts | 6 +- .../routes/schemas/schemas.ts | 4 +- .../schemas/update_rules_schema.test.ts | 54 +++---- .../routes/schemas/update_rules_schema.ts | 4 +- .../detection_engine/rules/create_rules.ts | 4 +- .../create_rules_stream_from_ndjson.test.ts | 20 +-- .../rules/get_export_all.test.ts | 2 +- .../rules/get_export_by_object_ids.test.ts | 6 +- .../rules/install_prepacked_rules.ts | 4 +- .../403_response_to_a_post.json | 23 ++- .../405_response_method_not_allowed.json | 23 ++- .../500_response_on_admin_page.json | 15 +- ...den_file_attribute_with_via_attribexe.json | 26 ++-- .../eql_adobe_hijack_persistence.json | 22 +-- .../eql_audio_capture_via_powershell.json | 22 +-- .../eql_audio_capture_via_soundrecorder.json | 22 +-- .../eql_bypass_uac_event_viewer.json | 22 +-- .../eql_bypass_uac_via_cmstp.json | 22 +-- .../eql_bypass_uac_via_sdclt.json | 22 +-- .../eql_clearing_windows_event_logs.json | 22 +-- ...delete_volume_usn_journal_with_fsutil.json | 22 +-- ...deleting_backup_catalogs_with_wbadmin.json | 22 +-- .../eql_direct_outbound_smb_connection.json | 22 +-- ...ble_windows_firewall_rules_with_netsh.json | 22 +-- .../eql_dll_search_order_hijack.json | 24 ++-- ...coding_or_decoding_files_via_certutil.json | 22 +-- .../eql_local_scheduled_task_commands.json | 22 +-- .../eql_local_service_commands.json | 22 +-- ...ql_modification_of_boot_configuration.json | 22 +-- ...ql_msbuild_making_network_connections.json | 22 +-- .../eql_mshta_making_network_connections.json | 26 ++-- .../eql_msxsl_making_network_connections.json | 22 +-- .../eql_psexec_lateral_movement_command.json | 18 +-- ...ql_suspicious_ms_office_child_process.json | 22 +-- ...l_suspicious_ms_outlook_child_process.json | 24 ++-- ...l_suspicious_pdf_reader_child_process.json | 22 +-- .../eql_system_shells_via_services.json | 22 +-- ...usual_network_connection_via_rundll32.json | 22 +-- .../eql_unusual_parentchild_relationship.json | 24 ++-- ...ql_unusual_process_network_connection.json | 22 +-- .../eql_user_account_creation.json | 22 +-- ...eql_user_added_to_administrator_group.json | 22 +-- ...ume_shadow_copy_deletion_via_vssadmin.json | 24 ++-- ..._volume_shadow_copy_deletion_via_wmic.json | 24 ++-- ...l_windows_script_executing_powershell.json | 22 +-- .../eql_wmic_command_lateral_movement.json | 24 ++-- .../linux_hping_activity.json | 22 ++- .../linux_iodine_activity.json | 22 ++- .../linux_kernel_module_activity.json | 19 +-- .../linux_ldso_process_activity.json | 19 ++- .../linux_lzop_activity.json | 15 +- .../linux_mknod_activity.json | 22 ++- .../linux_netcat_network_connection.json | 18 +-- ...k_anomalous_process_using_https_ports.json | 15 +- .../linux_nmap_activity.json | 22 ++- .../linux_nping_activity.json | 22 ++- ...nux_process_started_in_temp_directory.json | 18 +-- .../linux_ptrace_activity.json | 14 +- .../linux_rawshark_activity.json | 14 +- .../linux_shell_activity_by_web_server.json | 23 +-- .../linux_socat_activity.json | 18 +-- .../linux_ssh_forwarding.json | 27 ++-- .../linux_strace_activity.json | 22 ++- .../linux_tcpdump_activity.json | 24 ++-- .../prepackaged_rules/linux_web_download.json | 14 +- .../linux_whoami_commmand.json | 21 +-- .../network_dns_directly_to_the_internet.json | 23 ++- ...fer_protocol_activity_to_the_internet.json | 24 ++-- ...hat_protocol_activity_to_the_internet.json | 24 ++-- .../network_nat_traversal_port_activity.json | 17 ++- .../network_port_26_activity.json | 24 ++-- .../network_port_8000_activity.json | 15 +- ...rk_port_8000_activity_to_the_internet.json | 21 +-- ..._to_point_tunneling_protocol_activity.json | 18 +-- ...k_proxy_port_activity_to_the_internet.json | 22 +-- ...te_desktop_protocol_from_the_internet.json | 22 +-- ...mote_desktop_protocol_to_the_internet.json | 24 ++-- ...mote_procedure_call_from_the_internet.json | 22 +-- ...remote_procedure_call_to_the_internet.json | 22 +-- ...file_sharing_activity_to_the_internet.json | 24 ++-- .../network_smtp_to_the_internet.json | 24 ++-- ..._server_port_activity_to_the_internet.json | 18 +-- ...rk_ssh_secure_shell_from_the_internet.json | 24 ++-- ...work_ssh_secure_shell_to_the_internet.json | 22 +-- .../network_telnet_port_activity.json | 24 ++-- .../network_tor_activity_to_the_internet.json | 22 +-- ...l_network_computing_from_the_internet.json | 24 ++-- ...ual_network_computing_to_the_internet.json | 22 +-- .../prepackaged_rules/null_user_agent.json | 22 ++- .../prepackaged_rules/sqlmap_user_agent.json | 23 ++- ...rvice_bits_connecting_to_the_internet.json | 15 +- .../windows_burp_ce_activity.json | 15 +- ...s_certutil_connecting_to_the_internet.json | 15 +- ...and_prompt_connecting_to_the_internet.json | 15 +- ...nd_shell_started_by_internet_explorer.json | 14 +- ...s_command_shell_started_by_powershell.json | 14 +- ...dows_command_shell_started_by_svchost.json | 14 +- .../windows_credential_dumping_commands.json | 15 +- ...dows_credential_dumping_via_imageload.json | 15 +- ..._credential_dumping_via_registry_save.json | 15 +- ...ows_data_compression_using_powershell.json | 15 +- ...fense_evasion_decoding_using_certutil.json | 15 +- ...asion_or_persistence_via_hidden_files.json | 15 +- ...ws_defense_evasion_via_filter_manager.json | 15 +- ...e_evasion_via_windows_event_log_tools.json | 15 +- ...dows_execution_via_compiled_html_file.json | 15 +- ...dows_execution_via_connection_manager.json | 15 +- ...on_via_microsoft_html_application_hta.json | 15 +- ...dows_execution_via_net_com_assemblies.json | 15 +- .../windows_execution_via_regsvr32.json | 15 +- ...ution_via_trusted_developer_utilities.json | 15 +- ...le_program_connecting_to_the_internet.json | 15 +- ...dows_image_load_from_a_temp_directory.json | 14 +- .../windows_indirect_command_execution.json | 15 +- .../windows_iodine_activity.json | 15 +- ...agement_instrumentation_wmi_execution.json | 15 +- ...cation_hta_connecting_to_the_internet.json | 15 +- .../windows_mimikatz_activity.json | 14 +- ...isc_lolbin_connecting_to_the_internet.json | 15 +- ...ommand_activity_by_the_system_account.json | 14 +- .../windows_net_user_command_activity.json | 14 +- .../windows_netcat_activity.json | 14 +- .../windows_netcat_network_activity.json | 14 +- ...ous_windows_process_using_https_ports.json | 15 +- .../windows_nmap_activity.json | 14 +- .../windows_nmap_scan_activity.json | 14 +- ...dows_payload_obfuscation_via_certutil.json | 15 +- ...stence_or_priv_escalation_via_hooking.json | 15 +- ..._persistence_via_application_shimming.json | 15 +- .../windows_persistence_via_bits_jobs.json | 15 +- ..._via_modification_of_existing_service.json | 15 +- ...s_persistence_via_netshell_helper_dll.json | 15 +- ...powershell_connecting_to_the_internet.json | 15 +- ...escalation_via_accessibility_features.json | 15 +- ...rocess_discovery_via_tasklist_command.json | 15 +- .../windows_process_execution_via_wmi.json | 15 +- ...ed_by_acrobat_reader_possible_payload.json | 14 +- ...by_ms_office_program_possible_payload.json | 14 +- ...s_process_started_by_the_java_runtime.json | 14 +- .../windows_psexec_activity.json | 15 +- ...er_program_connecting_to_the_internet.json | 15 +- .../windows_registry_query_local.json | 15 +- .../windows_registry_query_network.json | 15 +- .../windows_remote_management_execution.json | 15 +- .../windows_scheduled_task_activity.json | 15 +- ...nterpreter_connecting_to_the_internet.json | 15 +- ...windows_signed_binary_proxy_execution.json | 15 +- ...igned_binary_proxy_execution_download.json | 15 +- ...uspicious_process_started_by_a_script.json | 14 +- .../windows_whoami_command_activity.json | 14 +- .../windows_windump_activity.json | 15 +- .../windows_wireshark_activity.json | 15 +- .../rules/update_prepacked_rules.ts | 4 +- .../detection_engine/rules/update_rules.ts | 6 +- .../import/multiple_ruleid_queries.ndjson | 4 +- .../rules/queries/query_mitre_attack.json | 8 +- .../rules/queries/query_with_everything.json | 6 +- .../saved_query_with_everything.json | 6 +- .../multiple_ruleid_queries_corrupted.ndjson | 6 +- .../signals_on_signals/depth_test/README.md | 2 +- .../signals_on_signals/halting_test/README.md | 2 +- .../updates/update_query_everything.json | 6 +- .../scripts/signals/sample_signal.json | 40 ++---- .../signals/__mocks__/es_results.ts | 2 +- .../detection_engine/signals/build_rule.ts | 2 +- .../signals/signal_rule_alert_type.ts | 2 +- .../siem/server/lib/detection_engine/types.ts | 4 +- .../siem/server/lib/ecs_fields/index.ts | 2 +- 203 files changed, 1757 insertions(+), 1646 deletions(-) diff --git a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts index 2e776738547df9..b30c3b211b1b8d 100644 --- a/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts +++ b/x-pack/legacy/plugins/siem/public/containers/detection_engine/rules/types.ts @@ -30,7 +30,7 @@ export const NewRuleSchema = t.intersection([ rule_id: t.string, saved_id: t.string, tags: t.array(t.string), - threats: t.array(t.unknown), + threat: t.array(t.unknown), to: t.string, updated_by: t.string, }), @@ -73,7 +73,7 @@ export const RuleSchema = t.intersection([ tags: t.array(t.string), type: t.string, to: t.string, - threats: t.array(t.unknown), + threat: t.array(t.unknown), updated_at: t.string, updated_by: t.string, }), diff --git a/x-pack/legacy/plugins/siem/public/graphql/introspection.json b/x-pack/legacy/plugins/siem/public/graphql/introspection.json index 35599827ffe42d..a9247403bf22c3 100644 --- a/x-pack/legacy/plugins/siem/public/graphql/introspection.json +++ b/x-pack/legacy/plugins/siem/public/graphql/introspection.json @@ -4940,7 +4940,7 @@ "deprecationReason": null }, { - "name": "threats", + "name": "threat", "description": "", "args": [], "type": { "kind": "SCALAR", "name": "ToAny", "ofType": null }, diff --git a/x-pack/legacy/plugins/siem/public/graphql/types.ts b/x-pack/legacy/plugins/siem/public/graphql/types.ts index 4b6825268403cb..6a24ffcc130204 100644 --- a/x-pack/legacy/plugins/siem/public/graphql/types.ts +++ b/x-pack/legacy/plugins/siem/public/graphql/types.ts @@ -1015,7 +1015,7 @@ export interface RuleField { tags?: Maybe; - threats?: Maybe; + threat?: Maybe; type?: Maybe; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/config.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/config.ts index d475fd155ea25d..2c5a1ddd9a010b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/config.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/components/signals_histogram_panel/config.ts @@ -9,6 +9,7 @@ import { SignalsHistogramOption } from './types'; export const signalsHistogramOptions: SignalsHistogramOption[] = [ { text: 'signal.rule.risk_score', value: 'signal.rule.risk_score' }, { text: 'signal.rule.severity', value: 'signal.rule.severity' }, + { text: 'signal.rule.threat.tactic.name', value: 'signal.rule.threat.tactic.name' }, { text: 'destination.ip', value: 'destination.ip' }, { text: 'event.action', value: 'event.action' }, { text: 'event.category', value: 'event.category' }, diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts index 160e006c4d267f..16ab73365222bc 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/mitre/mitre_tactics_techniques.ts @@ -187,7 +187,7 @@ export const tacticsOptions: MitreTacticsOptions[] = [ }, ]; -export const techniques = [ +export const technique = [ { name: '.bash_profile and .bashrc', id: 'T1156', diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts index b62247e8f9a4f5..980575f1470a5a 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/all/__mocks__/mock.ts @@ -37,7 +37,7 @@ export const mockRule = (id: string): Rule => ({ tags: [], to: 'now', type: 'saved_query', - threats: [], + threat: [], version: 1, }); @@ -87,7 +87,7 @@ export const mockTableData: TableData[] = [ saved_id: "Garrett's IP", severity: 'low', tags: [], - threats: [], + threat: [], timeline_id: '86aa74d0-2136-11ea-9864-ebc8cc1cb8c2', timeline_title: 'Untitled timeline', to: 'now', @@ -136,7 +136,7 @@ export const mockTableData: TableData[] = [ saved_id: "Garrett's IP", severity: 'low', tags: [], - threats: [], + threat: [], timeline_id: '86aa74d0-2136-11ea-9864-ebc8cc1cb8c2', timeline_title: 'Untitled timeline', to: 'now', diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx index 011c008c5b2d2b..e1cbc6ee92393f 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/helpers.tsx @@ -24,7 +24,7 @@ import { tacticsOptions, techniquesOptions } from '../../../mitre/mitre_tactics_ import { FilterLabel } from './filter_label'; import * as i18n from './translations'; -import { BuildQueryBarDescription, BuildThreatsDescription, ListItems } from './types'; +import { BuildQueryBarDescription, BuildThreatDescription, ListItems } from './types'; import { SeverityBadge } from '../severity_badge'; import ListTreeIcon from './assets/list_tree_icon.svg'; @@ -94,7 +94,7 @@ export const buildQueryBarDescription = ({ return items; }; -const ThreatsEuiFlexGroup = styled(EuiFlexGroup)` +const ThreatEuiFlexGroup = styled(EuiFlexGroup)` .euiFlexItem { margin-bottom: 0px; } @@ -114,25 +114,22 @@ const ReferenceLinkItem = styled(EuiButtonEmpty)` } `; -export const buildThreatsDescription = ({ - label, - threats, -}: BuildThreatsDescription): ListItems[] => { - if (threats.length > 0) { +export const buildThreatDescription = ({ label, threat }: BuildThreatDescription): ListItems[] => { + if (threat.length > 0) { return [ { title: label, description: ( - - {threats.map((threat, index) => { - const tactic = tacticsOptions.find(t => t.id === threat.tactic.id); + + {threat.map((singleThreat, index) => { + const tactic = tacticsOptions.find(t => t.id === singleThreat.tactic.id); return ( - - + + {tactic != null ? tactic.text : ''} - {threat.techniques.map(technique => { + {singleThreat.technique.map(technique => { const myTechnique = techniquesOptions.find(t => t.id === technique.id); return ( @@ -153,7 +150,7 @@ export const buildThreatsDescription = ({ ); })} - + ), }, ]; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx index 8cf1601e2c4b64..f1d2609cde8fe5 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/index.tsx @@ -24,7 +24,7 @@ import { buildQueryBarDescription, buildSeverityDescription, buildStringArrayDescription, - buildThreatsDescription, + buildThreatDescription, buildUnorderedListArrayDescription, buildUrlsDescription, } from './helpers'; @@ -116,11 +116,11 @@ const getDescriptionItem = ( savedId, indexPatterns, }); - } else if (field === 'threats') { - const threats: IMitreEnterpriseAttack[] = get(field, value).filter( - (threat: IMitreEnterpriseAttack) => threat.tactic.name !== 'none' + } else if (field === 'threat') { + const threat: IMitreEnterpriseAttack[] = get(field, value).filter( + (singleThreat: IMitreEnterpriseAttack) => singleThreat.tactic.name !== 'none' ); - return buildThreatsDescription({ label, threats }); + return buildThreatDescription({ label, threat }); } else if (field === 'description') { return [ { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/types.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/types.ts index d32fbcd725d12f..c120d4a4106d02 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/types.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/description_step/types.ts @@ -27,7 +27,7 @@ export interface BuildQueryBarDescription { indexPatterns?: IIndexPattern; } -export interface BuildThreatsDescription { +export interface BuildThreatDescription { label: string; - threats: IMitreEnterpriseAttack[]; + threat: IMitreEnterpriseAttack[]; } diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/helpers.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/helpers.ts index 1202fe54ad194f..7a28a16214df63 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/helpers.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/helpers.ts @@ -9,9 +9,9 @@ import { IMitreAttack } from '../../types'; export const isMitreAttackInvalid = ( tacticName: string | null | undefined, - techniques: IMitreAttack[] | null | undefined + technique: IMitreAttack[] | null | undefined ) => { - if (isEmpty(tacticName) || (tacticName !== 'none' && isEmpty(techniques))) { + if (isEmpty(tacticName) || (tacticName !== 'none' && isEmpty(technique))) { return true; } return false; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/index.tsx index f9a22c37cfdf00..d85be053065fc2 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/index.tsx @@ -21,7 +21,7 @@ import styled from 'styled-components'; import { tacticsOptions, techniquesOptions } from '../../../mitre/mitre_tactics_techniques'; import * as Rulei18n from '../../translations'; import { FieldHook, getFieldValidityAndErrorMessage } from '../shared_imports'; -import { threatsDefault } from '../step_about_rule/default_value'; +import { threatDefault } from '../step_about_rule/default_value'; import { IMitreEnterpriseAttack } from '../../types'; import { MyAddItemButton } from '../add_item_form'; import { isMitreAttackInvalid } from './helpers'; @@ -49,7 +49,7 @@ export const AddMitreThreat = ({ dataTestSubj, field, idAria, isDisabled }: AddI const values = field.value as string[]; const newValues = [...values.slice(0, index), ...values.slice(index + 1)]; if (isEmpty(newValues)) { - field.setValue(threatsDefault); + field.setValue(threatDefault); } else { field.setValue(newValues); } @@ -62,10 +62,10 @@ export const AddMitreThreat = ({ dataTestSubj, field, idAria, isDisabled }: AddI if (!isEmpty(values[values.length - 1])) { field.setValue([ ...values, - { tactic: { id: 'none', name: 'none', reference: 'none' }, techniques: [] }, + { tactic: { id: 'none', name: 'none', reference: 'none' }, technique: [] }, ]); } else { - field.setValue([{ tactic: { id: 'none', name: 'none', reference: 'none' }, techniques: [] }]); + field.setValue([{ tactic: { id: 'none', name: 'none', reference: 'none' }, technique: [] }]); } }, [field]); @@ -82,7 +82,7 @@ export const AddMitreThreat = ({ dataTestSubj, field, idAria, isDisabled }: AddI { ...values[index], tactic: { id, reference, name }, - techniques: [], + technique: [], }, ...values.slice(index + 1), ]); @@ -96,7 +96,7 @@ export const AddMitreThreat = ({ dataTestSubj, field, idAria, isDisabled }: AddI ...values.slice(0, index), { ...values[index], - techniques: selectedOptions, + technique: selectedOptions, }, ...values.slice(index + 1), ]); @@ -133,9 +133,9 @@ export const AddMitreThreat = ({ dataTestSubj, field, idAria, isDisabled }: AddI ); const getSelectTechniques = (item: IMitreEnterpriseAttack, index: number, disabled: boolean) => { - const invalid = isMitreAttackInvalid(item.tactic.name, item.techniques); + const invalid = isMitreAttackInvalid(item.tactic.name, item.technique); const options = techniquesOptions.filter(t => t.tactics.includes(kebabCase(item.tactic.name))); - const selectedOptions = item.techniques.map(technic => ({ + const selectedOptions = item.technique.map(technic => ({ ...technic, label: `${technic.name} (${technic.id})`, // API doesn't allow for label field })); diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/translations.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/translations.ts index 557e91691b6c75..bbc12800b7df5a 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/translations.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/mitre/translations.ts @@ -13,7 +13,7 @@ export const TACTIC = i18n.translate('xpack.siem.detectionEngine.mitreAttack.tac export const TECHNIQUE = i18n.translate( 'xpack.siem.detectionEngine.mitreAttack.techniquesDescription', { - defaultMessage: 'technique', + defaultMessage: 'techniques', } ); diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/default_value.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/default_value.ts index 92aca1cecf9f30..70bfc2bcddd628 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/default_value.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/default_value.ts @@ -7,11 +7,11 @@ import { AboutStepRule } from '../../types'; import { DEFAULT_TIMELINE_TITLE } from '../../../../../components/timeline/search_super_select/translations'; -export const threatsDefault = [ +export const threatDefault = [ { framework: 'MITRE ATT&CK', tactic: { id: 'none', name: 'none', reference: 'none' }, - techniques: [], + technique: [], }, ]; @@ -28,5 +28,5 @@ export const stepAboutDefaultValue: AboutStepRule = { id: null, title: DEFAULT_TIMELINE_TITLE, }, - threats: threatsDefault, + threat: threatDefault, }; diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/index.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/index.tsx index 8370af397bfec3..4ae88b3014d190 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/index.tsx @@ -227,12 +227,12 @@ const StepAboutRuleComponent: FC = ({ }} /> diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/schema.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/schema.tsx index 15b793a502840f..22033dcf6b0f76 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/schema.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/step_about_rule/schema.tsx @@ -139,7 +139,7 @@ export const schema: FormSchema = { ), labelAppend: OptionalFieldLabel, }, - threats: { + threat: { label: i18n.translate( 'xpack.siem.detectionEngine.createRule.stepAboutRule.fieldMitreThreatLabel', { @@ -155,7 +155,7 @@ export const schema: FormSchema = { const [{ value, path }] = args; let hasError = false; (value as IMitreEnterpriseAttack[]).forEach(v => { - if (isMitreAttackInvalid(v.tactic.name, v.techniques)) { + if (isMitreAttackInvalid(v.tactic.name, v.technique)) { hasError = true; } }); diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts index ce91e15cdcf0d3..de6678b42df6f2 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/create/helpers.ts @@ -72,15 +72,7 @@ const formatScheduleStepData = (scheduleData: ScheduleStepRule): ScheduleStepRul }; const formatAboutStepData = (aboutStepData: AboutStepRule): AboutStepRuleJson => { - const { - falsePositives, - references, - riskScore, - threats, - timeline, - isNew, - ...rest - } = aboutStepData; + const { falsePositives, references, riskScore, threat, timeline, isNew, ...rest } = aboutStepData; return { false_positives: falsePositives.filter(item => !isEmpty(item)), references: references.filter(item => !isEmpty(item)), @@ -91,12 +83,12 @@ const formatAboutStepData = (aboutStepData: AboutStepRule): AboutStepRuleJson => timeline_title: timeline.title, } : {}), - threats: threats - .filter(threat => threat.tactic.name !== 'none') - .map(threat => ({ - ...threat, + threat: threat + .filter(singleThreat => singleThreat.tactic.name !== 'none') + .map(singleThreat => ({ + ...singleThreat, framework: 'MITRE ATT&CK', - techniques: threat.techniques.map(technique => { + technique: singleThreat.technique.map(technique => { const { id, name, reference } = technique; return { id, name, reference }; }), diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx index d12d39fdc490a5..ce0d50d9b61065 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/helpers.tsx @@ -43,9 +43,9 @@ export const getStepsData = ({ rule != null ? { isNew: false, - ...pick(['description', 'name', 'references', 'severity', 'tags', 'threats'], rule), + ...pick(['description', 'name', 'references', 'severity', 'tags', 'threat'], rule), ...(detailsView ? { name: '' } : {}), - threats: rule.threats as IMitreEnterpriseAttack[], + threat: rule.threat as IMitreEnterpriseAttack[], falsePositives: rule.false_positives, riskScore: rule.risk_score, timeline: { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts index 2b50e32a367ec4..effaa90d685df4 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/types.ts @@ -76,7 +76,7 @@ export interface AboutStepRule extends StepRuleData { falsePositives: string[]; tags: string[]; timeline: FieldValueTimeline; - threats: IMitreEnterpriseAttack[]; + threat: IMitreEnterpriseAttack[]; } export interface DefineStepRule extends StepRuleData { @@ -109,7 +109,7 @@ export interface AboutStepRuleJson { tags: string[]; timeline_id?: string; timeline_title?: string; - threats: IMitreEnterpriseAttack[]; + threat: IMitreEnterpriseAttack[]; } export interface ScheduleStepRuleJson { @@ -134,5 +134,5 @@ export interface IMitreAttack { export interface IMitreEnterpriseAttack { framework: string; tactic: IMitreAttack; - techniques: IMitreAttack[]; + technique: IMitreAttack[]; } diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/signals_by_category/index.tsx b/x-pack/legacy/plugins/siem/public/pages/overview/signals_by_category/index.tsx index 8819c3642b68bd..f85dacaa647e6b 100644 --- a/x-pack/legacy/plugins/siem/public/pages/overview/signals_by_category/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/overview/signals_by_category/index.tsx @@ -63,7 +63,7 @@ export const SignalsByCategory = React.memo( showLinkToSignals={true} defaultStackByOption={{ text: `${i18n.SIGNALS_BY_CATEGORY}`, - value: 'signal.rule.threats', + value: 'signal.rule.threat', }} legendPosition={'right'} to={to} diff --git a/x-pack/legacy/plugins/siem/server/graphql/ecs/schema.gql.ts b/x-pack/legacy/plugins/siem/server/graphql/ecs/schema.gql.ts index 9f57155d4d1890..730e6b884a1825 100644 --- a/x-pack/legacy/plugins/siem/server/graphql/ecs/schema.gql.ts +++ b/x-pack/legacy/plugins/siem/server/graphql/ecs/schema.gql.ts @@ -399,7 +399,7 @@ export const ecsSchema = gql` references: ToStringArray severity: ToStringArray tags: ToStringArray - threats: ToAny + threat: ToAny type: ToStringArray size: ToStringArray to: ToStringArray diff --git a/x-pack/legacy/plugins/siem/server/graphql/types.ts b/x-pack/legacy/plugins/siem/server/graphql/types.ts index bc7486777b9906..303262ece5c7f1 100644 --- a/x-pack/legacy/plugins/siem/server/graphql/types.ts +++ b/x-pack/legacy/plugins/siem/server/graphql/types.ts @@ -1017,7 +1017,7 @@ export interface RuleField { tags?: Maybe; - threats?: Maybe; + threat?: Maybe; type?: Maybe; @@ -4994,7 +4994,7 @@ export namespace RuleFieldResolvers { tags?: TagsResolver, TypeParent, TContext>; - threats?: ThreatsResolver, TypeParent, TContext>; + threat?: ThreatResolver, TypeParent, TContext>; type?: TypeResolver, TypeParent, TContext>; @@ -5112,7 +5112,7 @@ export namespace RuleFieldResolvers { Parent = RuleField, TContext = SiemContext > = Resolver; - export type ThreatsResolver< + export type ThreatResolver< R = Maybe, Parent = RuleField, TContext = SiemContext diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts index 4a48301ee4b9ce..d950d89eb22a68 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/__mocks__/request_responses.ts @@ -34,11 +34,11 @@ export const mockPrepackagedRule = (): PrepackagedRules => ({ severity: 'high', query: 'user.name: root or user.name: admin', language: 'kuery', - threats: [ + threat: [ { framework: 'fake', tactic: { id: 'fakeId', name: 'fakeName', reference: 'fakeRef' }, - techniques: [{ id: 'techniqueId', name: 'techniqueName', reference: 'techniqueRef' }], + technique: [{ id: 'techniqueId', name: 'techniqueName', reference: 'techniqueRef' }], }, ], enabled: true, @@ -69,11 +69,11 @@ export const typicalPayload = (): Partial => ({ severity: 'high', query: 'user.name: root or user.name: admin', language: 'kuery', - threats: [ + threat: [ { framework: 'fake', tactic: { id: 'fakeId', name: 'fakeName', reference: 'fakeRef' }, - techniques: [{ id: 'techniqueId', name: 'techniqueName', reference: 'techniqueRef' }], + technique: [{ id: 'techniqueId', name: 'techniqueName', reference: 'techniqueRef' }], }, ], }); @@ -298,7 +298,7 @@ export const getResult = (): RuleAlertType => ({ severity: 'high', to: 'now', type: 'query', - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -306,7 +306,7 @@ export const getResult = (): RuleAlertType => ({ name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/signals_mapping.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/signals_mapping.json index 4f3ba768b17b09..4986c100f1b0b5 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/signals_mapping.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/signals_mapping.json @@ -87,8 +87,38 @@ "tags": { "type": "keyword" }, - "threats": { - "type": "object" + "threat": { + "properties": { + "framework": { + "type": "keyword" + }, + "tactic": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "reference": { + "type": "keyword" + } + } + }, + "technique": { + "properties": { + "id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "reference": { + "type": "keyword" + } + } + } + } }, "type": { "type": "keyword" diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts index 0c98507bc6fa8d..68375043070f89 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts @@ -70,7 +70,7 @@ export const createCreateRulesBulkRoute = (server: ServerFacade): Hapi.ServerRou name, severity, tags, - threats, + threat, to, type, updated_at: updatedAt, @@ -128,7 +128,7 @@ export const createCreateRulesBulkRoute = (server: ServerFacade): Hapi.ServerRou tags, to, type, - threats, + threat, updatedAt, references, version, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts index 4480186d9a7a65..060659d0e1897c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/create_rules_route.ts @@ -56,7 +56,7 @@ export const createCreateRulesRoute = (server: ServerFacade): Hapi.ServerRoute = name, severity, tags, - threats, + threat, to, type, updated_at: updatedAt, @@ -115,7 +115,7 @@ export const createCreateRulesRoute = (server: ServerFacade): Hapi.ServerRoute = tags, to, type, - threats, + threat, updatedAt, references, version: 1, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts index 0dfdee2d713756..88a31c36a87fcf 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts @@ -105,7 +105,7 @@ export const createImportRulesRoute = (server: ServerFacade): Hapi.ServerRoute = name, severity, tags, - threats, + threat, to, type, references, @@ -154,7 +154,7 @@ export const createImportRulesRoute = (server: ServerFacade): Hapi.ServerRoute = tags, to, type, - threats, + threat, updatedAt: new Date().toISOString(), references, version, @@ -189,7 +189,7 @@ export const createImportRulesRoute = (server: ServerFacade): Hapi.ServerRoute = tags, to, type, - threats, + threat, references, version, }); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts index cf98043529bc03..8c7558d6d4fb57 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts @@ -70,7 +70,7 @@ export const createUpdateRulesBulkRoute = (server: ServerFacade): Hapi.ServerRou tags, to, type, - threats, + threat, references, version, } = payloadRule; @@ -103,7 +103,7 @@ export const createUpdateRulesBulkRoute = (server: ServerFacade): Hapi.ServerRou tags, to, type, - threats, + threat, references, version, }); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts index cbb66317186a13..f51cea0753f1ab 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/update_rules_route.ts @@ -54,7 +54,7 @@ export const createUpdateRulesRoute = (server: ServerFacade): Hapi.ServerRoute = tags, to, type, - threats, + threat, references, version, } = request.payload; @@ -98,7 +98,7 @@ export const createUpdateRulesRoute = (server: ServerFacade): Hapi.ServerRoute = tags, to, type, - threats, + threat, references, version, }); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts index c1b4c7de73f688..ec11a8fb2da39d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.test.ts @@ -52,7 +52,7 @@ describe('utils', () => { severity: 'high', updated_by: 'elastic', tags: [], - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -60,7 +60,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -115,7 +115,7 @@ describe('utils', () => { severity: 'high', updated_by: 'elastic', tags: [], - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -123,7 +123,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -180,7 +180,7 @@ describe('utils', () => { severity: 'high', updated_by: 'elastic', tags: [], - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -188,7 +188,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -245,7 +245,7 @@ describe('utils', () => { severity: 'high', updated_by: 'elastic', tags: [], - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -253,7 +253,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -308,7 +308,7 @@ describe('utils', () => { severity: 'high', updated_by: 'elastic', tags: [], - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -316,7 +316,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -374,7 +374,7 @@ describe('utils', () => { severity: 'high', updated_by: 'elastic', tags: [], - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -382,7 +382,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -440,7 +440,7 @@ describe('utils', () => { severity: 'high', updated_by: 'elastic', tags: [], - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -448,7 +448,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -506,7 +506,7 @@ describe('utils', () => { severity: 'high', updated_by: 'elastic', tags: ['tag 1', 'tag 2'], - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -514,7 +514,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -623,7 +623,7 @@ describe('utils', () => { tags: [], to: 'now', type: 'query', - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -631,7 +631,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -696,7 +696,7 @@ describe('utils', () => { tags: [], to: 'now', type: 'query', - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -704,7 +704,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -858,7 +858,7 @@ describe('utils', () => { tags: [], to: 'now', type: 'query', - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -866,7 +866,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -979,7 +979,7 @@ describe('utils', () => { saved_id: 'some-id', severity: 'high', tags: [], - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -987,7 +987,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -1039,7 +1039,7 @@ describe('utils', () => { saved_id: 'some-id', severity: 'high', tags: [], - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -1047,7 +1047,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', @@ -1088,7 +1088,7 @@ describe('utils', () => { saved_id: 'some-id', severity: 'high', tags: [], - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -1096,7 +1096,7 @@ describe('utils', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts index ae79b571b2b625..663ddf3a835a60 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/rules/utils.ts @@ -110,7 +110,7 @@ export const transformAlertToRule = ( tags: transformTags(alert.tags), to: alert.params.to, type: alert.params.type, - threats: alert.params.threats, + threat: alert.params.threat, version: alert.params.version, status: ruleStatus?.attributes.status, status_date: ruleStatus?.attributes.statusDate, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts index 2a04c15b8cd9fc..b536cfac05df3c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.test.ts @@ -224,7 +224,7 @@ describe('add prepackaged rules schema', () => { ).toBeFalsy(); }); - test('You can send in an empty array to threats', () => { + test('You can send in an empty array to threat', () => { expect( addPrepackagedRulesSchema.validate>({ rule_id: 'rule-1', @@ -241,12 +241,12 @@ describe('add prepackaged rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [], + threat: [], version: 1, }).error ).toBeFalsy(); }); - test('[rule_id, description, from, to, index, name, severity, interval, type, filter, risk_score, version, threats] does validate', () => { + test('[rule_id, description, from, to, index, name, severity, interval, type, filter, risk_score, version, s] does validate', () => { expect( addPrepackagedRulesSchema.validate>({ rule_id: 'rule-1', @@ -259,7 +259,7 @@ describe('add prepackaged rules schema', () => { severity: 'low', interval: '5m', type: 'query', - threats: [ + threat: [ { framework: 'someFramework', tactic: { @@ -267,7 +267,7 @@ describe('add prepackaged rules schema', () => { name: 'fakeName', reference: 'fakeRef', }, - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -342,28 +342,7 @@ describe('add prepackaged rules schema', () => { ).toEqual(true); }); - test('immutable cannot be false', () => { - expect( - addPrepackagedRulesSchema.validate>({ - rule_id: 'rule-1', - risk_score: 50, - description: 'some description', - from: 'now-5m', - to: 'now', - index: ['index-1'], - immutable: false, - name: 'some-name', - severity: 'low', - interval: '5m', - type: 'query', - query: 'some-query', - language: 'kuery', - version: 1, - }).error.message - ).toEqual('child "immutable" fails because ["immutable" must be one of [true]]'); - }); - - test('immutable can be true', () => { + test('immutable cannot be set in a pre-packaged rule', () => { expect( addPrepackagedRulesSchema.validate>({ rule_id: 'rule-1', @@ -380,8 +359,8 @@ describe('add prepackaged rules schema', () => { query: 'some-query', language: 'kuery', version: 1, - }).error - ).toBeFalsy(); + }).error.message + ).toEqual('child "immutable" fails because ["immutable" is not allowed]'); }); test('defaults enabled to false', () => { @@ -765,11 +744,11 @@ describe('add prepackaged rules schema', () => { ); }); - test('You cannot send in an array of threats that are missing "framework"', () => { + test('You cannot send in an array of threat that are missing "framework"', () => { expect( addPrepackagedRulesSchema.validate< - Partial> & { - threats: Array>>; + Partial> & { + threat: Array>>; } >({ rule_id: 'rule-1', @@ -786,14 +765,14 @@ describe('add prepackaged rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { tactic: { id: 'fakeId', name: 'fakeName', reference: 'fakeRef', }, - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -805,15 +784,15 @@ describe('add prepackaged rules schema', () => { version: 1, }).error.message ).toEqual( - 'child "threats" fails because ["threats" at position 0 fails because [child "framework" fails because ["framework" is required]]]' + 'child "threat" fails because ["threat" at position 0 fails because [child "framework" fails because ["framework" is required]]]' ); }); - test('You cannot send in an array of threats that are missing "tactic"', () => { + test('You cannot send in an array of threat that are missing "tactic"', () => { expect( addPrepackagedRulesSchema.validate< - Partial> & { - threats: Array>>; + Partial> & { + threat: Array>>; } >({ rule_id: 'rule-1', @@ -830,10 +809,10 @@ describe('add prepackaged rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { framework: 'fake', - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -845,15 +824,15 @@ describe('add prepackaged rules schema', () => { version: 1, }).error.message ).toEqual( - 'child "threats" fails because ["threats" at position 0 fails because [child "tactic" fails because ["tactic" is required]]]' + 'child "threat" fails because ["threat" at position 0 fails because [child "tactic" fails because ["tactic" is required]]]' ); }); - test('You cannot send in an array of threats that are missing "techniques"', () => { + test('You cannot send in an array of threat that are missing "technique"', () => { expect( addPrepackagedRulesSchema.validate< - Partial> & { - threats: Array>>; + Partial> & { + threat: Array>>; } >({ rule_id: 'rule-1', @@ -870,7 +849,7 @@ describe('add prepackaged rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { framework: 'fake', tactic: { @@ -883,7 +862,7 @@ describe('add prepackaged rules schema', () => { version: 1, }).error.message ).toEqual( - 'child "threats" fails because ["threats" at position 0 fails because [child "techniques" fails because ["techniques" is required]]]' + 'child "threat" fails because ["threat" at position 0 fails because [child "technique" fails because ["technique" is required]]]' ); }); @@ -937,54 +916,6 @@ describe('add prepackaged rules schema', () => { ); }); - test('You can optionally set the immutable to be true', () => { - expect( - addPrepackagedRulesSchema.validate>({ - rule_id: 'rule-1', - risk_score: 50, - description: 'some description', - from: 'now-5m', - to: 'now', - immutable: true, - index: ['index-1'], - name: 'some-name', - severity: 'low', - interval: '5m', - type: 'query', - references: ['index-1'], - query: 'some query', - language: 'kuery', - max_signals: 1, - version: 1, - }).error - ).toBeFalsy(); - }); - - test('You cannot set the immutable to be a number', () => { - expect( - addPrepackagedRulesSchema.validate< - Partial> & { immutable: number } - >({ - rule_id: 'rule-1', - risk_score: 50, - description: 'some description', - from: 'now-5m', - to: 'now', - immutable: 5, - index: ['index-1'], - name: 'some-name', - severity: 'low', - interval: '5m', - type: 'query', - references: ['index-1'], - query: 'some query', - language: 'kuery', - max_signals: 1, - version: 1, - }).error.message - ).toEqual('child "immutable" fails because ["immutable" must be a boolean]'); - }); - test('You cannot set the risk_score to 101', () => { expect( addPrepackagedRulesSchema.validate>({ @@ -993,7 +924,6 @@ describe('add prepackaged rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1016,7 +946,6 @@ describe('add prepackaged rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1039,7 +968,6 @@ describe('add prepackaged rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1062,7 +990,6 @@ describe('add prepackaged rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1085,7 +1012,6 @@ describe('add prepackaged rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1113,7 +1039,6 @@ describe('add prepackaged rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1137,7 +1062,6 @@ describe('add prepackaged rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1183,7 +1107,6 @@ describe('add prepackaged rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1207,7 +1130,6 @@ describe('add prepackaged rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1232,7 +1154,6 @@ describe('add prepackaged rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1257,7 +1178,6 @@ describe('add prepackaged rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1282,7 +1202,6 @@ describe('add prepackaged rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1322,6 +1241,7 @@ describe('add prepackaged rules schema', () => { rule_id: 'rule-1', risk_score: 50, description: 'some description', + index: ['auditbeat-*'], name: 'some-name', severity: 'low', type: 'query', @@ -1340,6 +1260,7 @@ describe('add prepackaged rules schema', () => { rule_id: 'rule-1', risk_score: 50, description: 'some description', + index: ['auditbeat-*'], name: 'some-name', severity: 'junk', type: 'query', diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts index d254f832434918..b62c480492c84c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/add_prepackaged_rules_schema.ts @@ -30,7 +30,7 @@ import { tags, to, type, - threats, + threat, references, version, } from './schemas'; @@ -42,9 +42,10 @@ import { DEFAULT_MAX_SIGNALS } from '../../../../../common/constants'; * Big differences between this schema and the createRulesSchema * - rule_id is required here * - output_index is not allowed (and instead the space index must be used) - * - immutable defaults to true instead of to false and if it is there can only be true + * - immutable is forbidden but defaults to true instead of to false and it can only ever be true * - enabled defaults to false instead of true * - version is a required field that must exist + * - index is a required field that must exist */ export const addPrepackagedRulesSchema = Joi.object({ description: description.required(), @@ -53,8 +54,11 @@ export const addPrepackagedRulesSchema = Joi.object({ filters, from: from.default('now-6m'), rule_id: rule_id.required(), - immutable: immutable.default(true).valid(true), - index, + immutable: immutable + .forbidden() + .default(true) + .valid(true), + index: index.required(), interval: interval.default('5m'), query: query.allow('').default(''), language: language.default('kuery'), @@ -73,7 +77,7 @@ export const addPrepackagedRulesSchema = Joi.object({ tags: tags.default([]), to: to.default('now'), type: type.required(), - threats: threats.default([]), + threat: threat.default([]), references: references.default([]), version: version.required(), }); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts index f765f01300c583..d9605a265d28b8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.test.ts @@ -239,7 +239,7 @@ describe('create rules schema', () => { ).toBeFalsy(); }); - test('You can send in an empty array to threats', () => { + test('You can send in an empty array to threat', () => { expect( createRulesSchema.validate>({ rule_id: 'rule-1', @@ -257,12 +257,12 @@ describe('create rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [], + threat: [], }).error ).toBeFalsy(); }); - test('[rule_id, description, from, to, index, name, severity, interval, type, filter, risk_score, output_index, threats] does validate', () => { + test('[rule_id, description, from, to, index, name, severity, interval, type, filter, risk_score, output_index, threat] does validate', () => { expect( createRulesSchema.validate>({ rule_id: 'rule-1', @@ -276,7 +276,7 @@ describe('create rules schema', () => { severity: 'low', interval: '5m', type: 'query', - threats: [ + threat: [ { framework: 'someFramework', tactic: { @@ -284,7 +284,7 @@ describe('create rules schema', () => { name: 'fakeName', reference: 'fakeRef', }, - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -678,11 +678,11 @@ describe('create rules schema', () => { ); }); - test('You cannot send in an array of threats that are missing "framework"', () => { + test('You cannot send in an array of threat that are missing "framework"', () => { expect( createRulesSchema.validate< - Partial> & { - threats: Array>>; + Partial> & { + threat: Array>>; } >({ rule_id: 'rule-1', @@ -700,14 +700,14 @@ describe('create rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { tactic: { id: 'fakeId', name: 'fakeName', reference: 'fakeRef', }, - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -718,15 +718,15 @@ describe('create rules schema', () => { ], }).error.message ).toEqual( - 'child "threats" fails because ["threats" at position 0 fails because [child "framework" fails because ["framework" is required]]]' + 'child "threat" fails because ["threat" at position 0 fails because [child "framework" fails because ["framework" is required]]]' ); }); - test('You cannot send in an array of threats that are missing "tactic"', () => { + test('You cannot send in an array of threat that are missing "tactic"', () => { expect( createRulesSchema.validate< - Partial> & { - threats: Array>>; + Partial> & { + threat: Array>>; } >({ rule_id: 'rule-1', @@ -744,10 +744,10 @@ describe('create rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { framework: 'fake', - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -758,15 +758,15 @@ describe('create rules schema', () => { ], }).error.message ).toEqual( - 'child "threats" fails because ["threats" at position 0 fails because [child "tactic" fails because ["tactic" is required]]]' + 'child "threat" fails because ["threat" at position 0 fails because [child "tactic" fails because ["tactic" is required]]]' ); }); - test('You cannot send in an array of threats that are missing "techniques"', () => { + test('You cannot send in an array of threat that are missing "technique"', () => { expect( createRulesSchema.validate< - Partial> & { - threats: Array>>; + Partial> & { + threat: Array>>; } >({ rule_id: 'rule-1', @@ -784,7 +784,7 @@ describe('create rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { framework: 'fake', tactic: { @@ -796,7 +796,7 @@ describe('create rules schema', () => { ], }).error.message ).toEqual( - 'child "threats" fails because ["threats" at position 0 fails because [child "techniques" fails because ["techniques" is required]]]' + 'child "threat" fails because ["threat" at position 0 fails because [child "technique" fails because ["technique" is required]]]' ); }); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts index 06dbb0cbb48f3c..eb79e06c8efa68 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/create_rules_schema.ts @@ -30,7 +30,7 @@ import { tags, to, type, - threats, + threat, references, version, } from './schemas'; @@ -65,7 +65,7 @@ export const createRulesSchema = Joi.object({ tags: tags.default([]), to: to.default('now'), type: type.required(), - threats: threats.default([]), + threat: threat.default([]), references: references.default([]), version: version.default(1), }); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts index b19a91d18c3ff4..c72e1b7ef2a63c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.test.ts @@ -244,7 +244,7 @@ describe('import rules schema', () => { ).toBeFalsy(); }); - test('You can send in an empty array to threats', () => { + test('You can send in an empty array to threat', () => { expect( importRulesSchema.validate>({ rule_id: 'rule-1', @@ -262,12 +262,12 @@ describe('import rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [], + threat: [], }).error ).toBeFalsy(); }); - test('[rule_id, description, from, to, index, name, severity, interval, type, filter, risk_score, output_index, threats] does validate', () => { + test('[rule_id, description, from, to, index, name, severity, interval, type, filter, risk_score, output_index, threat] does validate', () => { expect( importRulesSchema.validate>({ rule_id: 'rule-1', @@ -281,7 +281,7 @@ describe('import rules schema', () => { severity: 'low', interval: '5m', type: 'query', - threats: [ + threat: [ { framework: 'someFramework', tactic: { @@ -289,7 +289,7 @@ describe('import rules schema', () => { name: 'fakeName', reference: 'fakeRef', }, - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -685,11 +685,11 @@ describe('import rules schema', () => { ); }); - test('You cannot send in an array of threats that are missing "framework"', () => { + test('You cannot send in an array of threat that are missing "framework"', () => { expect( importRulesSchema.validate< - Partial> & { - threats: Array>>; + Partial> & { + threat: Array>>; } >({ rule_id: 'rule-1', @@ -707,14 +707,14 @@ describe('import rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { tactic: { id: 'fakeId', name: 'fakeName', reference: 'fakeRef', }, - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -725,15 +725,15 @@ describe('import rules schema', () => { ], }).error.message ).toEqual( - 'child "threats" fails because ["threats" at position 0 fails because [child "framework" fails because ["framework" is required]]]' + 'child "threat" fails because ["threat" at position 0 fails because [child "framework" fails because ["framework" is required]]]' ); }); - test('You cannot send in an array of threats that are missing "tactic"', () => { + test('You cannot send in an array of threat that are missing "tactic"', () => { expect( importRulesSchema.validate< - Partial> & { - threats: Array>>; + Partial> & { + threat: Array>>; } >({ rule_id: 'rule-1', @@ -751,10 +751,10 @@ describe('import rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { framework: 'fake', - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -765,15 +765,15 @@ describe('import rules schema', () => { ], }).error.message ).toEqual( - 'child "threats" fails because ["threats" at position 0 fails because [child "tactic" fails because ["tactic" is required]]]' + 'child "threat" fails because ["threat" at position 0 fails because [child "tactic" fails because ["tactic" is required]]]' ); }); - test('You cannot send in an array of threats that are missing "techniques"', () => { + test('You cannot send in an array of threat that are missing "technique"', () => { expect( importRulesSchema.validate< - Partial> & { - threats: Array>>; + Partial> & { + threat: Array>>; } >({ rule_id: 'rule-1', @@ -791,7 +791,7 @@ describe('import rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { framework: 'fake', tactic: { @@ -803,7 +803,7 @@ describe('import rules schema', () => { ], }).error.message ).toEqual( - 'child "threats" fails because ["threats" at position 0 fails because [child "techniques" fails because ["techniques" is required]]]' + 'child "threat" fails because ["threat" at position 0 fails because [child "technique" fails because ["technique" is required]]]' ); }); @@ -857,7 +857,7 @@ describe('import rules schema', () => { ); }); - test('You can optionally set the immutable to be true', () => { + test('You can optionally set the immutable to be false', () => { expect( importRulesSchema.validate>({ rule_id: 'rule-1', @@ -866,7 +866,7 @@ describe('import rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, + immutable: false, index: ['index-1'], name: 'some-name', severity: 'low', @@ -880,6 +880,29 @@ describe('import rules schema', () => { ).toBeFalsy(); }); + test('You cannnot set immutable to be true', () => { + expect( + importRulesSchema.validate>({ + rule_id: 'rule-1', + output_index: '.siem-signals', + risk_score: 50, + description: 'some description', + from: 'now-5m', + to: 'now', + immutable: true, + index: ['index-1'], + name: 'some-name', + severity: 'low', + interval: '5m', + type: 'query', + references: ['index-1'], + query: 'some query', + language: 'kuery', + max_signals: 1, + }).error.message + ).toEqual('child "immutable" fails because ["immutable" must be one of [false]]'); + }); + test('You cannot set the immutable to be a number', () => { expect( importRulesSchema.validate< @@ -914,7 +937,7 @@ describe('import rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, + immutable: false, index: ['index-1'], name: 'some-name', severity: 'low', @@ -937,7 +960,7 @@ describe('import rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, + immutable: false, index: ['index-1'], name: 'some-name', severity: 'low', @@ -960,7 +983,7 @@ describe('import rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, + immutable: false, index: ['index-1'], name: 'some-name', severity: 'low', @@ -983,7 +1006,7 @@ describe('import rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, + immutable: false, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1006,7 +1029,7 @@ describe('import rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, + immutable: false, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1032,7 +1055,7 @@ describe('import rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, + immutable: false, index: ['index-1'], name: 'some-name', severity: 'low', @@ -1056,7 +1079,7 @@ describe('import rules schema', () => { description: 'some description', from: 'now-5m', to: 'now', - immutable: true, + immutable: false, index: ['index-1'], name: 'some-name', severity: 'low', diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts index 8516585a2c0550..1254694645b9c0 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/import_rules_schema.ts @@ -36,7 +36,7 @@ import { tags, to, type, - threats, + threat, references, version, } from './schemas'; @@ -61,7 +61,7 @@ export const importRulesSchema = Joi.object({ filters, from: from.default('now-6m'), rule_id: rule_id.required(), - immutable: immutable.default(false), + immutable: immutable.default(false).valid(false), index, interval: interval.default('5m'), query: query.allow('').default(''), @@ -82,7 +82,7 @@ export const importRulesSchema = Joi.object({ tags: tags.default([]), to: to.default('now'), type: type.required(), - threats: threats.default([]), + threat: threat.default([]), references: references.default([]), version: version.default(1), created_at, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/schemas.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/schemas.ts index a027fcb96b599f..9b311b1b58ea74 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/schemas.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/schemas.ts @@ -87,11 +87,11 @@ export const threat_technique = Joi.object({ reference: threat_technique_reference.required(), }); export const threat_techniques = Joi.array().items(threat_technique.required()); -export const threats = Joi.array().items( +export const threat = Joi.array().items( Joi.object({ framework: threat_framework.required(), tactic: threat_tactic.required(), - techniques: threat_techniques.required(), + technique: threat_techniques.required(), }) ); export const created_at = Joi.string() diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts index 44b3b5b927be2c..0dc9f3df3da1ce 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.test.ts @@ -670,7 +670,7 @@ describe('update rules schema', () => { ).toEqual('child "filters" fails because ["filters" must be an array]'); }); - test('threats is not defaulted to empty array on update', () => { + test('threat is not defaulted to empty array on update', () => { expect( updateRulesSchema.validate>({ id: 'rule-1', @@ -686,11 +686,11 @@ describe('update rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - }).value.threats + }).value.threat ).toBe(undefined); }); - test('threats is not defaulted to undefined on update with empty array', () => { + test('threat is not defaulted to undefined on update with empty array', () => { expect( updateRulesSchema.validate>({ id: 'rule-1', @@ -706,12 +706,12 @@ describe('update rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [], - }).value.threats + threat: [], + }).value.threat ).toMatchObject([]); }); - test('threats is valid when updated with all sub-objects', () => { + test('threat is valid when updated with all sub-objects', () => { const expected: ThreatParams[] = [ { framework: 'fake', @@ -720,7 +720,7 @@ describe('update rules schema', () => { name: 'fakeName', reference: 'fakeRef', }, - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -744,7 +744,7 @@ describe('update rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { framework: 'fake', tactic: { @@ -752,7 +752,7 @@ describe('update rules schema', () => { name: 'fakeName', reference: 'fakeRef', }, - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -761,15 +761,15 @@ describe('update rules schema', () => { ], }, ], - }).value.threats + }).value.threat ).toMatchObject(expected); }); - test('threats is invalid when updated with missing property framework', () => { + test('threat is invalid when updated with missing property framework', () => { expect( updateRulesSchema.validate< - Partial> & { - threats: Array>>; + Partial> & { + threat: Array>>; } >({ id: 'rule-1', @@ -785,14 +785,14 @@ describe('update rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { tactic: { id: 'fakeId', name: 'fakeName', reference: 'fakeRef', }, - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -803,15 +803,15 @@ describe('update rules schema', () => { ], }).error.message ).toEqual( - 'child "threats" fails because ["threats" at position 0 fails because [child "framework" fails because ["framework" is required]]]' + 'child "threat" fails because ["threat" at position 0 fails because [child "framework" fails because ["framework" is required]]]' ); }); - test('threats is invalid when updated with missing tactic sub-object', () => { + test('threat is invalid when updated with missing tactic sub-object', () => { expect( updateRulesSchema.validate< - Partial> & { - threats: Array>>; + Partial> & { + threat: Array>>; } >({ id: 'rule-1', @@ -827,10 +827,10 @@ describe('update rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { framework: 'fake', - techniques: [ + technique: [ { id: 'techniqueId', name: 'techniqueName', @@ -841,15 +841,15 @@ describe('update rules schema', () => { ], }).error.message ).toEqual( - 'child "threats" fails because ["threats" at position 0 fails because [child "tactic" fails because ["tactic" is required]]]' + 'child "threat" fails because ["threat" at position 0 fails because [child "tactic" fails because ["tactic" is required]]]' ); }); - test('threats is invalid when updated with missing techniques', () => { + test('threat is invalid when updated with missing technique', () => { expect( updateRulesSchema.validate< - Partial> & { - threats: Array>>; + Partial> & { + threat: Array>>; } >({ id: 'rule-1', @@ -865,7 +865,7 @@ describe('update rules schema', () => { query: 'some query', language: 'kuery', max_signals: 1, - threats: [ + threat: [ { framework: 'fake', tactic: { @@ -877,7 +877,7 @@ describe('update rules schema', () => { ], }).error.message ).toEqual( - 'child "threats" fails because ["threats" at position 0 fails because [child "techniques" fails because ["techniques" is required]]]' + 'child "threat" fails because ["threat" at position 0 fails because [child "technique" fails because ["technique" is required]]]' ); }); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts index d363bfca984666..3aa8e007a8cbdb 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/schemas/update_rules_schema.ts @@ -30,7 +30,7 @@ import { tags, to, type, - threats, + threat, references, id, version, @@ -61,7 +61,7 @@ export const updateRulesSchema = Joi.object({ tags, to, type, - threats, + threat, references, version, }).xor('id', 'rule_id'); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.ts index 1d3801d80de113..d65f5f84c6d644 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules.ts @@ -32,7 +32,7 @@ export const createRules = ({ name, severity, tags, - threats, + threat, to, type, references, @@ -63,7 +63,7 @@ export const createRules = ({ maxSignals, riskScore, severity, - threats, + threat, to, type, updatedAt: new Date().toISOString(), diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts index 48b7195c3b0bcf..d4b7c252e3e380 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts @@ -65,7 +65,7 @@ describe('create_rules_stream_from_ndjson', () => { language: 'kuery', max_signals: 100, tags: [], - threats: [], + threat: [], references: [], version: 1, }, @@ -88,7 +88,7 @@ describe('create_rules_stream_from_ndjson', () => { language: 'kuery', max_signals: 100, tags: [], - threats: [], + threat: [], references: [], version: 1, }, @@ -130,7 +130,7 @@ describe('create_rules_stream_from_ndjson', () => { language: 'kuery', max_signals: 100, tags: [], - threats: [], + threat: [], references: [], version: 1, }, @@ -153,7 +153,7 @@ describe('create_rules_stream_from_ndjson', () => { language: 'kuery', max_signals: 100, tags: [], - threats: [], + threat: [], references: [], version: 1, }, @@ -194,7 +194,7 @@ describe('create_rules_stream_from_ndjson', () => { language: 'kuery', max_signals: 100, tags: [], - threats: [], + threat: [], references: [], version: 1, }, @@ -217,7 +217,7 @@ describe('create_rules_stream_from_ndjson', () => { language: 'kuery', max_signals: 100, tags: [], - threats: [], + threat: [], references: [], version: 1, }, @@ -258,7 +258,7 @@ describe('create_rules_stream_from_ndjson', () => { language: 'kuery', max_signals: 100, tags: [], - threats: [], + threat: [], references: [], version: 1, }); @@ -282,7 +282,7 @@ describe('create_rules_stream_from_ndjson', () => { language: 'kuery', max_signals: 100, tags: [], - threats: [], + threat: [], references: [], version: 1, }); @@ -322,7 +322,7 @@ describe('create_rules_stream_from_ndjson', () => { language: 'kuery', max_signals: 100, tags: [], - threats: [], + threat: [], references: [], version: 1, }); @@ -348,7 +348,7 @@ describe('create_rules_stream_from_ndjson', () => { language: 'kuery', max_signals: 100, tags: [], - threats: [], + threat: [], references: [], version: 1, }); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts index eb9756af8fde10..ff48b9f5f7c33e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_all.test.ts @@ -23,7 +23,7 @@ describe('getExportAll', () => { const exports = await getExportAll(unsafeCast); expect(exports).toEqual({ rulesNdjson: - '{"created_at":"2019-12-13T16:40:33.400Z","updated_at":"2019-12-13T16:40:33.400Z","created_by":"elastic","description":"Detecting root and admin users","enabled":true,"false_positives":[],"filters":[{"query":{"match_phrase":{"host.name":"some-host"}}}],"from":"now-6m","id":"04128c15-0d1b-4716-a4c5-46997ac7f3bd","immutable":false,"index":["auditbeat-*","filebeat-*","packetbeat-*","winlogbeat-*"],"interval":"5m","rule_id":"rule-1","language":"kuery","output_index":".siem-signals","max_signals":100,"risk_score":50,"name":"Detect Root/Admin Users","query":"user.name: root or user.name: admin","references":["http://www.example.com","https://ww.example.com"],"saved_id":"some-id","timeline_id":"some-timeline-id","timeline_title":"some-timeline-title","meta":{"someMeta":"someField"},"severity":"high","updated_by":"elastic","tags":[],"to":"now","type":"query","threats":[{"framework":"MITRE ATT&CK","tactic":{"id":"TA0040","name":"impact","reference":"https://attack.mitre.org/tactics/TA0040/"},"techniques":[{"id":"T1499","name":"endpoint denial of service","reference":"https://attack.mitre.org/techniques/T1499/"}]}],"version":1}\n', + '{"created_at":"2019-12-13T16:40:33.400Z","updated_at":"2019-12-13T16:40:33.400Z","created_by":"elastic","description":"Detecting root and admin users","enabled":true,"false_positives":[],"filters":[{"query":{"match_phrase":{"host.name":"some-host"}}}],"from":"now-6m","id":"04128c15-0d1b-4716-a4c5-46997ac7f3bd","immutable":false,"index":["auditbeat-*","filebeat-*","packetbeat-*","winlogbeat-*"],"interval":"5m","rule_id":"rule-1","language":"kuery","output_index":".siem-signals","max_signals":100,"risk_score":50,"name":"Detect Root/Admin Users","query":"user.name: root or user.name: admin","references":["http://www.example.com","https://ww.example.com"],"saved_id":"some-id","timeline_id":"some-timeline-id","timeline_title":"some-timeline-title","meta":{"someMeta":"someField"},"severity":"high","updated_by":"elastic","tags":[],"to":"now","type":"query","threat":[{"framework":"MITRE ATT&CK","tactic":{"id":"TA0040","name":"impact","reference":"https://attack.mitre.org/tactics/TA0040/"},"technique":[{"id":"T1499","name":"endpoint denial of service","reference":"https://attack.mitre.org/techniques/T1499/"}]}],"version":1}\n', exportDetails: '{"exported_count":1,"missing_rules":[],"missing_rules_count":0}\n', }); }); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts index a861d80a66fd53..05e455efb3f22e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts @@ -25,7 +25,7 @@ describe('get_export_by_object_ids', () => { const exports = await getExportByObjectIds(unsafeCast, objects); expect(exports).toEqual({ rulesNdjson: - '{"created_at":"2019-12-13T16:40:33.400Z","updated_at":"2019-12-13T16:40:33.400Z","created_by":"elastic","description":"Detecting root and admin users","enabled":true,"false_positives":[],"filters":[{"query":{"match_phrase":{"host.name":"some-host"}}}],"from":"now-6m","id":"04128c15-0d1b-4716-a4c5-46997ac7f3bd","immutable":false,"index":["auditbeat-*","filebeat-*","packetbeat-*","winlogbeat-*"],"interval":"5m","rule_id":"rule-1","language":"kuery","output_index":".siem-signals","max_signals":100,"risk_score":50,"name":"Detect Root/Admin Users","query":"user.name: root or user.name: admin","references":["http://www.example.com","https://ww.example.com"],"saved_id":"some-id","timeline_id":"some-timeline-id","timeline_title":"some-timeline-title","meta":{"someMeta":"someField"},"severity":"high","updated_by":"elastic","tags":[],"to":"now","type":"query","threats":[{"framework":"MITRE ATT&CK","tactic":{"id":"TA0040","name":"impact","reference":"https://attack.mitre.org/tactics/TA0040/"},"techniques":[{"id":"T1499","name":"endpoint denial of service","reference":"https://attack.mitre.org/techniques/T1499/"}]}],"version":1}\n', + '{"created_at":"2019-12-13T16:40:33.400Z","updated_at":"2019-12-13T16:40:33.400Z","created_by":"elastic","description":"Detecting root and admin users","enabled":true,"false_positives":[],"filters":[{"query":{"match_phrase":{"host.name":"some-host"}}}],"from":"now-6m","id":"04128c15-0d1b-4716-a4c5-46997ac7f3bd","immutable":false,"index":["auditbeat-*","filebeat-*","packetbeat-*","winlogbeat-*"],"interval":"5m","rule_id":"rule-1","language":"kuery","output_index":".siem-signals","max_signals":100,"risk_score":50,"name":"Detect Root/Admin Users","query":"user.name: root or user.name: admin","references":["http://www.example.com","https://ww.example.com"],"saved_id":"some-id","timeline_id":"some-timeline-id","timeline_title":"some-timeline-title","meta":{"someMeta":"someField"},"severity":"high","updated_by":"elastic","tags":[],"to":"now","type":"query","threat":[{"framework":"MITRE ATT&CK","tactic":{"id":"TA0040","name":"impact","reference":"https://attack.mitre.org/tactics/TA0040/"},"technique":[{"id":"T1499","name":"endpoint denial of service","reference":"https://attack.mitre.org/techniques/T1499/"}]}],"version":1}\n', exportDetails: '{"exported_count":1,"missing_rules":[],"missing_rules_count":0}\n', }); }); @@ -98,7 +98,7 @@ describe('get_export_by_object_ids', () => { tags: [], to: 'now', type: 'query', - threats: [ + threat: [ { framework: 'MITRE ATT&CK', tactic: { @@ -106,7 +106,7 @@ describe('get_export_by_object_ids', () => { name: 'impact', reference: 'https://attack.mitre.org/tactics/TA0040/', }, - techniques: [ + technique: [ { id: 'T1499', name: 'endpoint denial of service', diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts index 555063854dc60e..7e8ed62baf1cff 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/install_prepacked_rules.ts @@ -40,7 +40,7 @@ export const installPrepackagedRules = ( tags, to, type, - threats, + threat, references, version, } = rule; @@ -72,7 +72,7 @@ export const installPrepackagedRules = ( tags, to, type, - threats, + threat, references, version, createdAt: new Date().toISOString(), diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json index b9ca36e009ce50..da0613e1f6fa7e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/403_response_to_a_post.json @@ -1,28 +1,25 @@ { "description": "A POST request to web application returned a 403 response which indicates the web application declined to process the request because the action requested was disallowed.", - "enabled": false, "false_positives": [ "Security scans and tests may result in these errors. Misconfigured or buggy applications may produce large numbers of these errors. If the source is unexpected, or the user is unauthorized, or the request is unusual, these may be suspicious or malicious activity." ], - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Web Application Suspicious Activity: POST Request Declined", "query": "http.response.status_code:403 and http.request.method:post", - "references": [ - "https://en.wikipedia.org/wiki/HTTP_403" - ], + "references": ["https://en.wikipedia.org/wiki/HTTP_403"], "risk_score": 50, "rule_id": "a87a4e42-1d82-44bd-b0bf-d9b7f91fb89e", "severity": "low", - "tags": [ - "Elastic", - "apm" - ], - "to": "now", + "tags": ["Elastic", "apm"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json index c33307b93592b0..b0edfb25e93920 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/405_response_method_not_allowed.json @@ -1,28 +1,25 @@ { "description": "A request to web application returned a 405 response which indicates the web application declined to process the request because the HTTP method was not allowed for the resource.", - "enabled": false, "false_positives": [ "Security scans and tests may result in these errors. Misconfigured or buggy applications may produce large numbers of these errors. If the source is unexpected, or the user is unauthorized, or the request is unusual, these may be suspicious or malicious activity." ], - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Web Application Suspicious Activity: Unauthorized Method", "query": "http.response.status_code:405", - "references": [ - "https://en.wikipedia.org/wiki/HTTP_405" - ], + "references": ["https://en.wikipedia.org/wiki/HTTP_405"], "risk_score": 50, "rule_id": "75ee75d8-c180-481c-ba88-ee50129a6aef", "severity": "low", - "tags": [ - "Elastic", - "apm" - ], - "to": "now", + "tags": ["Elastic", "apm"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/500_response_on_admin_page.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/500_response_on_admin_page.json index 62312003797326..3b4bcbe6709214 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/500_response_on_admin_page.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/500_response_on_admin_page.json @@ -1,17 +1,20 @@ { "description": "500 Response on Admin page", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "500 Response on Admin page", "query": "url.path:\"/admin/\" and http.response.status_code:500", "risk_score": 50, "rule_id": "054f669c-b065-492e-acd9-15e44fc42380", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json index e5280d19f8e4a5..6843f622bee8f9 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adding_the_hidden_file_attribute_with_via_attribexe.json @@ -1,20 +1,21 @@ { "description": "Adversaries can add the 'hidden' attribute to files to hide them from the user in an attempt to evade detection", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Adding the Hidden File Attribute with via attrib.exe", - "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"attrib.exe\" and process.args:\"+h\"", + "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"attrib.exe\" and process.args:\"+h\"", "risk_score": 25, "rule_id": "4630d948-40d4-4cef-ac69-4002e29bc3db", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/" }, - "techniques": [ + "technique": [ { "id": "T1158", "name": "Hidden Files and Directories", @@ -37,7 +38,7 @@ "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/" }, - "techniques": [ + "technique": [ { "id": "T1158", "name": "Hidden Files and Directories", @@ -46,7 +47,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json index 0fac9b17160e2a..fcc105f2447e84 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_adobe_hijack_persistence.json @@ -1,20 +1,21 @@ { "description": "Detects writing executable files that will be automatically launched by Adobe on launch.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Adobe Hijack Persistence", "query": "file.path:(\"C:\\Program Files (x86)\\Adobe\\Acrobat Reader DC\\Reader\\AcroCEF\\RdrCEF.exe\" or \"C:\\Program Files\\Adobe\\Acrobat Reader DC\\Reader\\AcroCEF\\RdrCEF.exe\") and event.action:\"File created (rule: FileCreate)\" and not process.name:msiexeec.exe", "risk_score": 25, "rule_id": "2bf78aa2-9c56-48de-b139-f169bf99cf86", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/" }, - "techniques": [ + "technique": [ { "id": "T1044", "name": "File System Permissions Weakness", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_audio_capture_via_powershell.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_audio_capture_via_powershell.json index 0506d033489132..feaa8451754a57 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_audio_capture_via_powershell.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_audio_capture_via_powershell.json @@ -1,20 +1,21 @@ { "description": "An adversary can leverage a computer's peripheral devices or applications to capture audio recordings for the purpose of listening into sensitive conversations to gather information.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Audio Capture via PowerShell", "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"powershell.exe\" and process.args:\"WindowsAudioDevice-Powershell-Cmdlet\"", "risk_score": 25, "rule_id": "b27b9f47-0a20-4807-8377-7f899b4fbada", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Collection", "reference": "https://attack.mitre.org/tactics/TA0009/" }, - "techniques": [ + "technique": [ { "id": "T1123", "name": "Audio Capture", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_audio_capture_via_soundrecorder.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_audio_capture_via_soundrecorder.json index 392eeb3980c9fc..0365616e86faf6 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_audio_capture_via_soundrecorder.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_audio_capture_via_soundrecorder.json @@ -1,20 +1,21 @@ { "description": "An adversary can leverage a computer's peripheral devices or applications to capture audio recordings for the purpose of listening into sensitive conversations to gather information.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Audio Capture via SoundRecorder", "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"SoundRecorder.exe\" and process.args:\"/FILE\"", "risk_score": 25, "rule_id": "f8e06892-ed10-4452-892e-2c5a38d552f1", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Collection", "reference": "https://attack.mitre.org/tactics/TA0009/" }, - "techniques": [ + "technique": [ { "id": "T1123", "name": "Audio Capture", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_bypass_uac_event_viewer.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_bypass_uac_event_viewer.json index ecbc9a2dd46c41..e3d57d2b05503f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_bypass_uac_event_viewer.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_bypass_uac_event_viewer.json @@ -1,20 +1,21 @@ { "description": "Identifies User Account Control (UAC) bypass via eventvwr. Attackers bypass UAC to stealthily execute code with elevated permissions.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Bypass UAC via Event Viewer", "query": "process.parent.name:eventvwr.exe and event.action:\"Process Create (rule: ProcessCreate)\" and not process.executable:(\"C:\\Windows\\System32\\mmc.exe\" or \"C:\\Windows\\SysWOW64\\mmc.exe\")", "risk_score": 25, "rule_id": "59547add-a400-4baa-aa0c-66c72efdb77f", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Privilege Escalation", "reference": "https://attack.mitre.org/tactics/TA0004/" }, - "techniques": [ + "technique": [ { "id": "T1088", "name": "Bypass User Account Control", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_bypass_uac_via_cmstp.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_bypass_uac_via_cmstp.json index 2518fda68ee0f6..0d9346a7e1f88e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_bypass_uac_via_cmstp.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_bypass_uac_via_cmstp.json @@ -1,20 +1,21 @@ { "description": "Identifies User Account Control (UAC) bypass via cmstp. Attackers bypass UAC to stealthily execute code with elevated permissions.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Bypass UAC via CMSTP", "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.parent.name:\"cmstp.exe\" and process.parent.args:(\"/s\" and \"/au\")", "risk_score": 25, "rule_id": "2f7403da-1a4c-46bb-8ecc-c1a596e10cd0", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Privilege Escalation", "reference": "https://attack.mitre.org/tactics/TA0004/" }, - "techniques": [ + "technique": [ { "id": "T1088", "name": "Bypass User Account Control", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_bypass_uac_via_sdclt.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_bypass_uac_via_sdclt.json index c419dc080ec3cb..3e99f1be6bf2ed 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_bypass_uac_via_sdclt.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_bypass_uac_via_sdclt.json @@ -1,20 +1,21 @@ { "description": "Identifies User Account Control (UAC) bypass via cmstp. Attackers bypass UAC to stealthily execute code with elevated permissions.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Bypass UAC via SDCLT", "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"sdclt.exe\" and process.args:\"/kickoffelev\" and not process.executable:(\"C:\\Windows\\System32\\sdclt.exe\" or \"C:\\Windows\\System32\\control.exe\" or \"C:\\Windows\\SysWOW64\\sdclt.exe\" or \"C:\\Windows\\SysWOW64\\control.exe\")", "risk_score": 25, "rule_id": "f68d83a1-24cb-4b8d-825b-e8af400b9670", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Privilege Escalation", "reference": "https://attack.mitre.org/tactics/TA0004/" }, - "techniques": [ + "technique": [ { "id": "T1088", "name": "Bypass User Account Control", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json index bcf9b02a0210f6..9d8d3bab1ace76 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_clearing_windows_event_logs.json @@ -1,20 +1,21 @@ { "description": "Identifies attempts to clear Windows event log stores. This is often done by attackers in an attempt evade detection or destroy forensic evidence on a system.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Clearing Windows Event Logs", "query": "event.action:\"Process Create (rule: ProcessCreate)\" and (process.name:\"wevtutil.exe\" and process.args:\"cl\") or (process.name:\"powershell.exe\" and process.args:\"Clear-EventLog\")", "risk_score": 25, "rule_id": "d331bbe2-6db4-4941-80a5-8270db72eb61", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/" }, - "techniques": [ + "technique": [ { "id": "T1070", "name": "Indicator Removal on Host", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json index 5a9ba605975340..e69de058960d4d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_delete_volume_usn_journal_with_fsutil.json @@ -1,20 +1,21 @@ { "description": "Identifies use of the fsutil command to delete the volume USNJRNL. This technique is used by attackers to eliminate evidence of files created during post-exploitation activities.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Delete Volume USN Journal with fsutil", "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"fsutil.exe\" and process.args:(\"usn\" and \"deletejournal\")", "risk_score": 25, "rule_id": "f675872f-6d85-40a3-b502-c0d2ef101e92", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/" }, - "techniques": [ + "technique": [ { "id": "T1107", "name": "File Deletion", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json index 240678d45238cc..cbf51ffb7c20b3 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_deleting_backup_catalogs_with_wbadmin.json @@ -1,20 +1,21 @@ { "description": "Identifies use of the wbadmin command to delete the backup catalog. Ransomware and other malware may do this to prevent system recovery.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Deleting Backup Catalogs with wbadmin", "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"wbadmin.exe\" and process.args:(\"delete\" and \"catalog\")", "risk_score": 25, "rule_id": "581add16-df76-42bb-af8e-c979bfb39a59", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/" }, - "techniques": [ + "technique": [ { "id": "T1107", "name": "File Deletion", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json index 9e5ccc73dc05ee..5e8321c6777aab 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_direct_outbound_smb_connection.json @@ -1,20 +1,21 @@ { "description": "Identifies unexpected processes making network connections over port 445. Windows File Sharing is typically implemented over Server Message Block (SMB), which communicates between hosts using port 445. When legitimate, these network connections are established by the kernel. Processes making 445/tcp connections may be port scanners, exploits, or suspicious user-level processes moving laterally.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Direct Outbound SMB Connection", "query": " event.action:\"Network connection detected (rule: NetworkConnect)\" and destination.port:445 and not process.pid:4 and not destination.ip:(\"127.0.0.1\" or \"::1\")", "risk_score": 50, "rule_id": "c82c7d8f-fb9e-4874-a4bd-fd9e3f9becf1", "severity": "medium", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Lateral Movement", "reference": "https://attack.mitre.org/tactics/TA0008/" }, - "techniques": [ + "technique": [ { "id": "T1210", "name": "Exploitation of Remote Services", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json index 40a8298561dbd7..c9510913a151fd 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_disable_windows_firewall_rules_with_netsh.json @@ -1,20 +1,21 @@ { "description": "Identifies use of the netsh command to disable or weaken the local firewall. Attackers will use this command line tool to disable the firewall during troubleshooting or to enable network mobility.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Disable Windows Firewall Rules with Netsh", "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"netsh.exe\" and process.args:(\"firewall\" and \"set\" and \"disable\") or process.args:(\"advfirewall\" and \"state\" and \"off\")", "risk_score": 50, "rule_id": "4b438734-3793-4fda-bd42-ceeada0be8f9", "severity": "medium", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/" }, - "techniques": [ + "technique": [ { "id": "T1089", "name": "Disabling Security Tools", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_dll_search_order_hijack.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_dll_search_order_hijack.json index 0ee8674e3304b2..214ddfaf0feec3 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_dll_search_order_hijack.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_dll_search_order_hijack.json @@ -1,20 +1,21 @@ { "description": "Detects writing DLL files to known locations associated with Windows files vulnerable to DLL search order hijacking.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "DLL Search Order Hijack", "query": " event.action:\"File created (rule: FileCreate)\" and not winlog.user.identifier:(\"S-1-5-18\" or \"S-1-5-19\" or \"S-1-5-20\") and file.path:(\"C\\Windows\\ehome\\cryptbase.dll\" or \"C\\Windows\\System32\\Sysprep\\cryptbase.dll\" or \"C\\Windows\\System32\\Sysprep\\cryptsp.dll\" or \"C\\Windows\\System32\\Sysprep\\rpcrtremote.dll\" or \"C\\Windows\\System32\\Sysprep\\uxtheme.dll\" or \"C\\Windows\\System32\\Sysprep\\dwmapi.dll\" or \"C\\Windows\\System32\\Sysprep\\shcore.dll\" or \"C\\Windows\\System32\\Sysprep\\oleacc.dll\" or \"C\\Windows\\System32\\ntwdblib.dll\") ", "risk_score": 50, "rule_id": "73fbc44c-c3cd-48a8-a473-f4eb2065c716", "severity": "medium", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Privilege Escalation", "reference": "https://attack.mitre.org/tactics/TA0004/" }, - "techniques": [ + "technique": [ { "id": "T1088", "name": "Bypass User Account Control", @@ -37,7 +38,7 @@ "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/" }, - "techniques": [ + "technique": [ { "id": "T1088", "name": "Bypass User Account Control", @@ -46,7 +47,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json index 3e912e076adecf..e531a2d05a97ea 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_encoding_or_decoding_files_via_certutil.json @@ -1,20 +1,21 @@ { "description": "Identifies the use of certutil.exe to encode or decode data. CertUtil is a native Windows component which is part of Certificate Services. CertUtil is often abused by attackers to encode or decode base64 data for stealthier command and control or exfiltration.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Encoding or Decoding Files via CertUtil", "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"certutil.exe\" and process.args:(\"-encode\" or \"/encode\" or \"-decode\" or \"/decode\")", "risk_score": 50, "rule_id": "fd70c98a-c410-42dc-a2e3-761c71848acf", "severity": "medium", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/" }, - "techniques": [ + "technique": [ { "id": "T1140", "name": "Deobfuscate/Decode Files or Information", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json index 304fea1cfbb76c..426d32b9b1e48b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_scheduled_task_commands.json @@ -1,20 +1,21 @@ { "description": "A scheduled task can be used by an adversary to establish persistence, move laterally, and/or escalate privileges.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Local Scheduled Task Commands", "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.name:schtasks.exe and process.args:(\"/create\" or \"-create\" or \"/S\" or \"-s\" or \"/run\" or \"-run\" or \"/change\" or \"-change\")", "risk_score": 25, "rule_id": "afcce5ad-65de-4ed2-8516-5e093d3ac99a", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/" }, - "techniques": [ + "technique": [ { "id": "T1053", "name": "Scheduled Task", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json index 7454b0fd452c67..71f94ecf91788a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_local_service_commands.json @@ -1,20 +1,21 @@ { "description": "Identifies use of sc.exe to create, modify, or start services on remote hosts. This could be indicative of adversary lateral movement but will be noisy if commonly done by admins.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Local Service Commands", "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.name:sc.exe and process.args:(\"create\" or \"config\" or \"failure\" or \"start\")", "risk_score": 25, "rule_id": "e8571d5f-bea1-46c2-9f56-998de2d3ed95", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/" }, - "techniques": [ + "technique": [ { "id": "T1021", "name": "Remote Services", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_modification_of_boot_configuration.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_modification_of_boot_configuration.json index d4ac29a78c77de..162dfe717df551 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_modification_of_boot_configuration.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_modification_of_boot_configuration.json @@ -1,20 +1,21 @@ { "description": "Identifies use of the bcdedit command to delete boot configuration data. This tactic is sometimes used as by malware or an attacker as a destructive technique.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Modification of Boot Configuration", "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"bcdedit.exe\" and process.args:\"set\" and process.args:( (\"bootstatuspolicy\" and \"ignoreallfailures\") or (\"recoveryenabled\" and \"no\") ) ", "risk_score": 75, "rule_id": "b9ab2f7f-f719-4417-9599-e0252fffe2d8", "severity": "high", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/" }, - "techniques": [ + "technique": [ { "id": "T1107", "name": "File Deletion", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json index 61049bba92cce4..296f6f0862374d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msbuild_making_network_connections.json @@ -1,20 +1,21 @@ { "description": "Identifies MsBuild.exe making outbound network connections. This may indicate adversarial activity as MsBuild is often leveraged by adversaries to execute code and evade detection.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "MsBuild Making Network Connections", "query": " event.action:\"Network connection detected (rule: NetworkConnect)\" and process.name:msbuild.exe and not destination.ip:(\"127.0.0.1\" or \"::1\")", "risk_score": 50, "rule_id": "0e79980b-4250-4a50-a509-69294c14e84b", "severity": "medium", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/" }, - "techniques": [ + "technique": [ { "id": "T1127", "name": "Trusted Developer Utilities", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json index f2ed8449b9aafa..18c9e286c99ef8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_mshta_making_network_connections.json @@ -1,23 +1,22 @@ { "description": "Identifies Mshta.exe making outbound network connections. This may indicate adversarial activity as Mshta is often leveraged by adversaries to execute malicious scripts and evade detection.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Mshta Making Network Connections", "query": "event.action:\"Network connection detected (rule: NetworkConnect)\" and process.name:\"mshta.exe\" and not process.name:\"mshta.exe\"", - "references": [ - "https://www.fireeye.com/blog/threat-research/2017/05/cyber-espionage-apt32.html" - ], + "references": ["https://www.fireeye.com/blog/threat-research/2017/05/cyber-espionage-apt32.html"], "risk_score": 50, "rule_id": "a4ec1382-4557-452b-89ba-e413b22ed4b8", "severity": "medium", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -25,7 +24,7 @@ "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/" }, - "techniques": [ + "technique": [ { "id": "T1170", "name": "Mshta", @@ -34,7 +33,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msxsl_making_network_connections.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msxsl_making_network_connections.json index c86b7515173dc4..b21b17cd89abf7 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msxsl_making_network_connections.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_msxsl_making_network_connections.json @@ -1,20 +1,21 @@ { "description": "Identifies MsXsl.exe making outbound network connections. This may indicate adversarial activity as MsXsl is often leveraged by adversaries to execute malicious scripts and evade detection.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "MsXsl Making Network Connections", "query": "process.name:msxsl.exe and event.action:\"Network connection detected (rule: NetworkConnect)\" and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", "risk_score": 50, "rule_id": "d7351b03-135d-43ba-8b36-cc9b07854525", "severity": "medium", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/" }, - "techniques": [ + "technique": [ { "id": "T1220", "name": "XSL Script Processing", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json index e35843bc9b4136..3e04dd4be292bf 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_psexec_lateral_movement_command.json @@ -1,20 +1,20 @@ { "description": "Identifies use of the SysInternals tool PsExec to execute commands on a remote host. This is an indication of lateral movement and may detect adversaries.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "PsExec Lateral Movement Command", "query": "process.name:psexec.exe and event.action:\"Network connection detected (rule: NetworkConnect)\" ", "risk_score": 50, "rule_id": "55d551c6-333b-4665-ab7e-5d14a59715ce", "severity": "low", - "tags": [ - "EIA" - ], - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json index 9d3b0361c9d291..ac66af50ecd1d0 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_office_child_process.json @@ -1,20 +1,21 @@ { "description": "Identifies suspicious child processes of frequently targeted Microsoft Office applications (Word, PowerPoint, Excel). These child processes are often launched during exploitation of Office applications or from documents with malicious macros.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Suspicious MS Office Child Process", "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.parent.name:(\"winword.exe\" or \"excel.exe\" or \"powerpnt.exe\" or \"eqnedt32.exe\" or \"fltldr.exe\" or \"mspub.exe\" or \"msaccess.exe\") and process.name:(\"arp.exe\" or \"dsquery.exe\" or \"dsget.exe\" or \"gpresult.exe\" or \"hostname.exe\" or \"ipconfig.exe\" or \"nbtstat.exe\" or \"net.exe\" or \"net1.exe\" or \"netsh.exe\" or \"netstat.exe\" or \"nltest.exe\" or \"ping.exe\" or \"qprocess.exe\" or \"quser.exe\" or \"qwinsta.exe\" or \"reg.exe\" or \"sc.exe\" or \"systeminfo.exe\" or \"tasklist.exe\" or \"tracert.exe\" or \"whoami.exe\" or \"bginfo.exe\" or \"cdb.exe\" or \"cmstp.exe\" or \"csi.exe\" or \"dnx.exe\" or \"fsi.exe\" or \"ieexec.exe\" or \"iexpress.exe\" or \"installutil.exe\" or \"Microsoft.Workflow.Compiler.exe\" or \"msbuild.exe\" or \"mshta.exe\" or \"msxsl.exe\" or \"odbcconf.exe\" or \"rcsi.exe\" or \"regsvr32.exe\" or \"xwizard.exe\" or \"atbroker.exe\" or \"forfiles.exe\" or \"schtasks.exe\" or \"regasm.exe\" or \"regsvcs.exe\" or \"cmd.exe\" or \"cscript.exe\" or \"powershell.exe\" or \"pwsh.exe\" or \"wmic.exe\" or \"wscript.exe\" or \"bitsadmin.exe\" or \"certutil.exe\" or \"ftp.exe\") ", "risk_score": 25, "rule_id": "a624863f-a70d-417f-a7d2-7a404638d47f", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/" }, - "techniques": [ + "technique": [ { "id": "T1193", "name": "Spearphishing Attachment", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json index f445cb187c4287..928144f0ecf0c6 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_ms_outlook_child_process.json @@ -1,20 +1,21 @@ { "description": "Identifies suspicious child processes of Microsoft Outlook. These child processes are often associated with spear phishing activity.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Suspicious MS Outlook Child Process", - "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.parent.name:\"outlook.exe\" and process.name:(\"arp.exe\" or \"dsquery.exe\" or \"dsget.exe\" or \"gpresult.exe\" or \"hostname.exe\" or \"ipconfig.exe\" or \"nbtstat.exe\" or \"net.exe\" or \"net1.exe\" or \"netsh.exe\" or \"netstat.exe\" or \"nltest.exe\" or \"ping.exe\" or \"qprocess.exe\" or \"quser.exe\" or \"qwinsta.exe\" or \"reg.exe\" or \"sc.exe\" or \"systeminfo.exe\" or \"tasklist.exe\" or \"tracert.exe\" or \"whoami.exe\" or \"bginfo.exe\" or \"cdb.exe\" or \"cmstp.exe\" or \"csi.exe\" or \"dnx.exe\" or \"fsi.exe\" or \"ieexec.exe\" or \"iexpress.exe\" or \"installutil.exe\" or \"Microsoft.Workflow.Compiler.exe\" or \"msbuild.exe\" or \"mshta.exe\" or \"msxsl.exe\" or \"odbcconf.exe\" or \"rcsi.exe\" or \"regsvr32.exe\" or \"xwizard.exe\" or \"atbroker.exe\" or \"forfiles.exe\" or \"schtasks.exe\" or \"regasm.exe\" or \"regsvcs.exe\" or \"cmd.exe\" or \"cscript.exe\" or \"powershell.exe\" or \"pwsh.exe\" or \"wmic.exe\" or \"wscript.exe\" or \"bitsadmin.exe\" or \"certutil.exe\" or \"ftp.exe\") ", + "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.parent.name:\"outlook.exe\" and process.name:(\"arp.exe\" or \"dsquery.exe\" or \"dsget.exe\" or \"gpresult.exe\" or \"hostname.exe\" or \"ipconfig.exe\" or \"nbtstat.exe\" or \"net.exe\" or \"net1.exe\" or \"netsh.exe\" or \"netstat.exe\" or \"nltest.exe\" or \"ping.exe\" or \"qprocess.exe\" or \"quser.exe\" or \"qwinsta.exe\" or \"reg.exe\" or \"sc.exe\" or \"systeminfo.exe\" or \"tasklist.exe\" or \"tracert.exe\" or \"whoami.exe\" or \"bginfo.exe\" or \"cdb.exe\" or \"cmstp.exe\" or \"csi.exe\" or \"dnx.exe\" or \"fsi.exe\" or \"ieexec.exe\" or \"iexpress.exe\" or \"installutil.exe\" or \"Microsoft.Workflow.Compiler.exe\" or \"msbuild.exe\" or \"mshta.exe\" or \"msxsl.exe\" or \"odbcconf.exe\" or \"rcsi.exe\" or \"regsvr32.exe\" or \"xwizard.exe\" or \"atbroker.exe\" or \"forfiles.exe\" or \"schtasks.exe\" or \"regasm.exe\" or \"regsvcs.exe\" or \"cmd.exe\" or \"cscript.exe\" or \"powershell.exe\" or \"pwsh.exe\" or \"wmic.exe\" or \"wscript.exe\" or \"bitsadmin.exe\" or \"certutil.exe\" or \"ftp.exe\") ", "risk_score": 25, "rule_id": "32f4675e-6c49-4ace-80f9-97c9259dca2e", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/" }, - "techniques": [ + "technique": [ { "id": "T1193", "name": "Spearphishing Attachment", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_pdf_reader_child_process.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_pdf_reader_child_process.json index 0b44ebd922c022..160da5b899042c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_pdf_reader_child_process.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_suspicious_pdf_reader_child_process.json @@ -1,20 +1,21 @@ { "description": "Identifies suspicious child processes of PDF reader applications. These child processes are often launched via exploitation of PDF applications or social engineering.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "EQL - Suspicious PDF Reader Child Process", "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.parent.name:(\"acrord32.exe\" or \"rdrcef.exe\" or \"foxitphantomPDF.exe\" or \"foxitreader.exe\") and process.name:(\"arp.exe\" or \"dsquery.exe\" or \"dsget.exe\" or \"gpresult.exe\" or \"hostname.exe\" or \"ipconfig.exe\" or \"nbtstat.exe\" or \"net.exe\" or \"net1.exe\" or \"netsh.exe\" or \"netstat.exe\" or \"nltest.exe\" or \"ping.exe\" or \"qprocess.exe\" or \"quser.exe\" or \"qwinsta.exe\" or \"reg.exe\" or \"sc.exe\" or \"systeminfo.exe\" or \"tasklist.exe\" or \"tracert.exe\" or \"whoami.exe\" or \"bginfo.exe\" or \"cdb.exe\" or \"cmstp.exe\" or \"csi.exe\" or \"dnx.exe\" or \"fsi.exe\" or \"ieexec.exe\" or \"iexpress.exe\" or \"installutil.exe\" or \"Microsoft.Workflow.Compiler.exe\" or \"msbuild.exe\" or \"mshta.exe\" or \"msxsl.exe\" or \"odbcconf.exe\" or \"rcsi.exe\" or \"regsvr32.exe\" or \"xwizard.exe\" or \"atbroker.exe\" or \"forfiles.exe\" or \"schtasks.exe\" or \"regasm.exe\" or \"regsvcs.exe\" or \"cmd.exe\" or \"cscript.exe\" or \"powershell.exe\" or \"pwsh.exe\" or \"wmic.exe\" or \"wscript.exe\" or \"bitsadmin.exe\" or \"certutil.exe\" or \"ftp.exe\") ", "risk_score": 75, "rule_id": "afcac7b1-d092-43ff-a136-aa7accbda38f", "severity": "high", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/" }, - "techniques": [ + "technique": [ { "id": "T1193", "name": "Spearphishing Attachment", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json index 687f5c0db2dabf..268e8110c508dc 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_system_shells_via_services.json @@ -1,20 +1,21 @@ { "description": "Windows services typically run as SYSTEM and can be used as a privilege escalation opportunity. Malware or penetration testers may run a shell as a service to gain SYSTEM permissions.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "System Shells via Services", "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.parent.name:\"services.exe\" and process.name:(\"cmd.exe\" or \"powershell.exe\")", "risk_score": 50, "rule_id": "0022d47d-39c7-4f69-a232-4fe9dc7a3acd", "severity": "medium", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/" }, - "techniques": [ + "technique": [ { "id": "T1050", "name": "New Service", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json index 4893f80e8b56c2..7332cc77103470 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_network_connection_via_rundll32.json @@ -1,20 +1,21 @@ { "description": "Identifies unusual instances of Rundll32.exe making outbound network connections. This may indicate adversarial activity and may identify malicious DLLs.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Unusual Network Connection via RunDLL32", "query": "process.name:rundll32.exe and event.action:\"Network connection detected (rule: NetworkConnect)\" and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", "risk_score": 25, "rule_id": "52aaab7b-b51c-441a-89ce-4387b3aea886", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/" }, - "techniques": [ + "technique": [ { "id": "T1085", "name": "Rundll32", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json index 29e3c998ebe02f..d13d23a9354f77 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_parentchild_relationship.json @@ -1,20 +1,21 @@ { "description": "Identifies Windows programs run from unexpected parent processes. This could indicate masquerading or other strange activity on a system.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Unusual Parent-Child Relationship ", - "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.parent.executable:* and ( (process.name:\"smss.exe\" and not process.parent.name:(\"System\" or \"smss.exe\")) or (process.name:\"csrss.exe\" and not process.parent.name:(\"smss.exe\" or \"svchost.exe\")) or (process.name:\"wininit.exe\" and not process.parent.name:\"smss.exe\") or (process.name:\"winlogon.exe\" and not process.parent.name:\"smss.exe\") or (process.name:\"lsass.exe\" and not process.parent.name:\"wininit.exe\") or (process.name:\"LogonUI.exe\" and not process.parent.name:(\"winlogon.exe\" or \"wininit.exe\")) or (process.name:\"services.exe\" and not process.parent.name:\"wininit.exe\") or (process.name:\"svchost.exe\" and not process.parent.name:(\"services.exe\" or \"MsMpEng.exe\")) or (process.name:\"spoolsv.exe\" and not process.parent.name:\"services.exe\") or (process.name:\"taskhost.exe\" and not process.parent.name:(\"services.exe\" or \"svchost.exe\")) or (process.name:\"taskhostw.exe\" and not process.parent.name:(\"services.exe\" or \"svchost.exe\")) or (process.name:\"userinit.exe\" and not process.parent.name:(\"dwm.exe\" or \"winlogon.exe\")) )", + "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.parent.executable:* and ( (process.name:\"smss.exe\" and not process.parent.name:(\"System\" or \"smss.exe\")) or (process.name:\"csrss.exe\" and not process.parent.name:(\"smss.exe\" or \"svchost.exe\")) or (process.name:\"wininit.exe\" and not process.parent.name:\"smss.exe\") or (process.name:\"winlogon.exe\" and not process.parent.name:\"smss.exe\") or (process.name:\"lsass.exe\" and not process.parent.name:\"wininit.exe\") or (process.name:\"LogonUI.exe\" and not process.parent.name:(\"winlogon.exe\" or \"wininit.exe\")) or (process.name:\"services.exe\" and not process.parent.name:\"wininit.exe\") or (process.name:\"svchost.exe\" and not process.parent.name:(\"services.exe\" or \"MsMpEng.exe\")) or (process.name:\"spoolsv.exe\" and not process.parent.name:\"services.exe\") or (process.name:\"taskhost.exe\" and not process.parent.name:(\"services.exe\" or \"svchost.exe\")) or (process.name:\"taskhostw.exe\" and not process.parent.name:(\"services.exe\" or \"svchost.exe\")) or (process.name:\"userinit.exe\" and not process.parent.name:(\"dwm.exe\" or \"winlogon.exe\")) )", "risk_score": 50, "rule_id": "35df0dd8-092d-4a83-88c1-5151a804f31b", "severity": "medium", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Privilege Escalation", "reference": "https://attack.mitre.org/tactics/TA0004/" }, - "techniques": [ + "technique": [ { "id": "T1093", "name": "Process Hollowing", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json index ce34e4a352c887..138ecbb820513b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_unusual_process_network_connection.json @@ -1,20 +1,21 @@ { "description": "Identifies network activity from unexpected system applications. This may indicate adversarial activity as these applications are often leveraged by adversaries to execute code and evade detection.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Unusual Process Network Connection", "query": " event.action:\"Network connection detected (rule: NetworkConnect)\" and process.name:(bginfo.exe or cdb.exe or cmstp.exe or csi.exe or dnx.exe or fsi.exe or ieexec.exe or iexpress.exe or Microsoft.Workflow.Compiler.exe or odbcconf.exe or rcsi.exe or xwizard.exe)", "risk_score": 25, "rule_id": "610949a1-312f-4e04-bb55-3a79b8c95267", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/" }, - "techniques": [ + "technique": [ { "id": "T1127", "name": "Trusted Developer Utilities", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json index 5b94babaf8add3..9f3ecdb7a7f57d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_account_creation.json @@ -1,20 +1,21 @@ { "description": "Identifies attempts to create new local users. This is sometimes done by attackers to increase access to a system or domain.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "User Account Creation", "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.name:(\"net.exe\" or \"net1.exe\") and not process.parent.name:\"net.exe\" and process.args:(\"user\" and (\"/add\" or \"/ad\")) ", "risk_score": 50, "rule_id": "1aa9181a-492b-4c01-8b16-fa0735786b2b", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/" }, - "techniques": [ + "technique": [ { "id": "T1136", "name": "Create Account", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_added_to_administrator_group.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_added_to_administrator_group.json index f0b770985c7166..1a0e0f8dcb2ad8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_added_to_administrator_group.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_user_added_to_administrator_group.json @@ -1,20 +1,21 @@ { "description": "Identifies attempts to add a user to an administrative group with the \"net.exe\" command. This is sometimes done by attackers to increase access of a compromised account or create new account.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "User Added to Administrator Group", "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.name:(\"net.exe\" or \"net1.exe\") and not process.parent.name:\"net.exe\" and process.args:(\"group\" and \"admin\" and \"/add\") ", "risk_score": 50, "rule_id": "4426de6f-6103-44aa-a77e-49d672836c27", "severity": "medium", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Persistence", "reference": "https://attack.mitre.org/tactics/TA0003/" }, - "techniques": [ + "technique": [ { "id": "T1098", "name": "Account Manipulation", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json index 8f23d398a48a74..794fec38b380ef 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_vssadmin.json @@ -1,20 +1,21 @@ { "description": "Identifies use of vssadmin.exe for shadow copy deletion on endpoints. This commonly occurs in tandem with ransomware or other destructive attacks.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Volume Shadow Copy Deletion via VssAdmin", - "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"vssadmin.exe\" and process.args:(\"delete\" and \"shadows\") ", + "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"vssadmin.exe\" and process.args:(\"delete\" and \"shadows\") ", "risk_score": 75, "rule_id": "b5ea4bfe-a1b2-421f-9d47-22a75a6f2921", "severity": "high", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/" }, - "techniques": [ + "technique": [ { "id": "T1490", "name": "Inhibit System Recovery", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json index fc18b2c0f5d70c..a3e94b08275be8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_volume_shadow_copy_deletion_via_wmic.json @@ -1,20 +1,21 @@ { "description": "Identifies use of wmic for shadow copy deletion on endpoints. This commonly occurs in tandem with ransomware or other destructive attacks.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Volume Shadow Copy Deletion via WMIC", - "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"wmic.exe\" and process.args:(\"shadowcopy\" and \"delete\")", + "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"wmic.exe\" and process.args:(\"shadowcopy\" and \"delete\")", "risk_score": 75, "rule_id": "dc9c1f74-dac3-48e3-b47f-eb79db358f57", "severity": "high", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Defense Evasion", "reference": "https://attack.mitre.org/tactics/TA0005/" }, - "techniques": [ + "technique": [ { "id": "T1107", "name": "File Deletion", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json index ff3d660704eeb7..868d84ef9ebce1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_windows_script_executing_powershell.json @@ -1,20 +1,21 @@ { "description": "Identifies a PowerShell process launched by either CScript or WScript. Observing Windows scripting processes executing a PowerShell script, may be indicative of malicious activity.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Script Executing PowerShell", "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.parent.name:(\"wscript.exe\" or \"cscript.exe\") and process.name:\"powershell.exe\"", "risk_score": 50, "rule_id": "f545ff26-3c94-4fd0-bd33-3c7f95a3a0fc", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Execution", "reference": "https://attack.mitre.org/tactics/TA0002/" }, - "techniques": [ + "technique": [ { "id": "T1193", "name": "Spearphishing Attachment", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_wmic_command_lateral_movement.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_wmic_command_lateral_movement.json index 5a9bda9e8ddfac..5c2804507cbd2b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_wmic_command_lateral_movement.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/eql_wmic_command_lateral_movement.json @@ -1,20 +1,21 @@ { "description": "Identifies use of wmic.exe to run commands on remote hosts. This could be indicative of adversary lateral movement but will be noisy if commonly done by admins.", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "WMIC Command Lateral Movement", - "query": " event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"wmic.exe\" and process.args:(\"/node\" or \"-node\") and process.args:(\"call\" or \"set\")", + "query": "event.action:\"Process Create (rule: ProcessCreate)\" and process.name:\"wmic.exe\" and process.args:(\"/node\" or \"-node\") and process.args:(\"call\" or \"set\")", "risk_score": 25, "rule_id": "9616587f-6396-42d0-bd31-ef8dbd806210", "severity": "low", - "tags": [ - "EIA" - ], - "threats": [ + "tags": ["Elastic"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Lateral Movement", "reference": "https://attack.mitre.org/tactics/TA0008/" }, - "techniques": [ + "technique": [ { "id": "T1047", "name": "Windows Management Instrumentation", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json index 1557f9ff4bb302..d0a07ce2d03657 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_hping_activity.json @@ -1,27 +1,25 @@ { "description": "Hping ran on a Linux host. Hping is FOSS command-line packet analyzer and has the ability to construct network packets for a wide variety of network security testing applications including scanning and firewall auditing.", - "enabled": false, "false_positives": [ "Normal use of hping is uncommon apart from security testing and research. Use by non-security engineers is very uncommon." ], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Hping Process Activity", "query": "process.name: hping and event.action:executed", - "references": [ - "https://en.wikipedia.org/wiki/Hping" - ], + "references": ["https://en.wikipedia.org/wiki/Hping"], "risk_score": 75, "rule_id": "90169566-2260-4824-b8e4-8615c3b4ed52", "severity": "high", - "tags": [ - "Elastic", - "linux" - ], - "to": "now", + "tags": ["Elastic", "linux"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json index 83c47d0d5c970c..1a116735e98f31 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_iodine_activity.json @@ -1,27 +1,25 @@ { "description": "Iodine is a tool for tunneling internet protocol version 4 (IPV4) trafic over the DNS protocol in order to circumvent firewalls, network security groups or network access lists while evading detection.", - "enabled": false, "false_positives": [ "Normal use of Iodine is uncommon apart from security testing and research. Use by non-security engineers is very uncommon." ], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Potential DNS Tunneling via Iodine", "query": "process.name: (iodine or iodined) and event.action:executed", - "references": [ - "https://code.kryo.se/iodine/" - ], + "references": ["https://code.kryo.se/iodine/"], "risk_score": 75, "rule_id": "041d4d41-9589-43e2-ba13-5680af75ebc2", "severity": "high", - "tags": [ - "Elastic", - "linux" - ], - "to": "now", + "tags": ["Elastic", "linux"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json index 6a448caac89e44..15298625713819 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_kernel_module_activity.json @@ -1,16 +1,9 @@ { "description": "Identifies loadable kernel module errors, often indicative of potential persistence attempts.", - "enabled": false, "false_positives": [ "Security tools and device drivers may run these programs in order to load legitimate kernel modules. Use of these programs by ordinary users is uncommon." ], - "from": "now-6m", - "immutable": true, - "index": [ - "auditbeat-*" - ], - "interval": "5m", - "language": "kuery", + "index": ["auditbeat-*"], "max_signals": 33, "name": "Persistence via Kernel Module Modification", "query": "process.name: (insmod or kmod or modprobe or rmod) and event.action:executed", @@ -20,11 +13,8 @@ "risk_score": 25, "rule_id": "81cc58f5-8062-49a2-ba84-5cc4b4d31c40", "severity": "low", - "tags": [ - "EIA", - "auditbeat" - ], - "threats": [ + "tags": ["Elastic", "auditbeat"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -32,7 +22,7 @@ "name": "Persistence", "reference": "https://attack.mitre.org/techniques/TA0003/" }, - "techniques": [ + "technique": [ { "id": "T1215", "name": "Kernel Modules and Extensions", @@ -41,7 +31,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ldso_process_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ldso_process_activity.json index 8e53ee96fd8f3a..187fc6379ef25e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ldso_process_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ldso_process_activity.json @@ -1,13 +1,16 @@ { "description": "ld.so runs in a privlieged context and can be used to escape restrictive environments by spawning a shell in order to elevate privlieges or move laterally.", - "enabled": false, "false_positives": [ "ld.so is a dual-use tool that can be used for benign or malicious activity. Some normal use of this command may originate from developers or administrators. Use of ld.so by non-engineers or ordinary users is uncommon." ], - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Ld.so Process Activity", @@ -15,11 +18,7 @@ "risk_score": 25, "rule_id": "3f31a31c-f7cf-4268-a0df-ec1a98099e7f", "severity": "low", - "tags": [ - "Elastic", - "linux" - ], - "to": "now", + "tags": ["Elastic", "linux"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_lzop_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_lzop_activity.json index 77953240c21859..8061ff72e130bb 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_lzop_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_lzop_activity.json @@ -1,17 +1,20 @@ { "description": "Linux lzop activity - possible @JulianRunnels", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Linux lzop activity", "query": "process.name:lzop and event.action:executed", "risk_score": 50, "rule_id": "d7359214-54a4-4572-9e51-ebf79cda9b04", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json index ea5a6287a8d7c8..1fe4802c6cf799 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_mknod_activity.json @@ -1,27 +1,25 @@ { "description": "The Linux mknod program is sometimes used in the command paylod of remote command injection (RCI) and other exploits to export a command shell when the traditional version of netcat is not available to the payload.", - "enabled": false, "false_positives": [ "Mknod is a Linux system program. Some normal use of this program, at varying levels of frequency, may originate from scripts, automation tools and frameworks. Usage by web servers is more likely to be suspicious." ], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Mknod Process Activity", "query": "process.name: mknod and event.action:executed", - "references": [ - "https://pen-testing.sans.org/blog/2013/05/06/netcat-without-e-no-problem" - ], + "references": ["https://pen-testing.sans.org/blog/2013/05/06/netcat-without-e-no-problem"], "risk_score": 25, "rule_id": "61c31c14-507f-4627-8c31-072556b89a9c", "severity": "low", - "tags": [ - "Elastic", - "linux" - ], - "to": "now", + "tags": ["Elastic", "linux"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json index 60943512f45ae6..6d57d0cbab3755 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_netcat_network_connection.json @@ -1,12 +1,16 @@ { "description": "A netcat process is engaging in network activity on a Linux host. Netcat is often used as a persistence mechanism by exporting a reverse shell or by serving a shell on a listening port. Netcat is also sometimes used for data exfiltation. ", - "enabled": false, "false_positives": [ "Netcat is a dual-use tool that can be used for benign or malicious activity. Netcat is included in some Linux distributions so its presence is not necessarily suspicious. Some normal use of this program, while uncommon, may originate from scripts, automation tools and frameworks." ], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Netcat Network Activity", @@ -19,11 +23,7 @@ "risk_score": 50, "rule_id": "adb961e0-cb74-42a0-af9e-29fc41f88f5f", "severity": "medium", - "tags": [ - "Elastic", - "linux" - ], - "to": "now", + "tags": ["Elastic", "linux"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_network_anomalous_process_using_https_ports.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_network_anomalous_process_using_https_ports.json index d04f6610f450d4..f10c940f8bb936 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_network_anomalous_process_using_https_ports.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_network_anomalous_process_using_https_ports.json @@ -1,17 +1,20 @@ { "description": "Linux Network - Anomalous Process Using HTTP/S Ports", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Linux Network - Anomalous Process Using HTTP/S Ports", "query": "(destination.port:443 or destination.port:80) and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16 and not process.name:curl and not process.name:http and not process.name:https and not process.name:nginx and not process.name:packetbeat and not process.name:python2 and not process.name:snapd and not process.name:wget", "risk_score": 50, "rule_id": "be40c674-1799-4a00-934d-0b2d54495913", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json index f10d3cf5470e40..b2284eea3f3098 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nmap_activity.json @@ -1,27 +1,25 @@ { "description": "Nmap ran on a Linux host. Nmap is a FOSS tool for network scanning and security testing. It can map and discover networks and identify listneing services and operating systems. It is sometimes used to gather information in support of exploitation, execution or lateral movement.", - "enabled": false, "false_positives": [ "Security testing tools and frameworks may run nmap in the course of security auditing. Some normal use of this command may originate from security engineers and network or server administrators. Use of nmap by ordinary users is uncommon." ], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Nmap Process Activity", "query": "process.name: nmap", - "references": [ - "https://en.wikipedia.org/wiki/Nmap" - ], + "references": ["https://en.wikipedia.org/wiki/Nmap"], "risk_score": 25, "rule_id": "c87fca17-b3a9-4e83-b545-f30746c53920", "severity": "low", - "tags": [ - "Elastic", - "linux" - ], - "to": "now", + "tags": ["Elastic", "linux"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json index ad25602c868979..4d37f32fb3ca0d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_nping_activity.json @@ -1,27 +1,25 @@ { "description": "Nping ran on a Linux host. Nping is part of the Nmap tool suite and has the ability to construct raw packets for a wide variety of security testing applications including denial of service testing.", - "enabled": false, "false_positives": [ "Some normal use of this command may originate from security engineers and network or server administrators but this is usually not routine or unannounced. Use of nping by non-engineers or ordinary users is uncommon." ], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Nping Process Activity", "query": "process.name: nping and event.action:executed", - "references": [ - "https://en.wikipedia.org/wiki/Nmap" - ], + "references": ["https://en.wikipedia.org/wiki/Nmap"], "risk_score": 50, "rule_id": "0d69150b-96f8-467c-a86d-a67a3378ce77", "severity": "medium", - "tags": [ - "Elastic", - "linux" - ], - "to": "now", + "tags": ["Elastic", "linux"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json index 7f1d2860027a85..d38cead306cd40 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_process_started_in_temp_directory.json @@ -1,12 +1,16 @@ { "description": "Identifies processes running in a temporary folder. This is sometimes done by adversaries to hide malware.", - "enabled": false, "false_positives": [ "Build systems like Jenkins may start processes in the /tmp directory. These can be exempted by name or by username." ], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Unusual Process Execution - Temp", @@ -14,11 +18,7 @@ "risk_score": 50, "rule_id": "df959768-b0c9-4d45-988c-5606a2be8e5a", "severity": "medium", - "tags": [ - "Elastic", - "linux" - ], - "to": "now", + "tags": ["Elastic", "linux"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ptrace_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ptrace_activity.json index 47ae28cf8ea4c0..6f99312c04a000 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ptrace_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ptrace_activity.json @@ -1,16 +1,20 @@ { "description": "Linux: Ptrace Activity", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Linux: Ptrace Activity", "query": "process.name: ptrace and event.action:executed", "risk_score": 50, "rule_id": "1bff9259-e160-4920-bf72-4c96b6dbb7af", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_rawshark_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_rawshark_activity.json index d4924cab7048fc..148468e959899f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_rawshark_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_rawshark_activity.json @@ -1,16 +1,20 @@ { "description": "Linux: Rawshark Activity", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Linux: Rawshark Activity", "query": "process.name: rawshark and event.action:executed", "risk_score": 50, "rule_id": "30eb2b9d-b53b-4ba5-bfab-7119a8b84029", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json index ed8bc30afbfa56..1711f45e770edc 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_shell_activity_by_web_server.json @@ -1,31 +1,19 @@ { "description": "Identifies suspicious commands executed via a web server, which may suggest a vulnerability and remote shell access.", - "enabled": false, "false_positives": [ "Network monitoring or management products may have a web server component that runs shell commands as part of normal behavior." ], - "filters": [], - "from": "now-6m", - "immutable": true, - "index": [ - "auditbeat-*" - ], - "interval": "5m", + "index": ["auditbeat-*"], "language": "kuery", "max_signals": 33, "name": "Potential Shell via Web Server", "query": "process.name: bash and (user.name: apache or www) and event.action:executed", - "references": [ - "https://pentestlab.blog/tag/web-shell/" - ], + "references": ["https://pentestlab.blog/tag/web-shell/"], "risk_score": 50, "rule_id": "231876e7-4d1f-4d63-a47c-47dd1acdc1cb", "severity": "low", - "tags": [ - "Elastic", - "linux" - ], - "threats": [ + "tags": ["Elastic", "linux"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -33,7 +21,7 @@ "name": "Persistence", "reference": "https://attack.mitre.org/techniques/TA0003/" }, - "techniques": [ + "technique": [ { "id": "T1100", "name": "Web Shell", @@ -42,7 +30,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json index c920bfb7d9a153..364a2bee65c234 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_socat_activity.json @@ -1,12 +1,16 @@ { "description": "A Socat process is running on a Linux host. Socat is often used as a persistence mechanism by exporting a reverse shell or by serving a shell on a listening port. Socat is also sometimes used for lateral movement. ", - "enabled": false, "false_positives": [ "Socat is a dual-use tool that can be used for benign or malicious activity. Some normal use of this program, at varying levels of frequency, may originate from scripts, automation tools and frameworks. Usage by web servers is more likely to be suspicious." ], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Socat Process Activity", @@ -17,11 +21,7 @@ "risk_score": 50, "rule_id": "cd4d5754-07e1-41d4-b9a5-ef4ea6a0a126", "severity": "medium", - "tags": [ - "Elastic", - "linux" - ], - "to": "now", + "tags": ["Elastic", "linux"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ssh_forwarding.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ssh_forwarding.json index d3b71573e03e33..3447689f08d620 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ssh_forwarding.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_ssh_forwarding.json @@ -1,28 +1,26 @@ { "description": "An SSH processes ran with the `-R` flag which can be used to forward a port to a remote destination for purposes of pivoting and persistence. This technique often used to create encrypted tunnels and circumvent firewalls, security groups or network access lists.", - "enabled": false, "false_positives": [ "Some normal use of this command may originate from usage by engineers as an alternative or ad-hoc remote access solution. Use of this command by non-administrative users is uncommon." ], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Potential Lateral Movement via SSH Port Forwarding", "query": "process.name:ssh and process.args:\"-R\" and event.action:executed", - "references": [ - "https://www.ssh.com/ssh/tunneling", - "https://www.ssh.com/ssh/tunneling/example" - ], + "references": ["https://www.ssh.com/ssh/tunneling", "https://www.ssh.com/ssh/tunneling/example"], "risk_score": 50, "rule_id": "45d256ab-e665-445b-8306-2f83a8db59f8", "severity": "medium", - "tags": [ - "Elastic", - "linux" - ], - "threats": [ + "tags": ["Elastic", "linux"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -30,7 +28,7 @@ "name": "Lateral Movement", "reference": "https://attack.mitre.org/tactics/TA0008/" }, - "techniques": [ + "technique": [ { "id": "T1184", "name": "SSH Hijacking", @@ -39,7 +37,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json index 29b4ae17f3108d..b0c2b4ecd07c2a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_strace_activity.json @@ -1,27 +1,25 @@ { "description": "Strace runs in a privlieged context and can be used to escape restrictive environments by instantiating a shell in order to elevate privlieges or move laterally.", - "enabled": false, "false_positives": [ "Strace is a dual-use tool that can be used for benign or malicious activity. Some normal use of this command may originate from developers or SREs engaged in debugging or system call tracing." ], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Strace Process Activity", "query": "process.name: strace and event.action:executed", - "references": [ - "https://en.wikipedia.org/wiki/Strace" - ], + "references": ["https://en.wikipedia.org/wiki/Strace"], "risk_score": 25, "rule_id": "d6450d4e-81c6-46a3-bd94-079886318ed5", "severity": "low", - "tags": [ - "Elastic", - "linux" - ], - "to": "now", + "tags": ["Elastic", "linux"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json index 8a3b6f29bb8bff..594aee0eca708a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_tcpdump_activity.json @@ -1,12 +1,16 @@ { "description": "The Tcpdump program ran on a Linux host. Tcpdump is a network monitoring or packet 'sniffing' tool that can be used to capture insecure credentials or data in motion. Sniffing can also be used to discover details of network services as a prelude to lateral movement or defense evasion.", - "enabled": false, "false_positives": [ "Some normal use of this command may originate from server or network administrators engaged in network troubleshooting." ], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "max_signals": 33, "name": "Network Sniffing via Tcpdump", @@ -14,11 +18,8 @@ "risk_score": 25, "rule_id": "7a137d76-ce3d-48e2-947d-2747796a78c0", "severity": "low", - "tags": [ - "Elastic", - "linux" - ], - "threats": [ + "tags": ["Elastic", "linux"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -26,7 +27,7 @@ "name": "Credential Access", "reference": "https://attack.mitre.org/tactics/TA0006/" }, - "techniques": [ + "technique": [ { "id": "T1040", "name": "Network Sniffing", @@ -41,7 +42,7 @@ "name": "Discovery", "reference": "https://attack.mitre.org/tactics/TA0007/" }, - "techniques": [ + "technique": [ { "id": "T1040", "name": "Network Sniffing", @@ -50,7 +51,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_web_download.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_web_download.json index 876a3fef7aa091..311e2b57796021 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_web_download.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_web_download.json @@ -1,16 +1,20 @@ { "description": "Linux: Web Download", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Linux: Web Download", "query": "process.name: (curl or wget) and event.action:executed", "risk_score": 50, "rule_id": "e8ec93a6-49d2-4467-8c12-81c435fcc519", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json index eecd79c0bca001..a370a44d4eb46c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/linux_whoami_commmand.json @@ -1,15 +1,6 @@ { "description": "The 'whoami' command was executed on a Linux host. This is often used by tools and persistence mechanisms to test for privlieged access.", - "enabled": false, - "false_positives": [ - "Security testing tools and frameworks may run this command. Some normal use of this command may originate from automation tools and frameworks." - ], - "from": "now-6m", - "immutable": true, - "index": [ - "auditbeat-*" - ], - "interval": "5m", + "index": ["auditbeat-*"], "language": "kuery", "max_signals": 33, "name": "User Discovery via Whoami", @@ -17,11 +8,8 @@ "risk_score": 25, "rule_id": "120559c6-5e24-49f4-9e30-8ffe697df6b9", "severity": "low", - "tags": [ - "Elastic", - "linux" - ], - "threats": [ + "tags": ["Elastic", "linux"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -29,7 +17,7 @@ "name": "Discovery", "reference": "https://attack.mitre.org/tactics/TA0007/" }, - "techniques": [ + "technique": [ { "id": "T1033", "name": "System Owner/User Discovery", @@ -38,7 +26,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json index 3b080df89c3355..5c1d64e294159a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_dns_directly_to_the_internet.json @@ -1,13 +1,16 @@ { "description": "This signal detects DNS network traffic logs that indicate an internal network\nclient reaching out to infrastructure on the Internet directly to answer name\nqueries. This activity could be a default or misconfiguration. This impacts\nyour organization's ability to provide enterprise monitoring and logging of DNS\nand opens your network to a variety of abuses or malicious communications.\n", - "enabled": false, "false_positives": [ "You should apply a filter to this rule to exclude your enterprise nameservers that are expected to reach out to the Internet" ], - "filters": [], - "from": "now-6m", - "interval": "5m", - "language": "kuery", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "name": "DNS Activity to the Internet", "query": "destination.port:53 and (\n network.direction: outbound or (\n source.ip:(10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip:( 169.254.169.254/32 or 127.0.0.53/32 or 10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16 or 224.0.0.251 or ff02\\:\\:fb or 255.255.255.255 )\n )\n)\n", "references": [ @@ -17,11 +20,8 @@ "risk_score": 50, "rule_id": "6ea71ff0-9e95-475b-9506-2580d1ce6154", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -29,7 +29,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -38,7 +38,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json index e88f20e39adec4..62064db7e14433 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ftp_file_transfer_protocol_activity_to_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects events that may indicate the use of FTP network connections.\nThe File Transfer Protocol (FTP) has been around in its current form since the\n1980's. It can be an efficient and normal procedure on your network to send and\nreceive files. Because it is common and efficient, adversaries will also often\nuse this protocol to exfiltrate data from your network or download new tools.\nAdditionally, FTP is a plaintext protocol which may expose your username and\npassword, if intercepted.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "FTP (File Transfer Protocol) Activity to the Internet", "query": "network.transport: tcp and destination.port: (20 or 21) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 25, "rule_id": "87ec6396-9ac4-4706-bcf0-2ebb22002f43", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -37,7 +38,7 @@ "name": "Exfiltration", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Exfiltration Over Alternative Protocol", @@ -46,7 +47,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json index 183caff8939cd4..4590fdf39d143b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_irc_internet_relay_chat_protocol_activity_to_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects events that use common ports for IRC to the Internet. IRC\nis a common protocol that can be used chat and file transfer. This protocol\nalso makes a good candidate for remote control of malware and data transfer in\nand out of a network.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "IRC (Internet Relay Chat) Protocol Activity to the Internet", "query": "network.transport: tcp and destination.port:(6667 or 6697) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 25, "rule_id": "c6474c34-4953-447a-903e-9fcb7b6661aa", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -37,7 +38,7 @@ "name": "Exfiltration", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Exfiltration Over Alternative Protocol", @@ -46,7 +47,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json index 110d940743e94c..e74bed3463993c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_nat_traversal_port_activity.json @@ -1,9 +1,13 @@ { "description": "This signal detects events that could be describing IPSEC NAT Traversal traffic.\nIPSEC is a VPN technology that allows one system to talk to another using\nencrypted tunnels. NAT Traversal enables these tunnels to communicate over\nthe Internet where one of the sides is behind a NAT router gateway. This may\nbe common on your network, but this technique is also used by threat actors\nto avoid detection.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "IPSEC NAT Traversal Port Activity", "query": "network.transport: udp and destination.port: 4500", @@ -11,7 +15,7 @@ "rule_id": "a9cb3641-ff4b-4cdc-a063-b4b8d02a67c7", "severity": "low", "tags": ["Elastic", "network"], - "threats": [ + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -19,7 +23,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -28,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json index 6efbd2494346eb..e05e83ff0a1ee1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_26_activity.json @@ -1,9 +1,13 @@ { "description": "This signal detects events that may indicate use of SMTP on TCP port 26. This\nport is commonly used by several popular mail transfer agents to deconflict\nwith the default SMTP port 25. This port has also been used by a malware family\ncalled BadPatch for command and control of Windows systems.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "SMTP on Port 26/TCP", "query": "network.transport: tcp and destination.port: 26", @@ -14,11 +18,8 @@ "risk_score": 25, "rule_id": "d7e62693-aab9-4f66-a21a-3d79ecdd603d", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -26,7 +27,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -41,7 +42,7 @@ "name": "Exfiltration", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Exfiltration Over Alternative Protocol", @@ -50,7 +51,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity.json index 218109b73221d6..73a634a3a9f420 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity.json @@ -1,17 +1,20 @@ { "description": "Network - Port 8000 Activity", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Network - Port 8000 Activity", "query": "destination.port:8000", "risk_score": 50, "rule_id": "9c5f8092-e3f7-4eda-b9d3-56eed28fb157", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json index 96c04167dfeca1..e193ab83d89fd6 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_port_8000_activity_to_the_internet.json @@ -1,20 +1,21 @@ { "description": "TCP Port 8000 is commonly used for development environments of web server\nsoftware. It generally should not be exposed directly to the Internet. If you are\nrunning software like this on the Internet, you should consider placing it behind\na reverse proxy.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "TCP Port 8000 Activity to the Internet", "query": "network.transport: tcp and destination.port: 8000 and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 25, "rule_id": "08d5d7e2-740f-44d8-aeda-e41f4263efaf", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json index 61b10ab0f24042..7b527dbc09a44e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_pptp_point_to_point_tunneling_protocol_activity.json @@ -1,20 +1,20 @@ { "description": "This signal detects events that may indicate use of a PPTP VPN connection. Some threat actors use these types of connections to tunnel their traffic while avoiding detection.", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "PPTP (Point to Point Tunneling Protocol) Activity", "query": "network.transport: tcp and destination.port: 1723", "risk_score": 25, "rule_id": "d2053495-8fe7-4168-b3df-dad844046be3", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "to": "now", + "tags": ["Elastic", "network"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json index 60ba2d0a93b895..50f521ea91e2b3 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_proxy_port_activity_to_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects events that may describe network events of proxy use to the\nInternet. It includes popular HTTP proxy ports and SOCKS proxy ports. Typically\nenvironments will use an internal IP address for a proxy server. It can also\nbe used to circumvent network controls and detection mechanisms.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Proxy Port Activity to the Internet", "query": "network.transport: tcp and destination.port: (3128 or 8080 or 1080) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 25, "rule_id": "ad0e5e75-dd89-4875-8d0a-dfdc1828b5f3", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json index e03694be5c9a30..edd4aa456974df 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_from_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects network events that may indicate the use of RDP traffic\nfrom the Internet. RDP is commonly used by system administrators to remotely\ncontrol a system for maintenance or to use shared resources. It should almost\nnever be directly exposed to the Internet, as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "RDP (Remote Desktop Protocol) from the Internet", "query": "network.transport: tcp and destination.port: 3389 and (\n network.direction: inbound or (\n not source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n and destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "8c1bdde8-4204-45c0-9e0c-c85ca3902488", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Initial Access", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1190", "name": "Exploit Public-Facing Application", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json index bfa402624f05a3..c9f3f95ad1e070 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rdp_remote_desktop_protocol_to_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects network events that may indicate the use of RDP traffic\nto the Internet. RDP is commonly used by system administrators to remotely\ncontrol a system for maintenance or to use shared resources. It should almost\nnever be directly exposed to the Internet, as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "RDP (Remote Desktop Protocol) to the Internet", "query": "network.transport: tcp and destination.port: 3389 and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "e56993d2-759c-4120-984c-9ec9bb940fd5", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Initial Access", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1190", "name": "Exploit Public-Facing Application", @@ -37,7 +38,7 @@ "name": "Exfiltration", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Exfiltration Over Alternative Protocol", @@ -46,7 +47,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json index 5ae41db83fa582..9f5a60f1743d75 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_from_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects network events that may indicate the use of RPC traffic\nfrom the Internet. RPC is commonly used by system administrators to remotely\ncontrol a system for maintenance or to use shared resources. It should almost\nnever be directly exposed to the Internet, as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "RPC (Remote Procedure Call) from the Internet", "query": "network.transport: tcp and destination.port: 135 and (\n network.direction: inbound or (\n not source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "143cb236-0956-4f42-a706-814bcaa0cf5a", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Initial Access", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1190", "name": "Exploit Public-Facing Application", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json index 9e0b91ee16d254..b860158ef93d3d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_rpc_remote_procedure_call_to_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects network events that may indicate the use of RPC traffic\nto the Internet. RPC is commonly used by system administrators to remotely\ncontrol a system for maintenance or to use shared resources. It should almost\nnever be directly exposed to the Internet, as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "RPC (Remote Procedure Call) to the Internet", "query": "network.transport: tcp and destination.port: 135 and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "32923416-763a-4531-bb35-f33b9232ecdb", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Initial Access", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1190", "name": "Exploit Public-Facing Application", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json index e1a2b98aae4b28..fa1f1aba66e830 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smb_windows_file_sharing_activity_to_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects network events that may indicate the use of Windows\nfile sharing (also called SMB or CIFS) traffic to the Internet. SMB is commonly\nused within networks to share files, printers, and other system resources amongst\ntrusted systems. It should almost never be directly exposed to the Internet, as\nit is frequently targetted and exploited by threat actors as an initial access\nor backdoor vector or for data exfiltration.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "SMB (Windows File Sharing) Activity to the Internet", "query": "network.transport: tcp and destination.port: (139 or 445) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "c82b2bd8-d701-420c-ba43-f11a155b681a", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Initial Access", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1190", "name": "Exploit Public-Facing Application", @@ -37,7 +38,7 @@ "name": "Exfiltration", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Exfiltration Over Alternative Protocol", @@ -46,7 +47,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json index d763650243bf85..85c8b3f05166c5 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_smtp_to_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects events that may describe SMTP traffic from internal\nhosts to a host across the Internet. In an enterprise network, there is typically\na dedicate host that is internal that could perform this function. It is also\nfrequently abused by threat actors for command and control or data exfiltration.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "SMTP to the Internet", "query": "network.transport: tcp and destination.port: (25 or 465 or 587) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "67a9beba-830d-4035-bfe8-40b7e28f8ac4", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -37,7 +38,7 @@ "name": "Exfiltration", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Exfiltration Over Alternative Protocol", @@ -46,7 +47,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json index c52730658f7d29..e0998029081d35 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_sql_server_port_activity_to_the_internet.json @@ -1,20 +1,20 @@ { "description": "This signal detects events that may describe database traffic\n(MS SQL, Oracle, MySQL, and Postgresql) across the Internet. Databases\nshould almost never be directly exposed to the Internet, as they are\nfrequently targeted by threat actors to gain initial access to network resources.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "SQL Traffic to the Internet", "query": "network.transport: tcp and destination.port: (1433 or 1521 or 3336 or 5432) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 50, "rule_id": "139c7458-566a-410c-a5cd-f80238d6a5cd", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "to": "now", + "tags": ["Elastic", "network"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json index fb28fdcaca3a53..24289094915843 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_from_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects network events that may indicate the use of SSH traffic\nfrom the Internet. SSH is commonly used by system administrators to remotely\ncontrol a system using the command line shell. If it is exposed to the Internet,\nit should be done with strong security controls as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "SSH (Secure Shell) from the Internet", "query": "network.transport: tcp and destination.port:22 and (\n network.direction: inbound or (\n not source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 25, "rule_id": "ea0784f0-a4d7-4fea-ae86-4baaf27a6f17", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Initial Access", "reference": "https://attack.mitre.org/tactics/TA0001/" }, - "techniques": [ + "technique": [ { "id": "T1190", "name": "Exploit Public-Facing Application", @@ -37,7 +38,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -46,7 +47,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json index 4ac8993cae0a8c..cf77f9363f525f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_ssh_secure_shell_to_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects network events that may indicate the use of SSH traffic\nfrom the Internet. SSH is commonly used by system administrators to remotely\ncontrol a system using the command line shell. If it is exposed to the Internet,\nit should be done with strong security controls as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "SSH (Secure Shell) to the Internet", "query": "network.transport: tcp and destination.port:22 and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 25, "rule_id": "6f1500bc-62d7-4eb9-8601-7485e87da2f4", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json index 64310e378d5f14..a9a364b1b14bd7 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_telnet_port_activity.json @@ -1,20 +1,21 @@ { "description": "This signal detects network events that may indicate the use of Telnet traffic.\nTelnet is commonly used by system administrators to remotely control older or embeded\nsystems using the command line shell. It should almost never be directly exposed to\nthe Internet, as it is frequently targetted and exploited by threat actors as an\ninitial access or backdoor vector. As a plaintext protocol, it may also expose\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Telnet Port Activity", "query": "network.transport: tcp and destination.port: 23", "risk_score": 50, "rule_id": "34fde489-94b0-4500-a76f-b8a157cf9269", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Initial Access", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1190", "name": "Exploit Public-Facing Application", @@ -37,7 +38,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -46,7 +47,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json index 3bb70f8bfe6844..811a81c0e67543 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_tor_activity_to_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects network events that may indicate the use of Tor traffic\nto the Internet. Tor is a network protocol that sends traffic through a\nseries of encrypted tunnels used to conceal a user's location and usage.\nTor may be used by threat actors as an alternate communication pathway to\nconceal the actor's indentity and avoid detection.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Tor Activity to the Internet", "query": "network.transport: tcp and destination.port: (9001 or 9030) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 25, "rule_id": "7d2c38d7-ede7-4bdf-b140-445906e6c540", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json index 01519fa40c8205..d46ee76ba72b2c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_from_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects network events that may indicate the use of VNC traffic\nfrom the Internet. VNC is commonly used by system administrators to remotely\ncontrol a system for maintenance or to use shared resources. It should almost\nnever be directly exposed to the Internet, as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "VNC (Virtual Network Computing) from the Internet", "query": "network.transport: tcp and (destination.port >= 5800 and destination.port <= 5810) and (\n network.direction: inbound or (\n not source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 25, "rule_id": "5700cb81-df44-46aa-a5d7-337798f53eb8", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Initial Access", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1190", "name": "Exploit Public-Facing Application", @@ -37,7 +38,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -46,7 +47,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json index 94afe98f7807a9..d820cedc335abf 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/network_vnc_virtual_network_computing_to_the_internet.json @@ -1,20 +1,21 @@ { "description": "This signal detects network events that may indicate the use of VNC traffic\nfrom the Internet. VNC is commonly used by system administrators to remotely\ncontrol a system for maintenance or to use shared resources. It should almost\nnever be directly exposed to the Internet, as it is frequently targetted and\nexploited by threat actors as an initial access or backdoor vector.\n", - "enabled": false, - "filters": [], - "from": "now-6m", - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "VNC (Virtual Network Computing) to the Internet", "query": "network.transport: tcp and (destination.port >= 5800 and destination.port <= 5810) and (\n network.direction: outbound or (\n source.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16) and\n not destination.ip: (10.0.0.0/8 or 172.16.0.0/12 or 192.168.0.0/16)\n )\n)\n", "risk_score": 25, "rule_id": "3ad49c61-7adc-42c1-b788-732eda2f5abf", "severity": "low", - "tags": [ - "Elastic", - "network" - ], - "threats": [ + "tags": ["Elastic", "network"], + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -22,7 +23,7 @@ "name": "Command and Control", "reference": "https://attack.mitre.org/tactics/TA0011/" }, - "techniques": [ + "technique": [ { "id": "T1043", "name": "Commonly Used Port", @@ -31,7 +32,6 @@ ] } ], - "to": "now", "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json index b819e61cda7ec8..9d787d3ab738f0 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/null_user_agent.json @@ -1,9 +1,16 @@ { "description": "A request to a web application server contained no identifying user agent string.", - "enabled": false, "false_positives": [ "Some normal applications and scripts may contain no user agent. Most legitmate web requests from the Internet contain a user agent string. Requests from web browsers almost always contain a user agent string. If the source is unexpected, or the user is unauthorized, or the request is unusual, these may be suspicious or malicious activity." ], + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "filters": [ { "$state": { @@ -22,24 +29,15 @@ } } ], - "from": "now-6m", - "immutable": true, - "interval": "5m", "language": "kuery", "max_signals": 33, "name": "Web Application Suspicious Activity: No User Agent", "query": "url.path: *", - "references": [ - "https://en.wikipedia.org/wiki/User_agent" - ], + "references": ["https://en.wikipedia.org/wiki/User_agent"], "risk_score": 50, "rule_id": "43303fd4-4839-4e48-b2b2-803ab060758d", "severity": "low", - "tags": [ - "Elastic", - "apm" - ], - "to": "now", + "tags": ["Elastic", "apm"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json index cb9413b9c108ee..c92b8019958373 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/sqlmap_user_agent.json @@ -1,27 +1,24 @@ { "description": "This is an example of how to detect an unwanted web client user agent. This search matches the user agent for sqlmap 1.3.11 which is a popular FOSS tool for testing web applications for SQL injection vulnerabilities. ", - "enabled": false, "false_positives": [ "This signal does not indicate that a SQL injection attack occured, only that the sqlmap tool was used. Security scans and tests may result in these errors. If the source is not an authorized security tester, this is generally suspicious or malicious activity." ], - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Web Application Suspicious Activity: sqlmap User Agent", "query": "user_agent.original:\"sqlmap/1.3.11#stable (http://sqlmap.org)\"", - "references": [ - "http://sqlmap.org/" - ], + "references": ["http://sqlmap.org/"], "risk_score": 50, "rule_id": "d49cc73f-7a16-4def-89ce-9fc7127d7820", "severity": "low", - "tags": [ - "Elastic", - "apm" - ], - "to": "now", + "tags": ["Elastic", "apm"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_background_intelligent_transfer_service_bits_connecting_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_background_intelligent_transfer_service_bits_connecting_to_the_internet.json index 301954fc587452..91abe1368b0118 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_background_intelligent_transfer_service_bits_connecting_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_background_intelligent_transfer_service_bits_connecting_to_the_internet.json @@ -1,17 +1,20 @@ { "description": "Windows: Background Intelligent Transfer Service (BITS) Connecting to the Internet", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows: Background Intelligent Transfer Service (BITS) Connecting to the Internet", "query": "process.name:bitsadmin.exe and event.action:\"Network connection detected (rule: NetworkConnect)\" and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", "risk_score": 50, "rule_id": "7edadee3-98ae-472c-b1c4-8c0a2c4877cc", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_burp_ce_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_burp_ce_activity.json index 22429df353679c..f3e62405d6e189 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_burp_ce_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_burp_ce_activity.json @@ -1,17 +1,20 @@ { "description": "Windows Burp CE activity", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Burp CE activity", "query": "process.name:BurpSuiteCommunity.exe", "risk_score": 50, "rule_id": "0f09845b-2ec8-4770-8155-7df3d4e402cc", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_connecting_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_connecting_to_the_internet.json index 6cf9a375586bae..451a1ad4942dea 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_connecting_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_certutil_connecting_to_the_internet.json @@ -1,17 +1,20 @@ { "description": "Windows: Certutil Connecting to the Internet", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows: Certutil Connecting to the Internet", "query": "process.name:certutil.exe and event.action:\"Network connection detected (rule: NetworkConnect)\" and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", "risk_score": 50, "rule_id": "1a2cf526-6784-4c51-a2b9-f0adcc05d85c", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json index c404bf7a05c85e..6a2a9213a94a96 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_prompt_connecting_to_the_internet.json @@ -1,17 +1,20 @@ { "description": "Windows: Command Prompt Connecting to the Internet", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows: Command Prompt Connecting to the Internet", "query": "process.name:cmd.exe and event.action:\"Network connection detected (rule: NetworkConnect)\" and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", "risk_score": 50, "rule_id": "89f9a4b0-9f8f-4ee0-8823-c4751a6d6696", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_internet_explorer.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_internet_explorer.json index 1bcad8ae016ef8..92edd71a665dd7 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_internet_explorer.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_internet_explorer.json @@ -1,16 +1,20 @@ { "description": "Command shell started by Internet Explorer", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Command shell started by Internet Explorer", "query": "process.parent.name:iexplore.exe and process.name:cmd.exe", "risk_score": 50, "rule_id": "7a6e1e81-deae-4cf6-b807-9a768fff3c06", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json index faa9694f658ff0..663b2485fab936 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_powershell.json @@ -1,16 +1,20 @@ { "description": "Command shell started by Powershell", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Command shell started by Powershell", "query": "process.parent.name:powershell.exe and process.name:cmd.exe", "risk_score": 50, "rule_id": "0f616aee-8161-4120-857e-742366f5eeb3", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json index aa371fea3f01d2..73ab27a131e3d3 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_command_shell_started_by_svchost.json @@ -1,16 +1,20 @@ { "description": "Command shell started by Svchost", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Command shell started by Svchost", "query": "process.parent.name:svchost.exe and process.name:cmd.exe", "risk_score": 50, "rule_id": "fd7a6052-58fa-4397-93c3-4795249ccfa2", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_commands.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_commands.json index dec76deb3e8880..9516b804125821 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_commands.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_commands.json @@ -1,17 +1,20 @@ { "description": "Windows Credential Dumping Commands", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Credential Dumping Commands", "query": "event.code: 1 and process.args:*Invoke-Mimikatz-DumpCreds* or process.args:*gsecdump* or process.args:*wce* or (process.args:*procdump* and process.args:*lsass*) or (process.args:*ntdsutil* and process.args:*ntds*ifm*create*)", "risk_score": 50, "rule_id": "66885745-ea38-432c-9edb-599b943948d4", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_via_imageload.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_via_imageload.json index de3fc49fefa374..06a9de8f20720a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_via_imageload.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_via_imageload.json @@ -1,17 +1,20 @@ { "description": "Windows Credential Dumping via ImageLoad", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Credential Dumping via ImageLoad", "query": "event.code:7 and not process.name:Sysmon.exe and not process.name:Sysmon64.exe and not process.name:svchost.exe and not process.name:logonui.exe and (file.path:*samlib.dll* or file.path:*WinSCard.dll* or file.path:*cryptdll.dll* or file.path:*hid.dll* or file.path:*vaultcli.dll*)", "risk_score": 50, "rule_id": "f872647c-d070-4b1c-afcc-055f081d9205", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_via_registry_save.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_via_registry_save.json index 016f49e22a8f8f..a19646d2f83cf0 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_via_registry_save.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_credential_dumping_via_registry_save.json @@ -1,17 +1,20 @@ { "description": "Windows Credential Dumping via Registry Save", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Credential Dumping via Registry Save", "query": "event.code: 1 and process.name:reg.exe and process.args:*save* and (process.args:*sam* or process.args:*system*)", "risk_score": 50, "rule_id": "9f6fb56f-4bbd-404e-b955-49dfba7c0e68", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_data_compression_using_powershell.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_data_compression_using_powershell.json index cf1334eda67781..9be27cbec023fa 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_data_compression_using_powershell.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_data_compression_using_powershell.json @@ -1,17 +1,20 @@ { "description": "Windows Data Compression Using Powershell", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Data Compression Using Powershell", "query": "event.code: 1 and process.name:powershell.exe and (process.args:*Recurse* and process.args:*Compress-Archive*)", "risk_score": 50, "rule_id": "bc913943-e1f9-4bf5-a593-caca7c2eb0c3", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_decoding_using_certutil.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_decoding_using_certutil.json index f718e5effe8ae1..a4126a9b45ec9b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_decoding_using_certutil.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_decoding_using_certutil.json @@ -1,17 +1,20 @@ { "description": "Windows Defense Evasion - Decoding Using Certutil", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Defense Evasion - Decoding Using Certutil", "query": "event.code:1 and process.name:attrib.exe and (process.args:*+h* or process.args:*+s*)", "risk_score": 50, "rule_id": "d9642bf2-87d0-45c2-8781-2bd2017cdbb8", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_or_persistence_via_hidden_files.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_or_persistence_via_hidden_files.json index 844a3fc2ac9ec2..edba96cbcc37b0 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_or_persistence_via_hidden_files.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_or_persistence_via_hidden_files.json @@ -1,17 +1,20 @@ { "description": "Windows Defense Evasion or Persistence via Hidden Files", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Defense Evasion or Persistence via Hidden Files", "query": "event.code:1 and process.name:attrib.exe and (process.args:\"+h\" or process.args:\"+s\")", "risk_score": 50, "rule_id": "340a0063-baba-447b-8396-26a5cc1eb684", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json index b98b0e3f8d0aa1..56c2a3ecd7eaff 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_filter_manager.json @@ -1,17 +1,20 @@ { "description": "Windows Defense evasion via Filter Manager", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Defense evasion via Filter Manager", "query": "event.code:1 and process.name:fltmc.exe", "risk_score": 50, "rule_id": "06dceabf-adca-48af-ac79-ffdf4c3b1e9a", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_windows_event_log_tools.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_windows_event_log_tools.json index 2d37fedd30480d..2f25c7282a87d1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_windows_event_log_tools.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_defense_evasion_via_windows_event_log_tools.json @@ -1,17 +1,20 @@ { "description": "Windows Defense Evasion via Windows Event Log Tools", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Defense Evasion via Windows Event Log Tools", "query": "event.code:1 and process.name:wevtutil.exe", "risk_score": 50, "rule_id": "07979a67-ab4d-460f-9ff3-bf1352de6762", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json index 027556b7f24569..079d33bf0f676b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_compiled_html_file.json @@ -1,17 +1,20 @@ { "description": "Windows Execution via Compiled HTML File", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Execution via Compiled HTML File", "query": "event.code:1 and process.name:hh.exe", "risk_score": 50, "rule_id": "e3343ab9-4245-4715-b344-e11c56b0a47f", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_connection_manager.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_connection_manager.json index 30d2f4e3c89360..9c8a4f4b47dce1 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_connection_manager.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_connection_manager.json @@ -1,17 +1,20 @@ { "description": "Windows Execution via Connection Manager", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Execution via Connection Manager", "query": "event.code:1 and process.parent.name:pcalua.exe or (process.name:bash.exe or process.name:forfiles.exe or process.name:pcalua.exe)", "risk_score": 50, "rule_id": "f2728299-167a-489c-913c-2e0955ac3c40", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_microsoft_html_application_hta.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_microsoft_html_application_hta.json index aa67d2aebe64bb..d986ccbb865f8f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_microsoft_html_application_hta.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_microsoft_html_application_hta.json @@ -1,17 +1,20 @@ { "description": "Windows Execution via Microsoft HTML Application (HTA)", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Execution via Microsoft HTML Application (HTA)", "query": "event.code:1 and (process.parent.args:*mshta* or process.args:*mshta*)", "risk_score": 50, "rule_id": "b007cc82-c522-48d1-b7a7-53f63c50c494", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json index 20e0eba610e957..26e99cbb59e484 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_net_com_assemblies.json @@ -1,17 +1,20 @@ { "description": "Windows Execution via .NET COM Assemblies", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Execution via .NET COM Assemblies", "query": "event.code:1 and (process.name:regasm.exe or process.name:regsvcs.exe)", "risk_score": 50, "rule_id": "5c12412f-602c-4120-8c4f-69d723dbba04", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_regsvr32.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_regsvr32.json index 9371ec67fcec5c..06d4a075c4e6b5 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_regsvr32.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_regsvr32.json @@ -1,17 +1,20 @@ { "description": "Windows Execution via Regsvr32", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Execution via Regsvr32", "query": "event.code: 1 and scrobj.dll and (process.name:certutil.exe or process.name:regsvr32.exe or process.name:rundll32.exe)", "risk_score": 50, "rule_id": "b7333d08-be4b-4cb4-b81e-924ae37b3143", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json index 3153c0d38d2fd6..bc3ebf38181a0d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_execution_via_trusted_developer_utilities.json @@ -1,17 +1,20 @@ { "description": "Windows Execution via Trusted Developer Utilities", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Execution via Trusted Developer Utilities", "query": "event.code:1 and (process.name:MSBuild.exe or process.name:msxsl.exe)", "risk_score": 50, "rule_id": "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae1", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json index 4e39ab96840dff..cec9fe4a4aebe8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_html_help_executable_program_connecting_to_the_internet.json @@ -1,17 +1,20 @@ { "description": "Windows: HTML Help executable Program Connecting to the Internet", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows: HTML Help executable Program Connecting to the Internet", "query": "process.name:hh.exe and event.action:\"Network connection detected (rule: NetworkConnect)\" and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", "risk_score": 50, "rule_id": "b29ee2be-bf99-446c-ab1a-2dc0183394b8", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_image_load_from_a_temp_directory.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_image_load_from_a_temp_directory.json index d00f671c7b606f..3e80b58377af64 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_image_load_from_a_temp_directory.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_image_load_from_a_temp_directory.json @@ -1,6 +1,13 @@ { "description": "Windows image load from a temp directory", - "enabled": false, + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "filters": [ { "$state": { @@ -28,16 +35,13 @@ } } ], - "from": "now-6m", - "immutable": true, - "interval": "5m", "language": "kuery", "name": "Windows image load from a temp directory", "query": "file.path:Temp", "risk_score": 50, "rule_id": "f23e4cc7-6825-4a28-b27a-e67437a9a806", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_indirect_command_execution.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_indirect_command_execution.json index cbde84a5fc8580..a7f22358a11d9e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_indirect_command_execution.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_indirect_command_execution.json @@ -1,17 +1,20 @@ { "description": "Windows Indirect Command Execution", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Indirect Command Execution", "query": "event.code:1 and process.parent.name:pcalua.exe or (process.name:bash.exe or process.name:forfiles.exe or process.name:pcalua.exe)", "risk_score": 50, "rule_id": "ff969842-c573-4e69-8e12-02fb303290f2", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_iodine_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_iodine_activity.json index e60c57ebc489a3..8aae9dc83a1cd2 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_iodine_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_iodine_activity.json @@ -1,17 +1,20 @@ { "description": "Windows Iodine activity", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Iodine activity", "query": "event.code: 1 and process.name:iodine.exe or process.name:iodined.exe", "risk_score": 50, "rule_id": "fcbbf0b2-99c5-4c7f-8411-dc9ee392e43f", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_management_instrumentation_wmi_execution.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_management_instrumentation_wmi_execution.json index 378b23825dc820..da525a85732645 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_management_instrumentation_wmi_execution.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_management_instrumentation_wmi_execution.json @@ -1,17 +1,20 @@ { "description": "Windows Management Instrumentation (WMI) Execution", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Management Instrumentation (WMI) Execution", "query": "event.code:1 and (process.parent.args:*wmiprvse.exe* or process.name:wmic.exe or process.args:*wmic* )", "risk_score": 50, "rule_id": "cec5eb81-6e01-40e5-a1bf-bf175cce4eb4", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_microsoft_html_application_hta_connecting_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_microsoft_html_application_hta_connecting_to_the_internet.json index 8b5dffeec67af4..2f7a8dbee7c80d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_microsoft_html_application_hta_connecting_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_microsoft_html_application_hta_connecting_to_the_internet.json @@ -1,17 +1,20 @@ { "description": "Windows: Microsoft HTML Application (HTA) Connecting to the Internet", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows: Microsoft HTML Application (HTA) Connecting to the Internet", "query": "process.name:mshta.exe and event.action:\"Network connection detected (rule: NetworkConnect)\" and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", "risk_score": 50, "rule_id": "b084514b-e8ba-4bc4-bc2b-50fe145a4215", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_mimikatz_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_mimikatz_activity.json index 1016d2c7af5f24..64641bb539cb90 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_mimikatz_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_mimikatz_activity.json @@ -1,16 +1,20 @@ { "description": "Windows Mimikatz activity", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Mimikatz activity", "query": "event.code: 1 and process.name:mimikatz.exe", "risk_score": 50, "rule_id": "5346463d-062f-419d-88ff-7a5e97875210", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json index e6d606384d4548..bb08cd4023e6af 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_misc_lolbin_connecting_to_the_internet.json @@ -1,17 +1,20 @@ { "description": "Windows: Misc LOLBin Connecting to the Internet", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows: Misc LOLBin Connecting to the Internet", "query": "(process.name:expand.exe or process.name:extrac.exe or process.name:ieexec.exe or process.name:makecab.exe) and event.action:\"Network connection detected (rule: NetworkConnect)\" and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", "risk_score": 50, "rule_id": "63e65ec3-43b1-45b0-8f2d-45b34291dc44", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_activity_by_the_system_account.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_activity_by_the_system_account.json index f8689bb314857e..fce37db4fae3d6 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_activity_by_the_system_account.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_command_activity_by_the_system_account.json @@ -1,16 +1,20 @@ { "description": "Windows net command activity by the SYSTEM account", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows net command activity by the SYSTEM account", "query": "process.name: (net.exe or net1.exe) and user.name:SYSTEM", "risk_score": 50, "rule_id": "c3f5dc81-a8b4-4144-95a7-d0a818d7355d", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_user_command_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_user_command_activity.json index 6b895f30fd5c4e..555bb4afb0c10f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_user_command_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_net_user_command_activity.json @@ -1,16 +1,20 @@ { "description": "Windows net user command activity", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows net user command activity", "query": "process.name:net.exe and process.args:user and event.code:1", "risk_score": 50, "rule_id": "b039a69d-7fba-4c84-8029-57ac12548a15", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_netcat_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_netcat_activity.json index 8b105514ec798b..288bc6dd2375b8 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_netcat_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_netcat_activity.json @@ -1,16 +1,20 @@ { "description": "Windows Netcat activity", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Netcat activity", "query": "process.name:ncat.exe and event.code:1", "risk_score": 50, "rule_id": "e2437364-0c89-4e65-a34b-782cfbb7690b", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_netcat_network_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_netcat_network_activity.json index c16c91d9637e56..a533cd36ffdcf2 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_netcat_network_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_netcat_network_activity.json @@ -1,16 +1,20 @@ { "description": "Windows Netcat network activity", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Netcat network activity", "query": "process.name:ncat.exe and event.action:\"Network connection detected (rule: NetworkConnect)\"", "risk_score": 50, "rule_id": "ebdc4b6f-7fdb-4c21-bbd6-59e1ed11024a", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_network_anomalous_windows_process_using_https_ports.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_network_anomalous_windows_process_using_https_ports.json index a22b12d242414a..173e5191d9e656 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_network_anomalous_windows_process_using_https_ports.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_network_anomalous_windows_process_using_https_ports.json @@ -1,17 +1,20 @@ { "description": "Windows Network - Anomalous Windows Process Using HTTP/S Ports", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Network - Anomalous Windows Process Using HTTP/S Ports", "query": "(destination.port:443 or destination.port:80) and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16 and not process.name:chrome.exe and not process.name:explorer.exe and not process.name:filebeat.exe and not process.name:firefox.exe and not process.name:iexplore.exe and not process.name:jusched.exe and not process.name:MpCmdRun.exe and not process.name:MpSigStub.exe and not process.name:msfeedssync.exe and not process.name:packetbeat.exe and not process.name:powershell.exe and not process.name:procexp64.exe and not process.name:svchost.exe and not process.name:taskhostw.exe and not process.name:winlogbeat.exe", "risk_score": 50, "rule_id": "b486fa9e-e6c7-44a1-b07d-7d5f07f21ce1", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_nmap_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_nmap_activity.json index a0c3b5be64d1c3..dc231e5edce1ea 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_nmap_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_nmap_activity.json @@ -1,16 +1,20 @@ { "description": "Windows nmap activity", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows nmap activity", "query": "process.name:nmap.exe and event.code:1", "risk_score": 50, "rule_id": "5a4b2a98-31a6-4852-b224-d63aeb9e172d", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_nmap_scan_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_nmap_scan_activity.json index 0195367b6f7125..ccd49169e64976 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_nmap_scan_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_nmap_scan_activity.json @@ -1,16 +1,20 @@ { "description": "Windows nmap scan activity", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows nmap scan activity", "query": "process.name:nmap.exe and event.action:\"Network connection detected (rule: NetworkConnect)\"", "risk_score": 50, "rule_id": "54413985-a3da-4f45-b238-75afb65a1bae", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_payload_obfuscation_via_certutil.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_payload_obfuscation_via_certutil.json index 421cadfa8a63d7..f7a331ca014744 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_payload_obfuscation_via_certutil.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_payload_obfuscation_via_certutil.json @@ -1,17 +1,20 @@ { "description": "Windows Payload Obfuscation via Certutil", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Payload Obfuscation via Certutil", "query": "event.code:1 and process.name:certutil.exe and (process.args:*encode* or process.args:*ToBase64String*)", "risk_score": 50, "rule_id": "ce7c270c-c69b-47dd-8c21-60a35e92f372", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_or_priv_escalation_via_hooking.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_or_priv_escalation_via_hooking.json index 47de4ba9ff6e74..379cab0f07438d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_or_priv_escalation_via_hooking.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_or_priv_escalation_via_hooking.json @@ -1,17 +1,20 @@ { "description": "Windows Persistence or Priv Escalation via Hooking", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Persistence or Priv Escalation via Hooking", "query": "event.code:1 and process.name:mavinject.exe and processs.args:*INJECTRUNNING*", "risk_score": 50, "rule_id": "015f070d-cf70-437c-99d1-472e31d36b03", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json index c6e558a3be2607..ca5daf772a22e9 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_application_shimming.json @@ -1,17 +1,20 @@ { "description": "Windows Persistence via Application Shimming", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Persistence via Application Shimming", "query": "event.code:1 and process.name:sdbinst.exe", "risk_score": 50, "rule_id": "fd4a992d-6130-4802-9ff8-829b89ae801f", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_bits_jobs.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_bits_jobs.json index b6d97628f98ec5..4c6515f33fad06 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_bits_jobs.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_bits_jobs.json @@ -1,17 +1,20 @@ { "description": "Windows Persistence via BITS Jobs", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Persistence via BITS Jobs", "query": "event.code:1 and (process.name:bitsadmin.exe or process.args:*Start-BitsTransfer*)", "risk_score": 50, "rule_id": "7904fb20-172c-43fb-83e4-bfe27e3c702c", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_modification_of_existing_service.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_modification_of_existing_service.json index 782ce7a6eec92b..01b56a1ecd1e03 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_modification_of_existing_service.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_modification_of_existing_service.json @@ -1,17 +1,20 @@ { "description": "Windows Persistence via Modification of Existing Service", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Persistence via Modification of Existing Service", "query": "event.code:1 and process.args:*sc*config*binpath* and (process.name:cmd.exe or process.name:powershell.exe or process.name:sc.exe)", "risk_score": 50, "rule_id": "3bb04809-84ab-4487-bd99-ccc58675bd40", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_netshell_helper_dll.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_netshell_helper_dll.json index 19e6ac51158eb3..50b31aa7033eb6 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_netshell_helper_dll.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_persistence_via_netshell_helper_dll.json @@ -1,17 +1,20 @@ { "description": "Windows Persistence via Netshell Helper DLL", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Persistence via Netshell Helper DLL", "query": "event.code:1 and process.name:netsh.exe and process.args:*helper*", "risk_score": 50, "rule_id": "d7c2561d-2758-46ad-b5a9-247efb9eea21", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_powershell_connecting_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_powershell_connecting_to_the_internet.json index 50e3d6e0f38747..5198f85b999ac9 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_powershell_connecting_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_powershell_connecting_to_the_internet.json @@ -1,17 +1,20 @@ { "description": "Windows: Powershell Connecting to the Internet", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows: Powershell Connecting to the Internet", "query": "process.name:powershell.exe and event.action:\"Network connection detected (rule: NetworkConnect)\" and not destination.ip:169.254.169.254/32 and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", "risk_score": 50, "rule_id": "a8cfa646-e4d8-48b5-884e-6204ba77fc8d", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json index 96faa2a88e3a63..f24460373f55d3 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_priv_escalation_via_accessibility_features.json @@ -1,17 +1,20 @@ { "description": "Windows Priv Escalation via Accessibility Features", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Priv Escalation via Accessibility Features", "query": "event.code:1 and process.parent.name:winlogon.exe and (process.name:atbroker.exe or process.name:displayswitch.exe or process.name:magnify.exe or process.name:narrator.exe or process.name:osk.exe or process.name:sethc.exe or process.name:utilman.exe)", "risk_score": 50, "rule_id": "7405ddf1-6c8e-41ce-818f-48bea6bcaed8", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json index 572a9ede23e2af..fd2bfcf216bf35 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_discovery_via_tasklist_command.json @@ -1,17 +1,20 @@ { "description": "Windows Process Discovery via Tasklist Command", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Process Discovery via Tasklist Command", "query": "event.code:1 and process.name:tasklist.exe", "risk_score": 50, "rule_id": "cc16f774-59f9-462d-8b98-d27ccd4519ec", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_execution_via_wmi.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_execution_via_wmi.json index 9e29c82e48872e..1e14de81b7cb28 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_execution_via_wmi.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_execution_via_wmi.json @@ -1,17 +1,20 @@ { "description": "Process Execution via WMI", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Process Execution via WMI", "query": "process.name:scrcons.exe", "risk_score": 50, "rule_id": "7e6cd4b9-6346-4683-b3e6-6a3e66f3208f", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_started_by_acrobat_reader_possible_payload.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_started_by_acrobat_reader_possible_payload.json index e96c223765cbdb..973a7df57f712a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_started_by_acrobat_reader_possible_payload.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_started_by_acrobat_reader_possible_payload.json @@ -1,16 +1,20 @@ { "description": "Process started by Acrobat reader - possible payload", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Process started by Acrobat reader - possible payload", "query": "process.parent.name:AcroRd32.exe and event.code:1", "risk_score": 50, "rule_id": "b6422896-b6e3-45c3-9d9e-4eccb2a25270", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_started_by_ms_office_program_possible_payload.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_started_by_ms_office_program_possible_payload.json index c2e185cd0c7ebf..cb7b234c21f8ce 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_started_by_ms_office_program_possible_payload.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_started_by_ms_office_program_possible_payload.json @@ -1,16 +1,20 @@ { "description": "Process started by MS Office program - possible payload", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Process started by MS Office program - possible payload", "query": "process.parent.name:EXCEL.EXE or process.parent.name:MSPUB.EXE or process.parent.name:OUTLOOK.EXE or process.parent.name:POWERPNT.EXE or process.parent.name:VISIO.EXE or process.parent.name:WINWORD.EXE and event.code:1", "risk_score": 50, "rule_id": "838dcec6-ce9a-4cdd-9ca8-f6512cf6d559", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_started_by_the_java_runtime.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_started_by_the_java_runtime.json index 6902807cb51d11..c684be0732064e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_started_by_the_java_runtime.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_process_started_by_the_java_runtime.json @@ -1,16 +1,20 @@ { "description": "Windows process started by the Java runtime", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows process started by the Java runtime", "query": "process.parent.name:javaw.exe and event.code:1", "risk_score": 50, "rule_id": "159168a1-b1d0-4e5c-ad72-c1e9ae2edec2", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_psexec_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_psexec_activity.json index 280f061ed7785e..e4c91b6f89cd43 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_psexec_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_psexec_activity.json @@ -1,17 +1,20 @@ { "description": "PSexec activity", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "PSexec activity", "query": "process.name:PsExec.exe or process.name:PsExec64.exe", "risk_score": 50, "rule_id": "3e61ab8b-0f39-4d2e-ab64-332f0d0b3ad7", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json index 563553a24a3e7b..a106eda988e943 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_register_server_program_connecting_to_the_internet.json @@ -1,17 +1,20 @@ { "description": "Windows: Register Server Program Connecting to the Internet", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows: Register Server Program Connecting to the Internet", "query": "(process.name:regsvr32.exe or process.name:regsvr64.exe) and event.action:\"Network connection detected (rule: NetworkConnect)\" and not destination.ip:169.254.169.254/32 and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", "risk_score": 50, "rule_id": "fb02b8d3-71ee-4af1-bacd-215d23f17efa", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_registry_query_local.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_registry_query_local.json index d9bc00cfbd3367..49642d271d4eaa 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_registry_query_local.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_registry_query_local.json @@ -1,17 +1,20 @@ { "description": "Windows Registry Query, Local", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Registry Query, Local", "query": "event.code: 1 and process.name:reg.exe and process.args:*query* and process.args:*reg*", "risk_score": 50, "rule_id": "b9074c74-6d23-4b07-927e-cc18b318a088", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_registry_query_network.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_registry_query_network.json index ddf8ff569e35f7..884deb7645a67e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_registry_query_network.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_registry_query_network.json @@ -1,17 +1,20 @@ { "description": "Windows Registry Query, Network", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Registry Query, Network", "query": "event.code: 1 and process.name:reg.exe and process.args:*query* and process.args:*reg*", "risk_score": 50, "rule_id": "f5412e37-981e-4d37-a1b2-eddaf797445a", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_remote_management_execution.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_remote_management_execution.json index 0e67b777ac6dc5..08d96ad741502a 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_remote_management_execution.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_remote_management_execution.json @@ -1,17 +1,20 @@ { "description": "Windows Remote Management Execution", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Remote Management Execution", "query": "(process.name:wsmprovhost.exe or process.name:winrm.cmd) and (process.args:*Enable-PSRemoting -Force* or process.args:*Invoke-Command -computer_name* or process.args:*wmic*node*process call create*)", "risk_score": 50, "rule_id": "ced66221-3e07-40ee-8588-5f107e7d50d8", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_scheduled_task_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_scheduled_task_activity.json index 58fd2df8f15ef1..56f5b71ceb510b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_scheduled_task_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_scheduled_task_activity.json @@ -1,17 +1,20 @@ { "description": "Windows Scheduled Task Activity", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Scheduled Task Activity", "query": "event.code:1 and (process.name:schtasks.exe or process.name:taskeng.exe) or (event.code:1 and process.name:svchost.exe and not process.parent.executable: \"C:\\Windows\\System32\\services.exe\" )", "risk_score": 50, "rule_id": "a1abd54d-3021-4f21-b2d1-0c6bc5c4051f", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_script_interpreter_connecting_to_the_internet.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_script_interpreter_connecting_to_the_internet.json index 41559425538ab2..a700ac0a48bc21 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_script_interpreter_connecting_to_the_internet.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_script_interpreter_connecting_to_the_internet.json @@ -1,17 +1,20 @@ { "description": "Windows: Script Interpreter Connecting to the Internet", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows: Script Interpreter Connecting to the Internet", "query": "(process.name:cscript.exe or process.name:wscript.exe) and event.action:\"Network connection detected (rule: NetworkConnect)\" and not destination.ip:10.0.0.0/8 and not destination.ip:172.16.0.0/12 and not destination.ip:192.168.0.0/16", "risk_score": 50, "rule_id": "2cc4597c-b0c9-4481-b1a6-e6c05cfc9f02", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution.json index 64185c784e0282..1dc62c7b5db42f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution.json @@ -1,17 +1,20 @@ { "description": "Windows Signed Binary Proxy Execution", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Signed Binary Proxy Execution", "query": "event.code:1 and http and (process.name:certutil.exe or process.name:msiexec.exe)", "risk_score": 50, "rule_id": "7edb573f-1f9b-4161-8c19-c7c383bb17f2", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution_download.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution_download.json index b1146f07612f67..717d99ee7901cc 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution_download.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_signed_binary_proxy_execution_download.json @@ -1,17 +1,20 @@ { "description": "Windows Signed Binary Proxy Execution Download", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Signed Binary Proxy Execution Download", "query": " event.code:3 and http and (process.name:certutil.exe or process.name:replace.exe)", "risk_score": 50, "rule_id": "68ecc190-cce2-4021-b976-c7c846ac0a00", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_process_started_by_a_script.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_process_started_by_a_script.json index c5a7db434ac386..82733cbb6b21c5 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_process_started_by_a_script.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_suspicious_process_started_by_a_script.json @@ -1,16 +1,20 @@ { "description": "Suspicious process started by a script", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Suspicious process started by a script", "query": "(process.parent.name:cmd.exe or process.parent.name:cscript.exe or process.parent.name:mshta.exe or process.parent.name:powershell.exe or process.parent.name:rundll32.exe or process.parent.name:wscript.exe or process.parent.name:wmiprvse.exe) and (process.name:bitsadmin.exe or process.name:certutil.exe or mshta.exe or process.name:nslookup.exe or process.name:schtasks.exe) and event.code:1", "risk_score": 50, "rule_id": "89db767d-99f9-479f-8052-9205fd3090c4", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json index b13a20518893cf..768cd65c5e4f53 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_whoami_command_activity.json @@ -1,16 +1,20 @@ { "description": "Windows whoami command activity", - "enabled": false, - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows whoami command activity", "query": "process.name:whoami.exe and event.code:1", "risk_score": 50, "rule_id": "ef862985-3f13-4262-a686-5f357bbb9bc2", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_windump_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_windump_activity.json index 8fc548b694b02b..4f33e95cfe2e99 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_windump_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_windump_activity.json @@ -1,17 +1,20 @@ { "description": "WinDump activity", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "WinDump activity", "query": "process.name:WinDump.exe", "risk_score": 50, "rule_id": "a342cfcb-8420-46a4-8d85-53edc631e0d6", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_wireshark_activity.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_wireshark_activity.json index 30ee18fe53557b..72db4aed03c88e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_wireshark_activity.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules/windows_wireshark_activity.json @@ -1,17 +1,20 @@ { "description": "Windows Wireshark activity", - "enabled": false, - "filters": [], - "from": "now-6m", - "immutable": true, - "interval": "5m", + "index": [ + "apm-*-transaction*", + "auditbeat-*", + "endgame-*", + "filebeat-*", + "packetbeat-*", + "winlogbeat-*" + ], "language": "kuery", "name": "Windows Wireshark activity", "query": "process.name:wireshark.exe", "risk_score": 50, "rule_id": "9af965ed-d501-4541-97f6-5f8d2a39737b", "severity": "low", - "to": "now", + "tags": ["Elastic"], "type": "query", "version": 1 } diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts index 0120a90df58aee..a169e5107c316c 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_prepacked_rules.ts @@ -38,7 +38,7 @@ export const updatePrepackagedRules = async ( tags, to, type, - threats, + threat, references, version, } = rule; @@ -70,7 +70,7 @@ export const updatePrepackagedRules = async ( tags, to, type, - threats, + threat, references, version, }); diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.ts index c4d78e83eebd60..e37e899c7de51d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/rules/update_rules.ts @@ -103,7 +103,7 @@ export const updateRules = async ({ name, severity, tags, - threats, + threat, to, type, references, @@ -133,7 +133,7 @@ export const updateRules = async ({ name, severity, tags, - threats, + threat, to, type, references, @@ -161,7 +161,7 @@ export const updateRules = async ({ maxSignals, riskScore, severity, - threats, + threat, to, type, updatedAt: new Date().toISOString(), diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson index 4c45ac7a1b38b8..e395916363ab6b 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/import/multiple_ruleid_queries.ndjson @@ -1,3 +1,3 @@ -{"created_at":"2020-01-09T01:38:00.740Z","updated_at":"2020-01-09T01:38:00.740Z","created_by":"elastic_kibana","description":"Query with a rule_id that acts like an external id","enabled":true,"false_positives":[],"from":"now-6m","id":"6688f367-1aa2-4895-a5a8-b3701eecf57d","immutable":false,"interval":"5m","rule_id":"query-rule-id-1","language":"kuery","output_index":".siem-signals-frank-default","max_signals":100,"risk_score":1,"name":"Query with a rule id Number 1","query":"user.name: root or user.name: admin","references":[],"severity":"high","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threats":[],"version":1} -{"created_at":"2020-01-09T01:38:00.745Z","updated_at":"2020-01-09T01:38:00.745Z","created_by":"elastic_kibana","description":"Query with a rule_id that acts like an external id","enabled":true,"false_positives":[],"from":"now-6m","id":"7a912444-6cfa-4c8f-83f4-2b26fb2a2ed9","immutable":false,"interval":"5m","rule_id":"query-rule-id-2","language":"kuery","output_index":".siem-signals-frank-default","max_signals":100,"risk_score":2,"name":"Query with a rule id Number 2","query":"user.name: root or user.name: admin","references":[],"severity":"low","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threats":[],"version":1} +{"created_at":"2020-01-09T01:38:00.740Z","updated_at":"2020-01-09T01:38:00.740Z","created_by":"elastic_kibana","description":"Query with a rule_id that acts like an external id","enabled":true,"false_positives":[],"from":"now-6m","id":"6688f367-1aa2-4895-a5a8-b3701eecf57d","immutable":false,"interval":"5m","rule_id":"query-rule-id-1","language":"kuery","output_index":".siem-signals-frank-default","max_signals":100,"risk_score":1,"name":"Query with a rule id Number 1","query":"user.name: root or user.name: admin","references":[],"severity":"high","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threat":[],"version":1} +{"created_at":"2020-01-09T01:38:00.745Z","updated_at":"2020-01-09T01:38:00.745Z","created_by":"elastic_kibana","description":"Query with a rule_id that acts like an external id","enabled":true,"false_positives":[],"from":"now-6m","id":"7a912444-6cfa-4c8f-83f4-2b26fb2a2ed9","immutable":false,"interval":"5m","rule_id":"query-rule-id-2","language":"kuery","output_index":".siem-signals-frank-default","max_signals":100,"risk_score":2,"name":"Query with a rule id Number 2","query":"user.name: root or user.name: admin","references":[],"severity":"low","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threat":[],"version":1} {"exported_count":2,"missing_rules":[],"missing_rules_count":0} diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json index f728e3b9882064..fec582ce772955 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_mitre_attack.json @@ -1,11 +1,11 @@ { "name": "Query which has Mitre Attack Data", - "description": "Example query which has Mitre Attack Data as threats", + "description": "Example query which has Mitre Attack Data as threat", "risk_score": 1, "severity": "high", "type": "query", "query": "user.name: root or user.name: admin", - "threats": [ + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -13,7 +13,7 @@ "name": "impact", "reference": "https://attack.mitre.org/tactics/TA0040/" }, - "techniques": [ + "technique": [ { "id": "T1499", "name": "endpoint denial of service", @@ -28,7 +28,7 @@ "name": "Automated Exfiltration", "reference": "https://attack.mitre.org/techniques/T1020/" }, - "techniques": [ + "technique": [ { "id": "T1002", "name": "Data Compressed", diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json index 4a90d904f31aba..082dd5205a142d 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/queries/query_with_everything.json @@ -40,7 +40,7 @@ "from": "now-6m", "severity": "high", "type": "query", - "threats": [ + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -48,7 +48,7 @@ "name": "impact", "reference": "https://attack.mitre.org/tactics/TA0040/" }, - "techniques": [ + "technique": [ { "id": "T1499", "name": "endpoint denial of service", @@ -63,7 +63,7 @@ "name": "Some other name", "reference": "https://example.com" }, - "techniques": [ + "technique": [ { "id": "some-other-id", "name": "some other technique name", diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json index 2b7dbc8cccf0e5..9d8b0d6b4922dc 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/saved_queries/saved_query_with_everything.json @@ -40,7 +40,7 @@ "from": "now-6m", "severity": "high", "type": "saved_query", - "threats": [ + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -48,7 +48,7 @@ "name": "impact", "reference": "https://attack.mitre.org/tactics/TA0040/" }, - "techniques": [ + "technique": [ { "id": "T1499", "name": "endpoint denial of service", @@ -63,7 +63,7 @@ "name": "Some other name", "reference": "https://example.com" }, - "techniques": [ + "technique": [ { "id": "some-other-id", "name": "some other technique name", diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson index 744bd1e078a41c..31acaa5bd9803f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/imports/multiple_ruleid_queries_corrupted.ndjson @@ -1,4 +1,4 @@ -{"created_at":"2020-01-09T01:38:00.740Z","updated_at":"2020-01-09T01:38:00.740Z","created_by":"elastic_kibana","description":"Query with a rule_id that acts like an external id","enabled":true,"false_positives":[],"from":"now-6m","id":"6688f367-1aa2-4895-a5a8-b3701eecf57d","immutable":false,"interval":"5m","rule_id":"query-rule-id-1","language":"kuery","output_index":".siem-signals-default","max_signals":100,"risk_score":1,"name":"Query with a rule id Number 1","query":"user.name: root or user.name: admin","references":[],"severity":"high","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threats":[],"version":1}, -{"created_at":"2020-01-09T01:38:00.745Z","updated_at":"2020-01-09T01:38:00.745Z","created_by":"elastic_kibana","enabled":true,"false_positives":[],"from":"now-6m","id":"7a912444-6cfa-4c8f-83f4-2b26fb2a2ed9","immutable":false,"interval":"5m","rule_id":"query-rule-id-2","language":"kuery","output_index":".siem-signals-default","max_signals":100,"risk_score":2,"name":"Query with a rule id Number 2","query":"user.name: root or user.name: admin","references":[],"severity":"low","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threats":[],"version":1} -{"created_at":"2020-01-09T01:38:00.745Z","updated_at":"2020-01-09T01:38:00.745Z","created_by":"elastic_kibana","description":"Query with a rule_id that acts like an external id","enabled":true,"false_positives":[],"from":"now-6m","id":"7a912444-6cfa-4c8f-83f4-2b26fb2a2ed9","immutable":false,"interval":"5m","rule_id":"query-rule-id-3","language":"kuery","output_index":".siem-signals-default","max_signals":100,"risk_score":2,"name":"Query with a rule id Number 2","query":"user.name: root or user.name: admin","references":[],"severity":"low","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threats":[],"version":1} +{"created_at":"2020-01-09T01:38:00.740Z","updated_at":"2020-01-09T01:38:00.740Z","created_by":"elastic_kibana","description":"Query with a rule_id that acts like an external id","enabled":true,"false_positives":[],"from":"now-6m","id":"6688f367-1aa2-4895-a5a8-b3701eecf57d","immutable":false,"interval":"5m","rule_id":"query-rule-id-1","language":"kuery","output_index":".siem-signals-default","max_signals":100,"risk_score":1,"name":"Query with a rule id Number 1","query":"user.name: root or user.name: admin","references":[],"severity":"high","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threat":[],"version":1}, +{"created_at":"2020-01-09T01:38:00.745Z","updated_at":"2020-01-09T01:38:00.745Z","created_by":"elastic_kibana","enabled":true,"false_positives":[],"from":"now-6m","id":"7a912444-6cfa-4c8f-83f4-2b26fb2a2ed9","immutable":false,"interval":"5m","rule_id":"query-rule-id-2","language":"kuery","output_index":".siem-signals-default","max_signals":100,"risk_score":2,"name":"Query with a rule id Number 2","query":"user.name: root or user.name: admin","references":[],"severity":"low","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threat":[],"version":1} +{"created_at":"2020-01-09T01:38:00.745Z","updated_at":"2020-01-09T01:38:00.745Z","created_by":"elastic_kibana","description":"Query with a rule_id that acts like an external id","enabled":true,"false_positives":[],"from":"now-6m","id":"7a912444-6cfa-4c8f-83f4-2b26fb2a2ed9","immutable":false,"interval":"5m","rule_id":"query-rule-id-3","language":"kuery","output_index":".siem-signals-default","max_signals":100,"risk_score":2,"name":"Query with a rule id Number 2","query":"user.name: root or user.name: admin","references":[],"severity":"low","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threat":[],"version":1} {"exported_count":2,"missing_rules":[],"missing_rules_count":0} diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md index ff3e9a8cf09486..2310ba979da202 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/depth_test/README.md @@ -123,7 +123,7 @@ ancestors -> An array tracking all of the parents of this particular signal. As ``` This is indicating that you have a single parent of an event from the signal (signal -> event) and this document has a single -ancestor of that event. Each 30 seconds that goes it will use de-duplication techniques to ensure that this signal is not re-inserted. If after +ancestor of that event. Each 30 seconds that goes it will use de-duplication technique to ensure that this signal is not re-inserted. If after each 30 seconds you DO SEE multiple signals then the bug is a de-duplication bug and a critical bug. If you ever see a duplicate rule in the ancestors array then that is another CRITICAL bug which needs to be fixed. diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md index 7895e579de3a66..b1a83f5317776f 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/test_cases/signals_on_signals/halting_test/README.md @@ -102,7 +102,7 @@ ancestors -> An array tracking all of the parents of this particular signal. As ``` This is indicating that you have a single parent of an event from the signal (signal -> event) and this document has a single -ancestor of that event. Each 30 seconds that goes it will use de-duplication techniques to ensure that this signal is not re-inserted. If after +ancestor of that event. Each 30 seconds that goes it will use de-duplication technique to ensure that this signal is not re-inserted. If after each 30 seconds you DO SEE multiple signals then the bug is a de-duplication bug and a critical bug. If you ever see a duplicate rule in the ancestors array then that is another CRITICAL bug which needs to be fixed. diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json index a47d0155727d8f..eb210cd8153d7e 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/rules/updates/update_query_everything.json @@ -40,7 +40,7 @@ "from": "now-6m", "severity": "high", "type": "query", - "threats": [ + "threat": [ { "framework": "MITRE ATT&CK", "tactic": { @@ -48,7 +48,7 @@ "name": "impact", "reference": "https://attack.mitre.org/tactics/TA0040/" }, - "techniques": [ + "technique": [ { "id": "T1499", "name": "endpoint denial of service", @@ -63,7 +63,7 @@ "name": "Some other name", "reference": "https://example.com" }, - "techniques": [ + "technique": [ { "id": "some-other-id", "name": "some other technique name", diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/sample_signal.json b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/sample_signal.json index 8cba054d4d2054..48b00930412b46 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/sample_signal.json +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signals/sample_signal.json @@ -13,13 +13,8 @@ "id": "e6f890af316a25920c951acefc46bfef", "name": "suricata-iowa", "containerized": false, - "ip": [ - "10.128.0.21", - "fe80::4001:aff:fe80:15" - ], - "mac": [ - "42:01:0a:80:00:15" - ], + "ip": ["10.128.0.21", "fe80::4001:aff:fe80:15"], + "mac": ["42:01:0a:80:00:15"], "hostname": "suricata-iowa" }, "client": { @@ -73,11 +68,8 @@ "bytes": 80 }, "process": { - "args": [ - "\/usr\/bin\/python3", - "\/usr\/bin\/google_network_daemon" - ], - "executable": "\/usr\/bin\/python3.7", + "args": ["/usr/bin/python3", "/usr/bin/google_network_daemon"], + "executable": "/usr/bin/python3.7", "created": "2019-11-04T15:01:04.190Z", "pid": 808, "name": "google_network_" @@ -137,38 +129,26 @@ "rule": { "id": "8d9bb7f1-9d8a-4f13-ae18-ccaf4ff61893", "rule_id": "rule-1", - "false_positives": [ - - ], + "false_positives": [], "max_signals": 100, "risk_score": 1, "description": "Detecting root and admin users", "from": "now-6s", "immutable": false, - "index": [ - "auditbeat-*", - "filebeat-*", - "packetbeat-*", - "winlogbeat-*" - ], + "index": ["auditbeat-*", "filebeat-*", "packetbeat-*", "winlogbeat-*"], "interval": "5s", "language": "kuery", - "name": "Detect Root\/Admin Users", + "name": "Detect Root/Admin Users", "query": "user.name: root or user.name: admin", - "references": [ - "http:\/\/www.example.com", - "https:\/\/ww.example.com" - ], + "references": ["http://www.example.com", "https://ww.example.com"], "severity": "high", - "tags": [ - - ], + "tags": [], "type": "query", "to": "now", "enabled": true, "created_by": "elastic", "updated_by": "elastic", - "threats": [ + "threat": [ { "framework": "fake", "technique": { diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts index 9a79b27bac7e94..6507e6ca73edeb 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/__mocks__/es_results.ts @@ -33,7 +33,7 @@ export const sampleRuleAlertParams = ( timelineId: undefined, timelineTitle: undefined, meta: undefined, - threats: undefined, + threat: undefined, version: 1, updatedAt: '2019-12-17T15:04:25.343Z', createdAt: '2019-12-17T15:04:37.105Z', diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_rule.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_rule.ts index 1093ff3a8a462d..ba1b2f695156bc 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_rule.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/build_rule.ts @@ -56,7 +56,7 @@ export const buildRule = ({ filters: ruleParams.filters, created_by: createdBy, updated_by: updatedBy, - threats: ruleParams.threats, + threat: ruleParams.threat, version: ruleParams.version, created_at: ruleParams.createdAt, updated_at: ruleParams.updatedAt, diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts index 5b0185cf3a6f82..370ed652808499 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/signals/signal_rule_alert_type.ts @@ -53,7 +53,7 @@ export const signalRulesAlertType = ({ maxSignals: schema.number({ defaultValue: DEFAULT_MAX_SIGNALS }), riskScore: schema.number(), severity: schema.string(), - threats: schema.nullable(schema.arrayOf(schema.object({}, { allowUnknowns: true }))), + threat: schema.nullable(schema.arrayOf(schema.object({}, { allowUnknowns: true }))), to: schema.string(), type: schema.string(), updatedAt: schema.string(), diff --git a/x-pack/legacy/plugins/siem/server/lib/detection_engine/types.ts b/x-pack/legacy/plugins/siem/server/lib/detection_engine/types.ts index c7bd92322360a8..d1c9845dbbcfcc 100644 --- a/x-pack/legacy/plugins/siem/server/lib/detection_engine/types.ts +++ b/x-pack/legacy/plugins/siem/server/lib/detection_engine/types.ts @@ -18,7 +18,7 @@ export interface IMitreAttack { export interface ThreatParams { framework: string; tactic: IMitreAttack; - techniques: IMitreAttack[]; + technique: IMitreAttack[]; } export interface RuleAlertParams { @@ -46,7 +46,7 @@ export interface RuleAlertParams { to: string; timelineId: string | undefined | null; timelineTitle: string | undefined | null; - threats: ThreatParams[] | undefined | null; + threat: ThreatParams[] | undefined | null; type: 'query' | 'saved_query'; version: number; updatedAt: string; diff --git a/x-pack/legacy/plugins/siem/server/lib/ecs_fields/index.ts b/x-pack/legacy/plugins/siem/server/lib/ecs_fields/index.ts index 237e4193683766..f85fb2c9fd7534 100644 --- a/x-pack/legacy/plugins/siem/server/lib/ecs_fields/index.ts +++ b/x-pack/legacy/plugins/siem/server/lib/ecs_fields/index.ts @@ -307,7 +307,7 @@ export const signalFieldsMap: Readonly> = { 'signal.rule.references': 'signal.rule.references', 'signal.rule.severity': 'signal.rule.severity', 'signal.rule.tags': 'signal.rule.tags', - 'signal.rule.threats': 'signal.rule.threats', + 'signal.rule.threat': 'signal.rule.threat', 'signal.rule.type': 'signal.rule.type', 'signal.rule.size': 'signal.rule.size', 'signal.rule.enabled': 'signal.rule.enabled', From 88ba41f39a474f0815da26ac9cac2a2a57a832a8 Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Sat, 25 Jan 2020 12:07:03 +0100 Subject: [PATCH 72/72] [ML] Anomaly Explorer: Fix cell selection when view-by is job id. (#55841) Fixes loading influencers, charts and anomaly table if view-by selection is job ID and cells in the overall swimlanes are selected. Previously, the check to return the job ids to filter on for the query would return the wrong value for a selection in the overall swimlane. This PR move the wrong and redundant code to a fixed util function getSelectionJobIds(). --- .../explorer/actions/load_explorer_data.ts | 9 ++------- .../application/explorer/explorer_utils.d.ts | 7 ++++++- .../application/explorer/explorer_utils.js | 18 ++++++++++++++---- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/x-pack/legacy/plugins/ml/public/application/explorer/actions/load_explorer_data.ts b/x-pack/legacy/plugins/ml/public/application/explorer/actions/load_explorer_data.ts index ed734051342248..819db630c0609d 100644 --- a/x-pack/legacy/plugins/ml/public/application/explorer/actions/load_explorer_data.ts +++ b/x-pack/legacy/plugins/ml/public/application/explorer/actions/load_explorer_data.ts @@ -12,11 +12,11 @@ import { forkJoin, of, Observable, Subject } from 'rxjs'; import { mergeMap, switchMap, tap } from 'rxjs/operators'; import { anomalyDataChange } from '../explorer_charts/explorer_charts_container_service'; -import { VIEW_BY_JOB_LABEL } from '../explorer_constants'; import { explorerService } from '../explorer_dashboard_service'; import { getDateFormatTz, getSelectionInfluencers, + getSelectionJobIds, getSelectionTimeRange, loadAnnotationsTableData, loadAnomaliesTableData, @@ -114,12 +114,7 @@ function loadExplorerData(config: LoadExplorerDataConfig): Observable d.id); - + const jobIds = getSelectionJobIds(selectedCells, selectedJobs); const timerange = getSelectionTimeRange( selectedCells, swimlaneBucketInterval.asSeconds(), diff --git a/x-pack/legacy/plugins/ml/public/application/explorer/explorer_utils.d.ts b/x-pack/legacy/plugins/ml/public/application/explorer/explorer_utils.d.ts index 0ab75b1db29722..c60b2d55d86862 100644 --- a/x-pack/legacy/plugins/ml/public/application/explorer/explorer_utils.d.ts +++ b/x-pack/legacy/plugins/ml/public/application/explorer/explorer_utils.d.ts @@ -35,10 +35,15 @@ export declare const getDefaultSwimlaneData: () => SwimlaneData; export declare const getInfluencers: (selectedJobs: any[]) => string[]; +export declare const getSelectionJobIds: ( + selectedCells: AppStateSelectedCells | undefined, + selectedJobs: ExplorerJob[] +) => string[]; + export declare const getSelectionInfluencers: ( selectedCells: AppStateSelectedCells | undefined, fieldName: string -) => any[]; +) => string[]; interface SelectionTimeRange { earliestMs: number; diff --git a/x-pack/legacy/plugins/ml/public/application/explorer/explorer_utils.js b/x-pack/legacy/plugins/ml/public/application/explorer/explorer_utils.js index 14d356c0d1c81c..4818856b8a8d2e 100644 --- a/x-pack/legacy/plugins/ml/public/application/explorer/explorer_utils.js +++ b/x-pack/legacy/plugins/ml/public/application/explorer/explorer_utils.js @@ -222,6 +222,19 @@ export function getSelectionInfluencers(selectedCells, fieldName) { return []; } +export function getSelectionJobIds(selectedCells, selectedJobs) { + if ( + selectedCells !== undefined && + selectedCells.type !== SWIMLANE_TYPE.OVERALL && + selectedCells.viewByFieldName !== undefined && + selectedCells.viewByFieldName === VIEW_BY_JOB_LABEL + ) { + return selectedCells.lanes; + } + + return selectedJobs.map(d => d.id); +} + export function getSwimlaneBucketInterval(selectedJobs, swimlaneContainerWidth) { // Bucketing interval should be the maximum of the chart related interval (i.e. time range related) // and the max bucket span for the jobs shown in the chart. @@ -587,10 +600,7 @@ export async function loadAnomaliesTableData( tableSeverity, influencersFilterQuery ) { - const jobIds = - selectedCells !== undefined && selectedCells.viewByFieldName === VIEW_BY_JOB_LABEL - ? selectedCells.lanes - : selectedJobs.map(d => d.id); + const jobIds = getSelectionJobIds(selectedCells, selectedJobs); const influencers = getSelectionInfluencers(selectedCells, fieldName); const timeRange = getSelectionTimeRange(selectedCells, interval, bounds);