diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_configure_package.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_configure_package.test.tsx index 7ec72369f338e..17c1b24dec817 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_configure_package.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_configure_package.test.tsx @@ -17,7 +17,8 @@ import { validatePackagePolicy } from '../../services'; import { StepConfigurePackagePolicy } from './step_configure_package'; -describe('StepConfigurePackage', () => { +// FLAKY: https://github.com/elastic/kibana/issues/201598 +describe.skip('StepConfigurePackage', () => { let packageInfo: PackageInfo; let packagePolicy: NewPackagePolicy; const mockUpdatePackagePolicy = jest.fn().mockImplementation((val: any) => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_status_filter.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_status_filter.test.tsx index 4c34cb8824af3..40017125a223b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_status_filter.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_status_filter.test.tsx @@ -35,7 +35,8 @@ const renderComponent = (props: React.ComponentProps) ); }; -describe('AgentStatusFilter', () => { +// FLAKY: https://github.com/elastic/kibana/issues/200788 +describe.skip('AgentStatusFilter', () => { it('Renders all statuses', () => { const { getByText } = renderComponent({ selectedStatus: [], diff --git a/x-pack/plugins/fleet/public/components/multiple_agent_policy_summary_line.test.tsx b/x-pack/plugins/fleet/public/components/multiple_agent_policy_summary_line.test.tsx index 100a6f67ad838..b14caf7a73517 100644 --- a/x-pack/plugins/fleet/public/components/multiple_agent_policy_summary_line.test.tsx +++ b/x-pack/plugins/fleet/public/components/multiple_agent_policy_summary_line.test.tsx @@ -15,7 +15,8 @@ import type { AgentPolicy } from '../types'; import { MultipleAgentPoliciesSummaryLine } from './multiple_agent_policy_summary_line'; -describe('MultipleAgentPolicySummaryLine', () => { +// FLAKY: https://github.com/elastic/kibana/issues/200786 +describe.skip('MultipleAgentPolicySummaryLine', () => { let testRenderer: TestRenderer; const render = (agentPolicies: AgentPolicy[]) => diff --git a/x-pack/plugins/fleet/public/hooks/use_agent_version.test.ts b/x-pack/plugins/fleet/public/hooks/use_agent_version.test.ts index f425fd903f103..2f48cf1f3c50d 100644 --- a/x-pack/plugins/fleet/public/hooks/use_agent_version.test.ts +++ b/x-pack/plugins/fleet/public/hooks/use_agent_version.test.ts @@ -15,6 +15,7 @@ jest.mock('./use_kibana_version'); jest.mock('./use_request'); // FLAKY: https://github.com/elastic/kibana/issues/201392 +// FLAKY: https://github.com/elastic/kibana/issues/201759 describe.skip('useAgentVersion', () => { afterEach(() => { jest.clearAllMocks(); diff --git a/x-pack/plugins/monitoring/server/lib/metrics/__snapshots__/metrics.test.js.snap b/x-pack/plugins/monitoring/server/lib/metrics/__snapshots__/metrics.test.js.snap index 24d9d52224fa4..242bfaeaffb6b 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/__snapshots__/metrics.test.js.snap +++ b/x-pack/plugins/monitoring/server/lib/metrics/__snapshots__/metrics.test.js.snap @@ -5981,7 +5981,7 @@ Object { "isNotSupportedInInternalCollection": undefined, "label": "Pipeline Node Count", "legendFormat": undefined, - "mbField": undefined, + "mbField": "logstash.node.stats.logstash.uuid", "metricAgg": undefined, "periodsField": undefined, "quotaField": undefined, @@ -6437,7 +6437,7 @@ Object { "isNotSupportedInInternalCollection": undefined, "label": "Pipeline Node Count", "legendFormat": undefined, - "mbField": undefined, + "mbField": "logstash.node.stats.logstash.uuid", "metricAgg": undefined, "periodsField": undefined, "quotaField": undefined, diff --git a/x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.ts b/x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.ts index fd150864c6b2e..b1240a2ca9798 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.ts +++ b/x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.ts @@ -7,11 +7,11 @@ /* eslint-disable max-classes-per-file */ -import _ from 'lodash'; import { i18n } from '@kbn/i18n'; -import { ClusterMetric, Metric, MetricOptions } from '../classes'; -import { LARGE_FLOAT } from '../../../../common/formatting'; +import _ from 'lodash'; import { NORMALIZED_DERIVATIVE_UNIT } from '../../../../common/constants'; +import { LARGE_FLOAT } from '../../../../common/formatting'; +import { ClusterMetric, Metric, MetricOptions } from '../classes'; const msTimeUnitLabel = i18n.translate('xpack.monitoring.metrics.logstash.msTimeUnitLabel', { defaultMessage: 'ms', @@ -411,7 +411,7 @@ export class LogstashPipelineThroughputMetric extends LogstashMetric { type LogstashPipelineNodeCountMetricOptions = Pick< MetricOptions, - 'field' | 'label' | 'description' | 'format' | 'units' + 'field' | 'label' | 'mbField' | 'description' | 'format' | 'units' > & Partial>; @@ -427,15 +427,10 @@ export class LogstashPipelineNodeCountMetric extends LogstashMetric { }: { pageOfPipelines: Array<{ id: string }>; }) => { - const termAggExtras: { - include: string[]; - } = { - include: [], - }; + const include: string[] | undefined = pageOfPipelines?.length + ? pageOfPipelines.map((pipeline) => pipeline.id) + : undefined; - if (pageOfPipelines) { - termAggExtras.include = pageOfPipelines.map((pipeline) => pipeline.id); - } return { pipelines_nested: { nested: { @@ -446,7 +441,7 @@ export class LogstashPipelineNodeCountMetric extends LogstashMetric { terms: { field: 'logstash_stats.pipelines.id', size: 1000, - ...termAggExtras, + include, }, aggs: { to_root: { @@ -472,7 +467,7 @@ export class LogstashPipelineNodeCountMetric extends LogstashMetric { terms: { field: 'logstash.node.stats.pipelines.id', size: 1000, - ...termAggExtras, + include, }, aggs: { to_root: { @@ -480,7 +475,7 @@ export class LogstashPipelineNodeCountMetric extends LogstashMetric { aggs: { node_count: { cardinality: { - field: this.field, + field: this.mbField, }, }, }, diff --git a/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.ts b/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.ts index 97119289d2139..73aa91ef6f5fa 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.ts +++ b/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.ts @@ -6,23 +6,23 @@ */ import { i18n } from '@kbn/i18n'; +import { + LARGE_ABBREVIATED, + LARGE_BYTES, + LARGE_FLOAT, + SMALL_BYTES, +} from '../../../../common/formatting'; import { QuotaMetric } from '../classes'; import { - LogstashEventsRateClusterMetric, LogstashEventsLatencyClusterMetric, - LogstashEventsRateMetric, LogstashEventsLatencyMetric, + LogstashEventsRateClusterMetric, + LogstashEventsRateMetric, LogstashMetric, + LogstashPipelineNodeCountMetric, LogstashPipelineQueueSizeMetric, LogstashPipelineThroughputMetric, - LogstashPipelineNodeCountMetric, } from './classes'; -import { - LARGE_FLOAT, - LARGE_BYTES, - SMALL_BYTES, - LARGE_ABBREVIATED, -} from '../../../../common/formatting'; const instanceSystemLoadTitle = i18n.translate( 'xpack.monitoring.metrics.logstash.systemLoadTitle', @@ -451,6 +451,7 @@ export const metrics = { logstash_cluster_pipeline_nodes_count: new LogstashPipelineNodeCountMetric({ field: 'logstash_stats.logstash.uuid', label: pipelineNodeCountLabel, + mbField: 'logstash.node.stats.logstash.uuid', description: pipelineNodeCountDescription, format: LARGE_FLOAT, units: '', @@ -459,6 +460,7 @@ export const metrics = { uuidField: 'logstash_stats.logstash.uuid', // TODO: add comment explaining why field: 'logstash_stats.logstash.uuid', label: pipelineNodeCountLabel, + mbField: 'logstash.node.stats.logstash.uuid', description: pipelineNodeCountDescription, format: LARGE_FLOAT, units: '',