mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[ES client] Rename deprecated params (#115528)
* filterPath --> filter_path * ignoreUnavailable --> ignore_unavailable * ignoreUnavailable --> ignore_unavailable * trackScores --> track_scores * trackTotalHits --> track_total_hits * rollback unnecessary changes
This commit is contained in:
parent
7e593a05a2
commit
c6fcde9a8b
104 changed files with 280 additions and 280 deletions
|
@ -61,7 +61,7 @@ describe('server/index_patterns/service/lib/es_api', () => {
|
|||
expect(resp).toBe(football);
|
||||
});
|
||||
|
||||
it('sets ignoreUnavailable and allowNoIndices params', async () => {
|
||||
it('sets ignore_unavailable and allow_no_indices params', async () => {
|
||||
const getAlias = sinon.stub();
|
||||
const callCluster = {
|
||||
indices: {
|
||||
|
@ -149,7 +149,7 @@ describe('server/index_patterns/service/lib/es_api', () => {
|
|||
expect(resp).toBe(football);
|
||||
});
|
||||
|
||||
it('sets ignoreUnavailable, allowNoIndices, and fields params', async () => {
|
||||
it('sets ignore_unavailable, allow_no_indices, and fields params', async () => {
|
||||
const fieldCaps = sinon.stub();
|
||||
const callCluster = {
|
||||
indices: {
|
||||
|
|
|
@ -26,8 +26,8 @@ describe('getSavedObjectsCounts', () => {
|
|||
expect(results).toStrictEqual([]);
|
||||
expect(esClient.search).toHaveBeenCalledWith({
|
||||
index: '.kibana',
|
||||
ignoreUnavailable: true,
|
||||
filterPath: 'aggregations.types.buckets',
|
||||
ignore_unavailable: true,
|
||||
filter_path: 'aggregations.types.buckets',
|
||||
body: {
|
||||
size: 0,
|
||||
query: { match_all: {} },
|
||||
|
@ -41,8 +41,8 @@ describe('getSavedObjectsCounts', () => {
|
|||
await getSavedObjectsCounts(esClient, '.kibana');
|
||||
expect(esClient.search).toHaveBeenCalledWith({
|
||||
index: '.kibana',
|
||||
ignoreUnavailable: true,
|
||||
filterPath: 'aggregations.types.buckets',
|
||||
ignore_unavailable: true,
|
||||
filter_path: 'aggregations.types.buckets',
|
||||
body: {
|
||||
size: 0,
|
||||
query: { match_all: {} },
|
||||
|
@ -56,8 +56,8 @@ describe('getSavedObjectsCounts', () => {
|
|||
await getSavedObjectsCounts(esClient, '.kibana', ['type_one', 'type_two']);
|
||||
expect(esClient.search).toHaveBeenCalledWith({
|
||||
index: '.kibana',
|
||||
ignoreUnavailable: true,
|
||||
filterPath: 'aggregations.types.buckets',
|
||||
ignore_unavailable: true,
|
||||
filter_path: 'aggregations.types.buckets',
|
||||
body: {
|
||||
size: 0,
|
||||
query: { terms: { type: ['type_one', 'type_two'] } },
|
||||
|
|
|
@ -17,8 +17,8 @@ export async function getSavedObjectsCounts(
|
|||
|
||||
const savedObjectCountSearchParams = {
|
||||
index: kibanaIndex,
|
||||
ignoreUnavailable: true,
|
||||
filterPath: 'aggregations.types.buckets',
|
||||
ignore_unavailable: true,
|
||||
filter_path: 'aggregations.types.buckets',
|
||||
body: {
|
||||
size: 0,
|
||||
query,
|
||||
|
|
|
@ -147,8 +147,8 @@ const customElementCollector: TelemetryCollector = async function customElementC
|
|||
const customElementParams = {
|
||||
size: 10000,
|
||||
index: kibanaIndex,
|
||||
ignoreUnavailable: true,
|
||||
filterPath: [`hits.hits._source.${CUSTOM_ELEMENT_TYPE}.content`],
|
||||
ignore_unavailable: true,
|
||||
filter_path: [`hits.hits._source.${CUSTOM_ELEMENT_TYPE}.content`],
|
||||
body: { query: { bool: { filter: { term: { type: CUSTOM_ELEMENT_TYPE } } } } },
|
||||
};
|
||||
|
||||
|
|
|
@ -381,8 +381,8 @@ const workpadCollector: TelemetryCollector = async function (kibanaIndex, esClie
|
|||
const searchParams = {
|
||||
size: 10000, // elasticsearch index.max_result_window default value
|
||||
index: kibanaIndex,
|
||||
ignoreUnavailable: true,
|
||||
filterPath: ['hits.hits._source.canvas-workpad', '-hits.hits._source.canvas-workpad.assets'],
|
||||
ignore_unavailable: true,
|
||||
filter_path: ['hits.hits._source.canvas-workpad', '-hits.hits._source.canvas-workpad.assets'],
|
||||
body: { query: { bool: { filter: { term: { type: CANVAS_TYPE } } } } },
|
||||
};
|
||||
|
||||
|
|
|
@ -69,9 +69,9 @@ export class InfraKibanaLogEntriesAdapter implements LogEntriesAdapter {
|
|||
};
|
||||
|
||||
const esQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: resolvedLogSourceConfiguration.indices,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
size: size + 1, // Extra one to test if it has more before or after
|
||||
track_total_hits: false,
|
||||
|
@ -139,9 +139,9 @@ export class InfraKibanaLogEntriesAdapter implements LogEntriesAdapter {
|
|||
);
|
||||
|
||||
const query = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: resolvedLogSourceConfiguration.indices,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
count_by_date: {
|
||||
|
|
|
@ -14,8 +14,8 @@ export const checkValidNode = async (
|
|||
id: string
|
||||
): Promise<boolean> => {
|
||||
const params = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
index: indexPattern,
|
||||
terminateAfter: 1,
|
||||
body: {
|
||||
|
|
|
@ -18,13 +18,13 @@ export class InfraElasticsearchSourceStatusAdapter implements InfraSourceStatusA
|
|||
this.framework
|
||||
.callWithRequest(requestContext, 'indices.getAlias', {
|
||||
name: aliasName,
|
||||
filterPath: '*.settings.index.uuid', // to keep the response size as small as possible
|
||||
filter_path: '*.settings.index.uuid', // to keep the response size as small as possible
|
||||
})
|
||||
.catch(withDefaultIfNotFound<InfraDatabaseGetIndicesResponse>({})),
|
||||
this.framework
|
||||
.callWithRequest(requestContext, 'indices.get', {
|
||||
index: aliasName,
|
||||
filterPath: '*.settings.index.uuid', // to keep the response size as small as possible
|
||||
filter_path: '*.settings.index.uuid', // to keep the response size as small as possible
|
||||
})
|
||||
.catch(withDefaultIfNotFound<InfraDatabaseGetIndicesResponse>({})),
|
||||
]);
|
||||
|
|
|
@ -65,10 +65,10 @@ export const createLogEntryDatasetsQuery = (
|
|||
});
|
||||
|
||||
const defaultRequestParameters = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
trackScores: false,
|
||||
trackTotalHits: false,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_scores: false,
|
||||
track_total_hits: false,
|
||||
};
|
||||
|
||||
const compositeDatasetKeyRT = rt.type({
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
|
||||
export const defaultRequestParameters = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
trackScores: false,
|
||||
trackTotalHits: false,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_scores: false,
|
||||
track_total_hits: false,
|
||||
};
|
||||
|
||||
export const createJobIdFilters = (jobId: string) => [
|
||||
|
|
|
@ -27,10 +27,10 @@ describe('createMetricsHostAnomaliesQuery', () => {
|
|||
pagination,
|
||||
})
|
||||
).toMatchObject({
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
trackScores: false,
|
||||
trackTotalHits: false,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_scores: false,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
query: {
|
||||
bool: {
|
||||
|
|
|
@ -27,10 +27,10 @@ describe('createMetricsK8sAnomaliesQuery', () => {
|
|||
pagination,
|
||||
})
|
||||
).toMatchObject({
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
trackScores: false,
|
||||
trackTotalHits: false,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_scores: false,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
query: {
|
||||
bool: {
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
|
||||
export const defaultRequestParameters = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
trackScores: false,
|
||||
trackTotalHits: false,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_scores: false,
|
||||
track_total_hits: false,
|
||||
};
|
||||
|
||||
export const createJobIdFilters = (jobId: string) => [
|
||||
|
|
|
@ -47,8 +47,8 @@ export const query = async (
|
|||
];
|
||||
|
||||
const params = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
index: options.indexPattern,
|
||||
body: {
|
||||
size: 0,
|
||||
|
|
|
@ -10,9 +10,9 @@ import { ESSearchClient } from '../metrics/types';
|
|||
export const hasData = async (index: string, client: ESSearchClient) => {
|
||||
const params = {
|
||||
index,
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
terminate_after: 1,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
size: 0,
|
||||
},
|
||||
|
|
|
@ -40,8 +40,8 @@ export const getCloudMetadata = async (
|
|||
}
|
||||
|
||||
const metricQuery = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
index: sourceConfiguration.metricAlias,
|
||||
body: {
|
||||
query: {
|
||||
|
|
|
@ -26,8 +26,8 @@ export const getCloudMetricsMetadata = async (
|
|||
timeRange: { from: number; to: number }
|
||||
): Promise<InfraCloudMetricsAdapterResponse> => {
|
||||
const metricQuery = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
index: sourceConfiguration.metricAlias,
|
||||
body: {
|
||||
query: {
|
||||
|
|
|
@ -32,8 +32,8 @@ export const getMetricMetadata = async (
|
|||
): Promise<InfraMetricsAdapterResponse> => {
|
||||
const fields = findInventoryFields(nodeType, sourceConfiguration.fields);
|
||||
const metricQuery = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
index: sourceConfiguration.metricAlias,
|
||||
body: {
|
||||
query: {
|
||||
|
|
|
@ -53,8 +53,8 @@ export const getNodeInfo = async (
|
|||
const fields = findInventoryFields(nodeType, sourceConfiguration.fields);
|
||||
const timestampField = sourceConfiguration.fields.timestamp;
|
||||
const params = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
terminateAfter: 1,
|
||||
index: sourceConfiguration.metricAlias,
|
||||
body: {
|
||||
|
|
|
@ -22,8 +22,8 @@ export const getPodNodeName = async (
|
|||
const fields = findInventoryFields(nodeType, sourceConfiguration.fields);
|
||||
const timestampField = sourceConfiguration.fields.timestamp;
|
||||
const params = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
terminateAfter: 1,
|
||||
index: sourceConfiguration.metricAlias,
|
||||
body: {
|
||||
|
|
|
@ -22,8 +22,8 @@ export const getDatasetForField = async (
|
|||
timerange: { field: string; to: number; from: number }
|
||||
) => {
|
||||
const params = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
terminateAfter: 1,
|
||||
index: indexPattern,
|
||||
body: {
|
||||
|
|
|
@ -41,8 +41,8 @@ export const queryTotalGroupings = async (
|
|||
}
|
||||
|
||||
const params = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
index: options.indexPattern,
|
||||
body: {
|
||||
size: 0,
|
||||
|
|
|
@ -35,9 +35,9 @@ export const calculateMetricInterval = async (
|
|||
from = options.timerange.to - inventoryModel.metrics.defaultTimeRangeInSeconds * 1000;
|
||||
}
|
||||
const query = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: options.indexPattern,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
query: {
|
||||
bool: {
|
||||
|
|
|
@ -107,7 +107,7 @@ export async function getLastRecovery(req: LegacyRequest, esIndexPattern: string
|
|||
const mbParams = {
|
||||
index: esIndexPattern,
|
||||
size,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
_source: ['elasticsearch.index.recovery', '@timestamp'],
|
||||
sort: { timestamp: { order: 'desc', unmapped_type: 'long' } },
|
||||
|
|
|
@ -20,9 +20,9 @@ export const buildActionsQuery = ({
|
|||
// const filter = [...createQueryFilterClauses(filterQuery)];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: '.fleet-actions',
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
// query: { bool: { filter } },
|
||||
query: {
|
||||
|
|
|
@ -23,9 +23,9 @@ export const buildActionDetailsQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: '.fleet-actions',
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
query: { bool: { filter } },
|
||||
size: 1,
|
||||
|
|
|
@ -25,9 +25,9 @@ export const buildActionResultsQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: '.fleet-actions-results*',
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggs: {
|
||||
aggs: {
|
||||
|
|
|
@ -21,9 +21,9 @@ export const buildAgentsQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: '.fleet-agents',
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
query: {
|
||||
bool: {
|
||||
|
|
|
@ -36,9 +36,9 @@ export const buildResultsQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: `logs-${OSQUERY_INTEGRATION_NAME}.result*`,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggs: {
|
||||
count_by_agent_id: {
|
||||
|
|
|
@ -148,7 +148,7 @@ export async function getReportingUsage(
|
|||
const reportingIndex = REPORTING_SYSTEM_INDEX;
|
||||
const params = {
|
||||
index: `${reportingIndex}-*`,
|
||||
filterPath: 'aggregations.*.buckets',
|
||||
filter_path: 'aggregations.*.buckets',
|
||||
body: {
|
||||
size: 0,
|
||||
aggs: {
|
||||
|
|
|
@ -32,8 +32,8 @@ export async function fetchRollupIndexPatterns(kibanaIndex: string, esClient: El
|
|||
const searchParams = {
|
||||
size: ES_MAX_RESULT_WINDOW_DEFAULT_VALUE,
|
||||
index: kibanaIndex,
|
||||
ignoreUnavailable: true,
|
||||
filterPath: ['hits.hits._id'],
|
||||
ignore_unavailable: true,
|
||||
filter_path: ['hits.hits._id'],
|
||||
body: {
|
||||
query: {
|
||||
bool: {
|
||||
|
|
|
@ -28,8 +28,8 @@ export const buildEventEnrichmentQuery: SecuritySolutionFactory<CtiQueries.event
|
|||
];
|
||||
|
||||
return {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
index: defaultIndex,
|
||||
body: {
|
||||
_source: false,
|
||||
|
|
|
@ -18,7 +18,7 @@ describe('parseEventEnrichmentResponse', () => {
|
|||
const parsedResponse = await parseEventEnrichmentResponse(options, response);
|
||||
|
||||
const expectedInspect = expect.objectContaining({
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
body: {
|
||||
_source: false,
|
||||
fields: ['*'],
|
||||
|
@ -57,7 +57,7 @@ describe('parseEventEnrichmentResponse', () => {
|
|||
},
|
||||
},
|
||||
},
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
index: ['filebeat-*'],
|
||||
});
|
||||
const parsedInspect = JSON.parse(parsedResponse.inspect.dsl[0]);
|
||||
|
|
|
@ -611,7 +611,7 @@ export const formattedSearchStrategyResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -622,7 +622,7 @@ export const formattedSearchStrategyResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
docvalue_fields: mockOptions.docValueFields,
|
||||
|
@ -783,7 +783,7 @@ export const mockBuckets: HostAggEsItem = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -821,7 +821,7 @@ export const expectedDsl = {
|
|||
docvalue_fields: mockOptions.docValueFields,
|
||||
size: 0,
|
||||
},
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
|
|
@ -40,9 +40,9 @@ export const buildHostsQuery = ({
|
|||
const agg = { host_count: { cardinality: { field: 'host.name' } } };
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
|
|
|
@ -40,9 +40,9 @@ export const buildHostsQueryEntities = ({
|
|||
const agg = { host_count: { cardinality: { field: 'host.name' } } };
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
|
|
|
@ -2149,7 +2149,7 @@ export const formattedSearchStrategyResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -2160,7 +2160,7 @@ export const formattedSearchStrategyResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
docvalue_fields: mockOptions.docValueFields,
|
||||
aggregations: {
|
||||
|
@ -2371,7 +2371,7 @@ export const formattedSearchStrategyResponse = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -2382,7 +2382,7 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
docvalue_fields: mockOptions.docValueFields,
|
||||
aggregations: {
|
||||
|
|
|
@ -61,9 +61,9 @@ export const buildQuery = ({
|
|||
};
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
aggregations: {
|
||||
|
|
|
@ -41,9 +41,9 @@ export const buildQueryEntities = ({
|
|||
};
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
aggregations: {
|
||||
|
|
|
@ -1301,7 +1301,7 @@ export const formattedSearchStrategyResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -1312,7 +1312,7 @@ export const formattedSearchStrategyResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -1415,7 +1415,7 @@ export const formattedSearchStrategyResponse = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -1426,7 +1426,7 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -35,9 +35,9 @@ export const buildHostDetailsQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -39,8 +39,8 @@ export const buildHostsKpiAuthenticationsQuery = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggs: {
|
||||
|
|
|
@ -28,8 +28,8 @@ export const buildHostsKpiAuthenticationsQueryEntities = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggs: {
|
||||
|
|
|
@ -28,8 +28,8 @@ export const buildHostsKpiHostsQuery = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -28,8 +28,8 @@ export const buildHostsKpiHostsQueryEntities = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -28,8 +28,8 @@ export const buildHostsKpiUniqueIpsQuery = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -28,8 +28,8 @@ export const buildHostsKpiUniqueIpsQueryEntities = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -124,7 +124,7 @@ export const formattedSearchStrategyFirstResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -135,7 +135,7 @@ export const formattedSearchStrategyFirstResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
query: { bool: { filter: [{ term: { 'host.name': 'siem-kibana' } }] } },
|
||||
|
@ -190,7 +190,7 @@ export const formattedSearchStrategyLastResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -201,7 +201,7 @@ export const formattedSearchStrategyLastResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
query: { bool: { filter: [{ term: { 'host.name': 'siem-kibana' } }] } },
|
||||
|
@ -225,7 +225,7 @@ export const formattedSearchStrategyLastResponse = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -236,7 +236,7 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
_source: ['@timestamp'],
|
||||
|
|
|
@ -17,9 +17,9 @@ export const buildFirstOrLastSeenHostQuery = ({
|
|||
const filter = [{ term: { 'host.name': hostName } }];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
|
|
|
@ -117,7 +117,7 @@ export const formattedSearchStrategyResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -128,7 +128,7 @@ export const formattedSearchStrategyResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -330,7 +330,7 @@ export const formattedSearchStrategyResponse = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -341,7 +341,7 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -28,9 +28,9 @@ export const buildOverviewHostQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -32,8 +32,8 @@ export const buildHostsRiskScoreQuery = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: false,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: false,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
query: {
|
||||
|
|
|
@ -4300,7 +4300,7 @@ export const formattedSearchStrategyResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -4311,7 +4311,7 @@ export const formattedSearchStrategyResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
process_count: { cardinality: { field: 'process.name' } },
|
||||
|
@ -4435,7 +4435,7 @@ export const formattedSearchStrategyResponse = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -4446,7 +4446,7 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
process_count: { cardinality: { field: 'process.name' } },
|
||||
|
|
|
@ -48,9 +48,9 @@ export const buildQuery = ({
|
|||
};
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
...agg,
|
||||
|
|
|
@ -41,8 +41,8 @@ export const formattedAlertsSearchStrategyResponse: MatrixHistogramStrategyRespo
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -127,7 +127,7 @@ export const formattedAlertsSearchStrategyResponse: MatrixHistogramStrategyRespo
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -164,7 +164,7 @@ export const expectedDsl = {
|
|||
},
|
||||
size: 0,
|
||||
},
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -209,8 +209,8 @@ export const formattedAnomaliesSearchStrategyResponse: MatrixHistogramStrategyRe
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggs: {
|
||||
|
@ -392,8 +392,8 @@ export const formattedAuthenticationsSearchStrategyResponse: MatrixHistogramStra
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -959,8 +959,8 @@ export const formattedEventsSearchStrategyResponse: MatrixHistogramStrategyRespo
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -1927,7 +1927,7 @@ export const formattedDnsSearchStrategyResponse: MatrixHistogramStrategyResponse
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -1938,7 +1938,7 @@ export const formattedDnsSearchStrategyResponse: MatrixHistogramStrategyResponse
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
dns_count: { cardinality: { field: 'dns.question.registered_domain' } },
|
||||
|
|
|
@ -36,8 +36,8 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -83,8 +83,8 @@ export const buildAlertsHistogramQuery = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: getHistogramAggregation(),
|
||||
|
|
|
@ -36,8 +36,8 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggs: {
|
||||
|
|
|
@ -64,8 +64,8 @@ export const buildAnomaliesHistogramQuery = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggs: getHistogramAggregation(),
|
||||
|
|
|
@ -35,8 +35,8 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -76,8 +76,8 @@ export const buildAuthenticationsHistogramQuery = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: getHistogramAggregation(),
|
||||
|
|
|
@ -59,8 +59,8 @@ export const buildAuthenticationsHistogramQueryEntities = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: getHistogramAggregation(),
|
||||
|
|
|
@ -26,7 +26,7 @@ export const mockOptions = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -37,7 +37,7 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
dns_count: { cardinality: { field: 'dns.question.registered_domain' } },
|
||||
|
|
|
@ -77,9 +77,9 @@ export const buildDnsHistogramQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
aggregations: {
|
||||
|
|
|
@ -40,8 +40,8 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -95,8 +95,8 @@ export const expectedThresholdDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -152,8 +152,8 @@ export const expectedThresholdMissingFieldDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -197,7 +197,7 @@ export const expectedThresholdMissingFieldDsl = {
|
|||
};
|
||||
|
||||
export const expectedThresholdWithCardinalityDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
eventActionGroup: {
|
||||
|
@ -244,7 +244,7 @@ export const expectedThresholdWithCardinalityDsl = {
|
|||
},
|
||||
size: 0,
|
||||
},
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -269,8 +269,8 @@ export const expectedThresholdWithGroupFieldsAndCardinalityDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -316,7 +316,7 @@ export const expectedThresholdWithGroupFieldsAndCardinalityDsl = {
|
|||
};
|
||||
|
||||
export const expectedThresholdGroupWithCardinalityDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
eventActionGroup: {
|
||||
|
@ -365,7 +365,7 @@ export const expectedThresholdGroupWithCardinalityDsl = {
|
|||
},
|
||||
size: 0,
|
||||
},
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -390,8 +390,8 @@ export const expectedIpIncludingMissingDataDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -453,8 +453,8 @@ export const expectedIpNotIncludingMissingDataDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -152,8 +152,8 @@ export const buildEventsHistogramQuery = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
aggregations: getHistogramAggregation(),
|
||||
|
|
|
@ -304,7 +304,7 @@ export const formattedSearchStrategyResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -315,7 +315,7 @@ export const formattedSearchStrategyResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
docvalue_fields: mockOptions.docValueFields,
|
||||
|
@ -446,7 +446,7 @@ export const formattedSearchStrategyResponse = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -457,7 +457,7 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggs: {
|
||||
|
|
|
@ -103,9 +103,9 @@ export const buildNetworkDetailsQuery = ({
|
|||
ip,
|
||||
}: NetworkDetailsRequestOptions) => {
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
|
|
|
@ -131,7 +131,7 @@ export const formattedSearchStrategyResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -142,7 +142,7 @@ export const formattedSearchStrategyResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
dns_count: { cardinality: { field: 'dns.question.registered_domain' } },
|
||||
|
@ -203,7 +203,7 @@ export const formattedSearchStrategyResponse = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -214,7 +214,7 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
dns_count: { cardinality: { field: 'dns.question.registered_domain' } },
|
||||
|
|
|
@ -88,9 +88,9 @@ export const buildDnsQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
aggregations: {
|
||||
|
|
|
@ -613,7 +613,7 @@ export const formattedSearchStrategyResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -624,7 +624,7 @@ export const formattedSearchStrategyResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
http_count: { cardinality: { field: 'url.path' } },
|
||||
|
@ -671,7 +671,7 @@ export const formattedSearchStrategyResponse = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -682,7 +682,7 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
http_count: { cardinality: { field: 'url.path' } },
|
||||
|
|
|
@ -36,9 +36,9 @@ export const buildHttpQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
...getCountAgg(),
|
||||
|
|
|
@ -28,8 +28,8 @@ export const buildDnsQueryEntities = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggs: {
|
||||
|
|
|
@ -56,8 +56,8 @@ export const buildDnsQuery = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
query: {
|
||||
|
|
|
@ -30,8 +30,8 @@ export const buildNetworkEventsQuery = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
query: {
|
||||
|
|
|
@ -28,8 +28,8 @@ export const buildNetworkEventsQueryEntities = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggs: {
|
||||
|
|
|
@ -56,8 +56,8 @@ export const buildTlsHandshakeQuery = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
query: {
|
||||
|
|
|
@ -28,8 +28,8 @@ export const buildTlsHandshakeQueryEntities = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggs: {
|
||||
|
|
|
@ -30,8 +30,8 @@ export const buildUniqueFlowsQuery = ({
|
|||
|
||||
const dslQuery = {
|
||||
index: defaultIndex,
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -84,9 +84,9 @@ export const buildUniquePrivateIpsQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -84,9 +84,9 @@ export const buildUniquePrivateIpsQueryEntities = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -101,7 +101,7 @@ export const formattedSearchStrategyResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -112,7 +112,7 @@ export const formattedSearchStrategyResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
@ -206,8 +206,8 @@ export const formattedSearchStrategyResponse = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
ignoreUnavailable: true,
|
||||
allow_no_indices: true,
|
||||
ignore_unavailable: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
|
|
@ -28,9 +28,9 @@ export const buildOverviewNetworkQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggregations: {
|
||||
|
|
|
@ -59,7 +59,7 @@ export const formattedSearchStrategyResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -70,7 +70,7 @@ export const formattedSearchStrategyResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggs: {
|
||||
|
@ -114,7 +114,7 @@ export const formattedSearchStrategyResponse = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -125,7 +125,7 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggs: {
|
||||
|
|
|
@ -75,9 +75,9 @@ export const buildNetworkTlsQuery = ({
|
|||
const filter = ip ? [...defaultFilter, { term: { [`${flowTarget}.ip`]: ip } }] : defaultFilter;
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggs: {
|
||||
|
|
|
@ -58,7 +58,7 @@ export const formattedSearchStrategyResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -69,7 +69,7 @@ export const formattedSearchStrategyResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
top_countries_count: { cardinality: { field: 'destination.geo.country_iso_code' } },
|
||||
|
@ -118,7 +118,7 @@ export const formattedSearchStrategyResponse = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -129,7 +129,7 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
top_countries_count: { cardinality: { field: 'destination.geo.country_iso_code' } },
|
||||
|
|
|
@ -42,9 +42,9 @@ export const buildTopCountriesQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
...getCountAgg(flowTarget),
|
||||
|
|
|
@ -47,9 +47,9 @@ export const buildTopCountriesQueryEntities = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
...getCountAgg(flowTarget),
|
||||
|
|
|
@ -810,7 +810,7 @@ export const formattedSearchStrategyResponse: NetworkTopNFlowStrategyResponse =
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -821,7 +821,7 @@ export const formattedSearchStrategyResponse: NetworkTopNFlowStrategyResponse =
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
top_n_flow_count: { cardinality: { field: 'source.ip' } },
|
||||
|
@ -878,7 +878,7 @@ export const formattedSearchStrategyResponse: NetworkTopNFlowStrategyResponse =
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -889,7 +889,7 @@ export const expectedDsl = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
top_n_flow_count: { cardinality: { field: 'source.ip' } },
|
||||
|
|
|
@ -42,9 +42,9 @@ export const buildTopNFlowQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
...getCountAgg(flowTarget),
|
||||
|
|
|
@ -47,9 +47,9 @@ export const buildTopNFlowQueryEntities = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
aggregations: {
|
||||
...getCountAgg(flowTarget),
|
||||
|
|
|
@ -119,7 +119,7 @@ export const formattedSearchStrategyResponse = {
|
|||
dsl: [
|
||||
JSON.stringify(
|
||||
{
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
@ -130,7 +130,7 @@ export const formattedSearchStrategyResponse = {
|
|||
'packetbeat-*',
|
||||
'winlogbeat-*',
|
||||
],
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggs: {
|
||||
|
@ -175,7 +175,7 @@ export const formattedSearchStrategyResponse = {
|
|||
};
|
||||
|
||||
export const expectedDsl = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggs: {
|
||||
|
@ -209,7 +209,7 @@ export const expectedDsl = {
|
|||
},
|
||||
size: 0,
|
||||
},
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
index: [
|
||||
'apm-*-transaction*',
|
||||
'traces-apm*',
|
||||
|
|
|
@ -34,9 +34,9 @@ export const buildUsersQuery = ({
|
|||
];
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: false,
|
||||
body: {
|
||||
aggs: {
|
||||
|
|
|
@ -30,9 +30,9 @@ export const buildHostRulesQuery = ({
|
|||
];
|
||||
|
||||
return {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex, // can stop getting this from sourcerer and assume default detections index if we want
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
|
|
|
@ -30,9 +30,9 @@ export const buildHostTacticsQuery = ({
|
|||
];
|
||||
|
||||
return {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex, // can stop getting this from sourcerer and assume default detections index if we want
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
|
|
|
@ -31,9 +31,9 @@ export const buildRiskScoreQuery = ({
|
|||
];
|
||||
|
||||
return {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
|
|
|
@ -30,9 +30,9 @@ export const buildUserRulesQuery = ({
|
|||
];
|
||||
|
||||
return {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex, // can stop getting this from sourcerer and assume default detections index if we want
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
track_total_hits: true,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
|
|
|
@ -188,8 +188,8 @@ export const getDetectionRuleMetrics = async (
|
|||
let rulesUsage: DetectionRulesTypeUsage = initialDetectionRulesUsage;
|
||||
const ruleSearchOptions: RuleSearchParams = {
|
||||
body: { query: { bool: { filter: { term: { 'alert.alertTypeId': SIGNALS_ID } } } } },
|
||||
filterPath: [],
|
||||
ignoreUnavailable: true,
|
||||
filter_path: [],
|
||||
ignore_unavailable: true,
|
||||
index: kibanaIndex,
|
||||
size: MAX_RESULTS_WINDOW,
|
||||
};
|
||||
|
|
|
@ -17,8 +17,8 @@ interface RuleSearchBody {
|
|||
|
||||
export interface RuleSearchParams {
|
||||
body: RuleSearchBody;
|
||||
filterPath: string[];
|
||||
ignoreUnavailable: boolean;
|
||||
filter_path: string[];
|
||||
ignore_unavailable: boolean;
|
||||
index: string;
|
||||
size: number;
|
||||
}
|
||||
|
|
|
@ -63,9 +63,9 @@ export const buildTimelineEventsAllQuery = ({
|
|||
});
|
||||
|
||||
const dslQuery = {
|
||||
allowNoIndices: true,
|
||||
allow_no_indices: true,
|
||||
index: defaultIndex,
|
||||
ignoreUnavailable: true,
|
||||
ignore_unavailable: true,
|
||||
body: {
|
||||
...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),
|
||||
aggregations: {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue