mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Infrastructure UI] Reorganize metric charts in the hosts view (#159457)
## Summary This PR is the first step towards making metrics across infra consistent. For the Hosts view, these are the new metrics: <img width="667" alt="image" src="6bcbc9a2
-b9d5-42fc-bee0-d74edffa9960"> _note: KPI's titles are now capitalized._ <img width="667" alt="image" src="16c51b3f
-ccfc-400f-ad86-cbca53dd2f6a"> ### How to test - Start a local Kibana instance - Navigate to `Infastructure > Hosts` ### For reviewer - Some translation keys had to be changed and others removed because the metrics no longer exist or the copy has completely changed. No new translations have been added. - All tooltips are temporary, they will be addressed in another PR --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
11cdbc999b
commit
8aab6fa522
38 changed files with 583 additions and 307 deletions
|
@ -10,9 +10,10 @@ import * as rt from 'io-ts';
|
|||
|
||||
export const InfraMetricTypeRT = rt.keyof({
|
||||
cpu: null,
|
||||
diskLatency: null,
|
||||
normalizedLoad1m: null,
|
||||
diskSpaceUsage: null,
|
||||
memory: null,
|
||||
memoryTotal: null,
|
||||
memoryFree: null,
|
||||
rx: null,
|
||||
tx: null,
|
||||
});
|
||||
|
|
|
@ -7,11 +7,14 @@
|
|||
|
||||
import { cpu } from './snapshot/cpu';
|
||||
import { diskLatency } from './snapshot/disk_latency';
|
||||
import { diskSpaceUsage } from './snapshot/disk_space_usage';
|
||||
import { count } from '../../shared/metrics/snapshot/count';
|
||||
import { load } from './snapshot/load';
|
||||
import { logRate } from './snapshot/log_rate';
|
||||
import { memory } from './snapshot/memory';
|
||||
import { memoryFree } from './snapshot/memory_free';
|
||||
import { memoryTotal } from './snapshot/memory_total';
|
||||
import { normalizedLoad1m } from './snapshot/normalized_load_1m';
|
||||
import { rx } from './snapshot/rx';
|
||||
import { tx } from './snapshot/tx';
|
||||
|
||||
|
@ -38,10 +41,13 @@ import { InventoryMetrics } from '../../types';
|
|||
const exposedHostSnapshotMetrics = {
|
||||
cpu,
|
||||
diskLatency,
|
||||
diskSpaceUsage,
|
||||
load,
|
||||
logRate,
|
||||
memory,
|
||||
memoryFree,
|
||||
memoryTotal,
|
||||
normalizedLoad1m,
|
||||
rx,
|
||||
tx,
|
||||
};
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { MetricsUIAggregation } from '../../../types';
|
||||
export const diskSpaceUsage: MetricsUIAggregation = {
|
||||
diskSpaceUsage: { avg: { field: 'system.filesystem.used.pct' } },
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { MetricsUIAggregation } from '../../../types';
|
||||
export const memoryFree: MetricsUIAggregation = {
|
||||
memory_total: {
|
||||
max: {
|
||||
field: 'system.memory.total',
|
||||
},
|
||||
},
|
||||
used_bytes: {
|
||||
avg: {
|
||||
field: 'system.memory.actual.used.bytes',
|
||||
},
|
||||
},
|
||||
memoryFree: {
|
||||
bucket_script: {
|
||||
buckets_path: {
|
||||
memoryTotal: 'memory_total',
|
||||
usedBytes: 'used_bytes',
|
||||
},
|
||||
script: {
|
||||
source: 'params.memoryTotal - params.usedBytes',
|
||||
lang: 'painless',
|
||||
},
|
||||
gap_policy: 'skip',
|
||||
},
|
||||
},
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { MetricsUIAggregation } from '../../../types';
|
||||
export const normalizedLoad1m: MetricsUIAggregation = {
|
||||
load_1m: {
|
||||
avg: {
|
||||
field: 'system.load.1',
|
||||
},
|
||||
},
|
||||
max_cores: {
|
||||
max: {
|
||||
field: 'system.load.cores',
|
||||
},
|
||||
},
|
||||
normalizedLoad1m: {
|
||||
bucket_script: {
|
||||
buckets_path: {
|
||||
load1m: 'load_1m',
|
||||
maxCores: 'max_cores',
|
||||
},
|
||||
script: {
|
||||
source: 'params.load1m / params.maxCores',
|
||||
lang: 'painless',
|
||||
},
|
||||
gap_policy: 'skip',
|
||||
},
|
||||
},
|
||||
};
|
|
@ -345,9 +345,12 @@ export const SnapshotMetricTypeKeys = {
|
|||
count: null,
|
||||
cpu: null,
|
||||
diskLatency: null,
|
||||
diskSpaceUsage: null,
|
||||
load: null,
|
||||
memory: null,
|
||||
memoryFree: null,
|
||||
memoryTotal: null,
|
||||
normalizedLoad1m: null,
|
||||
tx: null,
|
||||
rx: null,
|
||||
logRate: null,
|
||||
|
|
|
@ -6,12 +6,16 @@
|
|||
*/
|
||||
|
||||
import {
|
||||
cpu,
|
||||
cpuUsage,
|
||||
diskIORead,
|
||||
diskIOWrite,
|
||||
load,
|
||||
memory,
|
||||
memoryAvailable,
|
||||
diskReadThroughput,
|
||||
diskWriteThroughput,
|
||||
diskSpaceAvailable,
|
||||
diskSpaceUsage,
|
||||
normalizedLoad1m,
|
||||
memoryUsage,
|
||||
memoryFree,
|
||||
rx,
|
||||
tx,
|
||||
hostCount,
|
||||
|
@ -19,13 +23,17 @@ import {
|
|||
import { LineChart, MetricChart } from './lens/visualization_types';
|
||||
|
||||
export const hostLensFormulas = {
|
||||
cpu,
|
||||
cpuUsage,
|
||||
diskIORead,
|
||||
diskIOWrite,
|
||||
diskReadThroughput,
|
||||
diskWriteThroughput,
|
||||
diskSpaceAvailable,
|
||||
diskSpaceUsage,
|
||||
hostCount,
|
||||
load,
|
||||
memory,
|
||||
memoryAvailable,
|
||||
normalizedLoad1m,
|
||||
memoryUsage,
|
||||
memoryFree,
|
||||
rx,
|
||||
tx,
|
||||
};
|
||||
|
|
|
@ -18,7 +18,7 @@ export const cpuLineChart: LensLineChartConfig = {
|
|||
},
|
||||
};
|
||||
|
||||
export const cpu: LensChartConfig = {
|
||||
export const cpuUsage: LensChartConfig = {
|
||||
title: 'CPU Usage',
|
||||
formula: {
|
||||
formula:
|
|
@ -11,11 +11,11 @@ import { getFilters } from './utils';
|
|||
export const diskIORead: LensChartConfig = {
|
||||
title: 'Disk Read IOPS',
|
||||
formula: {
|
||||
formula: "counter_rate(max(system.diskio.read.bytes), kql='system.diskio.read.bytes: *')",
|
||||
formula: "counter_rate(max(system.diskio.read.count), kql='system.diskio.read.count: *')",
|
||||
format: {
|
||||
id: 'bytes',
|
||||
id: 'number',
|
||||
params: {
|
||||
decimals: 1,
|
||||
decimals: 0,
|
||||
},
|
||||
},
|
||||
},
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { LensChartConfig } from '../../../types';
|
||||
import { getFilters } from './utils';
|
||||
|
||||
export const diskReadThroughput: LensChartConfig = {
|
||||
title: 'Disk Read Throughput',
|
||||
formula: {
|
||||
formula: "counter_rate(max(system.diskio.read.count), kql='system.diskio.read.count: *')",
|
||||
format: {
|
||||
id: 'bytes',
|
||||
params: {
|
||||
decimals: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
getFilters,
|
||||
};
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { LensChartConfig } from '../../../types';
|
||||
import { getFilters } from './utils';
|
||||
|
||||
export const diskSpaceAvailable: LensChartConfig = {
|
||||
title: 'Disk Space Available',
|
||||
formula: {
|
||||
formula: 'average(system.filesystem.free)',
|
||||
format: {
|
||||
id: 'bytes',
|
||||
params: {
|
||||
decimals: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
getFilters,
|
||||
};
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { LensChartConfig } from '../../../types';
|
||||
import { getFilters } from './utils';
|
||||
|
||||
export const diskSpaceUsage: LensChartConfig = {
|
||||
title: 'Disk Space Usage',
|
||||
formula: {
|
||||
formula: 'average(system.filesystem.used.pct)',
|
||||
format: {
|
||||
id: 'percent',
|
||||
params: {
|
||||
decimals: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
getFilters,
|
||||
};
|
|
@ -11,11 +11,11 @@ import { getFilters } from './utils';
|
|||
export const diskIOWrite: LensChartConfig = {
|
||||
title: 'Disk Write IOPS',
|
||||
formula: {
|
||||
formula: "counter_rate(max(system.diskio.write.bytes), kql='system.diskio.write.bytes: *')",
|
||||
formula: "counter_rate(max(system.diskio.write.count), kql='system.diskio.write.count: *')",
|
||||
format: {
|
||||
id: 'bytes',
|
||||
id: 'number',
|
||||
params: {
|
||||
decimals: 1,
|
||||
decimals: 0,
|
||||
},
|
||||
},
|
||||
},
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { LensChartConfig } from '../../../types';
|
||||
import { getFilters } from './utils';
|
||||
|
||||
export const diskWriteThroughput: LensChartConfig = {
|
||||
title: 'Disk Write Throughput',
|
||||
formula: {
|
||||
formula: "counter_rate(max(system.diskio.write.count), kql='system.diskio.write.count: *')",
|
||||
format: {
|
||||
id: 'bytes',
|
||||
params: {
|
||||
decimals: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
getFilters,
|
||||
};
|
|
@ -5,12 +5,16 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
export { cpu } from './cpu';
|
||||
export { diskIORead } from './diskio_read';
|
||||
export { diskIOWrite } from './diskio_write';
|
||||
export { cpuUsage } from './cpu_usage';
|
||||
export { diskIORead } from './disk_read_iops';
|
||||
export { diskIOWrite } from './disk_write_iops';
|
||||
export { diskReadThroughput } from './disk_read_throughput';
|
||||
export { diskWriteThroughput } from './disk_write_throughput';
|
||||
export { diskSpaceAvailable } from './disk_space_available';
|
||||
export { diskSpaceUsage } from './disk_space_usage';
|
||||
export { hostCount } from './host_count';
|
||||
export { load } from './load';
|
||||
export { memory } from './memory';
|
||||
export { memoryAvailable } from './memory_available';
|
||||
export { normalizedLoad1m } from './normalized_load_1m';
|
||||
export { memoryUsage } from './memory_usage';
|
||||
export { memoryFree } from './memory_free';
|
||||
export { rx } from './rx';
|
||||
export { tx } from './tx';
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
import type { LensChartConfig } from '../../../types';
|
||||
import { getFilters } from './utils';
|
||||
|
||||
export const memoryAvailable: LensChartConfig = {
|
||||
title: 'Memory Available',
|
||||
export const memoryFree: LensChartConfig = {
|
||||
title: 'Memory Free',
|
||||
formula: {
|
||||
formula: 'max(system.memory.total) - average(system.memory.actual.used.bytes)',
|
||||
format: {
|
|
@ -18,8 +18,8 @@ const memoryLineChart: LensLineChartConfig = {
|
|||
},
|
||||
};
|
||||
|
||||
export const memory: LensChartConfig = {
|
||||
title: 'Memory',
|
||||
export const memoryUsage: LensChartConfig = {
|
||||
title: 'Memory Usage',
|
||||
formula: {
|
||||
formula: 'average(system.memory.actual.used.pct)',
|
||||
format: {
|
|
@ -60,7 +60,7 @@ export const loadLineChart: LensLineChartConfig = {
|
|||
extraReference: REFERENCE_LAYER,
|
||||
};
|
||||
|
||||
export const load: LensChartConfig = {
|
||||
export const normalizedLoad1m: LensChartConfig = {
|
||||
title: 'Normalized Load',
|
||||
formula: {
|
||||
formula: 'average(system.load.1) / max(system.load.cores)',
|
|
@ -21,7 +21,12 @@ import {
|
|||
getHistogramColumn,
|
||||
} from '../utils';
|
||||
|
||||
import type { VisualizationAttributes, LensChartConfig, MetricChartOptions } from '../../types';
|
||||
import type {
|
||||
VisualizationAttributes,
|
||||
LensChartConfig,
|
||||
MetricChartOptions,
|
||||
Formula,
|
||||
} from '../../types';
|
||||
|
||||
const HISTOGRAM_COLUMN_NAME = 'x_date_histogram';
|
||||
const TRENDLINE_LAYER_ID = 'trendline_layer';
|
||||
|
@ -43,7 +48,7 @@ export class MetricChart implements VisualizationAttributes<MetricVisualizationS
|
|||
getTrendLineLayer(baseLayer: PersistedIndexPatternLayer): FormBasedPersistedState['layers'] {
|
||||
const trendLineLayer = this.formulaAPI.insertOrReplaceFormulaColumn(
|
||||
TRENDLINE_ACCESSOR,
|
||||
this.chartConfig.formula,
|
||||
this.getFormulaWithOverride(),
|
||||
baseLayer,
|
||||
this.dataView
|
||||
);
|
||||
|
@ -60,6 +65,26 @@ export class MetricChart implements VisualizationAttributes<MetricVisualizationS
|
|||
};
|
||||
}
|
||||
|
||||
getFormulaWithOverride(): Formula {
|
||||
const { formula } = this.chartConfig;
|
||||
const { decimals = formula.format?.params?.decimals, title = this.chartConfig.title } =
|
||||
this.options ?? {};
|
||||
return {
|
||||
...this.chartConfig.formula,
|
||||
...(formula.format && decimals
|
||||
? {
|
||||
format: {
|
||||
...formula.format,
|
||||
params: {
|
||||
decimals,
|
||||
},
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
label: title,
|
||||
};
|
||||
}
|
||||
|
||||
getLayers(): FormBasedPersistedState['layers'] {
|
||||
const { showTrendLine = true } = this.options ?? {};
|
||||
const baseLayer: PersistedIndexPatternLayer = {
|
||||
|
@ -79,10 +104,7 @@ export class MetricChart implements VisualizationAttributes<MetricVisualizationS
|
|||
|
||||
const baseLayerDetails = this.formulaAPI.insertOrReplaceFormulaColumn(
|
||||
ACCESSOR,
|
||||
{
|
||||
...this.chartConfig.formula,
|
||||
label: this.options?.title ?? this.chartConfig.title,
|
||||
},
|
||||
this.getFormulaWithOverride(),
|
||||
{ columnOrder: [], columns: {} },
|
||||
this.dataView
|
||||
);
|
||||
|
|
|
@ -30,6 +30,7 @@ export interface MetricChartOptions extends LensOptions {
|
|||
showTitle?: boolean;
|
||||
showTrendLine?: boolean;
|
||||
backgroundColor?: string;
|
||||
decimals?: number;
|
||||
}
|
||||
|
||||
export interface LensLineChartConfig {
|
||||
|
|
|
@ -93,8 +93,9 @@ const stories: Meta<AssetDetailsProps> = {
|
|||
tx: 123030.54555555557,
|
||||
memory: 0.9044444444444445,
|
||||
cpu: 0.3979674157303371,
|
||||
diskLatency: 0.15291777273162221,
|
||||
memoryTotal: 34359738368,
|
||||
diskSpaceUsage: 0.3979674157303371,
|
||||
normalizedLoad1m: 0.15291777273162221,
|
||||
memoryFree: 34359738368,
|
||||
},
|
||||
overrides: {
|
||||
metadata: {
|
||||
|
|
|
@ -49,7 +49,7 @@ describe('useHostTable hook', () => {
|
|||
const { result, waitForNextUpdate } = renderHook(() =>
|
||||
useLensAttributes({
|
||||
visualizationType: 'lineChart',
|
||||
type: 'load',
|
||||
type: 'normalizedLoad1m',
|
||||
options: {
|
||||
title: 'Injected Normalized Load',
|
||||
},
|
||||
|
@ -176,7 +176,7 @@ describe('useHostTable hook', () => {
|
|||
const { result, waitForNextUpdate } = renderHook(() =>
|
||||
useLensAttributes({
|
||||
visualizationType: 'lineChart',
|
||||
type: 'load',
|
||||
type: 'normalizedLoad1m',
|
||||
dataView: mockDataView,
|
||||
})
|
||||
);
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
import React from 'react';
|
||||
import { EuiBasicTable } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { useIsWithinMaxBreakpoint } from '@elastic/eui';
|
||||
import { NoData } from '../../../../components/empty_states';
|
||||
import { HostNodeRow, useHostsTableContext } from '../hooks/use_hosts_table';
|
||||
import { useHostsViewContext } from '../hooks/use_hosts_view';
|
||||
|
@ -21,7 +20,6 @@ const PAGE_SIZE_OPTIONS = [5, 10, 20];
|
|||
export const HostsTable = () => {
|
||||
const { loading } = useHostsViewContext();
|
||||
const { onSubmit } = useUnifiedSearchContext();
|
||||
const isFixedLayout = useIsWithinMaxBreakpoint('l');
|
||||
|
||||
const {
|
||||
columns,
|
||||
|
@ -39,7 +37,6 @@ export const HostsTable = () => {
|
|||
<>
|
||||
<EuiBasicTable
|
||||
data-test-subj="hostsView-table"
|
||||
tableLayout={isFixedLayout ? 'fixed' : 'auto'}
|
||||
pagination={{
|
||||
pageIndex: pagination.pageIndex ?? 0,
|
||||
pageSize: pagination.pageSize ?? DEFAULT_PAGE_SIZE,
|
||||
|
|
|
@ -14,51 +14,48 @@ import { HostsTile } from './hosts_tile';
|
|||
|
||||
const KPI_CHARTS: Array<Omit<KPIChartProps, 'loading' | 'subtitle'>> = [
|
||||
{
|
||||
type: 'cpu',
|
||||
type: 'cpuUsage',
|
||||
trendLine: true,
|
||||
backgroundColor: '#F1D86F',
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.metricTrend.cpu.title', {
|
||||
defaultMessage: 'CPU usage',
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.metricTrend.cpuUsage.title', {
|
||||
defaultMessage: 'CPU Usage',
|
||||
}),
|
||||
toolTip: i18n.translate('xpack.infra.hostsViewPage.metricTrend.cpu.tooltip', {
|
||||
toolTip: i18n.translate('xpack.infra.hostsViewPage.metricTrend.cpuUsage.tooltip', {
|
||||
defaultMessage:
|
||||
'Average of percentage of CPU time spent in states other than Idle and IOWait, normalized by the number of CPU cores. Includes both time spent on user space and kernel space. 100% means all CPUs of the host are busy.',
|
||||
'Percentage of CPU time spent in states other than Idle and IOWait, normalized by the number of CPU cores. This includes both time spent on user space and kernel space.',
|
||||
}),
|
||||
},
|
||||
{
|
||||
type: 'memory',
|
||||
trendLine: true,
|
||||
backgroundColor: '#A987D1',
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.metricTrend.memory.title', {
|
||||
defaultMessage: 'Memory usage',
|
||||
}),
|
||||
toolTip: i18n.translate('xpack.infra.hostsViewPage.metricTrend.memory.tooltip', {
|
||||
defaultMessage:
|
||||
"Average of percentage of main memory usage excluding page cache. This includes resident memory for all processes plus memory used by the kernel structures and code apart the page cache. A high level indicates a situation of memory saturation for a host. 100% means the main memory is entirely filled with memory that can't be reclaimed, except by swapping out.",
|
||||
}),
|
||||
},
|
||||
{
|
||||
type: 'rx',
|
||||
type: 'normalizedLoad1m',
|
||||
trendLine: true,
|
||||
backgroundColor: '#79AAD9',
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.metricTrend.rx.title', {
|
||||
defaultMessage: 'Network inbound (RX)',
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.metricTrend.normalizedLoad1m.title', {
|
||||
defaultMessage: 'Normalized Load',
|
||||
}),
|
||||
toolTip: i18n.translate('xpack.infra.hostsViewPage.metricTrend.rx.tooltip', {
|
||||
defaultMessage:
|
||||
'Number of bytes which have been received per second on the public interfaces of the hosts.',
|
||||
toolTip: i18n.translate('xpack.infra.hostsViewPage.metricTrend.normalizedLoad1m.tooltip', {
|
||||
defaultMessage: '1 minute load average normalized by the number of CPU cores.',
|
||||
}),
|
||||
},
|
||||
{
|
||||
type: 'tx',
|
||||
type: 'memoryUsage',
|
||||
trendLine: true,
|
||||
backgroundColor: '#A987D1',
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.metricTrend.memoryUsage.title', {
|
||||
defaultMessage: 'Memory Usage',
|
||||
}),
|
||||
toolTip: i18n.translate('xpack.infra.hostsViewPage.metricTrend.memoryUsage.tooltip', {
|
||||
defaultMessage: 'Main memory usage excluding page cache.',
|
||||
}),
|
||||
},
|
||||
{
|
||||
type: 'diskSpaceUsage',
|
||||
trendLine: true,
|
||||
backgroundColor: '#F5A35C',
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.metricTrend.tx.title', {
|
||||
defaultMessage: 'Network outbound (TX)',
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.metricTrend.diskSpaceUsage.title', {
|
||||
defaultMessage: 'Disk Space Usage',
|
||||
}),
|
||||
toolTip: i18n.translate('xpack.infra.hostsViewPage.metricTrend.tx.tooltip', {
|
||||
defaultMessage:
|
||||
'Number of bytes which have been received per second on the public interfaces of the hosts.',
|
||||
toolTip: i18n.translate('xpack.infra.hostsViewPage.metricTrend.diskSpaceUsage.tooltip', {
|
||||
defaultMessage: 'Percentage of disk space used.',
|
||||
}),
|
||||
},
|
||||
];
|
||||
|
|
|
@ -34,6 +34,7 @@ export interface KPIChartProps {
|
|||
trendLine?: boolean;
|
||||
backgroundColor: string;
|
||||
type: HostsLensMetricChartFormulas;
|
||||
decimals?: number;
|
||||
toolTip: string;
|
||||
}
|
||||
|
||||
|
@ -44,6 +45,7 @@ export const Tile = ({
|
|||
type,
|
||||
backgroundColor,
|
||||
toolTip,
|
||||
decimals = 1,
|
||||
trendLine = false,
|
||||
}: KPIChartProps) => {
|
||||
const { searchCriteria, onSubmit } = useUnifiedSearchContext();
|
||||
|
@ -68,11 +70,12 @@ export const Tile = ({
|
|||
type,
|
||||
dataView,
|
||||
options: {
|
||||
title,
|
||||
subtitle: getSubtitle(),
|
||||
backgroundColor,
|
||||
decimals,
|
||||
subtitle: getSubtitle(),
|
||||
showTrendLine: trendLine,
|
||||
showTitle: false,
|
||||
title,
|
||||
},
|
||||
visualizationType: 'metricChart',
|
||||
});
|
||||
|
|
|
@ -94,8 +94,8 @@ export const MetricChart = ({ title, type, breakdownSize }: MetricChartProps) =>
|
|||
hasBorder
|
||||
paddingSize={error ? 'm' : 'none'}
|
||||
css={css`
|
||||
min-height: calc(${MIN_HEIGHT} + ${euiTheme.size.l});
|
||||
position: 'relative';
|
||||
min-height: calc(${MIN_HEIGHT}px + ${euiTheme.size.l});
|
||||
position: relative;
|
||||
`}
|
||||
data-test-subj={`hostsView-metricChart-${type}`}
|
||||
>
|
||||
|
|
|
@ -13,28 +13,64 @@ import { MetricChart, MetricChartProps } from './metric_chart';
|
|||
const DEFAULT_BREAKDOWN_SIZE = 20;
|
||||
const CHARTS_IN_ORDER: Array<Pick<MetricChartProps, 'title' | 'type'> & { fullRow?: boolean }> = [
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.load', {
|
||||
defaultMessage: 'Normalized Load',
|
||||
}),
|
||||
type: 'load',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.cpu', {
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.cpuUsage', {
|
||||
defaultMessage: 'CPU Usage',
|
||||
}),
|
||||
type: 'cpu',
|
||||
type: 'cpuUsage',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.memory', {
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.normalizedLoad1m', {
|
||||
defaultMessage: 'Normalized Load',
|
||||
}),
|
||||
type: 'normalizedLoad1m',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.memoryUsage', {
|
||||
defaultMessage: 'Memory Usage',
|
||||
}),
|
||||
type: 'memory',
|
||||
type: 'memoryUsage',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.memoryAvailable', {
|
||||
defaultMessage: 'Memory Available',
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.memoryFree', {
|
||||
defaultMessage: 'Memory Free',
|
||||
}),
|
||||
type: 'memoryAvailable',
|
||||
type: 'memoryFree',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.diskSpaceUsed', {
|
||||
defaultMessage: 'Disk Space Usage',
|
||||
}),
|
||||
type: 'diskSpaceUsage',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.diskSpaceAvailable', {
|
||||
defaultMessage: 'Disk Space Available',
|
||||
}),
|
||||
type: 'diskSpaceAvailable',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.diskIORead', {
|
||||
defaultMessage: 'Disk Read IOPS',
|
||||
}),
|
||||
type: 'diskIORead',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.diskIOWrite', {
|
||||
defaultMessage: 'Disk Write IOPS',
|
||||
}),
|
||||
type: 'diskIOWrite',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.diskReadThroughput', {
|
||||
defaultMessage: 'Disk Read Throughput',
|
||||
}),
|
||||
type: 'diskReadThroughput',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.diskWriteThroughput', {
|
||||
defaultMessage: 'Disk Write Throughput',
|
||||
}),
|
||||
type: 'diskWriteThroughput',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.rx', {
|
||||
|
@ -48,18 +84,6 @@ const CHARTS_IN_ORDER: Array<Pick<MetricChartProps, 'title' | 'type'> & { fullRo
|
|||
}),
|
||||
type: 'tx',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.diskIORead', {
|
||||
defaultMessage: 'Disk Read IOPS',
|
||||
}),
|
||||
type: 'diskIORead',
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.infra.hostsViewPage.tabs.metricsCharts.DiskIOWrite', {
|
||||
defaultMessage: 'Disk Write IOPS',
|
||||
}),
|
||||
type: 'diskIOWrite',
|
||||
},
|
||||
];
|
||||
|
||||
export const MetricsGrid = React.memo(() => {
|
||||
|
|
|
@ -26,24 +26,32 @@ const mockHostNode: InfraAssetMetricsItem[] = [
|
|||
{
|
||||
metrics: [
|
||||
{
|
||||
name: 'rx',
|
||||
value: 252456.92916666667,
|
||||
name: 'cpu',
|
||||
value: 0.6353277777777777,
|
||||
},
|
||||
{
|
||||
name: 'tx',
|
||||
value: 252758.425,
|
||||
name: 'diskSpaceUsage',
|
||||
value: 0.2040001,
|
||||
},
|
||||
{
|
||||
name: 'memory',
|
||||
value: 0.94525,
|
||||
},
|
||||
{
|
||||
name: 'cpu',
|
||||
value: 0.6353277777777777,
|
||||
name: 'memoryFree',
|
||||
value: 34359.738368,
|
||||
},
|
||||
{
|
||||
name: 'memoryTotal',
|
||||
value: 34359.738368,
|
||||
name: 'normalizedLoad1m',
|
||||
value: 239.2040001,
|
||||
},
|
||||
{
|
||||
name: 'rx',
|
||||
value: 252456.92916666667,
|
||||
},
|
||||
{
|
||||
name: 'tx',
|
||||
value: 252758.425,
|
||||
},
|
||||
],
|
||||
metadata: [
|
||||
|
@ -55,24 +63,32 @@ const mockHostNode: InfraAssetMetricsItem[] = [
|
|||
{
|
||||
metrics: [
|
||||
{
|
||||
name: 'rx',
|
||||
value: 95.86339715321859,
|
||||
name: 'cpu',
|
||||
value: 0.8647805555555556,
|
||||
},
|
||||
{
|
||||
name: 'tx',
|
||||
value: 110.38566859563191,
|
||||
name: 'diskSpaceUsage',
|
||||
value: 0.5400000214576721,
|
||||
},
|
||||
{
|
||||
name: 'memory',
|
||||
value: 0.5400000214576721,
|
||||
},
|
||||
{
|
||||
name: 'cpu',
|
||||
value: 0.8647805555555556,
|
||||
name: 'memoryFree',
|
||||
value: 9.194304,
|
||||
},
|
||||
{
|
||||
name: 'memoryTotal',
|
||||
value: 9.194304,
|
||||
name: 'normalizedLoad1m',
|
||||
value: 100,
|
||||
},
|
||||
{
|
||||
name: 'rx',
|
||||
value: 95.86339715321859,
|
||||
},
|
||||
{
|
||||
name: 'tx',
|
||||
value: 110.38566859563191,
|
||||
},
|
||||
],
|
||||
metadata: [
|
||||
|
@ -110,7 +126,9 @@ describe('useHostTable hook', () => {
|
|||
tx: 252758.425,
|
||||
memory: 0.94525,
|
||||
cpu: 0.6353277777777777,
|
||||
memoryTotal: 34359.738368,
|
||||
diskSpaceUsage: 0.2040001,
|
||||
memoryFree: 34359.738368,
|
||||
normalizedLoad1m: 239.2040001,
|
||||
},
|
||||
{
|
||||
name: 'host-1',
|
||||
|
@ -125,7 +143,9 @@ describe('useHostTable hook', () => {
|
|||
tx: 110.38566859563191,
|
||||
memory: 0.5400000214576721,
|
||||
cpu: 0.8647805555555556,
|
||||
memoryTotal: 9.194304,
|
||||
diskSpaceUsage: 0.5400000214576721,
|
||||
memoryFree: 9.194304,
|
||||
normalizedLoad1m: 100,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -116,36 +116,37 @@ const titleLabel = i18n.translate('xpack.infra.hostsViewPage.table.nameColumnHea
|
|||
defaultMessage: 'Name',
|
||||
});
|
||||
|
||||
const averageCpuUsageLabel = i18n.translate(
|
||||
'xpack.infra.hostsViewPage.table.averageCpuUsageColumnHeader',
|
||||
const cpuUsageLabel = i18n.translate('xpack.infra.hostsViewPage.table.cpuUsageColumnHeader', {
|
||||
defaultMessage: 'CPU usage (avg.)',
|
||||
});
|
||||
|
||||
const diskSpaceUsageLabel = i18n.translate(
|
||||
'xpack.infra.hostsViewPage.table.diskSpaceUsageColumnHeader',
|
||||
{
|
||||
defaultMessage: 'CPU usage (avg.)',
|
||||
defaultMessage: 'Disk Space Usage (avg.)',
|
||||
}
|
||||
);
|
||||
|
||||
const diskLatencyLabel = i18n.translate('xpack.infra.hostsViewPage.table.diskLatencyColumnHeader', {
|
||||
defaultMessage: 'Disk Latency (avg.)',
|
||||
});
|
||||
|
||||
const averageTXLabel = i18n.translate('xpack.infra.hostsViewPage.table.averageTxColumnHeader', {
|
||||
const txLabel = i18n.translate('xpack.infra.hostsViewPage.table.txColumnHeader', {
|
||||
defaultMessage: 'TX (avg.)',
|
||||
});
|
||||
|
||||
const averageRXLabel = i18n.translate('xpack.infra.hostsViewPage.table.averageRxColumnHeader', {
|
||||
const rxLabel = i18n.translate('xpack.infra.hostsViewPage.table.rxColumnHeader', {
|
||||
defaultMessage: 'RX (avg.)',
|
||||
});
|
||||
|
||||
const averageTotalMemoryLabel = i18n.translate(
|
||||
'xpack.infra.hostsViewPage.table.averageMemoryTotalColumnHeader',
|
||||
{
|
||||
defaultMessage: 'Memory total (avg.)',
|
||||
}
|
||||
);
|
||||
const memoryFreeLabel = i18n.translate('xpack.infra.hostsViewPage.table.memoryFreeColumnHeader', {
|
||||
defaultMessage: 'Memory Free (avg.)',
|
||||
});
|
||||
|
||||
const averageMemoryUsageLabel = i18n.translate(
|
||||
'xpack.infra.hostsViewPage.table.averageMemoryUsageColumnHeader',
|
||||
const memoryUsageLabel = i18n.translate('xpack.infra.hostsViewPage.table.memoryUsageColumnHeader', {
|
||||
defaultMessage: 'Memory Usage (avg.)',
|
||||
});
|
||||
|
||||
const normalizedLoad1mLabel = i18n.translate(
|
||||
'xpack.infra.hostsViewPage.table.normalizedLoad1mColumnHeader',
|
||||
{
|
||||
defaultMessage: 'Memory usage (avg.)',
|
||||
defaultMessage: 'Normalized Load (avg.)',
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -255,9 +256,10 @@ export const useHostsTable = () => {
|
|||
onClick={() => reportHostEntryClick(title)}
|
||||
/>
|
||||
),
|
||||
width: '20%',
|
||||
},
|
||||
{
|
||||
name: averageCpuUsageLabel,
|
||||
name: cpuUsageLabel,
|
||||
field: 'cpu',
|
||||
sortable: true,
|
||||
'data-test-subj': 'hostsView-tableRow-cpuUsage',
|
||||
|
@ -265,44 +267,54 @@ export const useHostsTable = () => {
|
|||
align: 'right',
|
||||
},
|
||||
{
|
||||
name: diskLatencyLabel,
|
||||
field: 'diskLatency',
|
||||
name: normalizedLoad1mLabel,
|
||||
field: 'normalizedLoad1m',
|
||||
sortable: true,
|
||||
'data-test-subj': 'hostsView-tableRow-diskLatency',
|
||||
render: (avg: number) => formatMetric('diskLatency', avg),
|
||||
'data-test-subj': 'hostsView-tableRow-normalizedLoad1m',
|
||||
render: (avg: number) => formatMetric('normalizedLoad1m', avg),
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
name: averageRXLabel,
|
||||
name: memoryUsageLabel,
|
||||
field: 'memory',
|
||||
sortable: true,
|
||||
'data-test-subj': 'hostsView-tableRow-memoryTotal',
|
||||
render: (avg: number) => formatMetric('memory', avg),
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
name: memoryFreeLabel,
|
||||
field: 'memoryFree',
|
||||
sortable: true,
|
||||
'data-test-subj': 'hostsView-tableRow-memoryFree',
|
||||
render: (avg: number) => formatMetric('memoryFree', avg),
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
name: diskSpaceUsageLabel,
|
||||
field: 'diskSpaceUsage',
|
||||
sortable: true,
|
||||
'data-test-subj': 'hostsView-tableRow-diskSpaceUsage',
|
||||
render: (avg: number) => formatMetric('diskSpaceUsage', avg),
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
name: rxLabel,
|
||||
field: 'rx',
|
||||
sortable: true,
|
||||
'data-test-subj': 'hostsView-tableRow-rx',
|
||||
render: (avg: number) => formatMetric('rx', avg),
|
||||
align: 'right',
|
||||
width: '120px',
|
||||
},
|
||||
{
|
||||
name: averageTXLabel,
|
||||
name: txLabel,
|
||||
field: 'tx',
|
||||
sortable: true,
|
||||
'data-test-subj': 'hostsView-tableRow-tx',
|
||||
render: (avg: number) => formatMetric('tx', avg),
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
name: averageTotalMemoryLabel,
|
||||
field: 'memoryTotal',
|
||||
sortable: true,
|
||||
'data-test-subj': 'hostsView-tableRow-memoryTotal',
|
||||
render: (avg: number) => formatMetric('memoryTotal', avg),
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
name: averageMemoryUsageLabel,
|
||||
field: 'memory',
|
||||
sortable: true,
|
||||
'data-test-subj': 'hostsView-tableRow-memory',
|
||||
render: (avg: number) => formatMetric('memory', avg),
|
||||
align: 'right',
|
||||
width: '120px',
|
||||
},
|
||||
],
|
||||
[
|
||||
|
|
|
@ -27,12 +27,13 @@ import {
|
|||
import { StringDateRange } from './use_unified_search_url_state';
|
||||
|
||||
const HOST_TABLE_METRICS: Array<{ type: InfraAssetMetricType }> = [
|
||||
{ type: 'cpu' },
|
||||
{ type: 'diskSpaceUsage' },
|
||||
{ type: 'memory' },
|
||||
{ type: 'memoryFree' },
|
||||
{ type: 'normalizedLoad1m' },
|
||||
{ type: 'rx' },
|
||||
{ type: 'tx' },
|
||||
{ type: 'memory' },
|
||||
{ type: 'cpu' },
|
||||
{ type: 'diskLatency' },
|
||||
{ type: 'memoryTotal' },
|
||||
];
|
||||
|
||||
const BASE_INFRA_METRICS_PATH = '/api/metrics/infra';
|
||||
|
|
|
@ -31,24 +31,6 @@ const METRIC_FORMATTERS: MetricFormatters = {
|
|||
formatter: InfraFormatterType.percent,
|
||||
template: '{{value}}',
|
||||
},
|
||||
memory: {
|
||||
formatter: InfraFormatterType.percent,
|
||||
template: '{{value}}',
|
||||
},
|
||||
memoryTotal: {
|
||||
formatter: InfraFormatterType.bytes,
|
||||
template: '{{value}}',
|
||||
},
|
||||
diskLatency: {
|
||||
formatter: InfraFormatterType.number,
|
||||
template: '{{value}} ms',
|
||||
},
|
||||
rx: { formatter: InfraFormatterType.bits, template: '{{value}}/s' },
|
||||
tx: { formatter: InfraFormatterType.bits, template: '{{value}}/s' },
|
||||
logRate: {
|
||||
formatter: InfraFormatterType.abbreviatedNumber,
|
||||
template: '{{value}}/s',
|
||||
},
|
||||
diskIOReadBytes: {
|
||||
formatter: InfraFormatterType.bytes,
|
||||
template: '{{value}}/s',
|
||||
|
@ -57,6 +39,36 @@ const METRIC_FORMATTERS: MetricFormatters = {
|
|||
formatter: InfraFormatterType.bytes,
|
||||
template: '{{value}}/s',
|
||||
},
|
||||
diskLatency: {
|
||||
formatter: InfraFormatterType.number,
|
||||
template: '{{value}} ms',
|
||||
},
|
||||
diskSpaceUsage: {
|
||||
formatter: InfraFormatterType.percent,
|
||||
template: '{{value}}',
|
||||
},
|
||||
memory: {
|
||||
formatter: InfraFormatterType.percent,
|
||||
template: '{{value}}',
|
||||
},
|
||||
memoryFree: {
|
||||
formatter: InfraFormatterType.bytes,
|
||||
template: '{{value}}',
|
||||
},
|
||||
memoryTotal: {
|
||||
formatter: InfraFormatterType.bytes,
|
||||
template: '{{value}}',
|
||||
},
|
||||
normalizedLoad1m: {
|
||||
formatter: InfraFormatterType.percent,
|
||||
template: '{{value}}',
|
||||
},
|
||||
rx: { formatter: InfraFormatterType.bits, template: '{{value}}/s' },
|
||||
tx: { formatter: InfraFormatterType.bits, template: '{{value}}/s' },
|
||||
logRate: {
|
||||
formatter: InfraFormatterType.abbreviatedNumber,
|
||||
template: '{{value}}/s',
|
||||
},
|
||||
s3BucketSize: {
|
||||
formatter: InfraFormatterType.bytes,
|
||||
template: '{{value}}',
|
||||
|
|
|
@ -16,13 +16,16 @@ const metricsApiRequest: GetInfraMetricsRequestBodyPayload = {
|
|||
type: 'cpu',
|
||||
},
|
||||
{
|
||||
type: 'diskLatency',
|
||||
type: 'diskSpaceUsage',
|
||||
},
|
||||
{
|
||||
type: 'memory',
|
||||
},
|
||||
{
|
||||
type: 'memoryTotal',
|
||||
type: 'memoryFree',
|
||||
},
|
||||
{
|
||||
type: 'normalizedLoad1m',
|
||||
},
|
||||
{
|
||||
type: 'rx',
|
||||
|
@ -45,15 +48,18 @@ describe('mapper', () => {
|
|||
{
|
||||
key: 'host-0',
|
||||
doc_count: 155,
|
||||
diskLatency: {
|
||||
doc_count: 0,
|
||||
result: {
|
||||
value: null,
|
||||
},
|
||||
diskSpaceUsage: {
|
||||
value: 0.2040001,
|
||||
},
|
||||
memory: {
|
||||
value: 0.542838307852529,
|
||||
},
|
||||
memoryFree: {
|
||||
value: 34359.738368,
|
||||
},
|
||||
normalizedLoad1m: {
|
||||
value: 239.2040001,
|
||||
},
|
||||
tx: {
|
||||
doc_count: 155,
|
||||
result: {
|
||||
|
@ -66,9 +72,6 @@ describe('mapper', () => {
|
|||
value: 3959.4930095127706,
|
||||
},
|
||||
},
|
||||
memoryTotal: {
|
||||
value: 66640704.099216014,
|
||||
},
|
||||
cpu: {
|
||||
doc_count: 155,
|
||||
result: {
|
||||
|
@ -99,9 +102,10 @@ describe('mapper', () => {
|
|||
],
|
||||
metrics: [
|
||||
{ name: 'cpu', value: 0.13271302652800487 },
|
||||
{ name: 'diskLatency', value: 0 },
|
||||
{ name: 'diskSpaceUsage', value: 0.2040001 },
|
||||
{ name: 'memory', value: 0.542838307852529 },
|
||||
{ name: 'memoryTotal', value: 66640704.099216014 },
|
||||
{ name: 'memoryFree', value: 34359.738368 },
|
||||
{ name: 'normalizedLoad1m', value: 239.2040001 },
|
||||
{ name: 'rx', value: 3959.4930095127706 },
|
||||
{ name: 'tx', value: 100.26926542816672 },
|
||||
],
|
||||
|
|
|
@ -18477,23 +18477,18 @@
|
|||
"xpack.infra.hostsViewPage.landing.introTitle": "Présentation : Analyse de l'hôte",
|
||||
"xpack.infra.hostsViewPage.landing.learnMore": "En savoir plus",
|
||||
"xpack.infra.hostsViewPage.landing.tryTheFeatureMessage": "Il s'agit d'une version préliminaire de la fonctionnalité, et nous souhaiterions vivement connaître votre avis tandis que nous continuons\n à la développer et à l'améliorer. Pour accéder à cette fonctionnalité, il suffit de l'activer ci-dessous. Ne passez pas à côté\n de cette nouvelle et puissante fonctionnalité ajoutée à notre plateforme... Essayez-la aujourd'hui même !",
|
||||
"xpack.infra.hostsViewPage.metricTrend.cpu.title": "Utilisation CPU",
|
||||
"xpack.infra.hostsViewPage.metricTrend.cpu.tooltip": "Moyenne de pourcentage de temps CPU utilisé dans les états autres que Inactif et IOWait, normalisée par le nombre de cœurs de processeur. Inclut le temps passé à la fois sur l'espace utilisateur et sur l'espace du noyau. 100 % signifie que tous les processeurs de l'hôte sont occupés.",
|
||||
"xpack.infra.hostsViewPage.metricTrend.cpuUsage.title": "Utilisation CPU",
|
||||
"xpack.infra.hostsViewPage.metricTrend.cpuUsage.tooltip": "Moyenne de pourcentage de temps CPU utilisé dans les états autres que Inactif et IOWait, normalisée par le nombre de cœurs de processeur. Inclut le temps passé à la fois sur l'espace utilisateur et sur l'espace du noyau. 100 % signifie que tous les processeurs de l'hôte sont occupés.",
|
||||
"xpack.infra.hostsViewPage.metricTrend.hostCount.title": "Hôtes",
|
||||
"xpack.infra.hostsViewPage.metricTrend.hostCount.tooltip": "Nombre d'hôtes renvoyé par vos critères de recherche actuels.",
|
||||
"xpack.infra.hostsViewPage.metricTrend.memory.title": "Utilisation mémoire",
|
||||
"xpack.infra.hostsViewPage.metricTrend.memory.tooltip": "Moyenne de pourcentage d'utilisation de la mémoire principale, en excluant le cache de pages. Cela inclut la mémoire résidente pour tous les processus, plus la mémoire utilisée par les structures et le code du noyau, à l'exception du cache de pages. Un niveau élevé indique une situation de saturation de la mémoire pour un hôte. 100 % signifie que la mémoire principale est entièrement remplie par de la mémoire ne pouvant pas être récupérée, sauf en l'échangeant.",
|
||||
"xpack.infra.hostsViewPage.metricTrend.rx.title": "Réseau entrant (RX)",
|
||||
"xpack.infra.hostsViewPage.metricTrend.rx.tooltip": "Nombre d'octets qui ont été reçus par seconde sur les interfaces publiques des hôtes.",
|
||||
"xpack.infra.hostsViewPage.metricTrend.memoryUsage.title": "Utilisation mémoire",
|
||||
"xpack.infra.hostsViewPage.metricTrend.normalizedLoad1m.title": "Charge normalisée",
|
||||
"xpack.infra.hostsViewPage.metricTrend.subtitle.average": "Moyenne",
|
||||
"xpack.infra.hostsViewPage.metricTrend.tx.title": "Réseau sortant (TX)",
|
||||
"xpack.infra.hostsViewPage.metricTrend.tx.tooltip": "Nombre d'octets qui ont été reçus par seconde sur les interfaces publiques des hôtes.",
|
||||
"xpack.infra.hostsViewPage.table.averageCpuUsageColumnHeader": "Utilisation CPU (moy.)",
|
||||
"xpack.infra.hostsViewPage.table.averageMemoryTotalColumnHeader": "Total de la mémoire (moy.)",
|
||||
"xpack.infra.hostsViewPage.table.averageMemoryUsageColumnHeader": "Utilisation de la mémoire (moy.)",
|
||||
"xpack.infra.hostsViewPage.table.averageRxColumnHeader": "RX (moy.)",
|
||||
"xpack.infra.hostsViewPage.table.averageTxColumnHeader": "TX (moy.)",
|
||||
"xpack.infra.hostsViewPage.table.diskLatencyColumnHeader": "Latence du disque (moy.)",
|
||||
"xpack.infra.hostsViewPage.table.cpuUsageColumnHeader": "Utilisation CPU (moy.)",
|
||||
"xpack.infra.hostsViewPage.table.memoryUsageColumnHeader": "Utilisation de la mémoire (moy.)",
|
||||
"xpack.infra.hostsViewPage.table.normalizedLoad1mColumnHeader": "Charge normalisée (moy.)",
|
||||
"xpack.infra.hostsViewPage.table.rxColumnHeader": "RX (moy.)",
|
||||
"xpack.infra.hostsViewPage.table.txColumnHeader": "TX (moy.)",
|
||||
"xpack.infra.hostsViewPage.table.nameColumnHeader": "Nom",
|
||||
"xpack.infra.hostsViewPage.table.toggleDialogWithDetails": "Afficher/Masquer les détails de la boîte de dialogue",
|
||||
"xpack.infra.hostsViewPage.tabs.alerts.alertStatusFilter.active": "Actif",
|
||||
|
@ -18507,12 +18502,11 @@
|
|||
"xpack.infra.hostsViewPage.tabs.logs.textFieldPlaceholder": "Rechercher les entrées de logs...",
|
||||
"xpack.infra.hostsViewPage.tabs.logs.title": "Logs",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.actions.openInLines": "Ouvrir dans Lens",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.cpu": "Utilisation CPU",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.cpuUsage": "Utilisation CPU",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.diskIORead": "Entrées et sorties par seconde en lecture sur le disque",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.DiskIOWrite": "Entrées et sorties par seconde en écriture sur le disque",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.load": "Charge normalisée",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.memory": "Utilisation mémoire",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.memoryAvailable": "Mémoire disponible",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.diskIOWrite": "Entrées et sorties par seconde en écriture sur le disque",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.memoryUsage": "Utilisation mémoire",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.normalizedLoad1m": "Charge normalisée",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.rx": "Réseau entrant (RX)",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.title": "Indicateurs",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.tx": "Réseau sortant (TX)",
|
||||
|
|
|
@ -18476,23 +18476,18 @@
|
|||
"xpack.infra.hostsViewPage.landing.introTitle": "導入:ホスト分析",
|
||||
"xpack.infra.hostsViewPage.landing.learnMore": "詳細",
|
||||
"xpack.infra.hostsViewPage.landing.tryTheFeatureMessage": "この機能は初期バージョンであり、今後継続する中で、開発、改善するうえで皆様からのフィードバックをお願いします\n 。機能にアクセスするには、以下を有効にします。プラットフォームに\n 追加されたこの強力な新機能をお見逃しなく。今すぐお試しください!",
|
||||
"xpack.infra.hostsViewPage.metricTrend.cpu.title": "CPU 使用状況",
|
||||
"xpack.infra.hostsViewPage.metricTrend.cpu.tooltip": "アイドルおよびIOWait以外の状態で費やされたCPU時間の割合の平均値を、CPUコア数で正規化したもの。ユーザースペースとカーネルスペースの両方で費やされた時間が含まれます。100%はホストのすべてのCPUがビジー状態であることを示します。",
|
||||
"xpack.infra.hostsViewPage.metricTrend.cpuUsage.title": "CPU 使用状況",
|
||||
"xpack.infra.hostsViewPage.metricTrend.cpuUsage.tooltip": "アイドルおよびIOWait以外の状態で費やされたCPU時間の割合の平均値を、CPUコア数で正規化したもの。ユーザースペースとカーネルスペースの両方で費やされた時間が含まれます。100%はホストのすべてのCPUがビジー状態であることを示します。",
|
||||
"xpack.infra.hostsViewPage.metricTrend.hostCount.title": "ホスト",
|
||||
"xpack.infra.hostsViewPage.metricTrend.hostCount.tooltip": "現在の検索条件から返されたホストの数です。",
|
||||
"xpack.infra.hostsViewPage.metricTrend.memory.title": "メモリー使用状況",
|
||||
"xpack.infra.hostsViewPage.metricTrend.memory.tooltip": "ページキャッシュを除いたメインメモリの割合の平均値。これには、すべてのプロセスの常駐メモリと、ページキャッシュを離れてカーネル構造とコードによって使用されるメモリが含まれます。高レベルは、ホストのメモリが飽和状態にあることを示します。100%とは、メインメモリがすべてスワップアウト以外の、再利用不可能なメモリで満たされていることを意味します。",
|
||||
"xpack.infra.hostsViewPage.metricTrend.rx.title": "ネットワーク受信(RX)",
|
||||
"xpack.infra.hostsViewPage.metricTrend.rx.tooltip": "ホストのパブリックインターフェースで1秒間に受信したバイト数。",
|
||||
"xpack.infra.hostsViewPage.metricTrend.memoryUsage.title": "メモリー使用状況",
|
||||
"xpack.infra.hostsViewPage.metricTrend.normalizedLoad1m.title": "正規化された負荷",
|
||||
"xpack.infra.hostsViewPage.metricTrend.subtitle.average": "平均",
|
||||
"xpack.infra.hostsViewPage.metricTrend.tx.title": "ネットワーク送信(TX)",
|
||||
"xpack.infra.hostsViewPage.metricTrend.tx.tooltip": "ホストのパブリックインターフェースで1秒間に受信したバイト数。",
|
||||
"xpack.infra.hostsViewPage.table.averageCpuUsageColumnHeader": "CPU使用状況(平均)",
|
||||
"xpack.infra.hostsViewPage.table.averageMemoryTotalColumnHeader": "メモリー合計(平均)",
|
||||
"xpack.infra.hostsViewPage.table.averageMemoryUsageColumnHeader": "メモリー使用状況(平均)",
|
||||
"xpack.infra.hostsViewPage.table.averageRxColumnHeader": "RX(平均)",
|
||||
"xpack.infra.hostsViewPage.table.averageTxColumnHeader": "TX(平均)",
|
||||
"xpack.infra.hostsViewPage.table.diskLatencyColumnHeader": "ディスクレイテンシ(平均)",
|
||||
"xpack.infra.hostsViewPage.table.cpuUsageColumnHeader": "CPU使用状況(平均)",
|
||||
"xpack.infra.hostsViewPage.table.memoryUsageColumnHeader": "メモリー使用状況(平均)",
|
||||
"xpack.infra.hostsViewPage.table.normalizedLoad1mColumnHeader": "正規化された負荷(平均)",
|
||||
"xpack.infra.hostsViewPage.table.rxColumnHeader": "RX(平均)",
|
||||
"xpack.infra.hostsViewPage.table.txColumnHeader": "TX(平均)",
|
||||
"xpack.infra.hostsViewPage.table.nameColumnHeader": "名前",
|
||||
"xpack.infra.hostsViewPage.table.toggleDialogWithDetails": "詳細ダイアログを切り替え",
|
||||
"xpack.infra.hostsViewPage.tabs.alerts.alertStatusFilter.active": "アクティブ",
|
||||
|
@ -18506,12 +18501,11 @@
|
|||
"xpack.infra.hostsViewPage.tabs.logs.textFieldPlaceholder": "ログエントリーを検索...",
|
||||
"xpack.infra.hostsViewPage.tabs.logs.title": "ログ",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.actions.openInLines": "Lensで開く",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.cpu": "CPU使用状況",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.cpuUsage": "CPU使用状況",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.diskIORead": "ディスク読み取りIOPS",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.DiskIOWrite": "ディスク書き込みIOPS",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.load": "正規化された負荷",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.memory": "メモリー使用状況",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.memoryAvailable": "使用可能なメモリー",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.diskIOWrite": "ディスク書き込みIOPS",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.memoryUsage": "メモリー使用状況",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.normalizedLoad1m": "正規化された負荷",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.rx": "ネットワーク受信(RX)",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.title": "メトリック",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.tx": "ネットワーク送信(TX)",
|
||||
|
|
|
@ -18476,23 +18476,18 @@
|
|||
"xpack.infra.hostsViewPage.landing.introTitle": "即将引入:主机分析",
|
||||
"xpack.infra.hostsViewPage.landing.learnMore": "了解详情",
|
||||
"xpack.infra.hostsViewPage.landing.tryTheFeatureMessage": "这是早期版本的功能,我们需要您的反馈,\n 以便继续开发和改进该功能。要访问该功能,直接在下面启用即可。请抓紧时间,\n 了解新添加到我们平台中的这项强大功能 - 立即试用!",
|
||||
"xpack.infra.hostsViewPage.metricTrend.cpu.title": "CPU 使用",
|
||||
"xpack.infra.hostsViewPage.metricTrend.cpu.tooltip": "CPU 在空闲和 IOWait 状态以外所花费时间的平均百分比,按 CPU 核心数进行标准化。包括在用户空间和内核空间上花费的时间。100% 表示主机的所有 CPU 都处于忙碌状态。",
|
||||
"xpack.infra.hostsViewPage.metricTrend.cpuUsage.title": "CPU 使用",
|
||||
"xpack.infra.hostsViewPage.metricTrend.cpuUsage.tooltip": "CPU 在空闲和 IOWait 状态以外所花费时间的平均百分比,按 CPU 核心数进行标准化。包括在用户空间和内核空间上花费的时间。100% 表示主机的所有 CPU 都处于忙碌状态。",
|
||||
"xpack.infra.hostsViewPage.metricTrend.hostCount.title": "主机",
|
||||
"xpack.infra.hostsViewPage.metricTrend.hostCount.tooltip": "当前搜索条件返回的主机数。",
|
||||
"xpack.infra.hostsViewPage.metricTrend.memory.title": "内存使用",
|
||||
"xpack.infra.hostsViewPage.metricTrend.memory.tooltip": "主内存使用率(不包括页面缓存)的平均百分比。这包括所有进程的常驻内存,加上由内核结构和代码使用的内存,但不包括页面缓存。高比率表明主机出现内存饱和情况。100% 表示主内存被完全占用,除了进行换出外无法回收内存。",
|
||||
"xpack.infra.hostsViewPage.metricTrend.rx.title": "网络入站数据 (RX)",
|
||||
"xpack.infra.hostsViewPage.metricTrend.rx.tooltip": "主机的公共接口上每秒接收的字节数。",
|
||||
"xpack.infra.hostsViewPage.metricTrend.memoryUsage.title": "内存使用",
|
||||
"xpack.infra.hostsViewPage.metricTrend.normalizedLoad1m.title": "正規化された負荷",
|
||||
"xpack.infra.hostsViewPage.metricTrend.subtitle.average": "平均值",
|
||||
"xpack.infra.hostsViewPage.metricTrend.tx.title": "网络出站数据 (TX)",
|
||||
"xpack.infra.hostsViewPage.metricTrend.tx.tooltip": "主机的公共接口上每秒接收的字节数。",
|
||||
"xpack.infra.hostsViewPage.table.averageCpuUsageColumnHeader": "CPU 使用率(平均值)",
|
||||
"xpack.infra.hostsViewPage.table.averageMemoryTotalColumnHeader": "内存合计(平均值)",
|
||||
"xpack.infra.hostsViewPage.table.averageMemoryUsageColumnHeader": "内存使用率(平均值)",
|
||||
"xpack.infra.hostsViewPage.table.averageRxColumnHeader": "RX(平均值)",
|
||||
"xpack.infra.hostsViewPage.table.averageTxColumnHeader": "TX(平均值)",
|
||||
"xpack.infra.hostsViewPage.table.diskLatencyColumnHeader": "磁盘延迟(平均值)",
|
||||
"xpack.infra.hostsViewPage.table.cpuUsageColumnHeader": "CPU 使用率(平均值)",
|
||||
"xpack.infra.hostsViewPage.table.memoryUsageColumnHeader": "内存使用率(平均值)",
|
||||
"xpack.infra.hostsViewPage.table.normalizedLoad1mColumnHeader": "标准化负载(平均)",
|
||||
"xpack.infra.hostsViewPage.table.rxColumnHeader": "RX(平均值)",
|
||||
"xpack.infra.hostsViewPage.table.txColumnHeader": "TX(平均值)",
|
||||
"xpack.infra.hostsViewPage.table.nameColumnHeader": "名称",
|
||||
"xpack.infra.hostsViewPage.table.toggleDialogWithDetails": "切换具有详情的对话框",
|
||||
"xpack.infra.hostsViewPage.tabs.alerts.alertStatusFilter.active": "活动",
|
||||
|
@ -18506,12 +18501,11 @@
|
|||
"xpack.infra.hostsViewPage.tabs.logs.textFieldPlaceholder": "搜索日志条目......",
|
||||
"xpack.infra.hostsViewPage.tabs.logs.title": "日志",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.actions.openInLines": "在 Lens 中打开",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.cpu": "CPU 使用率",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.cpuUsage": "CPU 使用率",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.diskIORead": "磁盘读取 IOPS",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.DiskIOWrite": "磁盘写入 IOPS",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.load": "标准化负载",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.memory": "内存利用率",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.memoryAvailable": "可用内存",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.diskIOWrite": "磁盘写入 IOPS",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.memoryUsage": "内存利用率",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.normalizedLoad1m": "标准化负载",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.rx": "网络入站数据 (RX)",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.title": "指标",
|
||||
"xpack.infra.hostsViewPage.tabs.metricsCharts.tx": "网络出站数据 (TX)",
|
||||
|
|
|
@ -31,13 +31,16 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
type: 'cpu',
|
||||
},
|
||||
{
|
||||
type: 'diskLatency',
|
||||
type: 'diskSpaceUsage',
|
||||
},
|
||||
{
|
||||
type: 'memory',
|
||||
},
|
||||
{
|
||||
type: 'memoryTotal',
|
||||
type: 'memoryFree',
|
||||
},
|
||||
{
|
||||
type: 'normalizedLoad1m',
|
||||
},
|
||||
{
|
||||
type: 'rx',
|
||||
|
@ -93,9 +96,10 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
],
|
||||
metrics: [
|
||||
{ name: 'cpu', value: 0.44708333333333333 },
|
||||
{ name: 'diskLatency', value: null },
|
||||
{ name: 'diskSpaceUsage', value: 0 },
|
||||
{ name: 'memory', value: 0.4563333333333333 },
|
||||
{ name: 'memoryTotal', value: 15768948736 },
|
||||
{ name: 'memoryFree', value: 8573890560 },
|
||||
{ name: 'normalizedLoad1m', value: 0.7375000000000002 },
|
||||
{ name: 'rx', value: null },
|
||||
{ name: 'tx', value: null },
|
||||
],
|
||||
|
@ -242,7 +246,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
const response = await makeRequest({ invalidBody, expectedHTTPCode: 400 });
|
||||
|
||||
expect(normalizeNewLine(response.body.message)).to.be(
|
||||
'[request body]: Failed to validate: in metrics/0/type: "any" does not match expected type "cpu" | "diskLatency" | "memory" | "memoryTotal" | "rx" | "tx"'
|
||||
'[request body]: Failed to validate: in metrics/0/type: "any" does not match expected type "cpu" | "normalizedLoad1m" | "diskSpaceUsage" | "memory" | "memoryFree" | "rx" | "tx"'
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -24,56 +24,62 @@ const tableEntries = [
|
|||
{
|
||||
title: 'demo-stack-apache-01',
|
||||
cpuUsage: '1.2%',
|
||||
diskLatency: '1.6 ms',
|
||||
normalizedLoad: '0.5%',
|
||||
memoryUsage: '18.4%',
|
||||
memoryFree: '3.2 GB',
|
||||
diskSpaceUsage: '17.6%',
|
||||
rx: '0 bit/s',
|
||||
tx: '0 bit/s',
|
||||
memoryTotal: '3.9 GB',
|
||||
memory: '18.4%',
|
||||
},
|
||||
{
|
||||
title: 'demo-stack-client-01',
|
||||
cpuUsage: '0.5%',
|
||||
diskLatency: '8.7 ms',
|
||||
normalizedLoad: '0.1%',
|
||||
memoryUsage: '13.8%',
|
||||
memoryFree: '3.3 GB',
|
||||
diskSpaceUsage: '16.9%',
|
||||
rx: '0 bit/s',
|
||||
tx: '0 bit/s',
|
||||
memoryTotal: '3.9 GB',
|
||||
memory: '13.8%',
|
||||
},
|
||||
{
|
||||
title: 'demo-stack-haproxy-01',
|
||||
cpuUsage: '0.8%',
|
||||
diskLatency: '7 ms',
|
||||
normalizedLoad: '0%',
|
||||
memoryUsage: '16.5%',
|
||||
memoryFree: '3.2 GB',
|
||||
diskSpaceUsage: '16.3%',
|
||||
rx: '0 bit/s',
|
||||
tx: '0 bit/s',
|
||||
memoryTotal: '3.9 GB',
|
||||
memory: '16.5%',
|
||||
},
|
||||
{
|
||||
title: 'demo-stack-mysql-01',
|
||||
cpuUsage: '0.9%',
|
||||
diskLatency: '6.6 ms',
|
||||
normalizedLoad: '0%',
|
||||
memoryUsage: '18.2%',
|
||||
memoryFree: '3.2 GB',
|
||||
diskSpaceUsage: '17.8%',
|
||||
rx: '0 bit/s',
|
||||
tx: '0 bit/s',
|
||||
memoryTotal: '3.9 GB',
|
||||
memory: '18.2%',
|
||||
},
|
||||
{
|
||||
title: 'demo-stack-nginx-01',
|
||||
cpuUsage: '0.8%',
|
||||
diskLatency: '5.7 ms',
|
||||
normalizedLoad: '1.4%',
|
||||
memoryUsage: '18%',
|
||||
memoryFree: '3.2 GB',
|
||||
diskSpaceUsage: '17.5%',
|
||||
rx: '0 bit/s',
|
||||
tx: '0 bit/s',
|
||||
memoryTotal: '3.9 GB',
|
||||
memory: '18%',
|
||||
},
|
||||
{
|
||||
title: 'demo-stack-redis-01',
|
||||
cpuUsage: '0.8%',
|
||||
diskLatency: '6.3 ms',
|
||||
normalizedLoad: '0%',
|
||||
memoryUsage: '15.9%',
|
||||
memoryFree: '3.3 GB',
|
||||
diskSpaceUsage: '16.3%',
|
||||
rx: '0 bit/s',
|
||||
tx: '0 bit/s',
|
||||
memoryTotal: '3.9 GB',
|
||||
memory: '15.9%',
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -388,10 +394,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
|
||||
[
|
||||
{ metric: 'hostsCount', value: '6' },
|
||||
{ metric: 'cpu', value: '1%' },
|
||||
{ metric: 'memory', value: '17%' },
|
||||
{ metric: 'tx', value: 'N/A' },
|
||||
{ metric: 'rx', value: 'N/A' },
|
||||
{ metric: 'cpuUsage', value: '0.8%' },
|
||||
{ metric: 'normalizedLoad1m', value: '0.3%' },
|
||||
{ metric: 'memoryUsage', value: '16.8%' },
|
||||
{ metric: 'diskSpaceUsage', value: '17.1%' },
|
||||
].forEach(({ metric, value }) => {
|
||||
it(`${metric} tile should show ${value}`, async () => {
|
||||
await retry.try(async () => {
|
||||
|
@ -412,9 +418,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
await browser.scrollTop();
|
||||
});
|
||||
|
||||
it('should load 8 lens metric charts', async () => {
|
||||
it('should load 12 lens metric charts', async () => {
|
||||
const metricCharts = await pageObjects.infraHostsView.getAllMetricsCharts();
|
||||
expect(metricCharts.length).to.equal(8);
|
||||
expect(metricCharts.length).to.equal(12);
|
||||
});
|
||||
|
||||
it('should have an option to open the chart in lens', async () => {
|
||||
|
@ -540,10 +546,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
await Promise.all(
|
||||
[
|
||||
{ metric: 'hostsCount', value: '3' },
|
||||
{ metric: 'cpu', value: '1%' },
|
||||
{ metric: 'memory', value: '16%' },
|
||||
{ metric: 'tx', value: 'N/A' },
|
||||
{ metric: 'rx', value: 'N/A' },
|
||||
{ metric: 'cpuUsage', value: '0.8%' },
|
||||
{ metric: 'normalizedLoad1m', value: '0.2%' },
|
||||
{ metric: 'memoryUsage', value: '16.3%' },
|
||||
{ metric: 'diskSpaceUsage', value: '16.9%' },
|
||||
].map(async ({ metric, value }) => {
|
||||
await retry.try(async () => {
|
||||
const tileValue = await pageObjects.infraHostsView.getKPITileValue(metric);
|
||||
|
@ -624,20 +630,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
});
|
||||
});
|
||||
|
||||
it('should sort by Disk Latency asc', async () => {
|
||||
await pageObjects.infraHostsView.sortByDiskLatency();
|
||||
let hostRows = await pageObjects.infraHostsView.getHostsTableData();
|
||||
const hostDataFirtPage = await pageObjects.infraHostsView.getHostsRowData(hostRows[0]);
|
||||
expect(hostDataFirtPage).to.eql(tableEntries[0]);
|
||||
|
||||
await pageObjects.infraHostsView.paginateTo(2);
|
||||
hostRows = await pageObjects.infraHostsView.getHostsTableData();
|
||||
const hostDataLastPage = await pageObjects.infraHostsView.getHostsRowData(hostRows[0]);
|
||||
expect(hostDataLastPage).to.eql(tableEntries[1]);
|
||||
});
|
||||
|
||||
it('should sort by Disk Latency desc', async () => {
|
||||
await pageObjects.infraHostsView.sortByDiskLatency();
|
||||
it('should sort by a numeric field asc', async () => {
|
||||
await pageObjects.infraHostsView.sortByCpuUsage();
|
||||
let hostRows = await pageObjects.infraHostsView.getHostsTableData();
|
||||
const hostDataFirtPage = await pageObjects.infraHostsView.getHostsRowData(hostRows[0]);
|
||||
expect(hostDataFirtPage).to.eql(tableEntries[1]);
|
||||
|
@ -648,7 +642,19 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
expect(hostDataLastPage).to.eql(tableEntries[0]);
|
||||
});
|
||||
|
||||
it('should sort by Title asc', async () => {
|
||||
it('should sort by a numeric field desc', async () => {
|
||||
await pageObjects.infraHostsView.sortByCpuUsage();
|
||||
let hostRows = await pageObjects.infraHostsView.getHostsTableData();
|
||||
const hostDataFirtPage = await pageObjects.infraHostsView.getHostsRowData(hostRows[0]);
|
||||
expect(hostDataFirtPage).to.eql(tableEntries[0]);
|
||||
|
||||
await pageObjects.infraHostsView.paginateTo(2);
|
||||
hostRows = await pageObjects.infraHostsView.getHostsTableData();
|
||||
const hostDataLastPage = await pageObjects.infraHostsView.getHostsRowData(hostRows[0]);
|
||||
expect(hostDataLastPage).to.eql(tableEntries[1]);
|
||||
});
|
||||
|
||||
it('should sort by text field asc', async () => {
|
||||
await pageObjects.infraHostsView.sortByTitle();
|
||||
let hostRows = await pageObjects.infraHostsView.getHostsTableData();
|
||||
const hostDataFirtPage = await pageObjects.infraHostsView.getHostsRowData(hostRows[0]);
|
||||
|
@ -660,7 +666,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
expect(hostDataLastPage).to.eql(tableEntries[5]);
|
||||
});
|
||||
|
||||
it('should sort by Title desc', async () => {
|
||||
it('should sort by text field desc', async () => {
|
||||
await pageObjects.infraHostsView.sortByTitle();
|
||||
let hostRows = await pageObjects.infraHostsView.getHostsTableData();
|
||||
const hostDataFirtPage = await pageObjects.infraHostsView.getHostsRowData(hostRows[0]);
|
||||
|
|
|
@ -90,11 +90,10 @@ export function InfraHostsViewProvider({ getService }: FtrProviderContext) {
|
|||
const cells = await row.findAllByCssSelector('[data-test-subj*="hostsView-tableRow-"]');
|
||||
|
||||
// Retrieve content for each cell
|
||||
const [title, cpuUsage, diskLatency, rx, tx, memoryTotal, memory] = await Promise.all(
|
||||
cells.map((cell) => this.getHostsCellContent(cell))
|
||||
);
|
||||
const [title, cpuUsage, normalizedLoad, memoryUsage, memoryFree, diskSpaceUsage, rx, tx] =
|
||||
await Promise.all(cells.map((cell) => this.getHostsCellContent(cell)));
|
||||
|
||||
return { title, cpuUsage, diskLatency, rx, tx, memoryTotal, memory };
|
||||
return { title, cpuUsage, normalizedLoad, memoryUsage, memoryFree, diskSpaceUsage, rx, tx };
|
||||
},
|
||||
|
||||
async getHostsCellContent(cell: WebElementWrapper) {
|
||||
|
@ -126,7 +125,7 @@ export function InfraHostsViewProvider({ getService }: FtrProviderContext) {
|
|||
},
|
||||
|
||||
async clickAndValidateMetriChartActionOptions() {
|
||||
const element = await testSubjects.find('hostsView-metricChart-diskIOWrite');
|
||||
const element = await testSubjects.find('hostsView-metricChart-tx');
|
||||
await element.moveMouseTo();
|
||||
const button = await element.findByTestSubject('embeddablePanelToggleMenuIcon');
|
||||
await button.click();
|
||||
|
@ -284,16 +283,16 @@ export function InfraHostsViewProvider({ getService }: FtrProviderContext) {
|
|||
},
|
||||
|
||||
// Sorting
|
||||
getDiskLatencyHeader() {
|
||||
return testSubjects.find('tableHeaderCell_diskLatency_3');
|
||||
getCpuUsageHeader() {
|
||||
return testSubjects.find('tableHeaderCell_cpu_2');
|
||||
},
|
||||
|
||||
getTitleHeader() {
|
||||
return testSubjects.find('tableHeaderCell_title_1');
|
||||
},
|
||||
|
||||
async sortByDiskLatency() {
|
||||
const diskLatency = await this.getDiskLatencyHeader();
|
||||
async sortByCpuUsage() {
|
||||
const diskLatency = await this.getCpuUsageHeader();
|
||||
const button = await testSubjects.findDescendant('tableHeaderSortButton', diskLatency);
|
||||
await button.click();
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue