(false);
let currentRequestCheck: string;
- useIndexPattern((result: any) => setIndexPattern(toStaticIndexPattern(result)));
-
useEffect(() => {
if (indexPattern !== undefined) {
setIsLoadingIndexPattern(false);
diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_charts.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_charts.tsx
index 809618f07a6c1..ae99d08ab634e 100644
--- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_charts.tsx
+++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_charts.tsx
@@ -11,8 +11,8 @@ import { MonitorChart } from '../../../common/graphql/types';
import { UptimeGraphQLQueryProps, withUptimeGraphQL } from '../higher_order';
import { monitorChartsQuery } from '../../queries';
import { DurationChart } from './charts';
-import { SnapshotHistogram } from './charts/snapshot_histogram';
import { useUrlParams } from '../../hooks';
+import { PingHistogram } from '../connected';
interface MonitorChartsQueryResult {
monitorChartsData?: MonitorChart;
@@ -58,12 +58,14 @@ export const MonitorChartsComponent = ({
/>
-
diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/overview_page_parsing_error_callout.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/overview_page_parsing_error_callout.tsx
index 3d38ce42dd1f0..b71a4f2f8646a 100644
--- a/x-pack/legacy/plugins/uptime/public/components/functional/overview_page_parsing_error_callout.tsx
+++ b/x-pack/legacy/plugins/uptime/public/components/functional/overview_page_parsing_error_callout.tsx
@@ -26,6 +26,7 @@ export const OverviewPageParsingErrorCallout = ({
})}
color="danger"
iconType="alert"
+ style={{ width: '100%' }}
>
(
@@ -42,12 +40,15 @@ export const StatusPanel = ({
/>
-
diff --git a/x-pack/legacy/plugins/uptime/public/hooks/index.ts b/x-pack/legacy/plugins/uptime/public/hooks/index.ts
index aa7bb0a220357..cfb8d71f783a6 100644
--- a/x-pack/legacy/plugins/uptime/public/hooks/index.ts
+++ b/x-pack/legacy/plugins/uptime/public/hooks/index.ts
@@ -5,5 +5,5 @@
*/
export { useUrlParams } from './use_url_params';
-export { useIndexPattern } from './use_index_pattern';
export * from './use_telemetry';
+export * from './update_kuery_string';
diff --git a/x-pack/legacy/plugins/uptime/public/hooks/update_kuery_string.ts b/x-pack/legacy/plugins/uptime/public/hooks/update_kuery_string.ts
new file mode 100644
index 0000000000000..d02a6fc2afb5d
--- /dev/null
+++ b/x-pack/legacy/plugins/uptime/public/hooks/update_kuery_string.ts
@@ -0,0 +1,65 @@
+/*
+ * 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 { combineFiltersAndUserSearch, stringifyKueries } from '../lib/helper';
+import { esKuery } from '../../../../../../src/plugins/data/common/es_query';
+import { store } from '../state';
+import { setEsKueryString } from '../state/actions';
+import { IIndexPattern } from '../../../../../../src/plugins/data/common/index_patterns';
+
+const updateEsQueryForFilterGroup = (filterQueryString: string, indexPattern: IIndexPattern) => {
+ // Update EsQuery in Redux to be used in FilterGroup
+ const searchDSL: string = filterQueryString
+ ? JSON.stringify(
+ esKuery.toElasticsearchQuery(esKuery.fromKueryExpression(filterQueryString), indexPattern)
+ )
+ : '';
+ store.dispatch(setEsKueryString(searchDSL));
+};
+
+const getKueryString = (urlFilters: string): string => {
+ let kueryString = '';
+ // We are using try/catch here because this is user entered value
+ // and JSON.parse and stringifyKueries can have hard time parsing
+ // all possible scenarios, we can safely ignore if we can't parse them
+ try {
+ if (urlFilters !== '') {
+ const filterMap = new Map>(JSON.parse(urlFilters));
+ kueryString = stringifyKueries(filterMap);
+ }
+ } catch {
+ kueryString = '';
+ }
+ return kueryString;
+};
+
+export const useUpdateKueryString = (
+ indexPattern: IIndexPattern,
+ filterQueryString = '',
+ urlFilters: string
+): [string?, Error?] => {
+ const kueryString = getKueryString(urlFilters);
+
+ const combinedFilterString = combineFiltersAndUserSearch(filterQueryString, kueryString);
+
+ let esFilters: string | undefined;
+ // this try catch is necessary to evaluate user input in kuery bar,
+ // this error will be actually shown in UI for user to see
+ try {
+ if ((filterQueryString || urlFilters) && indexPattern) {
+ const ast = esKuery.fromKueryExpression(combinedFilterString);
+
+ const elasticsearchQuery = esKuery.toElasticsearchQuery(ast, indexPattern);
+
+ esFilters = JSON.stringify(elasticsearchQuery);
+
+ updateEsQueryForFilterGroup(filterQueryString, indexPattern);
+ }
+ return [esFilters];
+ } catch (err) {
+ return [urlFilters, err];
+ }
+};
diff --git a/x-pack/legacy/plugins/uptime/public/hooks/use_index_pattern.ts b/x-pack/legacy/plugins/uptime/public/hooks/use_index_pattern.ts
deleted file mode 100644
index f2b586b27dba6..0000000000000
--- a/x-pack/legacy/plugins/uptime/public/hooks/use_index_pattern.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 { useEffect, Dispatch } from 'react';
-import { useKibana } from '../../../../../../src/plugins/kibana_react/public';
-
-export const useIndexPattern = (setIndexPattern: Dispatch) => {
- const core = useKibana();
- useEffect(() => {
- const fetch = core.services.http?.fetch;
- async function getIndexPattern() {
- if (!fetch) throw new Error('Http core services are not defined');
- setIndexPattern(await fetch('/api/uptime/index_pattern', { method: 'GET' }));
- }
- getIndexPattern();
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [core.services.http]);
-};
diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/__snapshots__/to_static_index_pattern.test.ts.snap b/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/__snapshots__/to_static_index_pattern.test.ts.snap
deleted file mode 100644
index bc02e1054b6f7..0000000000000
--- a/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/__snapshots__/to_static_index_pattern.test.ts.snap
+++ /dev/null
@@ -1,19 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`toStaticIndexPattern provides the required fields 1`] = `
-Object {
- "attributes": Object {
- "fields": "[{\\"name\\":\\"@timestamp\\",\\"type\\":\\"date\\",\\"scripted\\":false,\\"searchable\\":true}]",
- },
- "fields": Array [
- Object {
- "name": "@timestamp",
- "scripted": false,
- "searchable": true,
- "type": "date",
- },
- ],
- "id": "foo",
- "title": "foo",
-}
-`;
diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/to_static_index_pattern.test.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/to_static_index_pattern.test.ts
deleted file mode 100644
index c8015a678c726..0000000000000
--- a/x-pack/legacy/plugins/uptime/public/lib/helper/__tests__/to_static_index_pattern.test.ts
+++ /dev/null
@@ -1,19 +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 { toStaticIndexPattern } from '../to_static_index_pattern';
-
-describe('toStaticIndexPattern', () => {
- it('provides the required fields', () => {
- const pattern = {
- attributes: {
- fields: '[{"name":"@timestamp","type":"date","scripted":false,"searchable":true}]',
- },
- id: 'foo',
- };
- expect(toStaticIndexPattern(pattern)).toMatchSnapshot();
- });
-});
diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/combine_filters_and_user_search.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/combine_filters_and_user_search.ts
index f3dfbb7d3b529..45aff24f0449e 100644
--- a/x-pack/legacy/plugins/uptime/public/lib/helper/combine_filters_and_user_search.ts
+++ b/x-pack/legacy/plugins/uptime/public/lib/helper/combine_filters_and_user_search.ts
@@ -5,6 +5,9 @@
*/
export const combineFiltersAndUserSearch = (filters: string, search: string) => {
+ if (!filters && !search) {
+ return '';
+ }
if (!filters) return search;
if (!search) return filters;
return `(${filters}) and (${search})`;
diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/index.ts b/x-pack/legacy/plugins/uptime/public/lib/helper/index.ts
index ced06ce7a1d7b..ef191ce32e532 100644
--- a/x-pack/legacy/plugins/uptime/public/lib/helper/index.ts
+++ b/x-pack/legacy/plugins/uptime/public/lib/helper/index.ts
@@ -12,5 +12,4 @@ export { getChartDateLabel } from './charts';
export { parameterizeValues } from './parameterize_values';
export { seriesHasDownValues } from './series_has_down_values';
export { stringifyKueries } from './stringify_kueries';
-export { toStaticIndexPattern } from './to_static_index_pattern';
export { UptimeUrlParams, getSupportedUrlParams } from './url_params';
diff --git a/x-pack/legacy/plugins/uptime/public/pages/index.ts b/x-pack/legacy/plugins/uptime/public/pages/index.ts
index a96be42eb0dee..17f083ca023ed 100644
--- a/x-pack/legacy/plugins/uptime/public/pages/index.ts
+++ b/x-pack/legacy/plugins/uptime/public/pages/index.ts
@@ -5,6 +5,6 @@
*/
export { MonitorPage } from './monitor';
-export { OverviewPage } from './overview';
export { NotFoundPage } from './not_found';
export { PageHeader } from './page_header';
+export { OverviewPage } from '../components/connected/';
diff --git a/x-pack/legacy/plugins/uptime/public/pages/overview.tsx b/x-pack/legacy/plugins/uptime/public/pages/overview.tsx
index 36abee673b682..0f6195c5f4c66 100644
--- a/x-pack/legacy/plugins/uptime/public/pages/overview.tsx
+++ b/x-pack/legacy/plugins/uptime/public/pages/overview.tsx
@@ -5,30 +5,28 @@
*/
import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui';
-import React, { Fragment, useContext, useState } from 'react';
+import React, { useContext } from 'react';
import styled from 'styled-components';
import {
EmptyState,
- FilterGroup,
- KueryBar,
MonitorList,
OverviewPageParsingErrorCallout,
StatusPanel,
} from '../components/functional';
import { UMUpdateBreadcrumbs } from '../lib/lib';
-import { useIndexPattern, useUrlParams, useUptimeTelemetry, UptimePage } from '../hooks';
+import { useUrlParams, useUptimeTelemetry, UptimePage } from '../hooks';
import { stringifyUrlParams } from '../lib/helper/stringify_url_params';
import { useTrackPageview } from '../../../infra/public';
-import { combineFiltersAndUserSearch, stringifyKueries, toStaticIndexPattern } from '../lib/helper';
-import { store } from '../state';
-import { setEsKueryString } from '../state/actions';
import { PageHeader } from './page_header';
-import { esKuery, DataPublicPluginStart } from '../../../../../../src/plugins/data/public';
-import { UptimeThemeContext } from '../contexts/uptime_theme_context';
+import { DataPublicPluginStart, IIndexPattern } from '../../../../../../src/plugins/data/public';
+import { UptimeThemeContext } from '../contexts';
+import { FilterGroup, KueryBar } from '../components/connected';
+import { useUpdateKueryString } from '../hooks';
interface OverviewPageProps {
autocomplete: DataPublicPluginStart['autocomplete'];
setBreadcrumbs: UMUpdateBreadcrumbs;
+ indexPattern: IIndexPattern;
}
type Props = OverviewPageProps;
@@ -42,72 +40,37 @@ const EuiFlexItemStyled = styled(EuiFlexItem)`
}
`;
-export const OverviewPage = ({ autocomplete, setBreadcrumbs }: Props) => {
+export const OverviewPageComponent = ({ autocomplete, setBreadcrumbs, indexPattern }: Props) => {
const { colors } = useContext(UptimeThemeContext);
- const [getUrlParams, updateUrl] = useUrlParams();
+ const [getUrlParams] = useUrlParams();
const { absoluteDateRangeStart, absoluteDateRangeEnd, ...params } = getUrlParams();
const {
dateRangeStart,
dateRangeEnd,
- search,
pagination,
statusFilter,
+ search,
filters: urlFilters,
} = params;
- const [indexPattern, setIndexPattern] = useState(undefined);
+
useUptimeTelemetry(UptimePage.Overview);
- useIndexPattern(setIndexPattern);
useTrackPageview({ app: 'uptime', path: 'overview' });
useTrackPageview({ app: 'uptime', path: 'overview', delay: 15000 });
- let error: any;
- let kueryString: string = '';
- try {
- if (urlFilters !== '') {
- const filterMap = new Map>(JSON.parse(urlFilters));
- kueryString = stringifyKueries(filterMap);
- }
- } catch {
- kueryString = '';
- }
-
- const filterQueryString = search || '';
- let filters: any | undefined;
- try {
- if (filterQueryString || urlFilters) {
- if (indexPattern) {
- const staticIndexPattern = toStaticIndexPattern(indexPattern);
- const combinedFilterString = combineFiltersAndUserSearch(filterQueryString, kueryString);
- const ast = esKuery.fromKueryExpression(combinedFilterString);
- const elasticsearchQuery = esKuery.toElasticsearchQuery(ast, staticIndexPattern);
- filters = JSON.stringify(elasticsearchQuery);
- const searchDSL: string = filterQueryString
- ? JSON.stringify(
- esKuery.toElasticsearchQuery(
- esKuery.fromKueryExpression(filterQueryString),
- staticIndexPattern
- )
- )
- : '';
- store.dispatch(setEsKueryString(searchDSL));
- }
- }
- } catch (e) {
- error = e;
- }
+ const [esFilters, error] = useUpdateKueryString(indexPattern, search, urlFilters);
const sharedProps = {
dateRangeStart,
dateRangeEnd,
- filters,
statusFilter,
+ filters: esFilters,
};
const linkParameters = stringifyUrlParams(params, true);
return (
-
+ <>
@@ -115,15 +78,7 @@ export const OverviewPage = ({ autocomplete, setBreadcrumbs }: Props) => {
- {
- if (urlFilters !== filtersKuery) {
- updateUrl({ filters: filtersKuery, pagination: '' });
- }
- }}
- />
+
{error && }
@@ -133,16 +88,15 @@ export const OverviewPage = ({ autocomplete, setBreadcrumbs }: Props) => {
absoluteDateRangeEnd={absoluteDateRangeEnd}
dateRangeStart={dateRangeStart}
dateRangeEnd={dateRangeEnd}
- filters={filters}
+ filters={esFilters}
statusFilter={statusFilter}
- sharedProps={sharedProps}
/>
{
}}
/>
-
+ >
);
};
diff --git a/x-pack/legacy/plugins/uptime/public/queries/snapshot_histogram_query.ts b/x-pack/legacy/plugins/uptime/public/queries/snapshot_histogram_query.ts
deleted file mode 100644
index 7eb56ea4e9dd1..0000000000000
--- a/x-pack/legacy/plugins/uptime/public/queries/snapshot_histogram_query.ts
+++ /dev/null
@@ -1,38 +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 gql from 'graphql-tag';
-
-export const snapshotHistogramQueryString = `
- query SnapshotHistogram(
- $dateRangeStart: String!
- $dateRangeEnd: String!
- $filters: String
- $monitorId: String
- $statusFilter: String
- ) {
- queryResult: getSnapshotHistogram(
- dateRangeStart: $dateRangeStart
- dateRangeEnd: $dateRangeEnd
- filters: $filters
- statusFilter: $statusFilter
- monitorId: $monitorId
- ) {
- histogram {
- upCount
- downCount
- x
- x0
- y
- }
- interval
- }
- }
-`;
-
-export const snapshotHistogramQuery = gql`
- ${snapshotHistogramQueryString}
-`;
diff --git a/x-pack/legacy/plugins/uptime/public/routes.tsx b/x-pack/legacy/plugins/uptime/public/routes.tsx
index 07bba5163922e..c318a82ab7f19 100644
--- a/x-pack/legacy/plugins/uptime/public/routes.tsx
+++ b/x-pack/legacy/plugins/uptime/public/routes.tsx
@@ -6,7 +6,7 @@
import React, { FC } from 'react';
import { Route, Switch } from 'react-router-dom';
-import { MonitorPage, OverviewPage, NotFoundPage } from './pages';
+import { MonitorPage, NotFoundPage, OverviewPage } from './pages';
import { DataPublicPluginStart } from '../../../../../src/plugins/data/public';
import { UMUpdateBreadcrumbs } from './lib/lib';
diff --git a/x-pack/legacy/plugins/uptime/public/state/actions/index.ts b/x-pack/legacy/plugins/uptime/public/state/actions/index.ts
index 9874da1839c2f..df707584bd844 100644
--- a/x-pack/legacy/plugins/uptime/public/state/actions/index.ts
+++ b/x-pack/legacy/plugins/uptime/public/state/actions/index.ts
@@ -8,3 +8,5 @@ export * from './overview_filters';
export * from './snapshot';
export * from './ui';
export * from './monitor_status';
+export * from './index_patternts';
+export * from './ping';
diff --git a/x-pack/legacy/plugins/uptime/public/state/actions/index_patternts.ts b/x-pack/legacy/plugins/uptime/public/state/actions/index_patternts.ts
new file mode 100644
index 0000000000000..f52dac805a199
--- /dev/null
+++ b/x-pack/legacy/plugins/uptime/public/state/actions/index_patternts.ts
@@ -0,0 +1,12 @@
+/*
+ * 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 { createAction } from 'redux-actions';
+import { QueryParams } from './types';
+
+export const getIndexPattern = createAction('GET_INDEX_PATTERN');
+export const getIndexPatternSuccess = createAction('GET_INDEX_PATTERN_SUCCESS');
+export const getIndexPatternFail = createAction('GET_INDEX_PATTERN_FAIL');
diff --git a/x-pack/legacy/plugins/uptime/public/state/actions/ping.ts b/x-pack/legacy/plugins/uptime/public/state/actions/ping.ts
new file mode 100644
index 0000000000000..bb7258d9a54b2
--- /dev/null
+++ b/x-pack/legacy/plugins/uptime/public/state/actions/ping.ts
@@ -0,0 +1,12 @@
+/*
+ * 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 { createAction } from 'redux-actions';
+import { GetPingHistogramParams, HistogramResult } from '../../../common/types';
+
+export const getPingHistogram = createAction('GET_PING_HISTOGRAM');
+export const getPingHistogramSuccess = createAction('GET_PING_HISTOGRAM_SUCCESS');
+export const getPingHistogramFail = createAction('GET_PING_HISTOGRAM_FAIL');
diff --git a/x-pack/legacy/plugins/uptime/public/state/api/index.ts b/x-pack/legacy/plugins/uptime/public/state/api/index.ts
index 1d0cac5f87854..2d20638832335 100644
--- a/x-pack/legacy/plugins/uptime/public/state/api/index.ts
+++ b/x-pack/legacy/plugins/uptime/public/state/api/index.ts
@@ -8,3 +8,5 @@ export * from './monitor';
export * from './overview_filters';
export * from './snapshot';
export * from './monitor_status';
+export * from './index_pattern';
+export * from './ping';
diff --git a/x-pack/legacy/plugins/uptime/public/state/api/index_pattern.ts b/x-pack/legacy/plugins/uptime/public/state/api/index_pattern.ts
new file mode 100644
index 0000000000000..2669376d728ab
--- /dev/null
+++ b/x-pack/legacy/plugins/uptime/public/state/api/index_pattern.ts
@@ -0,0 +1,21 @@
+/*
+ * 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 { getApiPath } from '../../lib/helper';
+
+interface APIParams {
+ basePath: string;
+}
+
+export const fetchIndexPattern = async ({ basePath }: APIParams) => {
+ const url = getApiPath(`/api/uptime/index_pattern`, basePath);
+
+ const response = await fetch(url);
+ if (!response.ok) {
+ throw new Error(response.statusText);
+ }
+ return await response.json();
+};
diff --git a/x-pack/legacy/plugins/uptime/public/state/api/monitor.ts b/x-pack/legacy/plugins/uptime/public/state/api/monitor.ts
index 8b1220830f091..80fd311c3ec7e 100644
--- a/x-pack/legacy/plugins/uptime/public/state/api/monitor.ts
+++ b/x-pack/legacy/plugins/uptime/public/state/api/monitor.ts
@@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { ThrowReporter } from 'io-ts/lib/ThrowReporter';
+import { PathReporter } from 'io-ts/lib/PathReporter';
import { getApiPath } from '../../lib/helper';
import { BaseParams } from './types';
import {
@@ -41,7 +41,7 @@ export const fetchMonitorDetails = async ({
throw new Error(response.statusText);
}
return response.json().then(data => {
- ThrowReporter.report(MonitorDetailsType.decode(data));
+ PathReporter.report(MonitorDetailsType.decode(data));
return data;
});
};
@@ -68,7 +68,7 @@ export const fetchMonitorLocations = async ({
throw new Error(response.statusText);
}
return response.json().then(data => {
- ThrowReporter.report(MonitorLocationsType.decode(data));
+ PathReporter.report(MonitorLocationsType.decode(data));
return data;
});
};
diff --git a/x-pack/legacy/plugins/uptime/public/state/api/ping.ts b/x-pack/legacy/plugins/uptime/public/state/api/ping.ts
new file mode 100644
index 0000000000000..e0c358fe40e71
--- /dev/null
+++ b/x-pack/legacy/plugins/uptime/public/state/api/ping.ts
@@ -0,0 +1,35 @@
+/*
+ * 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 qs from 'querystring';
+import { getApiPath } from '../../lib/helper';
+import { APIFn } from './types';
+import { GetPingHistogramParams, HistogramResult } from '../../../common/types';
+
+export const fetchPingHistogram: APIFn = async ({
+ basePath,
+ monitorId,
+ dateStart,
+ dateEnd,
+ statusFilter,
+ filters,
+}) => {
+ const url = getApiPath(`/api/uptime/ping/histogram`, basePath);
+ const params = {
+ dateStart,
+ dateEnd,
+ ...(monitorId && { monitorId }),
+ ...(statusFilter && { statusFilter }),
+ ...(filters && { filters }),
+ };
+ const urlParams = qs.stringify(params).toString();
+ const response = await fetch(`${url}?${urlParams}`);
+ if (!response.ok) {
+ throw new Error(response.statusText);
+ }
+ const responseData = await response.json();
+ return responseData;
+};
diff --git a/x-pack/legacy/plugins/uptime/public/state/api/types.ts b/x-pack/legacy/plugins/uptime/public/state/api/types.ts
index 278cfce29986f..c88e111d778d5 100644
--- a/x-pack/legacy/plugins/uptime/public/state/api/types.ts
+++ b/x-pack/legacy/plugins/uptime/public/state/api/types.ts
@@ -12,3 +12,5 @@ export interface BaseParams {
statusFilter?: string;
location?: string;
}
+
+export type APIFn = (params: { basePath: string } & P) => Promise;
diff --git a/x-pack/legacy/plugins/uptime/public/state/effects/index.ts b/x-pack/legacy/plugins/uptime/public/state/effects/index.ts
index 41dda145edb4e..f809454cefb39 100644
--- a/x-pack/legacy/plugins/uptime/public/state/effects/index.ts
+++ b/x-pack/legacy/plugins/uptime/public/state/effects/index.ts
@@ -9,10 +9,14 @@ import { fetchMonitorDetailsEffect } from './monitor';
import { fetchOverviewFiltersEffect } from './overview_filters';
import { fetchSnapshotCountEffect } from './snapshot';
import { fetchMonitorStatusEffect } from './monitor_status';
+import { fetchIndexPatternEffect } from './index_pattern';
+import { fetchPingHistogramEffect } from './ping';
export function* rootEffect() {
yield fork(fetchMonitorDetailsEffect);
yield fork(fetchSnapshotCountEffect);
yield fork(fetchOverviewFiltersEffect);
yield fork(fetchMonitorStatusEffect);
+ yield fork(fetchIndexPatternEffect);
+ yield fork(fetchPingHistogramEffect);
}
diff --git a/x-pack/legacy/plugins/uptime/public/state/effects/index_pattern.ts b/x-pack/legacy/plugins/uptime/public/state/effects/index_pattern.ts
new file mode 100644
index 0000000000000..a6f9256d5ccd9
--- /dev/null
+++ b/x-pack/legacy/plugins/uptime/public/state/effects/index_pattern.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 { takeLatest } from 'redux-saga/effects';
+import { getIndexPattern, getIndexPatternSuccess, getIndexPatternFail } from '../actions';
+import { fetchIndexPattern } from '../api';
+import { fetchEffectFactory } from './fetch_effect';
+
+export function* fetchIndexPatternEffect() {
+ yield takeLatest(
+ getIndexPattern,
+ fetchEffectFactory(fetchIndexPattern, getIndexPatternSuccess, getIndexPatternFail)
+ );
+}
diff --git a/x-pack/legacy/plugins/uptime/public/state/effects/ping.ts b/x-pack/legacy/plugins/uptime/public/state/effects/ping.ts
new file mode 100644
index 0000000000000..acb9b31915fa9
--- /dev/null
+++ b/x-pack/legacy/plugins/uptime/public/state/effects/ping.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 { takeLatest } from 'redux-saga/effects';
+import { getPingHistogram, getPingHistogramSuccess, getPingHistogramFail } from '../actions';
+import { fetchPingHistogram } from '../api';
+import { fetchEffectFactory } from './fetch_effect';
+
+export function* fetchPingHistogramEffect() {
+ yield takeLatest(
+ String(getPingHistogram),
+ fetchEffectFactory(fetchPingHistogram, getPingHistogramSuccess, getPingHistogramFail)
+ );
+}
diff --git a/x-pack/legacy/plugins/uptime/public/state/reducers/index.ts b/x-pack/legacy/plugins/uptime/public/state/reducers/index.ts
index 5f915d970e543..842cb1e937108 100644
--- a/x-pack/legacy/plugins/uptime/public/state/reducers/index.ts
+++ b/x-pack/legacy/plugins/uptime/public/state/reducers/index.ts
@@ -10,6 +10,8 @@ import { overviewFiltersReducer } from './overview_filters';
import { snapshotReducer } from './snapshot';
import { uiReducer } from './ui';
import { monitorStatusReducer } from './monitor_status';
+import { indexPatternReducer } from './index_pattern';
+import { pingReducer } from './ping';
export const rootReducer = combineReducers({
monitor: monitorReducer,
@@ -17,4 +19,6 @@ export const rootReducer = combineReducers({
snapshot: snapshotReducer,
ui: uiReducer,
monitorStatus: monitorStatusReducer,
+ indexPattern: indexPatternReducer,
+ ping: pingReducer,
});
diff --git a/x-pack/legacy/plugins/uptime/public/state/reducers/index_pattern.ts b/x-pack/legacy/plugins/uptime/public/state/reducers/index_pattern.ts
new file mode 100644
index 0000000000000..dff043f81b95c
--- /dev/null
+++ b/x-pack/legacy/plugins/uptime/public/state/reducers/index_pattern.ts
@@ -0,0 +1,41 @@
+/*
+ * 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 { handleActions, Action } from 'redux-actions';
+import { getIndexPattern, getIndexPatternSuccess, getIndexPatternFail } from '../actions';
+
+export interface IndexPatternState {
+ index_pattern: any;
+ errors: any[];
+ loading: boolean;
+}
+
+const initialState: IndexPatternState = {
+ index_pattern: null,
+ loading: false,
+ errors: [],
+};
+
+export const indexPatternReducer = handleActions(
+ {
+ [String(getIndexPattern)]: state => ({
+ ...state,
+ loading: true,
+ }),
+
+ [String(getIndexPatternSuccess)]: (state, action: Action) => ({
+ ...state,
+ loading: false,
+ index_pattern: { ...action.payload },
+ }),
+
+ [String(getIndexPatternFail)]: (state, action: Action) => ({
+ ...state,
+ errors: [...state.errors, action.payload],
+ loading: false,
+ }),
+ },
+ initialState
+);
diff --git a/x-pack/legacy/plugins/uptime/public/state/reducers/ping.ts b/x-pack/legacy/plugins/uptime/public/state/reducers/ping.ts
new file mode 100644
index 0000000000000..76775e6a0a355
--- /dev/null
+++ b/x-pack/legacy/plugins/uptime/public/state/reducers/ping.ts
@@ -0,0 +1,45 @@
+/*
+ * 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 { handleActions, Action } from 'redux-actions';
+import { getPingHistogram, getPingHistogramSuccess, getPingHistogramFail } from '../actions';
+import { HistogramResult } from '../../../common/types';
+
+export interface PingState {
+ pingHistogram: HistogramResult | null;
+ errors: any[];
+ loading: boolean;
+}
+
+const initialState: PingState = {
+ pingHistogram: null,
+ loading: false,
+ errors: [],
+};
+
+type MonitorStatusPayload = HistogramResult & Error;
+
+export const pingReducer = handleActions(
+ {
+ [String(getPingHistogram)]: state => ({
+ ...state,
+ loading: true,
+ }),
+
+ [String(getPingHistogramSuccess)]: (state: PingState, action: Action) => ({
+ ...state,
+ loading: false,
+ pingHistogram: { ...action.payload },
+ }),
+
+ [String(getPingHistogramFail)]: (state, action: Action) => ({
+ ...state,
+ errors: [...state.errors, action.payload],
+ loading: false,
+ }),
+ },
+ initialState
+);
diff --git a/x-pack/legacy/plugins/uptime/public/state/selectors/__tests__/index.test.ts b/x-pack/legacy/plugins/uptime/public/state/selectors/__tests__/index.test.ts
index 38fb3edea4768..2e27431a5ff14 100644
--- a/x-pack/legacy/plugins/uptime/public/state/selectors/__tests__/index.test.ts
+++ b/x-pack/legacy/plugins/uptime/public/state/selectors/__tests__/index.test.ts
@@ -45,6 +45,16 @@ describe('state selectors', () => {
monitor: null,
loading: false,
},
+ indexPattern: {
+ index_pattern: null,
+ loading: false,
+ errors: [],
+ },
+ ping: {
+ pingHistogram: null,
+ loading: false,
+ errors: [],
+ },
};
it('selects base path from state', () => {
diff --git a/x-pack/legacy/plugins/uptime/public/state/selectors/index.ts b/x-pack/legacy/plugins/uptime/public/state/selectors/index.ts
index 337e99f6ede16..fe6a7a1b7eade 100644
--- a/x-pack/legacy/plugins/uptime/public/state/selectors/index.ts
+++ b/x-pack/legacy/plugins/uptime/public/state/selectors/index.ts
@@ -28,3 +28,11 @@ export const selectSelectedMonitor = (state: AppState) => {
export const selectMonitorStatus = (state: AppState) => {
return state.monitorStatus.status;
};
+
+export const selectIndexPattern = ({ indexPattern }: AppState) => {
+ return indexPattern.index_pattern;
+};
+
+export const selectPingHistogram = ({ ping, ui }: AppState) => {
+ return { data: ping.pingHistogram, loading: ping.loading, lastRefresh: ui.lastRefresh };
+};
diff --git a/x-pack/legacy/plugins/uptime/server/graphql/monitors/resolvers.ts b/x-pack/legacy/plugins/uptime/server/graphql/monitors/resolvers.ts
index 897d67dde807e..cc5744eac6ea1 100644
--- a/x-pack/legacy/plugins/uptime/server/graphql/monitors/resolvers.ts
+++ b/x-pack/legacy/plugins/uptime/server/graphql/monitors/resolvers.ts
@@ -4,19 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { UMGqlRange } from '../../../common/domain_types';
import { UMResolver } from '../../../common/graphql/resolver_types';
-import {
- GetFilterBarQueryArgs,
- GetMonitorChartsDataQueryArgs,
- MonitorChart,
- GetSnapshotHistogramQueryArgs,
-} from '../../../common/graphql/types';
+import { GetMonitorChartsDataQueryArgs, MonitorChart } from '../../../common/graphql/types';
import { UMServerLibs } from '../../lib/lib';
import { CreateUMGraphQLResolvers, UMContext } from '../types';
-import { HistogramResult } from '../../../common/domain_types';
-
-export type UMMonitorsResolver = UMResolver, any, UMGqlRange, UMContext>;
export type UMGetMonitorChartsResolver = UMResolver<
any | Promise,
@@ -25,49 +16,20 @@ export type UMGetMonitorChartsResolver = UMResolver<
UMContext
>;
-export type UMGetFilterBarResolver = UMResolver<
- any | Promise,
- any,
- GetFilterBarQueryArgs,
- UMContext
->;
-
-export type UMGetSnapshotHistogram = UMResolver<
- HistogramResult | Promise,
- any,
- GetSnapshotHistogramQueryArgs,
- UMContext
->;
-
export const createMonitorsResolvers: CreateUMGraphQLResolvers = (
libs: UMServerLibs
): {
Query: {
- getSnapshotHistogram: UMGetSnapshotHistogram;
getMonitorChartsData: UMGetMonitorChartsResolver;
};
} => ({
Query: {
- async getSnapshotHistogram(
- _resolver,
- { dateRangeStart, dateRangeEnd, filters, monitorId, statusFilter },
- { APICaller }
- ): Promise {
- return await libs.pings.getPingHistogram({
- callES: APICaller,
- dateRangeStart,
- dateRangeEnd,
- filters,
- monitorId,
- statusFilter,
- });
- },
async getMonitorChartsData(
_resolver,
{ monitorId, dateRangeStart, dateRangeEnd, location },
{ APICaller }
): Promise {
- return await libs.monitors.getMonitorChartsData({
+ return libs.monitors.getMonitorChartsData({
callES: APICaller,
monitorId,
dateRangeStart,
diff --git a/x-pack/legacy/plugins/uptime/server/graphql/monitors/schema.gql.ts b/x-pack/legacy/plugins/uptime/server/graphql/monitors/schema.gql.ts
index 8a86d97b4cd8e..6b8a896c4c60b 100644
--- a/x-pack/legacy/plugins/uptime/server/graphql/monitors/schema.gql.ts
+++ b/x-pack/legacy/plugins/uptime/server/graphql/monitors/schema.gql.ts
@@ -7,19 +7,6 @@
import gql from 'graphql-tag';
export const monitorsSchema = gql`
- type HistogramDataPoint {
- upCount: Int
- downCount: Int
- x: UnsignedInteger
- x0: UnsignedInteger
- y: UnsignedInteger
- }
-
- type DataPoint {
- x: UnsignedInteger
- y: Float
- }
-
"Represents a bucket of monitor status information."
type StatusData {
"The timeseries point for this status data."
@@ -93,11 +80,6 @@ export const monitorsSchema = gql`
monitors: [LatestMonitor!]
}
- type HistogramResult {
- histogram: [HistogramDataPoint]!
- interval: UnsignedInteger!
- }
-
extend type Query {
getMonitors(
dateRangeStart: String!
@@ -106,14 +88,6 @@ export const monitorsSchema = gql`
statusFilter: String
): LatestMonitorsResult
- getSnapshotHistogram(
- dateRangeStart: String!
- dateRangeEnd: String!
- filters: String
- statusFilter: String
- monitorId: String
- ): HistogramResult
-
getMonitorChartsData(
monitorId: String!
dateRangeStart: String!
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 2f72081a70988..fb2052bb4c87f 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
@@ -8,26 +8,12 @@ import { GraphQLSchema } from 'graphql';
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import {
SavedObjectsLegacyService,
- RequestHandler,
IRouter,
CallAPIOptions,
SavedObjectsClientContract,
} from 'src/core/server';
-import { ObjectType } from '@kbn/config-schema';
import { UMKibanaRoute } from '../../../rest_api';
-export interface UMFrameworkRouteOptions<
- P extends ObjectType,
- Q extends ObjectType,
- B extends ObjectType
-> {
- path: string;
- method: string;
- handler: RequestHandler;
- config?: any;
- validate: any;
-}
-
type APICaller = (
endpoint: string,
clientParams: Record,
diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/index.ts b/x-pack/legacy/plugins/uptime/server/lib/adapters/index.ts
index f5ff3b8c62ba9..fbef70f106dd8 100644
--- a/x-pack/legacy/plugins/uptime/server/lib/adapters/index.ts
+++ b/x-pack/legacy/plugins/uptime/server/lib/adapters/index.ts
@@ -8,5 +8,5 @@ export * from './framework';
export * from './monitor_states';
export * from './monitors';
export * from './pings';
-export * from './saved_objects';
+export * from './stub_index_pattern';
export * from './telemetry';
diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/__tests__/__snapshots__/elasticsearch_pings_adapter.test.ts.snap b/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/__tests__/__snapshots__/elasticsearch_pings_adapter.test.ts.snap
index b73595d539e93..1b31f44557df0 100644
--- a/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/__tests__/__snapshots__/elasticsearch_pings_adapter.test.ts.snap
+++ b/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/__tests__/__snapshots__/elasticsearch_pings_adapter.test.ts.snap
@@ -22,7 +22,7 @@ Object {
"y": 1,
},
],
- "interval": 36000,
+ "interval": "1m",
}
`;
@@ -48,7 +48,7 @@ Object {
"y": 1,
},
],
- "interval": 5609564928000,
+ "interval": "1h",
}
`;
@@ -68,7 +68,7 @@ Object {
"y": 1,
},
],
- "interval": 5609564928000,
+ "interval": "1d",
}
`;
@@ -88,7 +88,7 @@ Object {
"y": 1,
},
],
- "interval": 5609564928000,
+ "interval": "1s",
}
`;
@@ -102,7 +102,7 @@ Object {
"y": 1,
},
],
- "interval": 36000,
+ "interval": "10s",
}
`;
@@ -122,6 +122,6 @@ Object {
"y": 1,
},
],
- "interval": 36000,
+ "interval": "1m",
}
`;
diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/__tests__/elasticsearch_pings_adapter.test.ts b/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/__tests__/elasticsearch_pings_adapter.test.ts
index e1e39ac9b2637..866ab110928b4 100644
--- a/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/__tests__/elasticsearch_pings_adapter.test.ts
+++ b/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/__tests__/elasticsearch_pings_adapter.test.ts
@@ -5,8 +5,7 @@
*/
import { set } from 'lodash';
-import { elasticsearchPingsAdapter as adapter } from '../elasticsearch_pings_adapter';
-import { assertCloseTo } from '../../../helper';
+import { elasticsearchPingsAdapter as adapter } from '../es_pings';
describe('ElasticsearchPingsAdapter class', () => {
let mockHits: any[];
@@ -35,6 +34,7 @@ describe('ElasticsearchPingsAdapter class', () => {
},
},
],
+ interval: '1s',
},
},
};
@@ -98,12 +98,11 @@ describe('ElasticsearchPingsAdapter class', () => {
});
const result = await adapter.getPingHistogram({
callES: mockEsClient,
- dateRangeStart: 'now-15m',
- dateRangeEnd: 'now',
- filters: null,
+ dateStart: 'now-15m',
+ dateEnd: 'now',
+ filters: '',
});
- assertCloseTo(result.interval, 36000, 100);
- result.interval = 36000;
+ result.interval = '10s';
expect(mockEsClient).toHaveBeenCalledTimes(1);
expect(result).toMatchSnapshot();
});
@@ -116,12 +115,11 @@ describe('ElasticsearchPingsAdapter class', () => {
const result = await adapter.getPingHistogram({
callES: mockEsClient,
- dateRangeStart: 'now-15m',
- dateRangeEnd: 'now',
- filters: null,
+ dateStart: 'now-15m',
+ dateEnd: 'now',
+ filters: '',
});
- assertCloseTo(result.interval, 36000, 100);
- result.interval = 36000;
+ result.interval = '1m';
expect(mockEsClient).toHaveBeenCalledTimes(1);
expect(result).toMatchSnapshot();
@@ -175,14 +173,13 @@ describe('ElasticsearchPingsAdapter class', () => {
};
const result = await adapter.getPingHistogram({
callES: mockEsClient,
- dateRangeStart: '1234',
- dateRangeEnd: '5678',
+ dateStart: '1234',
+ dateEnd: '5678',
filters: JSON.stringify(searchFilter),
monitorId: undefined,
statusFilter: 'down',
});
- assertCloseTo(result.interval, 5609564928000, 1000);
- result.interval = 5609564928000;
+ result.interval = '1h';
expect(mockEsClient).toHaveBeenCalledTimes(1);
expect(result).toMatchSnapshot();
@@ -229,13 +226,12 @@ describe('ElasticsearchPingsAdapter class', () => {
const filters = `{"bool":{"must":[{"simple_query_string":{"query":"http"}}]}}`;
const result = await adapter.getPingHistogram({
callES: mockEsClient,
- dateRangeStart: 'now-15m',
- dateRangeEnd: 'now',
+ dateStart: 'now-15m',
+ dateEnd: 'now',
filters,
});
- assertCloseTo(result.interval, 36000, 100);
- result.interval = 36000;
+ result.interval = '1m';
expect(mockEsClient).toHaveBeenCalledTimes(1);
expect(result).toMatchSnapshot();
});
@@ -246,14 +242,14 @@ describe('ElasticsearchPingsAdapter class', () => {
mockEsClient.mockReturnValue(standardMockResponse);
const result = await adapter.getPingHistogram({
callES: mockEsClient,
- dateRangeStart: '1234',
- dateRangeEnd: '5678',
+ dateStart: '1234',
+ dateEnd: '5678',
filters: '',
monitorId: undefined,
statusFilter: 'down',
});
- assertCloseTo(result.interval, 5609564928000, 1000);
- result.interval = 5609564928000;
+
+ result.interval = '1d';
expect(mockEsClient).toHaveBeenCalledTimes(1);
expect(result).toMatchSnapshot();
@@ -267,8 +263,8 @@ describe('ElasticsearchPingsAdapter class', () => {
const result = await adapter.getPingHistogram({
callES: mockEsClient,
- dateRangeStart: '1234',
- dateRangeEnd: '5678',
+ dateStart: '1234',
+ dateEnd: '5678',
filters: '',
monitorId: undefined,
statusFilter: 'up',
diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/es_get_ping_historgram.ts b/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/es_get_ping_historgram.ts
new file mode 100644
index 0000000000000..66cae497eb081
--- /dev/null
+++ b/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/es_get_ping_historgram.ts
@@ -0,0 +1,82 @@
+/*
+ * 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 { get } from 'lodash';
+import { INDEX_NAMES, QUERY } from '../../../../common/constants';
+import { parseFilterQuery, getFilterClause } from '../../helper';
+import { UMElasticsearchQueryFn } from '../framework';
+import { GetPingHistogramParams, HistogramResult } from '../../../../common/types';
+import { HistogramQueryResult } from './types';
+
+export const esGetPingHistogram: UMElasticsearchQueryFn<
+ GetPingHistogramParams,
+ HistogramResult
+> = async ({ callES, dateStart, dateEnd, filters, monitorId, statusFilter }) => {
+ const boolFilters = parseFilterQuery(filters);
+ const additionalFilters = [];
+ if (monitorId) {
+ additionalFilters.push({ match: { 'monitor.id': monitorId } });
+ }
+ if (boolFilters) {
+ additionalFilters.push(boolFilters);
+ }
+ const filter = getFilterClause(dateStart, dateEnd, additionalFilters);
+
+ const params = {
+ index: INDEX_NAMES.HEARTBEAT,
+ body: {
+ query: {
+ bool: {
+ filter,
+ },
+ },
+ size: 0,
+ aggs: {
+ timeseries: {
+ auto_date_histogram: {
+ field: '@timestamp',
+ buckets: QUERY.DEFAULT_BUCKET_COUNT,
+ },
+ aggs: {
+ down: {
+ filter: {
+ term: {
+ 'monitor.status': 'down',
+ },
+ },
+ },
+ up: {
+ filter: {
+ term: {
+ 'monitor.status': 'up',
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ };
+
+ const result = await callES('search', params);
+ const interval = result.aggregations.timeseries?.interval;
+ const buckets: HistogramQueryResult[] = get(result, 'aggregations.timeseries.buckets', []);
+ const histogram = buckets.map(bucket => {
+ const x: number = get(bucket, 'key');
+ const downCount: number = get(bucket, 'down.doc_count');
+ const upCount: number = get(bucket, 'up.doc_count');
+ return {
+ x,
+ downCount: statusFilter && statusFilter !== 'down' ? 0 : downCount,
+ upCount: statusFilter && statusFilter !== 'up' ? 0 : upCount,
+ y: 1,
+ };
+ });
+ return {
+ histogram,
+ interval,
+ };
+};
diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/elasticsearch_pings_adapter.ts b/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/es_pings.ts
similarity index 67%
rename from x-pack/legacy/plugins/uptime/server/lib/adapters/pings/elasticsearch_pings_adapter.ts
rename to x-pack/legacy/plugins/uptime/server/lib/adapters/pings/es_pings.ts
index adabffcb1ea4a..93e3a1bd9397b 100644
--- a/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/elasticsearch_pings_adapter.ts
+++ b/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/es_pings.ts
@@ -7,9 +7,8 @@
import { get } from 'lodash';
import { INDEX_NAMES } from '../../../../common/constants';
import { HttpBody, Ping, PingResults } from '../../../../common/graphql/types';
-import { parseFilterQuery, getFilterClause, getHistogramIntervalFormatted } from '../../helper';
-import { UMPingsAdapter, HistogramQueryResult } from './adapter_types';
-import { getHistogramInterval } from '../../helper/get_histogram_interval';
+import { UMPingsAdapter } from './types';
+import { esGetPingHistogram } from './es_get_ping_historgram';
export const elasticsearchPingsAdapter: UMPingsAdapter = {
getAll: async ({
@@ -174,80 +173,7 @@ export const elasticsearchPingsAdapter: UMPingsAdapter = {
return result.hits.hits[0]?._source;
},
- getPingHistogram: async ({
- callES,
- dateRangeStart,
- dateRangeEnd,
- filters,
- monitorId,
- statusFilter,
- }) => {
- const boolFilters = parseFilterQuery(filters);
- const additionalFilters = [];
- if (monitorId) {
- additionalFilters.push({ match: { 'monitor.id': monitorId } });
- }
- if (boolFilters) {
- additionalFilters.push(boolFilters);
- }
- const filter = getFilterClause(dateRangeStart, dateRangeEnd, additionalFilters);
- const interval = getHistogramInterval(dateRangeStart, dateRangeEnd);
- const intervalFormatted = getHistogramIntervalFormatted(dateRangeStart, dateRangeEnd);
-
- const params = {
- index: INDEX_NAMES.HEARTBEAT,
- body: {
- query: {
- bool: {
- filter,
- },
- },
- size: 0,
- aggs: {
- timeseries: {
- date_histogram: {
- field: '@timestamp',
- fixed_interval: intervalFormatted,
- },
- aggs: {
- down: {
- filter: {
- term: {
- 'monitor.status': 'down',
- },
- },
- },
- up: {
- filter: {
- term: {
- 'monitor.status': 'up',
- },
- },
- },
- },
- },
- },
- },
- };
-
- const result = await callES('search', params);
- const buckets: HistogramQueryResult[] = get(result, 'aggregations.timeseries.buckets', []);
- const histogram = buckets.map(bucket => {
- const x: number = get(bucket, 'key');
- const downCount: number = get(bucket, 'down.doc_count');
- const upCount: number = get(bucket, 'up.doc_count');
- return {
- x,
- downCount: statusFilter && statusFilter !== 'down' ? 0 : downCount,
- upCount: statusFilter && statusFilter !== 'up' ? 0 : upCount,
- y: 1,
- };
- });
- return {
- histogram,
- interval,
- };
- },
+ getPingHistogram: esGetPingHistogram,
getDocCount: async ({ callES }) => {
const { count } = await callES('count', { index: INDEX_NAMES.HEARTBEAT });
diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/index.ts b/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/index.ts
index 6d93785e01527..37324a8f521f6 100644
--- a/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/index.ts
+++ b/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/index.ts
@@ -4,5 +4,5 @@
* you may not use this file except in compliance with the Elastic License.
*/
-export * from './adapter_types';
-export { elasticsearchPingsAdapter } from './elasticsearch_pings_adapter';
+export * from './types';
+export { elasticsearchPingsAdapter } from './es_pings';
diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/adapter_types.ts b/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/types.ts
similarity index 79%
rename from x-pack/legacy/plugins/uptime/server/lib/adapters/pings/adapter_types.ts
rename to x-pack/legacy/plugins/uptime/server/lib/adapters/pings/types.ts
index 8b2a49c0c9ffe..b1b1589af2ca7 100644
--- a/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/adapter_types.ts
+++ b/x-pack/legacy/plugins/uptime/server/lib/adapters/pings/types.ts
@@ -5,8 +5,8 @@
*/
import { DocCount, Ping, PingResults } from '../../../../common/graphql/types';
-import { HistogramResult } from '../../../../common/domain_types';
import { UMElasticsearchQueryFn } from '../framework';
+import { GetPingHistogramParams, HistogramResult } from '../../../../common/types';
export interface GetAllParams {
/** @member dateRangeStart timestamp bounds */
@@ -42,19 +42,6 @@ export interface GetLatestMonitorDocsParams {
monitorId?: string | null;
}
-export interface GetPingHistogramParams {
- /** @member dateRangeStart timestamp bounds */
- dateRangeStart: string;
- /** @member dateRangeEnd timestamp bounds */
- dateRangeEnd: string;
- /** @member filters user-defined filters */
- filters?: string | null;
- /** @member monitorId optional limit to monitorId */
- monitorId?: string | null;
- /** @member statusFilter special filter targeting the latest status of each monitor */
- statusFilter?: string | null;
-}
-
/**
* Count the number of documents in heartbeat indices
*/
diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/saved_objects/heartbeat_index_pattern.json b/x-pack/legacy/plugins/uptime/server/lib/adapters/saved_objects/heartbeat_index_pattern.json
deleted file mode 100644
index 444c7510c6a6d..0000000000000
--- a/x-pack/legacy/plugins/uptime/server/lib/adapters/saved_objects/heartbeat_index_pattern.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "attributes": {
- "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\":\"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\":\"client.address\",\"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.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.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\":\"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\":\"destination.address\",\"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.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.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\":\"ecs.version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"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\":\"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.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.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.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.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.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.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.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\":\"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\":\"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.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.status_code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.rtt.content.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.rtt.response_header.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.rtt.total.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.rtt.validate.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.rtt.validate_body.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"http.rtt.write_request.us\",\"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\":\"icmp.requests\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"icmp.rtt.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"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\":\"kubernetes.container.image\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"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.deployment.name\",\"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.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"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.uid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"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.statefulset.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"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.original\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"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\":\"monitor.check_group\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"monitor.duration.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"monitor.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"monitor.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"monitor.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"monitor.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"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\":\"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\":\"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\":\"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.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"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.title\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"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\":\"related.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"resolve.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"resolve.rtt.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"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.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.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.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.ephemeral_id\",\"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\":\"socks5.rtt.connect.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"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.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.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.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\":\"summary.down\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"summary.up\",\"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\":\"tcp.rtt.connect.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"tcp.rtt.validate.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"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\":\"tls.certificate_not_valid_after\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"tls.certificate_not_valid_before\",\"type\":\"date\",\"esTypes\":[\"date\"],\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"tls.rtt.handshake.us\",\"type\":\"number\",\"esTypes\":[\"long\"],\"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.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}]",
- "timeFieldName": "@timestamp",
- "title": "heartbeat-8*"
- },
- "id": "heartbeat-8*",
- "migrationVersion": { "index-pattern": "6.5.0" },
- "references": [],
- "type": "index-pattern",
- "updated_at": "2019-08-20T17:45:34.286Z",
- "version": "1"
-}
diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/saved_objects/kibana_saved_objects_adapter.ts b/x-pack/legacy/plugins/uptime/server/lib/adapters/saved_objects/kibana_saved_objects_adapter.ts
deleted file mode 100644
index 7628c5bac0660..0000000000000
--- a/x-pack/legacy/plugins/uptime/server/lib/adapters/saved_objects/kibana_saved_objects_adapter.ts
+++ /dev/null
@@ -1,25 +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 { UMSavedObjectsAdapter } from './types';
-import uptimeIndexPattern from './heartbeat_index_pattern.json';
-
-export const savedObjectsAdapter: UMSavedObjectsAdapter = {
- getUptimeIndexPattern: async client => {
- try {
- return await client.get('index-pattern', uptimeIndexPattern.id);
- } catch (error) {
- return await client.create(
- 'index-pattern',
- {
- ...uptimeIndexPattern.attributes,
- title: 'UptimeIndexPattern',
- },
- { id: uptimeIndexPattern.id, overwrite: false }
- );
- }
- },
-};
diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/saved_objects/types.ts b/x-pack/legacy/plugins/uptime/server/lib/adapters/stub_index_pattern/index.ts
similarity index 62%
rename from x-pack/legacy/plugins/uptime/server/lib/adapters/saved_objects/types.ts
rename to x-pack/legacy/plugins/uptime/server/lib/adapters/stub_index_pattern/index.ts
index 0fef1e1428e97..4ef6e3fa8a6bd 100644
--- a/x-pack/legacy/plugins/uptime/server/lib/adapters/saved_objects/types.ts
+++ b/x-pack/legacy/plugins/uptime/server/lib/adapters/stub_index_pattern/index.ts
@@ -4,8 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { UMSavedObjectsQueryFn } from '../framework';
-
-export interface UMSavedObjectsAdapter {
- getUptimeIndexPattern: UMSavedObjectsQueryFn;
-}
+export { StubIndexPatternAdapter, stubIndexPatternAdapter } from './stub_index_pattern';
diff --git a/x-pack/legacy/plugins/uptime/server/lib/adapters/stub_index_pattern/stub_index_pattern.ts b/x-pack/legacy/plugins/uptime/server/lib/adapters/stub_index_pattern/stub_index_pattern.ts
new file mode 100644
index 0000000000000..49ec86af25040
--- /dev/null
+++ b/x-pack/legacy/plugins/uptime/server/lib/adapters/stub_index_pattern/stub_index_pattern.ts
@@ -0,0 +1,54 @@
+/*
+ * 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 { APICaller } from 'kibana/server';
+import {
+ IndexPatternsFetcher,
+ IIndexPattern,
+} from '../../../../../../../../src/plugins/data/server';
+import { INDEX_NAMES } from '../../../../common/constants';
+import { UMElasticsearchQueryFn } from '../framework';
+
+export interface StubIndexPatternAdapter {
+ getUptimeIndexPattern: UMElasticsearchQueryFn;
+}
+
+export const stubIndexPatternAdapter: StubIndexPatternAdapter = {
+ getUptimeIndexPattern: async callES => {
+ const indexPatternsFetcher = new IndexPatternsFetcher((...rest: Parameters) =>
+ callES(...rest)
+ );
+
+ // Since `getDynamicIndexPattern` is called in setup_request (and thus by every endpoint)
+ // and since `getFieldsForWildcard` will throw if the specified indices don't exist,
+ // we have to catch errors here to avoid all endpoints returning 500 for users without APM data
+ // (would be a bad first time experience)
+ try {
+ const fields = await indexPatternsFetcher.getFieldsForWildcard({
+ pattern: INDEX_NAMES.HEARTBEAT,
+ });
+
+ const indexPattern: IIndexPattern = {
+ fields,
+ title: INDEX_NAMES.HEARTBEAT,
+ };
+
+ return indexPattern;
+ } catch (e) {
+ const notExists = e.output?.statusCode === 404;
+ if (notExists) {
+ // eslint-disable-next-line no-console
+ console.error(
+ `Could not get dynamic index pattern because indices "${INDEX_NAMES.HEARTBEAT}" don't exist`
+ );
+ return;
+ }
+
+ // re-throw
+ throw e;
+ }
+ },
+};
diff --git a/x-pack/legacy/plugins/uptime/server/lib/compose/kibana.ts b/x-pack/legacy/plugins/uptime/server/lib/compose/kibana.ts
index cc11bf90da5f3..b44a890de3819 100644
--- a/x-pack/legacy/plugins/uptime/server/lib/compose/kibana.ts
+++ b/x-pack/legacy/plugins/uptime/server/lib/compose/kibana.ts
@@ -10,7 +10,7 @@ import { elasticsearchPingsAdapter } from '../adapters/pings';
import { licenseCheck } from '../domains';
import { UMDomainLibs, UMServerLibs } from '../lib';
import { elasticsearchMonitorStatesAdapter } from '../adapters/monitor_states';
-import { savedObjectsAdapter } from '../adapters/saved_objects';
+import { stubIndexPatternAdapter } from '../adapters/stub_index_pattern';
import { UptimeCorePlugins, UptimeCoreSetup } from '../adapters/framework';
export function compose(server: UptimeCoreSetup, plugins: UptimeCorePlugins): UMServerLibs {
@@ -21,7 +21,7 @@ export function compose(server: UptimeCoreSetup, plugins: UptimeCorePlugins): UM
monitors: elasticsearchMonitorsAdapter,
monitorStates: elasticsearchMonitorStatesAdapter,
pings: elasticsearchPingsAdapter,
- savedObjects: savedObjectsAdapter,
+ stubIndexPattern: stubIndexPatternAdapter,
};
return {
diff --git a/x-pack/legacy/plugins/uptime/server/lib/helper/assert_close_to.ts b/x-pack/legacy/plugins/uptime/server/lib/helper/assert_close_to.ts
index 13b6f3688809c..45b76ba25470b 100644
--- a/x-pack/legacy/plugins/uptime/server/lib/helper/assert_close_to.ts
+++ b/x-pack/legacy/plugins/uptime/server/lib/helper/assert_close_to.ts
@@ -8,4 +8,9 @@ export const assertCloseTo = (actual: number, expected: number, precision: numbe
if (Math.abs(expected - actual) > precision) {
throw new Error(`expected [${expected}] to be within ${precision} of ${actual}`);
}
+
+ // if actual is undefined above math condition will be NAN and it will be always false
+ if (actual === undefined) {
+ throw new Error(`expected close to [${expected}] but got [${actual}]`);
+ }
};
diff --git a/x-pack/legacy/plugins/uptime/server/lib/helper/index.ts b/x-pack/legacy/plugins/uptime/server/lib/helper/index.ts
index f9a8de81332d5..eae8023b66ff4 100644
--- a/x-pack/legacy/plugins/uptime/server/lib/helper/index.ts
+++ b/x-pack/legacy/plugins/uptime/server/lib/helper/index.ts
@@ -5,7 +5,6 @@
*/
export { getFilterClause } from './get_filter_clause';
-export { getHistogramInterval } from './get_histogram_interval';
export { getHistogramIntervalFormatted } from './get_histogram_interval_formatted';
export { parseFilterQuery } from './parse_filter_query';
export { assertCloseTo } from './assert_close_to';
diff --git a/x-pack/legacy/plugins/uptime/server/lib/lib.ts b/x-pack/legacy/plugins/uptime/server/lib/lib.ts
index da87c3ebfe301..e5ab9940d482d 100644
--- a/x-pack/legacy/plugins/uptime/server/lib/lib.ts
+++ b/x-pack/legacy/plugins/uptime/server/lib/lib.ts
@@ -9,7 +9,7 @@ import {
UMMonitorsAdapter,
UMMonitorStatesAdapter,
UMPingsAdapter,
- UMSavedObjectsAdapter,
+ StubIndexPatternAdapter,
} from './adapters';
import { UMLicenseCheck } from './domains';
@@ -18,7 +18,7 @@ export interface UMDomainLibs {
monitors: UMMonitorsAdapter;
monitorStates: UMMonitorStatesAdapter;
pings: UMPingsAdapter;
- savedObjects: UMSavedObjectsAdapter;
+ stubIndexPattern: StubIndexPatternAdapter;
}
export interface UMServerLibs extends UMDomainLibs {
diff --git a/x-pack/legacy/plugins/uptime/server/rest_api/index.ts b/x-pack/legacy/plugins/uptime/server/rest_api/index.ts
index e64b317e67f98..91936b499d8e6 100644
--- a/x-pack/legacy/plugins/uptime/server/rest_api/index.ts
+++ b/x-pack/legacy/plugins/uptime/server/rest_api/index.ts
@@ -16,6 +16,7 @@ import {
createGetMonitorLocationsRoute,
createGetStatusBarRoute,
} from './monitors';
+import { createGetPingHistogramRoute } from './pings/get_ping_histogram';
export * from './types';
export { createRouteWithAuth } from './create_route_with_auth';
@@ -31,4 +32,5 @@ export const restApiRoutes: UMRestApiRouteFactory[] = [
createGetSnapshotCount,
createLogMonitorPageRoute,
createLogOverviewPageRoute,
+ createGetPingHistogramRoute,
];
diff --git a/x-pack/legacy/plugins/uptime/server/rest_api/index_pattern/get_index_pattern.ts b/x-pack/legacy/plugins/uptime/server/rest_api/index_pattern/get_index_pattern.ts
index f061307807a42..cee8eaf3f9cae 100644
--- a/x-pack/legacy/plugins/uptime/server/rest_api/index_pattern/get_index_pattern.ts
+++ b/x-pack/legacy/plugins/uptime/server/rest_api/index_pattern/get_index_pattern.ts
@@ -14,11 +14,11 @@ export const createGetIndexPatternRoute: UMRestApiRouteFactory = (libs: UMServer
options: {
tags: ['access:uptime'],
},
- handler: async ({ savedObjectsClient: client }, _context, _request, response): Promise => {
+ handler: async ({ callES }, _context, _request, response): Promise => {
try {
return response.ok({
body: {
- ...(await libs.savedObjects.getUptimeIndexPattern(client, undefined)),
+ ...(await libs.stubIndexPattern.getUptimeIndexPattern(callES)),
},
});
} catch (e) {
diff --git a/x-pack/legacy/plugins/uptime/server/rest_api/pings/get_ping_histogram.ts b/x-pack/legacy/plugins/uptime/server/rest_api/pings/get_ping_histogram.ts
new file mode 100644
index 0000000000000..c8eb2a1e40ad4
--- /dev/null
+++ b/x-pack/legacy/plugins/uptime/server/rest_api/pings/get_ping_histogram.ts
@@ -0,0 +1,44 @@
+/*
+ * 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 { schema } from '@kbn/config-schema';
+import { UMServerLibs } from '../../lib/lib';
+import { UMRestApiRouteFactory } from '../types';
+
+export const createGetPingHistogramRoute: UMRestApiRouteFactory = (libs: UMServerLibs) => ({
+ method: 'GET',
+ path: '/api/uptime/ping/histogram',
+ validate: {
+ query: schema.object({
+ dateStart: schema.string(),
+ dateEnd: schema.string(),
+ monitorId: schema.maybe(schema.string()),
+ statusFilter: schema.maybe(schema.string()),
+ filters: schema.maybe(schema.string()),
+ }),
+ },
+ options: {
+ tags: ['access:uptime'],
+ },
+ handler: async ({ callES }, _context, request, response): Promise => {
+ const { dateStart, dateEnd, statusFilter, monitorId, filters } = request.query;
+
+ const result = await libs.pings.getPingHistogram({
+ callES,
+ dateStart,
+ dateEnd,
+ monitorId,
+ statusFilter,
+ filters,
+ });
+
+ return response.ok({
+ body: {
+ ...result,
+ },
+ });
+ },
+});
diff --git a/x-pack/plugins/console_extensions/kibana.json b/x-pack/plugins/console_extensions/kibana.json
new file mode 100644
index 0000000000000..9411523d3f6dd
--- /dev/null
+++ b/x-pack/plugins/console_extensions/kibana.json
@@ -0,0 +1,8 @@
+{
+ "id": "consoleExtensions",
+ "version": "1.0.0",
+ "kibanaVersion": "kibana",
+ "requiredPlugins": ["console"],
+ "server": true,
+ "ui": false
+}
diff --git a/x-pack/legacy/plugins/uptime/public/lib/helper/to_static_index_pattern.ts b/x-pack/plugins/console_extensions/server/config.ts
similarity index 56%
rename from x-pack/legacy/plugins/uptime/public/lib/helper/to_static_index_pattern.ts
rename to x-pack/plugins/console_extensions/server/config.ts
index b8a12c1e578e3..c429e0fce13fa 100644
--- a/x-pack/legacy/plugins/uptime/public/lib/helper/to_static_index_pattern.ts
+++ b/x-pack/plugins/console_extensions/server/config.ts
@@ -3,9 +3,10 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
+import { schema, TypeOf } from '@kbn/config-schema';
-export const toStaticIndexPattern = (indexPattern: any) => ({
- ...indexPattern,
- fields: JSON.parse(indexPattern.attributes.fields),
- title: indexPattern.id,
+export type ConfigType = TypeOf;
+
+export const config = schema.object({
+ enabled: schema.boolean({ defaultValue: true }),
});
diff --git a/x-pack/plugins/console_extensions/server/index.ts b/x-pack/plugins/console_extensions/server/index.ts
new file mode 100644
index 0000000000000..7fc16d4507da9
--- /dev/null
+++ b/x-pack/plugins/console_extensions/server/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 { PluginInitializerContext, PluginConfigDescriptor } from 'kibana/server';
+
+import { config as configSchema, ConfigType } from './config';
+import { ConsoleExtensionsServerPlugin } from './plugin';
+
+export const plugin = (ctx: PluginInitializerContext) => new ConsoleExtensionsServerPlugin(ctx);
+
+export const config: PluginConfigDescriptor = {
+ schema: configSchema,
+};
diff --git a/x-pack/plugins/console_extensions/server/plugin.ts b/x-pack/plugins/console_extensions/server/plugin.ts
new file mode 100644
index 0000000000000..f4c41aa0a0ad5
--- /dev/null
+++ b/x-pack/plugins/console_extensions/server/plugin.ts
@@ -0,0 +1,32 @@
+/*
+ * 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 { join } from 'path';
+import { CoreSetup, Logger, Plugin, PluginInitializerContext } from 'kibana/server';
+
+import { ConsoleSetup } from '../../../../src/plugins/console/server';
+
+import { processors } from './spec/ingest/index';
+
+interface SetupDependencies {
+ console: ConsoleSetup;
+}
+
+export class ConsoleExtensionsServerPlugin implements Plugin {
+ log: Logger;
+ constructor(private readonly ctx: PluginInitializerContext) {
+ this.log = this.ctx.logger.get();
+ }
+
+ setup(
+ core: CoreSetup,
+ { console: { addProcessorDefinition, addExtensionSpecFilePath } }: SetupDependencies
+ ) {
+ addExtensionSpecFilePath(join(__dirname, 'spec/'));
+ processors.forEach(processor => addProcessorDefinition(processor));
+ this.log.debug('Installed console autocomplete extensions.');
+ }
+ start() {}
+}
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.delete_auto_follow_pattern.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.delete_auto_follow_pattern.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.delete_auto_follow_pattern.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.delete_auto_follow_pattern.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.follow.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.follow.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.follow.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.follow.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.follow_info.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.follow_info.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.follow_info.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.follow_info.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.follow_stats.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.follow_stats.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.follow_stats.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.follow_stats.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.forget_follower.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.forget_follower.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.forget_follower.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.forget_follower.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.get_auto_follow_pattern.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.get_auto_follow_pattern.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.get_auto_follow_pattern.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.get_auto_follow_pattern.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.pause_auto_follow_pattern.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.pause_auto_follow_pattern.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.pause_auto_follow_pattern.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.pause_auto_follow_pattern.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.pause_follow.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.pause_follow.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.pause_follow.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.pause_follow.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.put_auto_follow_pattern.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.put_auto_follow_pattern.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.put_auto_follow_pattern.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.put_auto_follow_pattern.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.resume_auto_follow_pattern.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.resume_auto_follow_pattern.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.resume_auto_follow_pattern.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.resume_auto_follow_pattern.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.resume_follow.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.resume_follow.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.resume_follow.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.resume_follow.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.stats.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.stats.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.stats.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.stats.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ccr.unfollow.json b/x-pack/plugins/console_extensions/server/spec/generated/ccr.unfollow.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ccr.unfollow.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ccr.unfollow.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/enrich.delete_policy.json b/x-pack/plugins/console_extensions/server/spec/generated/enrich.delete_policy.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/enrich.delete_policy.json
rename to x-pack/plugins/console_extensions/server/spec/generated/enrich.delete_policy.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/enrich.execute_policy.json b/x-pack/plugins/console_extensions/server/spec/generated/enrich.execute_policy.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/enrich.execute_policy.json
rename to x-pack/plugins/console_extensions/server/spec/generated/enrich.execute_policy.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/enrich.get_policy.json b/x-pack/plugins/console_extensions/server/spec/generated/enrich.get_policy.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/enrich.get_policy.json
rename to x-pack/plugins/console_extensions/server/spec/generated/enrich.get_policy.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/enrich.put_policy.json b/x-pack/plugins/console_extensions/server/spec/generated/enrich.put_policy.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/enrich.put_policy.json
rename to x-pack/plugins/console_extensions/server/spec/generated/enrich.put_policy.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/enrich.stats.json b/x-pack/plugins/console_extensions/server/spec/generated/enrich.stats.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/enrich.stats.json
rename to x-pack/plugins/console_extensions/server/spec/generated/enrich.stats.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/graph.explore.json b/x-pack/plugins/console_extensions/server/spec/generated/graph.explore.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/graph.explore.json
rename to x-pack/plugins/console_extensions/server/spec/generated/graph.explore.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ilm.delete_lifecycle.json b/x-pack/plugins/console_extensions/server/spec/generated/ilm.delete_lifecycle.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ilm.delete_lifecycle.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ilm.delete_lifecycle.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ilm.explain_lifecycle.json b/x-pack/plugins/console_extensions/server/spec/generated/ilm.explain_lifecycle.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ilm.explain_lifecycle.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ilm.explain_lifecycle.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ilm.get_lifecycle.json b/x-pack/plugins/console_extensions/server/spec/generated/ilm.get_lifecycle.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ilm.get_lifecycle.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ilm.get_lifecycle.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ilm.get_status.json b/x-pack/plugins/console_extensions/server/spec/generated/ilm.get_status.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ilm.get_status.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ilm.get_status.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ilm.move_to_step.json b/x-pack/plugins/console_extensions/server/spec/generated/ilm.move_to_step.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ilm.move_to_step.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ilm.move_to_step.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ilm.put_lifecycle.json b/x-pack/plugins/console_extensions/server/spec/generated/ilm.put_lifecycle.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ilm.put_lifecycle.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ilm.put_lifecycle.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ilm.remove_policy.json b/x-pack/plugins/console_extensions/server/spec/generated/ilm.remove_policy.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ilm.remove_policy.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ilm.remove_policy.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ilm.retry.json b/x-pack/plugins/console_extensions/server/spec/generated/ilm.retry.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ilm.retry.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ilm.retry.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ilm.set_policy.json b/x-pack/plugins/console_extensions/server/spec/generated/ilm.set_policy.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ilm.set_policy.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ilm.set_policy.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ilm.start.json b/x-pack/plugins/console_extensions/server/spec/generated/ilm.start.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ilm.start.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ilm.start.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ilm.stop.json b/x-pack/plugins/console_extensions/server/spec/generated/ilm.stop.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ilm.stop.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ilm.stop.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/indices.freeze.json b/x-pack/plugins/console_extensions/server/spec/generated/indices.freeze.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/indices.freeze.json
rename to x-pack/plugins/console_extensions/server/spec/generated/indices.freeze.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/indices.reload_search_analyzers.json b/x-pack/plugins/console_extensions/server/spec/generated/indices.reload_search_analyzers.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/indices.reload_search_analyzers.json
rename to x-pack/plugins/console_extensions/server/spec/generated/indices.reload_search_analyzers.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/indices.unfreeze.json b/x-pack/plugins/console_extensions/server/spec/generated/indices.unfreeze.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/indices.unfreeze.json
rename to x-pack/plugins/console_extensions/server/spec/generated/indices.unfreeze.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/license.delete.json b/x-pack/plugins/console_extensions/server/spec/generated/license.delete.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/license.delete.json
rename to x-pack/plugins/console_extensions/server/spec/generated/license.delete.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/license.get.json b/x-pack/plugins/console_extensions/server/spec/generated/license.get.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/license.get.json
rename to x-pack/plugins/console_extensions/server/spec/generated/license.get.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/license.get_basic_status.json b/x-pack/plugins/console_extensions/server/spec/generated/license.get_basic_status.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/license.get_basic_status.json
rename to x-pack/plugins/console_extensions/server/spec/generated/license.get_basic_status.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/license.get_trial_status.json b/x-pack/plugins/console_extensions/server/spec/generated/license.get_trial_status.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/license.get_trial_status.json
rename to x-pack/plugins/console_extensions/server/spec/generated/license.get_trial_status.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/license.post.json b/x-pack/plugins/console_extensions/server/spec/generated/license.post.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/license.post.json
rename to x-pack/plugins/console_extensions/server/spec/generated/license.post.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/license.post_start_basic.json b/x-pack/plugins/console_extensions/server/spec/generated/license.post_start_basic.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/license.post_start_basic.json
rename to x-pack/plugins/console_extensions/server/spec/generated/license.post_start_basic.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/license.post_start_trial.json b/x-pack/plugins/console_extensions/server/spec/generated/license.post_start_trial.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/license.post_start_trial.json
rename to x-pack/plugins/console_extensions/server/spec/generated/license.post_start_trial.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/migration.deprecations.json b/x-pack/plugins/console_extensions/server/spec/generated/migration.deprecations.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/migration.deprecations.json
rename to x-pack/plugins/console_extensions/server/spec/generated/migration.deprecations.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/migration.get_assistance.json b/x-pack/plugins/console_extensions/server/spec/generated/migration.get_assistance.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/migration.get_assistance.json
rename to x-pack/plugins/console_extensions/server/spec/generated/migration.get_assistance.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/migration.upgrade.json b/x-pack/plugins/console_extensions/server/spec/generated/migration.upgrade.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/migration.upgrade.json
rename to x-pack/plugins/console_extensions/server/spec/generated/migration.upgrade.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.close_job.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.close_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.close_job.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.close_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_calendar.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_calendar.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_calendar.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.delete_calendar.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_calendar_event.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_calendar_event.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_calendar_event.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.delete_calendar_event.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_calendar_job.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_calendar_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_calendar_job.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.delete_calendar_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_data_frame_analytics.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_data_frame_analytics.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.delete_data_frame_analytics.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_datafeed.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_datafeed.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_datafeed.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.delete_datafeed.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_expired_data.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_expired_data.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_expired_data.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.delete_expired_data.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_filter.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_filter.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_filter.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.delete_filter.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_forecast.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_forecast.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_forecast.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.delete_forecast.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_job.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_job.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.delete_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_model_snapshot.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_model_snapshot.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_model_snapshot.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.delete_model_snapshot.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_trained_model.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_trained_model.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.delete_trained_model.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.delete_trained_model.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.estimate_memory_usage.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.estimate_memory_usage.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.estimate_memory_usage.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.estimate_memory_usage.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.evaluate_data_frame.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.evaluate_data_frame.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.evaluate_data_frame.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.evaluate_data_frame.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.explain_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.explain_data_frame_analytics.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.explain_data_frame_analytics.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.explain_data_frame_analytics.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.find_file_structure.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.find_file_structure.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.find_file_structure.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.find_file_structure.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.flush_job.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.flush_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.flush_job.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.flush_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.forecast.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.forecast.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.forecast.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.forecast.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_buckets.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_buckets.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_buckets.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_buckets.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_calendar_events.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_calendar_events.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_calendar_events.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_calendar_events.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_calendars.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_calendars.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_calendars.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_calendars.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_categories.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_categories.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_categories.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_categories.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_data_frame_analytics.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_data_frame_analytics.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_data_frame_analytics.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_data_frame_analytics_stats.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_data_frame_analytics_stats.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_data_frame_analytics_stats.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_data_frame_analytics_stats.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_datafeed_stats.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_datafeed_stats.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_datafeed_stats.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_datafeed_stats.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_datafeeds.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_datafeeds.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_datafeeds.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_datafeeds.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_filters.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_filters.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_filters.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_filters.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_influencers.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_influencers.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_influencers.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_influencers.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_job_stats.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_job_stats.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_job_stats.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_job_stats.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_jobs.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_jobs.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_jobs.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_jobs.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_model_snapshots.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_model_snapshots.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_model_snapshots.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_model_snapshots.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_overall_buckets.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_overall_buckets.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_overall_buckets.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_overall_buckets.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_records.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_records.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_records.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_records.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_trained_models.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_trained_models.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_trained_models.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_trained_models.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_trained_models_stats.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.get_trained_models_stats.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.get_trained_models_stats.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.get_trained_models_stats.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.info.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.info.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.info.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.info.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.open_job.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.open_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.open_job.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.open_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.post_calendar_events.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.post_calendar_events.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.post_calendar_events.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.post_calendar_events.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.post_data.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.post_data.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.post_data.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.post_data.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.preview_datafeed.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.preview_datafeed.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.preview_datafeed.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.preview_datafeed.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_calendar.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.put_calendar.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_calendar.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.put_calendar.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_calendar_job.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.put_calendar_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_calendar_job.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.put_calendar_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.put_data_frame_analytics.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_data_frame_analytics.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.put_data_frame_analytics.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_datafeed.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.put_datafeed.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_datafeed.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.put_datafeed.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_filter.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.put_filter.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_filter.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.put_filter.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_job.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.put_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_job.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.put_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_trained_model.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.put_trained_model.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.put_trained_model.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.put_trained_model.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.revert_model_snapshot.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.revert_model_snapshot.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.revert_model_snapshot.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.revert_model_snapshot.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.set_upgrade_mode.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.set_upgrade_mode.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.set_upgrade_mode.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.set_upgrade_mode.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.start_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.start_data_frame_analytics.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.start_data_frame_analytics.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.start_data_frame_analytics.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.start_datafeed.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.start_datafeed.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.start_datafeed.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.start_datafeed.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.stop_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.stop_data_frame_analytics.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.stop_data_frame_analytics.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.stop_data_frame_analytics.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.stop_datafeed.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.stop_datafeed.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.stop_datafeed.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.stop_datafeed.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.update_datafeed.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.update_datafeed.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.update_datafeed.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.update_datafeed.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.update_filter.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.update_filter.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.update_filter.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.update_filter.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.update_job.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.update_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.update_job.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.update_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.update_model_snapshot.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.update_model_snapshot.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.update_model_snapshot.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.update_model_snapshot.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.upgrade.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.upgrade.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.upgrade.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.upgrade.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.validate.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.validate.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.validate.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.validate.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ml.validate_detector.json b/x-pack/plugins/console_extensions/server/spec/generated/ml.validate_detector.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ml.validate_detector.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ml.validate_detector.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/monitoring.bulk.json b/x-pack/plugins/console_extensions/server/spec/generated/monitoring.bulk.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/monitoring.bulk.json
rename to x-pack/plugins/console_extensions/server/spec/generated/monitoring.bulk.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/rollup.delete_job.json b/x-pack/plugins/console_extensions/server/spec/generated/rollup.delete_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/rollup.delete_job.json
rename to x-pack/plugins/console_extensions/server/spec/generated/rollup.delete_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/rollup.get_jobs.json b/x-pack/plugins/console_extensions/server/spec/generated/rollup.get_jobs.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/rollup.get_jobs.json
rename to x-pack/plugins/console_extensions/server/spec/generated/rollup.get_jobs.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/rollup.get_rollup_caps.json b/x-pack/plugins/console_extensions/server/spec/generated/rollup.get_rollup_caps.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/rollup.get_rollup_caps.json
rename to x-pack/plugins/console_extensions/server/spec/generated/rollup.get_rollup_caps.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/rollup.get_rollup_index_caps.json b/x-pack/plugins/console_extensions/server/spec/generated/rollup.get_rollup_index_caps.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/rollup.get_rollup_index_caps.json
rename to x-pack/plugins/console_extensions/server/spec/generated/rollup.get_rollup_index_caps.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/rollup.put_job.json b/x-pack/plugins/console_extensions/server/spec/generated/rollup.put_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/rollup.put_job.json
rename to x-pack/plugins/console_extensions/server/spec/generated/rollup.put_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/rollup.rollup_search.json b/x-pack/plugins/console_extensions/server/spec/generated/rollup.rollup_search.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/rollup.rollup_search.json
rename to x-pack/plugins/console_extensions/server/spec/generated/rollup.rollup_search.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/rollup.start_job.json b/x-pack/plugins/console_extensions/server/spec/generated/rollup.start_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/rollup.start_job.json
rename to x-pack/plugins/console_extensions/server/spec/generated/rollup.start_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/rollup.stop_job.json b/x-pack/plugins/console_extensions/server/spec/generated/rollup.stop_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/rollup.stop_job.json
rename to x-pack/plugins/console_extensions/server/spec/generated/rollup.stop_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.authenticate.json b/x-pack/plugins/console_extensions/server/spec/generated/security.authenticate.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.authenticate.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.authenticate.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.change_password.json b/x-pack/plugins/console_extensions/server/spec/generated/security.change_password.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.change_password.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.change_password.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.clear_cached_realms.json b/x-pack/plugins/console_extensions/server/spec/generated/security.clear_cached_realms.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.clear_cached_realms.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.clear_cached_realms.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.clear_cached_roles.json b/x-pack/plugins/console_extensions/server/spec/generated/security.clear_cached_roles.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.clear_cached_roles.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.clear_cached_roles.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.create_api_key.json b/x-pack/plugins/console_extensions/server/spec/generated/security.create_api_key.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.create_api_key.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.create_api_key.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.delete_privileges.json b/x-pack/plugins/console_extensions/server/spec/generated/security.delete_privileges.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.delete_privileges.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.delete_privileges.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.delete_role.json b/x-pack/plugins/console_extensions/server/spec/generated/security.delete_role.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.delete_role.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.delete_role.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.delete_role_mapping.json b/x-pack/plugins/console_extensions/server/spec/generated/security.delete_role_mapping.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.delete_role_mapping.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.delete_role_mapping.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.delete_user.json b/x-pack/plugins/console_extensions/server/spec/generated/security.delete_user.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.delete_user.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.delete_user.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.disable_user.json b/x-pack/plugins/console_extensions/server/spec/generated/security.disable_user.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.disable_user.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.disable_user.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.enable_user.json b/x-pack/plugins/console_extensions/server/spec/generated/security.enable_user.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.enable_user.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.enable_user.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.get_api_key.json b/x-pack/plugins/console_extensions/server/spec/generated/security.get_api_key.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.get_api_key.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.get_api_key.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.get_builtin_privileges.json b/x-pack/plugins/console_extensions/server/spec/generated/security.get_builtin_privileges.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.get_builtin_privileges.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.get_builtin_privileges.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.get_privileges.json b/x-pack/plugins/console_extensions/server/spec/generated/security.get_privileges.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.get_privileges.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.get_privileges.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.get_role.json b/x-pack/plugins/console_extensions/server/spec/generated/security.get_role.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.get_role.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.get_role.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.get_role_mapping.json b/x-pack/plugins/console_extensions/server/spec/generated/security.get_role_mapping.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.get_role_mapping.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.get_role_mapping.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.get_token.json b/x-pack/plugins/console_extensions/server/spec/generated/security.get_token.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.get_token.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.get_token.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.get_user.json b/x-pack/plugins/console_extensions/server/spec/generated/security.get_user.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.get_user.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.get_user.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.get_user_privileges.json b/x-pack/plugins/console_extensions/server/spec/generated/security.get_user_privileges.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.get_user_privileges.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.get_user_privileges.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.has_privileges.json b/x-pack/plugins/console_extensions/server/spec/generated/security.has_privileges.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.has_privileges.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.has_privileges.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.invalidate_api_key.json b/x-pack/plugins/console_extensions/server/spec/generated/security.invalidate_api_key.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.invalidate_api_key.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.invalidate_api_key.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.invalidate_token.json b/x-pack/plugins/console_extensions/server/spec/generated/security.invalidate_token.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.invalidate_token.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.invalidate_token.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.put_privileges.json b/x-pack/plugins/console_extensions/server/spec/generated/security.put_privileges.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.put_privileges.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.put_privileges.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.put_role.json b/x-pack/plugins/console_extensions/server/spec/generated/security.put_role.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.put_role.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.put_role.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.put_role_mapping.json b/x-pack/plugins/console_extensions/server/spec/generated/security.put_role_mapping.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.put_role_mapping.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.put_role_mapping.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/security.put_user.json b/x-pack/plugins/console_extensions/server/spec/generated/security.put_user.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/security.put_user.json
rename to x-pack/plugins/console_extensions/server/spec/generated/security.put_user.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/slm.delete_lifecycle.json b/x-pack/plugins/console_extensions/server/spec/generated/slm.delete_lifecycle.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/slm.delete_lifecycle.json
rename to x-pack/plugins/console_extensions/server/spec/generated/slm.delete_lifecycle.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/slm.execute_lifecycle.json b/x-pack/plugins/console_extensions/server/spec/generated/slm.execute_lifecycle.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/slm.execute_lifecycle.json
rename to x-pack/plugins/console_extensions/server/spec/generated/slm.execute_lifecycle.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/slm.execute_retention.json b/x-pack/plugins/console_extensions/server/spec/generated/slm.execute_retention.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/slm.execute_retention.json
rename to x-pack/plugins/console_extensions/server/spec/generated/slm.execute_retention.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/slm.get_lifecycle.json b/x-pack/plugins/console_extensions/server/spec/generated/slm.get_lifecycle.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/slm.get_lifecycle.json
rename to x-pack/plugins/console_extensions/server/spec/generated/slm.get_lifecycle.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/slm.get_stats.json b/x-pack/plugins/console_extensions/server/spec/generated/slm.get_stats.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/slm.get_stats.json
rename to x-pack/plugins/console_extensions/server/spec/generated/slm.get_stats.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/slm.get_status.json b/x-pack/plugins/console_extensions/server/spec/generated/slm.get_status.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/slm.get_status.json
rename to x-pack/plugins/console_extensions/server/spec/generated/slm.get_status.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/slm.put_lifecycle.json b/x-pack/plugins/console_extensions/server/spec/generated/slm.put_lifecycle.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/slm.put_lifecycle.json
rename to x-pack/plugins/console_extensions/server/spec/generated/slm.put_lifecycle.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/slm.start.json b/x-pack/plugins/console_extensions/server/spec/generated/slm.start.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/slm.start.json
rename to x-pack/plugins/console_extensions/server/spec/generated/slm.start.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/slm.stop.json b/x-pack/plugins/console_extensions/server/spec/generated/slm.stop.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/slm.stop.json
rename to x-pack/plugins/console_extensions/server/spec/generated/slm.stop.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/sql.clear_cursor.json b/x-pack/plugins/console_extensions/server/spec/generated/sql.clear_cursor.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/sql.clear_cursor.json
rename to x-pack/plugins/console_extensions/server/spec/generated/sql.clear_cursor.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/sql.query.json b/x-pack/plugins/console_extensions/server/spec/generated/sql.query.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/sql.query.json
rename to x-pack/plugins/console_extensions/server/spec/generated/sql.query.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/sql.translate.json b/x-pack/plugins/console_extensions/server/spec/generated/sql.translate.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/sql.translate.json
rename to x-pack/plugins/console_extensions/server/spec/generated/sql.translate.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/ssl.certificates.json b/x-pack/plugins/console_extensions/server/spec/generated/ssl.certificates.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/ssl.certificates.json
rename to x-pack/plugins/console_extensions/server/spec/generated/ssl.certificates.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/transform.delete_transform.json b/x-pack/plugins/console_extensions/server/spec/generated/transform.delete_transform.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/transform.delete_transform.json
rename to x-pack/plugins/console_extensions/server/spec/generated/transform.delete_transform.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/transform.get_transform.json b/x-pack/plugins/console_extensions/server/spec/generated/transform.get_transform.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/transform.get_transform.json
rename to x-pack/plugins/console_extensions/server/spec/generated/transform.get_transform.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/transform.get_transform_stats.json b/x-pack/plugins/console_extensions/server/spec/generated/transform.get_transform_stats.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/transform.get_transform_stats.json
rename to x-pack/plugins/console_extensions/server/spec/generated/transform.get_transform_stats.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/transform.preview_transform.json b/x-pack/plugins/console_extensions/server/spec/generated/transform.preview_transform.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/transform.preview_transform.json
rename to x-pack/plugins/console_extensions/server/spec/generated/transform.preview_transform.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/transform.put_transform.json b/x-pack/plugins/console_extensions/server/spec/generated/transform.put_transform.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/transform.put_transform.json
rename to x-pack/plugins/console_extensions/server/spec/generated/transform.put_transform.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/transform.start_transform.json b/x-pack/plugins/console_extensions/server/spec/generated/transform.start_transform.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/transform.start_transform.json
rename to x-pack/plugins/console_extensions/server/spec/generated/transform.start_transform.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/transform.stop_transform.json b/x-pack/plugins/console_extensions/server/spec/generated/transform.stop_transform.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/transform.stop_transform.json
rename to x-pack/plugins/console_extensions/server/spec/generated/transform.stop_transform.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/transform.update_transform.json b/x-pack/plugins/console_extensions/server/spec/generated/transform.update_transform.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/transform.update_transform.json
rename to x-pack/plugins/console_extensions/server/spec/generated/transform.update_transform.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/watcher.ack_watch.json b/x-pack/plugins/console_extensions/server/spec/generated/watcher.ack_watch.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/watcher.ack_watch.json
rename to x-pack/plugins/console_extensions/server/spec/generated/watcher.ack_watch.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/watcher.activate_watch.json b/x-pack/plugins/console_extensions/server/spec/generated/watcher.activate_watch.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/watcher.activate_watch.json
rename to x-pack/plugins/console_extensions/server/spec/generated/watcher.activate_watch.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/watcher.deactivate_watch.json b/x-pack/plugins/console_extensions/server/spec/generated/watcher.deactivate_watch.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/watcher.deactivate_watch.json
rename to x-pack/plugins/console_extensions/server/spec/generated/watcher.deactivate_watch.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/watcher.delete_watch.json b/x-pack/plugins/console_extensions/server/spec/generated/watcher.delete_watch.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/watcher.delete_watch.json
rename to x-pack/plugins/console_extensions/server/spec/generated/watcher.delete_watch.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/watcher.execute_watch.json b/x-pack/plugins/console_extensions/server/spec/generated/watcher.execute_watch.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/watcher.execute_watch.json
rename to x-pack/plugins/console_extensions/server/spec/generated/watcher.execute_watch.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/watcher.get_watch.json b/x-pack/plugins/console_extensions/server/spec/generated/watcher.get_watch.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/watcher.get_watch.json
rename to x-pack/plugins/console_extensions/server/spec/generated/watcher.get_watch.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/watcher.put_watch.json b/x-pack/plugins/console_extensions/server/spec/generated/watcher.put_watch.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/watcher.put_watch.json
rename to x-pack/plugins/console_extensions/server/spec/generated/watcher.put_watch.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/watcher.start.json b/x-pack/plugins/console_extensions/server/spec/generated/watcher.start.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/watcher.start.json
rename to x-pack/plugins/console_extensions/server/spec/generated/watcher.start.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/watcher.stats.json b/x-pack/plugins/console_extensions/server/spec/generated/watcher.stats.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/watcher.stats.json
rename to x-pack/plugins/console_extensions/server/spec/generated/watcher.stats.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/watcher.stop.json b/x-pack/plugins/console_extensions/server/spec/generated/watcher.stop.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/watcher.stop.json
rename to x-pack/plugins/console_extensions/server/spec/generated/watcher.stop.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/xpack.info.json b/x-pack/plugins/console_extensions/server/spec/generated/xpack.info.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/xpack.info.json
rename to x-pack/plugins/console_extensions/server/spec/generated/xpack.info.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/xpack.ssl.certificates.json b/x-pack/plugins/console_extensions/server/spec/generated/xpack.ssl.certificates.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/xpack.ssl.certificates.json
rename to x-pack/plugins/console_extensions/server/spec/generated/xpack.ssl.certificates.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/generated/xpack.usage.json b/x-pack/plugins/console_extensions/server/spec/generated/xpack.usage.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/generated/xpack.usage.json
rename to x-pack/plugins/console_extensions/server/spec/generated/xpack.usage.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/ingest/index.js b/x-pack/plugins/console_extensions/server/spec/ingest/index.ts
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/ingest/index.js
rename to x-pack/plugins/console_extensions/server/spec/ingest/index.ts
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ccr.follow.json b/x-pack/plugins/console_extensions/server/spec/overrides/ccr.follow.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ccr.follow.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ccr.follow.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ccr.forget_follower.json b/x-pack/plugins/console_extensions/server/spec/overrides/ccr.forget_follower.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ccr.forget_follower.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ccr.forget_follower.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ccr.put_auto_follow_pattern.json b/x-pack/plugins/console_extensions/server/spec/overrides/ccr.put_auto_follow_pattern.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ccr.put_auto_follow_pattern.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ccr.put_auto_follow_pattern.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ccr.resume_follow.json b/x-pack/plugins/console_extensions/server/spec/overrides/ccr.resume_follow.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ccr.resume_follow.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ccr.resume_follow.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/enrich.put_policy.json b/x-pack/plugins/console_extensions/server/spec/overrides/enrich.put_policy.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/enrich.put_policy.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/enrich.put_policy.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ilm.move_to_step.json b/x-pack/plugins/console_extensions/server/spec/overrides/ilm.move_to_step.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ilm.move_to_step.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ilm.move_to_step.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ilm.put_lifecycle.json b/x-pack/plugins/console_extensions/server/spec/overrides/ilm.put_lifecycle.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ilm.put_lifecycle.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ilm.put_lifecycle.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.estimate_memory_usage.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.estimate_memory_usage.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.estimate_memory_usage.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.estimate_memory_usage.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.evaluate_data_frame.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.evaluate_data_frame.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.evaluate_data_frame.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.evaluate_data_frame.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.explain_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.explain_data_frame_analytics.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.explain_data_frame_analytics.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.explain_data_frame_analytics.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_buckets.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_buckets.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_buckets.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.get_buckets.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_calendar_events.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_calendar_events.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_calendar_events.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.get_calendar_events.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_calendars.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_calendars.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_calendars.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.get_calendars.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_categories.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_categories.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_categories.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.get_categories.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_influencers.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_influencers.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_influencers.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.get_influencers.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_model_snapshots.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_model_snapshots.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_model_snapshots.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.get_model_snapshots.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_overall_buckets.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_overall_buckets.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_overall_buckets.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.get_overall_buckets.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_records.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_records.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.get_records.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.get_records.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.post_calendar_events.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.post_calendar_events.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.post_calendar_events.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.post_calendar_events.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.put_calendar.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.put_calendar.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.put_calendar.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.put_calendar.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.put_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.put_data_frame_analytics.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.put_data_frame_analytics.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.put_data_frame_analytics.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.put_datafeed.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.put_datafeed.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.put_datafeed.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.put_datafeed.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.put_job.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.put_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.put_job.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.put_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.put_trained_model.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.put_trained_model.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.put_trained_model.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.put_trained_model.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.revert_model_snapshot.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.revert_model_snapshot.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.revert_model_snapshot.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.revert_model_snapshot.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.update_datafeed.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.update_datafeed.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.update_datafeed.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.update_datafeed.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.update_job.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.update_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.update_job.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.update_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/ml.update_model_snapshot.json b/x-pack/plugins/console_extensions/server/spec/overrides/ml.update_model_snapshot.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/ml.update_model_snapshot.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/ml.update_model_snapshot.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/security.authenticate.json b/x-pack/plugins/console_extensions/server/spec/overrides/security.authenticate.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/security.authenticate.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/security.authenticate.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/security.change_password.json b/x-pack/plugins/console_extensions/server/spec/overrides/security.change_password.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/security.change_password.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/security.change_password.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/security.create_api_key.json b/x-pack/plugins/console_extensions/server/spec/overrides/security.create_api_key.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/security.create_api_key.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/security.create_api_key.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/security.delete_privileges.json b/x-pack/plugins/console_extensions/server/spec/overrides/security.delete_privileges.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/security.delete_privileges.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/security.delete_privileges.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/security.get_token.json b/x-pack/plugins/console_extensions/server/spec/overrides/security.get_token.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/security.get_token.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/security.get_token.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/security.has_privileges.json b/x-pack/plugins/console_extensions/server/spec/overrides/security.has_privileges.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/security.has_privileges.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/security.has_privileges.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/security.invalidate_api_key.json b/x-pack/plugins/console_extensions/server/spec/overrides/security.invalidate_api_key.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/security.invalidate_api_key.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/security.invalidate_api_key.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/security.invalidate_token.json b/x-pack/plugins/console_extensions/server/spec/overrides/security.invalidate_token.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/security.invalidate_token.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/security.invalidate_token.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/security.put_privileges.json b/x-pack/plugins/console_extensions/server/spec/overrides/security.put_privileges.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/security.put_privileges.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/security.put_privileges.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/security.put_role.json b/x-pack/plugins/console_extensions/server/spec/overrides/security.put_role.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/security.put_role.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/security.put_role.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/security.put_role_mapping.json b/x-pack/plugins/console_extensions/server/spec/overrides/security.put_role_mapping.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/security.put_role_mapping.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/security.put_role_mapping.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/security.put_user.json b/x-pack/plugins/console_extensions/server/spec/overrides/security.put_user.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/security.put_user.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/security.put_user.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/slm.put_lifecycle.json b/x-pack/plugins/console_extensions/server/spec/overrides/slm.put_lifecycle.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/slm.put_lifecycle.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/slm.put_lifecycle.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/slm.start.json b/x-pack/plugins/console_extensions/server/spec/overrides/slm.start.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/slm.start.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/slm.start.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/slm.stop.json b/x-pack/plugins/console_extensions/server/spec/overrides/slm.stop.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/slm.stop.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/slm.stop.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/sql.query.json b/x-pack/plugins/console_extensions/server/spec/overrides/sql.query.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/sql.query.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/sql.query.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/transform.get_transform_stats.json b/x-pack/plugins/console_extensions/server/spec/overrides/transform.get_transform_stats.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/transform.get_transform_stats.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/transform.get_transform_stats.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/transform.preview_transform.json b/x-pack/plugins/console_extensions/server/spec/overrides/transform.preview_transform.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/transform.preview_transform.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/transform.preview_transform.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/transform.put_transform.json b/x-pack/plugins/console_extensions/server/spec/overrides/transform.put_transform.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/transform.put_transform.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/transform.put_transform.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/transform.stop_transform.json b/x-pack/plugins/console_extensions/server/spec/overrides/transform.stop_transform.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/transform.stop_transform.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/transform.stop_transform.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/transform.update_transform.json b/x-pack/plugins/console_extensions/server/spec/overrides/transform.update_transform.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/transform.update_transform.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/transform.update_transform.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.graph.explore.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.graph.explore.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.graph.explore.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.graph.explore.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.info.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.info.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.info.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.info.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.license.post.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.license.post.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.license.post.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.license.post.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.rollup.delete_job.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.rollup.delete_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.rollup.delete_job.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.rollup.delete_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.rollup.put_job.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.rollup.put_job.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.rollup.put_job.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.rollup.put_job.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.rollup.rollup_search.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.rollup.rollup_search.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.rollup.rollup_search.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.rollup.rollup_search.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.authenticate.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.authenticate.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.authenticate.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.authenticate.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.change_password.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.change_password.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.change_password.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.change_password.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.get_token.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.get_token.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.get_token.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.get_token.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.invalidate_token.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.invalidate_token.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.invalidate_token.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.invalidate_token.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.put_role.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.put_role.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.put_role.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.put_role.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.put_role_mapping.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.put_role_mapping.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.put_role_mapping.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.put_role_mapping.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.put_user.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.put_user.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.security.put_user.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.put_user.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.watcher.execute_watch.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.watcher.execute_watch.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.watcher.execute_watch.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.watcher.execute_watch.json
diff --git a/x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.watcher.put_watch.json b/x-pack/plugins/console_extensions/server/spec/overrides/xpack.watcher.put_watch.json
similarity index 100%
rename from x-pack/legacy/plugins/console_extensions/spec/overrides/xpack.watcher.put_watch.json
rename to x-pack/plugins/console_extensions/server/spec/overrides/xpack.watcher.put_watch.json
diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_histogram.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_histogram.json
deleted file mode 100644
index cf88ccae9cb99..0000000000000
--- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_histogram.json
+++ /dev/null
@@ -1,188 +0,0 @@
-{
- "queryResult": {
- "histogram": [
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172657286,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172680087,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172702888,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568172725689,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172748490,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172771291,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 92,
- "downCount": 8,
- "x": 1568172794092,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568172816893,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172839694,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172862495,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172885296,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568172908097,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172930898,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172953699,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 92,
- "downCount": 8,
- "x": 1568172976500,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568172999301,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173022102,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173044903,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173067704,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568173090505,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173113306,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173136107,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 92,
- "downCount": 8,
- "x": 1568173158908,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173181709,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568173204510,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173227311,
- "x0": null,
- "y": 1
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_histogram_by_filter.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_histogram_by_filter.json
deleted file mode 100644
index 383d4acd96340..0000000000000
--- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_histogram_by_filter.json
+++ /dev/null
@@ -1,188 +0,0 @@
-{
- "queryResult": {
- "histogram": [
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568172657286,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568172680087,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568172702888,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568172725689,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568172748490,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568172771291,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 92,
- "downCount": 0,
- "x": 1568172794092,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568172816893,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568172839694,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568172862495,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568172885296,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568172908097,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568172930898,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568172953699,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 92,
- "downCount": 0,
- "x": 1568172976500,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568172999301,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568173022102,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568173044903,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568173067704,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568173090505,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568173113306,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568173136107,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 92,
- "downCount": 0,
- "x": 1568173158908,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568173181709,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568173204510,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 0,
- "x": 1568173227311,
- "x0": null,
- "y": 1
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_histogram_by_id.json b/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_histogram_by_id.json
deleted file mode 100644
index cf88ccae9cb99..0000000000000
--- a/x-pack/test/api_integration/apis/uptime/graphql/fixtures/snapshot_histogram_by_id.json
+++ /dev/null
@@ -1,188 +0,0 @@
-{
- "queryResult": {
- "histogram": [
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172657286,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172680087,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172702888,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568172725689,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172748490,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172771291,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 92,
- "downCount": 8,
- "x": 1568172794092,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568172816893,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172839694,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172862495,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172885296,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568172908097,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172930898,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568172953699,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 92,
- "downCount": 8,
- "x": 1568172976500,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568172999301,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173022102,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173044903,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173067704,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568173090505,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173113306,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173136107,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 92,
- "downCount": 8,
- "x": 1568173158908,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173181709,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 0,
- "downCount": 0,
- "x": 1568173204510,
- "x0": null,
- "y": 1
- },
- {
- "upCount": 93,
- "downCount": 7,
- "x": 1568173227311,
- "x0": null,
- "y": 1
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/x-pack/test/api_integration/apis/uptime/graphql/index.js b/x-pack/test/api_integration/apis/uptime/graphql/index.js
index 64999761fde4e..54284377ec430 100644
--- a/x-pack/test/api_integration/apis/uptime/graphql/index.js
+++ b/x-pack/test/api_integration/apis/uptime/graphql/index.js
@@ -14,6 +14,5 @@ export default function({ loadTestFile }) {
loadTestFile(require.resolve('./monitor_charts'));
loadTestFile(require.resolve('./monitor_states'));
loadTestFile(require.resolve('./ping_list'));
- loadTestFile(require.resolve('./snapshot_histogram'));
});
}
diff --git a/x-pack/test/api_integration/apis/uptime/graphql/snapshot_histogram.ts b/x-pack/test/api_integration/apis/uptime/graphql/snapshot_histogram.ts
deleted file mode 100644
index 02fd3fd630d4b..0000000000000
--- a/x-pack/test/api_integration/apis/uptime/graphql/snapshot_histogram.ts
+++ /dev/null
@@ -1,88 +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 { snapshotHistogramQueryString } from '../../../../../legacy/plugins/uptime/public/queries/snapshot_histogram_query';
-import { expectFixtureEql } from './helpers/expect_fixture_eql';
-import { FtrProviderContext } from '../../../ftr_provider_context';
-import { assertCloseTo } from '../../../../../legacy/plugins/uptime/server/lib/helper';
-
-export default function({ getService }: FtrProviderContext) {
- describe('snapshotHistogram', () => {
- before('load heartbeat data', () => getService('esArchiver').load('uptime/full_heartbeat'));
- after('unload heartbeat index', () => getService('esArchiver').unload('uptime/full_heartbeat'));
-
- const supertest = getService('supertest');
-
- it('will fetch histogram data for all monitors', async () => {
- const getSnapshotHistogramQuery = {
- operationName: 'SnapshotHistogram',
- query: snapshotHistogramQueryString,
- variables: {
- dateRangeStart: '2019-09-11T03:31:04.380Z',
- dateRangeEnd: '2019-09-11T03:40:34.410Z',
- },
- };
-
- const {
- body: { data },
- } = await supertest
- .post('/api/uptime/graphql')
- .set('kbn-xsrf', 'foo')
- .send({ ...getSnapshotHistogramQuery });
- // manually testing this value and then removing it to avoid flakiness
- const { interval } = data.queryResult;
- assertCloseTo(interval, 22801, 100);
- delete data.queryResult.interval;
- expectFixtureEql(data, 'snapshot_histogram');
- });
-
- it('will fetch histogram data for a given monitor id', async () => {
- const getSnapshotHistogramQuery = {
- operationName: 'SnapshotHistogram',
- query: snapshotHistogramQueryString,
- variables: {
- dateRangeStart: '2019-09-11T03:31:04.380Z',
- dateRangeEnd: '2019-09-11T03:40:34.410Z',
- },
- };
-
- const {
- body: { data },
- } = await supertest
- .post('/api/uptime/graphql')
- .set('kbn-xsrf', 'foo')
- .send({ ...getSnapshotHistogramQuery });
- const { interval } = data.queryResult;
- assertCloseTo(interval, 22801, 100);
- delete data.queryResult.interval;
- expectFixtureEql(data, 'snapshot_histogram_by_id');
- });
-
- it('will fetch histogram data for a given filter', async () => {
- const getSnapshotHistogramQuery = {
- operationName: 'SnapshotHistogram',
- query: snapshotHistogramQueryString,
- variables: {
- dateRangeStart: '2019-09-11T03:31:04.380Z',
- dateRangeEnd: '2019-09-11T03:40:34.410Z',
- filters:
- '{"bool":{"must":[{"match":{"monitor.status":{"query":"up","operator":"and"}}}]}}',
- },
- };
-
- const {
- body: { data },
- } = await supertest
- .post('/api/uptime/graphql')
- .set('kbn-xsrf', 'foo')
- .send({ ...getSnapshotHistogramQuery });
- const { interval } = data.queryResult;
- assertCloseTo(interval, 22801, 100);
- delete data.queryResult.interval;
- expectFixtureEql(data, 'snapshot_histogram_by_filter');
- });
- });
-}
diff --git a/x-pack/test/api_integration/apis/uptime/rest/fixtures/ping_histogram.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/ping_histogram.json
new file mode 100644
index 0000000000000..972d1fd51760c
--- /dev/null
+++ b/x-pack/test/api_integration/apis/uptime/rest/fixtures/ping_histogram.json
@@ -0,0 +1,24 @@
+{
+ "histogram": [
+ { "x": 1568172664000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568172694000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568172724000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568172754000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568172784000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568172814000, "downCount": 8, "upCount": 92, "y": 1 },
+ { "x": 1568172844000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568172874000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568172904000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568172934000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568172964000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568172994000, "downCount": 8, "upCount": 92, "y": 1 },
+ { "x": 1568173024000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568173054000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568173084000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568173114000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568173144000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568173174000, "downCount": 8, "upCount": 92, "y": 1 },
+ { "x": 1568173204000, "downCount": 7, "upCount": 93, "y": 1 },
+ { "x": 1568173234000, "downCount": 7, "upCount": 93, "y": 1 }
+ ]
+}
diff --git a/x-pack/test/api_integration/apis/uptime/rest/fixtures/ping_histogram_by_filter.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/ping_histogram_by_filter.json
new file mode 100644
index 0000000000000..72b2d5276e025
--- /dev/null
+++ b/x-pack/test/api_integration/apis/uptime/rest/fixtures/ping_histogram_by_filter.json
@@ -0,0 +1,24 @@
+{
+ "histogram": [
+ { "x": 1568172664000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568172694000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568172724000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568172754000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568172784000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568172814000, "downCount": 0, "upCount": 92, "y": 1 },
+ { "x": 1568172844000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568172874000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568172904000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568172934000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568172964000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568172994000, "downCount": 0, "upCount": 92, "y": 1 },
+ { "x": 1568173024000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568173054000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568173084000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568173114000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568173144000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568173174000, "downCount": 0, "upCount": 92, "y": 1 },
+ { "x": 1568173204000, "downCount": 0, "upCount": 93, "y": 1 },
+ { "x": 1568173234000, "downCount": 0, "upCount": 93, "y": 1 }
+ ]
+}
diff --git a/x-pack/test/api_integration/apis/uptime/rest/fixtures/ping_histogram_by_id.json b/x-pack/test/api_integration/apis/uptime/rest/fixtures/ping_histogram_by_id.json
new file mode 100644
index 0000000000000..8e184b247ab52
--- /dev/null
+++ b/x-pack/test/api_integration/apis/uptime/rest/fixtures/ping_histogram_by_id.json
@@ -0,0 +1,24 @@
+{
+ "histogram": [
+ { "x": 1568172664000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568172694000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568172724000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568172754000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568172784000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568172814000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568172844000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568172874000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568172904000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568172934000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568172964000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568172994000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568173024000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568173054000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568173084000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568173114000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568173144000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568173174000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568173204000, "downCount": 0, "upCount": 1, "y": 1 },
+ { "x": 1568173234000, "downCount": 0, "upCount": 1, "y": 1 }
+ ]
+}
diff --git a/x-pack/test/api_integration/apis/uptime/rest/index.ts b/x-pack/test/api_integration/apis/uptime/rest/index.ts
index a86411f7c49ec..30c301c5ecb17 100644
--- a/x-pack/test/api_integration/apis/uptime/rest/index.ts
+++ b/x-pack/test/api_integration/apis/uptime/rest/index.ts
@@ -19,6 +19,7 @@ export default function({ getService, loadTestFile }: FtrProviderContext) {
after('unload', () => esArchiver.unload('uptime/full_heartbeat'));
loadTestFile(require.resolve('./monitor_latest_status'));
loadTestFile(require.resolve('./selected_monitor'));
+ loadTestFile(require.resolve('./ping_histogram'));
});
});
}
diff --git a/x-pack/test/api_integration/apis/uptime/rest/ping_histogram.ts b/x-pack/test/api_integration/apis/uptime/rest/ping_histogram.ts
new file mode 100644
index 0000000000000..429f50ec0aa5b
--- /dev/null
+++ b/x-pack/test/api_integration/apis/uptime/rest/ping_histogram.ts
@@ -0,0 +1,64 @@
+/*
+ * 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 { expectFixtureEql } from '../graphql/helpers/expect_fixture_eql';
+import { FtrProviderContext } from '../../../ftr_provider_context';
+import { assertCloseTo } from '../../../../../legacy/plugins/uptime/server/lib/helper';
+
+export default function({ getService }: FtrProviderContext) {
+ describe('pingHistogram', () => {
+ const supertest = getService('supertest');
+
+ it('will fetch histogram data for all monitors', async () => {
+ const dateStart = '2019-09-11T03:31:04.380Z';
+ const dateEnd = '2019-09-11T03:40:34.410Z';
+
+ const apiResponse = await supertest.get(
+ `/api/uptime/ping/histogram?dateStart=${dateStart}&dateEnd=${dateEnd}`
+ );
+ const data = apiResponse.body;
+
+ // manually testing this value and then removing it to avoid flakiness
+ const { interval } = data;
+ assertCloseTo(interval, 22801, 100);
+ delete data.interval;
+ expectFixtureEql(data, 'ping_histogram');
+ });
+
+ it('will fetch histogram data for a given monitor id', async () => {
+ const dateStart = '2019-09-11T03:31:04.380Z';
+ const dateEnd = '2019-09-11T03:40:34.410Z';
+ const monitorId = '0002-up';
+
+ const apiResponse = await supertest.get(
+ `/api/uptime/ping/histogram?monitorId=${monitorId}&dateStart=${dateStart}&dateEnd=${dateEnd}`
+ );
+ const data = apiResponse.body;
+
+ const { interval } = data;
+ assertCloseTo(interval, 22801, 100);
+ delete data.interval;
+ expectFixtureEql(data, 'ping_histogram_by_id');
+ });
+
+ it('will fetch histogram data for a given filter', async () => {
+ const dateStart = '2019-09-11T03:31:04.380Z';
+ const dateEnd = '2019-09-11T03:40:34.410Z';
+ const filters =
+ '{"bool":{"must":[{"match":{"monitor.status":{"query":"up","operator":"and"}}}]}}';
+
+ const apiResponse = await supertest.get(
+ `/api/uptime/ping/histogram?dateStart=${dateStart}&dateEnd=${dateEnd}&filters=${filters}`
+ );
+ const data = apiResponse.body;
+
+ const { interval } = data;
+ assertCloseTo(interval, 22801, 100);
+ delete data.interval;
+ expectFixtureEql(data, 'ping_histogram_by_filter');
+ });
+ });
+}
diff --git a/x-pack/test/kerberos_api_integration/config.ts b/x-pack/test/kerberos_api_integration/config.ts
index a1e1466ae40ed..5de397a4cca1a 100644
--- a/x-pack/test/kerberos_api_integration/config.ts
+++ b/x-pack/test/kerberos_api_integration/config.ts
@@ -34,6 +34,7 @@ export default async function({ readConfigFile }: FtrConfigProviderContext) {
...xPackAPITestsConfig.get('esTestCluster.serverArgs'),
'xpack.security.authc.token.enabled=true',
'xpack.security.authc.token.timeout=15s',
+ 'xpack.security.authc.realms.kerberos.kerb1.order=0',
`xpack.security.authc.realms.kerberos.kerb1.keytab.path=${kerberosKeytabPath}`,
],
serverEnvVars: {