mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Infra UI] Cleanup host-specific Node Detail Page code (#166828)
closes: https://github.com/elastic/kibana/issues/166428 ## Summary This PR removes code that is no longer needed after replacing the Node Details View for Host with the Asset Details. ### TSVB The TSVB files were apparently only used to display charts in the Node Details view. Due to the Asset Details using Lens to power the charts, corresponding `host` TSVB formulas and configs are no longer needed. Therefore, `host*`, `hostK8s*`, and `hostDocker*` (the latter appears to have never been used) have been removed. Additionally, `aws*` from `required_metrics` was also removed because it was host-specific. ### FE Components The main change is in the `useMetadata` hook. I have changed the hook signature, making `requiredMetrics` optional. This parameter is used to process additional filtering and is only used in asset types that the old Node Details page supports. Not passing it is not expected to break other places that depend on this hook. ### Server Removing TSVB files has a direct impact on the `api/metrics/node_details` endpoint. This endpoint is only used to provide data to the Node Details page. It returns a 400 error if an invalid metric is passed - which will be the case for hosts **Example Request:** ```json POST kbn:api/metrics/node_details { "metrics": [ "hostK8sCpuCap", "hostSystemOverview" ], "nodeId": "gke-release-oblt-release-oblt-pool-c4163099-bcaj", "nodeType": "host", "timerange": { "from": 1695210522045, "to": 1695214122045, "interval": ">=1m" }, "cloudId": "6106013995483209805", "sourceId": "default" } ``` **Response:** ```json { "statusCode": 400, "error": "Bad Request", "message": "Failed to validate: \n in metrics/0: \"hostK8sCpuCap\" does not match expected type \"podOverview\" | \"podCpuUsage\" | \"podMemoryUsage\" | \"podLogUsage\" | \"podNetworkTraffic\" | \"containerOverview\" | \"containerCpuKernel\" | \"containerCpuUsage\" | \"containerDiskIOOps\" | \"containerDiskIOBytes\" | \"containerMemory\" | \"containerNetworkTraffic\" | \"containerK8sOverview\" | \"containerK8sCpuUsage\" | \"containerK8sMemoryUsage\" | \"nginxHits\" | \"nginxRequestRate\" | \"nginxActiveConnections\" | \"nginxRequestsPerConnection\" | \"awsEC2CpuUtilization\" | \"awsEC2NetworkTraffic\" | \"awsEC2DiskIOBytes\" | \"awsS3TotalRequests\" | \"awsS3NumberOfObjects\" | \"awsS3BucketSize\" | \"awsS3DownloadBytes\" | \"awsS3UploadBytes\" | \"awsRDSCpuTotal\" | \"awsRDSConnections\" | \"awsRDSQueriesExecuted\" | \"awsRDSActiveTransactions\" | \"awsRDSLatency\" | \"awsSQSMessagesVisible\" | \"awsSQSMessagesDelayed\" | \"awsSQSMessagesSent\" | \"awsSQSMessagesEmpty\" | \"awsSQSOldestMessage\" | \"custom\"\n in metrics/1: \"hostSystemOverview\" does not match expected type \"podOverview\" | \"podCpuUsage\" | \"podMemoryUsage\" | \"podLogUsage\" | \"podNetworkTraffic\" | \"containerOverview\" | \"containerCpuKernel\" | \"containerCpuUsage\" | \"containerDiskIOOps\" | \"containerDiskIOBytes\" | \"containerMemory\" | \"containerNetworkTraffic\" | \"containerK8sOverview\" | \"containerK8sCpuUsage\" | \"containerK8sMemoryUsage\" | \"nginxHits\" | \"nginxRequestRate\" | \"nginxActiveConnections\" | \"nginxRequestsPerConnection\" | \"awsEC2CpuUtilization\" | \"awsEC2NetworkTraffic\" | \"awsEC2DiskIOBytes\" | \"awsS3TotalRequests\" | \"awsS3NumberOfObjects\" | \"awsS3BucketSize\" | \"awsS3DownloadBytes\" | \"awsS3UploadBytes\" | \"awsRDSCpuTotal\" | \"awsRDSConnections\" | \"awsRDSQueriesExecuted\" | \"awsRDSActiveTransactions\" | \"awsRDSLatency\" | \"awsSQSMessagesVisible\" | \"awsSQSMessagesDelayed\" | \"awsSQSMessagesSent\" | \"awsSQSMessagesEmpty\" | \"awsSQSOldestMessage\" | \"custom\"" } ``` ### How to Test - Start a local Kibana instance pointing to an oblt cluster. - Navigate to `Infrastructure`. - Try different asset types and navigate to the Node Details view. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
3be21c9e56
commit
d79a38363a
39 changed files with 105 additions and 2558 deletions
|
@ -8,10 +8,6 @@
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
import { metrics } from './metrics';
|
import { metrics } from './metrics';
|
||||||
import { InventoryModel } from '../types';
|
import { InventoryModel } from '../types';
|
||||||
import {
|
|
||||||
aws as awsRequiredMetrics,
|
|
||||||
nginx as nginxRequireMetrics,
|
|
||||||
} from '../shared/metrics/required_metrics';
|
|
||||||
|
|
||||||
export { hostSnapshotMetricTypes } from './metrics';
|
export { hostSnapshotMetricTypes } from './metrics';
|
||||||
|
|
||||||
|
@ -38,19 +34,5 @@ export const host: InventoryModel = {
|
||||||
cloudProvider: 'cloud.provider',
|
cloudProvider: 'cloud.provider',
|
||||||
},
|
},
|
||||||
metrics,
|
metrics,
|
||||||
requiredMetrics: [
|
|
||||||
'hostSystemOverview',
|
|
||||||
'hostCpuUsage',
|
|
||||||
'hostLoad',
|
|
||||||
'hostMemoryUsage',
|
|
||||||
'hostNetworkTraffic',
|
|
||||||
'hostK8sOverview',
|
|
||||||
'hostK8sCpuCap',
|
|
||||||
'hostK8sMemoryCap',
|
|
||||||
'hostK8sDiskCap',
|
|
||||||
'hostK8sPodCap',
|
|
||||||
...awsRequiredMetrics,
|
|
||||||
...nginxRequireMetrics,
|
|
||||||
],
|
|
||||||
tooltipMetrics: ['cpu', 'memory', 'tx', 'rx'],
|
tooltipMetrics: ['cpu', 'memory', 'tx', 'rx'],
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,24 +18,6 @@ import { normalizedLoad1m } from './snapshot/normalized_load_1m';
|
||||||
import { rx } from './snapshot/rx';
|
import { rx } from './snapshot/rx';
|
||||||
import { tx } from './snapshot/tx';
|
import { tx } from './snapshot/tx';
|
||||||
|
|
||||||
import { hostSystemOverview } from './tsvb/host_system_overview';
|
|
||||||
import { hostCpuUsage } from './tsvb/host_cpu_usage';
|
|
||||||
import { hostLoad } from './tsvb/host_load';
|
|
||||||
import { hostMemoryUsage } from './tsvb/host_memory_usage';
|
|
||||||
import { hostNetworkTraffic } from './tsvb/host_network_traffic';
|
|
||||||
import { hostFilesystem } from './tsvb/host_filesystem';
|
|
||||||
|
|
||||||
import { hostK8sOverview } from './tsvb/host_k8s_overview';
|
|
||||||
import { hostK8sCpuCap } from './tsvb/host_k8s_cpu_cap';
|
|
||||||
import { hostK8sPodCap } from './tsvb/host_k8s_pod_cap';
|
|
||||||
import { hostK8sDiskCap } from './tsvb/host_k8s_disk_cap';
|
|
||||||
import { hostK8sMemoryCap } from './tsvb/host_k8s_memory_cap';
|
|
||||||
|
|
||||||
import { hostDockerTop5ByMemory } from './tsvb/host_docker_top_5_by_memory';
|
|
||||||
import { hostDockerTop5ByCpu } from './tsvb/host_docker_top_5_by_cpu';
|
|
||||||
import { hostDockerOverview } from './tsvb/host_docker_overview';
|
|
||||||
import { hostDockerInfo } from './tsvb/host_docker_info';
|
|
||||||
|
|
||||||
import { InventoryMetrics } from '../../types';
|
import { InventoryMetrics } from '../../types';
|
||||||
|
|
||||||
const exposedHostSnapshotMetrics = {
|
const exposedHostSnapshotMetrics = {
|
||||||
|
@ -59,23 +41,6 @@ export const hostSnapshotMetricTypes = Object.keys(exposedHostSnapshotMetrics) a
|
||||||
>;
|
>;
|
||||||
|
|
||||||
export const metrics: InventoryMetrics = {
|
export const metrics: InventoryMetrics = {
|
||||||
tsvb: {
|
|
||||||
hostSystemOverview,
|
|
||||||
hostCpuUsage,
|
|
||||||
hostLoad,
|
|
||||||
hostMemoryUsage,
|
|
||||||
hostNetworkTraffic,
|
|
||||||
hostFilesystem,
|
|
||||||
hostK8sOverview,
|
|
||||||
hostK8sCpuCap,
|
|
||||||
hostK8sPodCap,
|
|
||||||
hostK8sDiskCap,
|
|
||||||
hostK8sMemoryCap,
|
|
||||||
hostDockerOverview,
|
|
||||||
hostDockerInfo,
|
|
||||||
hostDockerTop5ByMemory,
|
|
||||||
hostDockerTop5ByCpu,
|
|
||||||
},
|
|
||||||
snapshot: hostSnapshotMetrics,
|
snapshot: hostSnapshotMetrics,
|
||||||
defaultSnapshot: 'cpu',
|
defaultSnapshot: 'cpu',
|
||||||
defaultTimeRangeInSeconds: 3600, // 1 hour
|
defaultTimeRangeInSeconds: 3600, // 1 hour
|
||||||
|
|
|
@ -1,254 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostCpuUsage: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostCpuUsage',
|
|
||||||
requires: ['system.cpu'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'user',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.cpu.user.pct',
|
|
||||||
id: 'avg-cpu-user',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'system.cpu.cores',
|
|
||||||
id: 'max-cpu-cores',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-avg-cores',
|
|
||||||
script: 'params.avg / params.cores',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'max-cpu-cores',
|
|
||||||
id: 'var-cores',
|
|
||||||
name: 'cores',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'avg-cpu-user',
|
|
||||||
id: 'var-avg',
|
|
||||||
name: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'system',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.cpu.system.pct',
|
|
||||||
id: 'avg-cpu-system',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'system.cpu.cores',
|
|
||||||
id: 'max-cpu-cores',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-avg-cores',
|
|
||||||
script: 'params.avg / params.cores',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'max-cpu-cores',
|
|
||||||
id: 'var-cores',
|
|
||||||
name: 'cores',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'avg-cpu-system',
|
|
||||||
id: 'var-avg',
|
|
||||||
name: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'steal',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.cpu.steal.pct',
|
|
||||||
id: 'avg-cpu-steal',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'system.cpu.cores',
|
|
||||||
id: 'max-cpu-cores',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-avg-cores',
|
|
||||||
script: 'params.avg / params.cores',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'avg-cpu-steal',
|
|
||||||
id: 'var-avg',
|
|
||||||
name: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'max-cpu-cores',
|
|
||||||
id: 'var-cores',
|
|
||||||
name: 'cores',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'irq',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.cpu.irq.pct',
|
|
||||||
id: 'avg-cpu-irq',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'system.cpu.cores',
|
|
||||||
id: 'max-cpu-cores',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-avg-cores',
|
|
||||||
script: 'params.avg / params.cores',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'max-cpu-cores',
|
|
||||||
id: 'var-cores',
|
|
||||||
name: 'cores',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'avg-cpu-irq',
|
|
||||||
id: 'var-avg',
|
|
||||||
name: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'softirq',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.cpu.softirq.pct',
|
|
||||||
id: 'avg-cpu-softirq',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'system.cpu.cores',
|
|
||||||
id: 'max-cpu-cores',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-avg-cores',
|
|
||||||
script: 'params.avg / params.cores',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'max-cpu-cores',
|
|
||||||
id: 'var-cores',
|
|
||||||
name: 'cores',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'avg-cpu-softirq',
|
|
||||||
id: 'var-avg',
|
|
||||||
name: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'iowait',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.cpu.iowait.pct',
|
|
||||||
id: 'avg-cpu-iowait',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'system.cpu.cores',
|
|
||||||
id: 'max-cpu-cores',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-avg-cores',
|
|
||||||
script: 'params.avg / params.cores',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'max-cpu-cores',
|
|
||||||
id: 'var-cores',
|
|
||||||
name: 'cores',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'avg-cpu-iowait',
|
|
||||||
id: 'var-avg',
|
|
||||||
name: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'nice',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.cpu.nice.pct',
|
|
||||||
id: 'avg-cpu-nice',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'system.cpu.cores',
|
|
||||||
id: 'max-cpu-cores',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-avg-cores',
|
|
||||||
script: 'params.avg / params.cores',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'max-cpu-cores',
|
|
||||||
id: 'var-cores',
|
|
||||||
name: 'cores',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'avg-cpu-nice',
|
|
||||||
id: 'var-avg',
|
|
||||||
name: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,56 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostDockerInfo: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostDockerInfo',
|
|
||||||
requires: ['docker.info'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'running',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'docker.info.containers.running',
|
|
||||||
id: 'max-running',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'paused',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'docker.info.containers.paused',
|
|
||||||
id: 'max-paused',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'stopped',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'docker.info.containers.stopped',
|
|
||||||
id: 'max-stopped',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,67 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostDockerOverview: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostDockerOverview',
|
|
||||||
requires: ['docker.info'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'top_n',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'total',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'docker.info.containers.total',
|
|
||||||
id: 'max-total',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'running',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'docker.info.containers.running',
|
|
||||||
id: 'max-running',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'paused',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'docker.info.containers.paused',
|
|
||||||
id: 'max-paused',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'stopped',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'docker.info.containers.stopped',
|
|
||||||
id: 'max-stopped',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,37 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostDockerTop5ByCpu: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostDockerTop5ByCpu',
|
|
||||||
requires: ['docker.cpu'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'avg-cpu',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'docker.cpu.total.pct',
|
|
||||||
id: 'avg-cpu-metric',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'terms',
|
|
||||||
terms_field: 'container.name',
|
|
||||||
terms_order_by: 'avg-cpu',
|
|
||||||
terms_size: 5,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,37 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostDockerTop5ByMemory: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostDockerTop5ByMemory',
|
|
||||||
requires: ['docker.memory'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'avg-memory',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'docker.memory.usage.pct',
|
|
||||||
id: 'avg-memory-metric',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'terms',
|
|
||||||
terms_field: 'container.name',
|
|
||||||
terms_order_by: 'avg-memory',
|
|
||||||
terms_size: 5,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,38 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostFilesystem: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostFilesystem',
|
|
||||||
requires: ['system.filesystem'],
|
|
||||||
filter: 'system.filesystem.device_name:\\/*',
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
time_field: timeField,
|
|
||||||
interval,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'used',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.filesystem.used.pct',
|
|
||||||
id: 'avg-filesystem-used',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'terms',
|
|
||||||
terms_field: 'system.filesystem.device_name',
|
|
||||||
terms_order_by: 'used',
|
|
||||||
terms_size: 5,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,58 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostK8sCpuCap: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostK8sCpuCap',
|
|
||||||
map_field_to: 'kubernetes.node.name',
|
|
||||||
requires: ['kubernetes.node'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'capacity',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.cpu.allocatable.cores',
|
|
||||||
id: 'max-cpu-cap',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-nanocores',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
id: 'var-cores',
|
|
||||||
field: 'max-cpu-cap',
|
|
||||||
name: 'cores',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
script: 'params.cores * 1000000000',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'used',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.cpu.usage.nanocores',
|
|
||||||
id: 'avg-cpu-usage',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,45 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
export const hostK8sDiskCap: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostK8sDiskCap',
|
|
||||||
map_field_to: 'kubernetes.node.name',
|
|
||||||
requires: ['kubernetes.node'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'capacity',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.fs.capacity.bytes',
|
|
||||||
id: 'max-fs-cap',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'used',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.fs.used.bytes',
|
|
||||||
id: 'avg-fs-used',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,46 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostK8sMemoryCap: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostK8sMemoryCap',
|
|
||||||
map_field_to: 'kubernetes.node.name',
|
|
||||||
requires: ['kubernetes.node'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'capacity',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.memory.allocatable.bytes',
|
|
||||||
id: 'max-memory-cap',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'used',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.memory.usage.bytes',
|
|
||||||
id: 'avg-memory-usage',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,155 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostK8sOverview: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostK8sOverview',
|
|
||||||
requires: ['kubernetes'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'top_n',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'cpucap',
|
|
||||||
split_mode: 'everything',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.cpu.allocatable.cores',
|
|
||||||
id: 'max-cpu-cap',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.cpu.usage.nanocores',
|
|
||||||
id: 'avg-cpu-usage',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-used-cap',
|
|
||||||
script: 'params.used / (params.cap * 1000000000)',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'max-cpu-cap',
|
|
||||||
id: 'var-cap',
|
|
||||||
name: 'cap',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'avg-cpu-usage',
|
|
||||||
id: 'var-used',
|
|
||||||
name: 'used',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'diskcap',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.fs.capacity.bytes',
|
|
||||||
id: 'max-fs-cap',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.fs.used.bytes',
|
|
||||||
id: 'avg-fs-used',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-used-cap',
|
|
||||||
script: 'params.used / params.cap',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'max-fs-cap',
|
|
||||||
id: 'var-cap',
|
|
||||||
name: 'cap',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'avg-fs-used',
|
|
||||||
id: 'var-used',
|
|
||||||
name: 'used',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'memorycap',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.memory.allocatable.bytes',
|
|
||||||
id: 'max-memory-cap',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.memory.usage.bytes',
|
|
||||||
id: 'avg-memory-usage',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-used-cap',
|
|
||||||
script: 'params.used / params.cap',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'max-memory-cap',
|
|
||||||
id: 'var-cap',
|
|
||||||
name: 'cap',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'avg-memory-usage',
|
|
||||||
id: 'var-used',
|
|
||||||
name: 'used',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'podcap',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.pod.capacity.total',
|
|
||||||
id: 'max-pod-cap',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'kubernetes.pod.uid',
|
|
||||||
id: 'card-pod-name',
|
|
||||||
type: 'cardinality',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-used-cap',
|
|
||||||
script: 'params.used / params.cap',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'max-pod-cap',
|
|
||||||
id: 'var-cap',
|
|
||||||
name: 'cap',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'card-pod-name',
|
|
||||||
id: 'var-used',
|
|
||||||
name: 'used',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,47 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostK8sPodCap: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostK8sPodCap',
|
|
||||||
requires: ['kubernetes.node'],
|
|
||||||
map_field_to: 'kubernetes.node.name',
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'capacity',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'kubernetes.node.pod.allocatable.total',
|
|
||||||
id: 'max-pod-cap',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'used',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'kubernetes.pod.uid',
|
|
||||||
id: 'avg-pod',
|
|
||||||
type: 'cardinality',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,56 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostLoad: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostLoad',
|
|
||||||
requires: ['system.cpu'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'load_1m',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.load.1',
|
|
||||||
id: 'avg-load-1m',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'load_5m',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.load.5',
|
|
||||||
id: 'avg-load-5m',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'load_15m',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.load.15',
|
|
||||||
id: 'avg-load-15m',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,78 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostMemoryUsage: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostMemoryUsage',
|
|
||||||
requires: ['system.memory'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'free',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.memory.free',
|
|
||||||
id: 'avg-memory-free',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'used',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.memory.actual.used.bytes',
|
|
||||||
id: 'avg-memory-used',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'cache',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.memory.actual.used.bytes',
|
|
||||||
id: 'avg-memory-actual-used',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'system.memory.used.bytes',
|
|
||||||
id: 'avg-memory-used',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-used-actual',
|
|
||||||
script: 'params.used - params.actual',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'avg-memory-actual-used',
|
|
||||||
id: 'var-actual',
|
|
||||||
name: 'actual',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'avg-memory-used',
|
|
||||||
id: 'var-used',
|
|
||||||
name: 'used',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,109 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostNetworkTraffic: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostNetworkTraffic',
|
|
||||||
requires: ['system.network'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'tx',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'host.network.egress.bytes',
|
|
||||||
id: 'avg-net-out',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'max-period',
|
|
||||||
type: 'max',
|
|
||||||
field: 'metricset.period',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '3216b170-f192-11ec-a8e3-dd984b7213e2',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
id: '34e64c30-f192-11ec-a8e3-dd984b7213e2',
|
|
||||||
name: 'value',
|
|
||||||
field: 'avg-net-out',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '3886cb80-f192-11ec-a8e3-dd984b7213e2',
|
|
||||||
name: 'period',
|
|
||||||
field: 'max-period',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
script: 'params.value / (params.period / 1000)',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
filter: {
|
|
||||||
language: 'kuery',
|
|
||||||
query: 'host.network.egress.bytes : * ',
|
|
||||||
},
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'rx',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'host.network.ingress.bytes',
|
|
||||||
id: 'avg-net-in',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'calc-invert-rate',
|
|
||||||
script: 'params.rate * -1',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
field: 'avg-net-in',
|
|
||||||
id: 'var-rate',
|
|
||||||
name: 'rate',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'max-period',
|
|
||||||
type: 'max',
|
|
||||||
field: 'metricset.period',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '3216b170-f192-11ec-a8e3-dd984b7213e2',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
id: '34e64c30-f192-11ec-a8e3-dd984b7213e2',
|
|
||||||
name: 'value',
|
|
||||||
field: 'calc-invert-rate',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '3886cb80-f192-11ec-a8e3-dd984b7213e2',
|
|
||||||
name: 'period',
|
|
||||||
field: 'max-period',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
script: 'params.value / (params.period / 1000)',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
filter: {
|
|
||||||
language: 'kuery',
|
|
||||||
query: 'host.network.ingress.bytes : * ',
|
|
||||||
},
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,130 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const hostSystemOverview: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern,
|
|
||||||
interval
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'hostSystemOverview',
|
|
||||||
requires: ['system.cpu', 'system.memory', 'system.load', 'system.network'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval,
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'top_n',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'cpu',
|
|
||||||
split_mode: 'everything',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.cpu.total.norm.pct',
|
|
||||||
id: 'avg-cpu-total',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'load',
|
|
||||||
split_mode: 'everything',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.load.5',
|
|
||||||
id: 'avg-load-5m',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'memory',
|
|
||||||
split_mode: 'everything',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'system.memory.actual.used.pct',
|
|
||||||
id: 'avg-memory-actual-used',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'rx',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'host.network.ingress.bytes',
|
|
||||||
id: 'avg-net-in',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'max-period',
|
|
||||||
type: 'max',
|
|
||||||
field: 'metricset.period',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '3216b170-f192-11ec-a8e3-dd984b7213e2',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
id: '34e64c30-f192-11ec-a8e3-dd984b7213e2',
|
|
||||||
name: 'value',
|
|
||||||
field: 'avg-net-in',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '3886cb80-f192-11ec-a8e3-dd984b7213e2',
|
|
||||||
name: 'period',
|
|
||||||
field: 'max-period',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
script: 'params.value / (params.period / 1000)',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
filter: {
|
|
||||||
language: 'kuery',
|
|
||||||
query: 'host.network.ingress.bytes : * ',
|
|
||||||
},
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'tx',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'host.network.egress.bytes',
|
|
||||||
id: 'avg-net-out',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'max-period',
|
|
||||||
type: 'max',
|
|
||||||
field: 'metricset.period',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '3216b170-f192-11ec-a8e3-dd984b7213e2',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{
|
|
||||||
id: '34e64c30-f192-11ec-a8e3-dd984b7213e2',
|
|
||||||
name: 'value',
|
|
||||||
field: 'avg-net-out',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '3886cb80-f192-11ec-a8e3-dd984b7213e2',
|
|
||||||
name: 'period',
|
|
||||||
field: 'max-period',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
script: 'params.value / (params.period / 1000)',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
filter: {
|
|
||||||
language: 'kuery',
|
|
||||||
query: 'host.network.egress.bytes : * ',
|
|
||||||
},
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -10,12 +10,6 @@ import { nginxActiveConnections } from './tsvb/nginx_active_connections';
|
||||||
import { nginxHits } from './tsvb/nginx_hits';
|
import { nginxHits } from './tsvb/nginx_hits';
|
||||||
import { nginxRequestsPerConnection } from './tsvb/nginx_requests_per_connection';
|
import { nginxRequestsPerConnection } from './tsvb/nginx_requests_per_connection';
|
||||||
|
|
||||||
import { awsCpuUtilization } from './tsvb/aws_cpu_utilization';
|
|
||||||
import { awsDiskioBytes } from './tsvb/aws_diskio_bytes';
|
|
||||||
import { awsDiskioOps } from './tsvb/aws_diskio_ops';
|
|
||||||
import { awsNetworkBytes } from './tsvb/aws_network_bytes';
|
|
||||||
import { awsNetworkPackets } from './tsvb/aws_network_packets';
|
|
||||||
import { awsOverview } from './tsvb/aws_overview';
|
|
||||||
import { InventoryMetrics } from '../../types';
|
import { InventoryMetrics } from '../../types';
|
||||||
import { count } from './snapshot/count';
|
import { count } from './snapshot/count';
|
||||||
|
|
||||||
|
@ -25,12 +19,6 @@ export const metrics: InventoryMetrics = {
|
||||||
nginxHits,
|
nginxHits,
|
||||||
nginxRequestRate,
|
nginxRequestRate,
|
||||||
nginxRequestsPerConnection,
|
nginxRequestsPerConnection,
|
||||||
awsCpuUtilization,
|
|
||||||
awsDiskioBytes,
|
|
||||||
awsDiskioOps,
|
|
||||||
awsNetworkBytes,
|
|
||||||
awsNetworkPackets,
|
|
||||||
awsOverview,
|
|
||||||
},
|
},
|
||||||
snapshot: {
|
snapshot: {
|
||||||
count,
|
count,
|
||||||
|
|
|
@ -13,12 +13,3 @@ export const nginx: InventoryMetric[] = [
|
||||||
'nginxActiveConnections',
|
'nginxActiveConnections',
|
||||||
'nginxRequestsPerConnection',
|
'nginxRequestsPerConnection',
|
||||||
];
|
];
|
||||||
|
|
||||||
export const aws: InventoryMetric[] = [
|
|
||||||
'awsOverview',
|
|
||||||
'awsCpuUtilization',
|
|
||||||
'awsNetworkBytes',
|
|
||||||
'awsNetworkPackets',
|
|
||||||
'awsDiskioOps',
|
|
||||||
'awsDiskioBytes',
|
|
||||||
];
|
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const awsCpuUtilization: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'awsCpuUtilization',
|
|
||||||
requires: ['aws.ec2'],
|
|
||||||
map_field_to: 'cloud.instance.id',
|
|
||||||
id_type: 'cloud',
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
interval: '>=5m',
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'cpu-util',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.cpu.total.pct',
|
|
||||||
id: 'avg-cpu-util',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,84 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const awsDiskioBytes: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'awsDiskioBytes',
|
|
||||||
requires: ['aws.ec2'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
map_field_to: 'cloud.instance.id',
|
|
||||||
id_type: 'cloud',
|
|
||||||
interval: '>=5m',
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'writes',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.diskio.write.bytes',
|
|
||||||
id: 'sum-diskio-out',
|
|
||||||
type: 'sum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'csum-sum-diskio-out',
|
|
||||||
field: 'sum-diskio-out',
|
|
||||||
type: 'cumulative_sum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'deriv-csum-sum-diskio-out',
|
|
||||||
unit: '1s',
|
|
||||||
type: 'derivative',
|
|
||||||
field: 'csum-sum-diskio-out',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'posonly-deriv-csum-sum-diskio-out',
|
|
||||||
field: 'deriv-csum-sum-diskio-out',
|
|
||||||
type: 'positive_only',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'reads',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.diskio.read.bytes',
|
|
||||||
id: 'sum-diskio-in',
|
|
||||||
type: 'sum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'csum-sum-diskio-in',
|
|
||||||
field: 'sum-diskio-in',
|
|
||||||
type: 'cumulative_sum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'deriv-csum-sum-diskio-in',
|
|
||||||
unit: '1s',
|
|
||||||
type: 'derivative',
|
|
||||||
field: 'csum-sum-diskio-in',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'posonly-deriv-csum-sum-diskio-in',
|
|
||||||
field: 'deriv-csum-sum-diskio-in',
|
|
||||||
type: 'positive_only',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'inverted-posonly-deriv-csum-sum-diskio-in',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [{ id: 'var-rate', name: 'rate', field: 'posonly-deriv-csum-sum-diskio-in' }],
|
|
||||||
script: 'params.rate * -1',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,83 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const awsDiskioOps: TSVBMetricModelCreator = (timeField, indexPattern): TSVBMetricModel => ({
|
|
||||||
id: 'awsDiskioOps',
|
|
||||||
requires: ['aws.ec2'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
map_field_to: 'cloud.instance.id',
|
|
||||||
id_type: 'cloud',
|
|
||||||
interval: '>=5m',
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'writes',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.diskio.write.count',
|
|
||||||
id: 'sum-diskio-writes',
|
|
||||||
type: 'sum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'csum-sum-diskio-writes',
|
|
||||||
field: 'sum-diskio-writes',
|
|
||||||
type: 'cumulative_sum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'deriv-csum-sum-diskio-writes',
|
|
||||||
unit: '1s',
|
|
||||||
type: 'derivative',
|
|
||||||
field: 'csum-sum-diskio-writes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'posonly-deriv-csum-sum-diskio-writes',
|
|
||||||
field: 'deriv-csum-sum-diskio-writes',
|
|
||||||
type: 'positive_only',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'reads',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.diskio.read.count',
|
|
||||||
id: 'sum-diskio-reads',
|
|
||||||
type: 'sum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'csum-sum-diskio-reads',
|
|
||||||
field: 'sum-diskio-reads',
|
|
||||||
type: 'cumulative_sum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'deriv-csum-sum-diskio-reads',
|
|
||||||
unit: '1s',
|
|
||||||
type: 'derivative',
|
|
||||||
field: 'csum-sum-diskio-reads',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'posonly-deriv-csum-sum-diskio-reads',
|
|
||||||
field: 'deriv-csum-sum-diskio-reads',
|
|
||||||
type: 'positive_only',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'inverted-posonly-deriv-csum-sum-diskio-reads',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [
|
|
||||||
{ id: 'var-rate', name: 'rate', field: 'posonly-deriv-csum-sum-diskio-reads' },
|
|
||||||
],
|
|
||||||
script: 'params.rate * -1',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,86 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
// see discussion in: https://github.com/elastic/kibana/issues/42687
|
|
||||||
|
|
||||||
export const awsNetworkBytes: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'awsNetworkBytes',
|
|
||||||
requires: ['aws.ec2'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
map_field_to: 'cloud.instance.id',
|
|
||||||
id_type: 'cloud',
|
|
||||||
interval: '>=5m',
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'tx',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.network.out.bytes',
|
|
||||||
id: 'sum-net-out',
|
|
||||||
type: 'sum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'csum-sum-net-out',
|
|
||||||
field: 'sum-net-out',
|
|
||||||
type: 'cumulative_sum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'deriv-csum-sum-net-out',
|
|
||||||
unit: '1s',
|
|
||||||
type: 'derivative',
|
|
||||||
field: 'csum-sum-net-out',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'posonly-deriv-csum-sum-net-out',
|
|
||||||
field: 'deriv-csum-sum-net-out',
|
|
||||||
type: 'positive_only',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'rx',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.network.in.bytes',
|
|
||||||
id: 'sum-net-in',
|
|
||||||
type: 'sum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'csum-sum-net-in',
|
|
||||||
field: 'sum-net-in',
|
|
||||||
type: 'cumulative_sum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'deriv-csum-sum-net-in',
|
|
||||||
unit: '1s',
|
|
||||||
type: 'derivative',
|
|
||||||
field: 'csum-sum-net-in',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'posonly-deriv-csum-sum-net-in',
|
|
||||||
field: 'deriv-csum-sum-net-in',
|
|
||||||
type: 'positive_only',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'inverted-posonly-deriv-csum-sum-net-in',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [{ id: 'var-rate', name: 'rate', field: 'posonly-deriv-csum-sum-net-in' }],
|
|
||||||
script: 'params.rate * -1',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,52 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const awsNetworkPackets: TSVBMetricModelCreator = (
|
|
||||||
timeField,
|
|
||||||
indexPattern
|
|
||||||
): TSVBMetricModel => ({
|
|
||||||
id: 'awsNetworkPackets',
|
|
||||||
requires: ['aws.ec2'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
map_field_to: 'cloud.instance.id',
|
|
||||||
id_type: 'cloud',
|
|
||||||
interval: '>=5m',
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'timeseries',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'packets-out',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.network.out.packets',
|
|
||||||
id: 'avg-net-out',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'packets-in',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.network.in.packets',
|
|
||||||
id: 'avg-net-in',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'inverted-avg-net-in',
|
|
||||||
type: 'calculation',
|
|
||||||
variables: [{ id: 'var-avg', name: 'avg', field: 'avg-net-in' }],
|
|
||||||
script: 'params.avg * -1',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_mode: 'everything',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -1,65 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types';
|
|
||||||
|
|
||||||
export const awsOverview: TSVBMetricModelCreator = (timeField, indexPattern): TSVBMetricModel => ({
|
|
||||||
id: 'awsOverview',
|
|
||||||
requires: ['aws.ec2'],
|
|
||||||
index_pattern: indexPattern,
|
|
||||||
map_field_to: 'cloud.instance.id',
|
|
||||||
id_type: 'cloud',
|
|
||||||
interval: '>=5m',
|
|
||||||
time_field: timeField,
|
|
||||||
type: 'top_n',
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
id: 'cpu-util',
|
|
||||||
split_mode: 'everything',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.cpu.total.pct',
|
|
||||||
id: 'cpu-total-pct',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'status-check-failed',
|
|
||||||
split_mode: 'everything',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.status.check_failed',
|
|
||||||
id: 'status-check-failed',
|
|
||||||
type: 'max',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'packets-out',
|
|
||||||
split_mode: 'everything',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.network.out.packets',
|
|
||||||
id: 'network-out-packets',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'packets-in',
|
|
||||||
split_mode: 'everything',
|
|
||||||
metrics: [
|
|
||||||
{
|
|
||||||
field: 'aws.ec2.network.in.packets',
|
|
||||||
id: 'network-in-packets',
|
|
||||||
type: 'avg',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
|
@ -37,21 +37,6 @@ export type InventoryFormatterType = rt.TypeOf<typeof InventoryFormatterTypeRT>;
|
||||||
export type InventoryItemType = rt.TypeOf<typeof ItemTypeRT>;
|
export type InventoryItemType = rt.TypeOf<typeof ItemTypeRT>;
|
||||||
|
|
||||||
export const InventoryMetricRT = rt.keyof({
|
export const InventoryMetricRT = rt.keyof({
|
||||||
hostSystemOverview: null,
|
|
||||||
hostCpuUsage: null,
|
|
||||||
hostFilesystem: null,
|
|
||||||
hostK8sOverview: null,
|
|
||||||
hostK8sCpuCap: null,
|
|
||||||
hostK8sDiskCap: null,
|
|
||||||
hostK8sMemoryCap: null,
|
|
||||||
hostK8sPodCap: null,
|
|
||||||
hostLoad: null,
|
|
||||||
hostMemoryUsage: null,
|
|
||||||
hostNetworkTraffic: null,
|
|
||||||
hostDockerOverview: null,
|
|
||||||
hostDockerInfo: null,
|
|
||||||
hostDockerTop5ByCpu: null,
|
|
||||||
hostDockerTop5ByMemory: null,
|
|
||||||
podOverview: null,
|
podOverview: null,
|
||||||
podCpuUsage: null,
|
podCpuUsage: null,
|
||||||
podMemoryUsage: null,
|
podMemoryUsage: null,
|
||||||
|
@ -71,12 +56,6 @@ export const InventoryMetricRT = rt.keyof({
|
||||||
nginxRequestRate: null,
|
nginxRequestRate: null,
|
||||||
nginxActiveConnections: null,
|
nginxActiveConnections: null,
|
||||||
nginxRequestsPerConnection: null,
|
nginxRequestsPerConnection: null,
|
||||||
awsOverview: null,
|
|
||||||
awsCpuUtilization: null,
|
|
||||||
awsNetworkBytes: null,
|
|
||||||
awsNetworkPackets: null,
|
|
||||||
awsDiskioBytes: null,
|
|
||||||
awsDiskioOps: null,
|
|
||||||
awsEC2CpuUtilization: null,
|
awsEC2CpuUtilization: null,
|
||||||
awsEC2NetworkTraffic: null,
|
awsEC2NetworkTraffic: null,
|
||||||
awsEC2DiskIOBytes: null,
|
awsEC2DiskIOBytes: null,
|
||||||
|
@ -377,7 +356,7 @@ export const SnapshotMetricTypeRT = rt.keyof(SnapshotMetricTypeKeys);
|
||||||
export type SnapshotMetricType = rt.TypeOf<typeof SnapshotMetricTypeRT>;
|
export type SnapshotMetricType = rt.TypeOf<typeof SnapshotMetricTypeRT>;
|
||||||
|
|
||||||
export interface InventoryMetrics {
|
export interface InventoryMetrics {
|
||||||
tsvb: { [name: string]: TSVBMetricModelCreator };
|
tsvb?: { [name: string]: TSVBMetricModelCreator };
|
||||||
snapshot: { [name: string]: MetricsUIAggregation | undefined };
|
snapshot: { [name: string]: MetricsUIAggregation | undefined };
|
||||||
defaultSnapshot: SnapshotMetricType;
|
defaultSnapshot: SnapshotMetricType;
|
||||||
/** This is used by the inventory view to calculate the appropriate amount of time for the metrics detail page. Some metris like awsS3 require multiple days where others like host only need an hour.*/
|
/** This is used by the inventory view to calculate the appropriate amount of time for the metrics detail page. Some metris like awsS3 require multiple days where others like host only need an hour.*/
|
||||||
|
@ -403,7 +382,7 @@ export interface InventoryModel {
|
||||||
uptime: boolean;
|
uptime: boolean;
|
||||||
};
|
};
|
||||||
metrics: InventoryMetrics;
|
metrics: InventoryMetrics;
|
||||||
requiredMetrics: InventoryMetric[];
|
requiredMetrics?: InventoryMetric[];
|
||||||
tooltipMetrics: SnapshotMetricType[];
|
tooltipMetrics: SnapshotMetricType[];
|
||||||
nodeFilter?: object[];
|
nodeFilter?: object[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,16 +15,23 @@ import { throwErrors, createPlainError } from '../../../../common/runtime_types'
|
||||||
import { getFilteredMetrics } from '../../../pages/metrics/metric_detail/lib/get_filtered_metrics';
|
import { getFilteredMetrics } from '../../../pages/metrics/metric_detail/lib/get_filtered_metrics';
|
||||||
import type { InventoryItemType, InventoryMetric } from '../../../../common/inventory_models/types';
|
import type { InventoryItemType, InventoryMetric } from '../../../../common/inventory_models/types';
|
||||||
|
|
||||||
export function useMetadata(
|
interface UseMetadataProps {
|
||||||
nodeId: string,
|
assetId: string;
|
||||||
nodeType: InventoryItemType,
|
assetType: InventoryItemType;
|
||||||
requiredMetrics: InventoryMetric[],
|
requiredMetrics?: InventoryMetric[];
|
||||||
sourceId: string,
|
sourceId: string;
|
||||||
timeRange: {
|
timeRange: {
|
||||||
from: number;
|
from: number;
|
||||||
to: number;
|
to: number;
|
||||||
}
|
};
|
||||||
) {
|
}
|
||||||
|
export function useMetadata({
|
||||||
|
assetId,
|
||||||
|
assetType,
|
||||||
|
sourceId,
|
||||||
|
timeRange,
|
||||||
|
requiredMetrics = [],
|
||||||
|
}: UseMetadataProps) {
|
||||||
const decodeResponse = (response: any) => {
|
const decodeResponse = (response: any) => {
|
||||||
return pipe(InfraMetadataRT.decode(response), fold(throwErrors(createPlainError), identity));
|
return pipe(InfraMetadataRT.decode(response), fold(throwErrors(createPlainError), identity));
|
||||||
};
|
};
|
||||||
|
@ -32,8 +39,8 @@ export function useMetadata(
|
||||||
'/api/infra/metadata',
|
'/api/infra/metadata',
|
||||||
'POST',
|
'POST',
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
nodeId,
|
nodeId: assetId,
|
||||||
nodeType,
|
nodeType: assetType,
|
||||||
sourceId,
|
sourceId,
|
||||||
timeRange,
|
timeRange,
|
||||||
}),
|
}),
|
||||||
|
@ -49,17 +56,13 @@ export function useMetadata(
|
||||||
return {
|
return {
|
||||||
name: (response && response.name) || '',
|
name: (response && response.name) || '',
|
||||||
filteredRequiredMetrics:
|
filteredRequiredMetrics:
|
||||||
(response && getFilteredMetrics(requiredMetrics, response.features)) || [],
|
response && requiredMetrics.length > 0
|
||||||
|
? getFilteredMetrics(requiredMetrics, response.features)
|
||||||
|
: [],
|
||||||
error: (error && error.message) || null,
|
error: (error && error.message) || null,
|
||||||
loading,
|
loading,
|
||||||
metadata: response,
|
metadata: response,
|
||||||
cloudId:
|
cloudId: response?.info?.cloud?.instance?.id || '',
|
||||||
(response &&
|
|
||||||
response.info &&
|
|
||||||
response.info.cloud &&
|
|
||||||
response.info.cloud.instance &&
|
|
||||||
response.info.cloud.instance.id) ||
|
|
||||||
'',
|
|
||||||
reload: makeRequest,
|
reload: makeRequest,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
import { useEffect, useCallback } from 'react';
|
import { useEffect, useCallback } from 'react';
|
||||||
import createContainer from 'constate';
|
import createContainer from 'constate';
|
||||||
import { findInventoryModel } from '../../../../common/inventory_models';
|
|
||||||
import { useSourceContext } from '../../../containers/metrics_source';
|
import { useSourceContext } from '../../../containers/metrics_source';
|
||||||
import { useMetadata } from './use_metadata';
|
import { useMetadata } from './use_metadata';
|
||||||
import { AssetDetailsProps } from '../types';
|
import { AssetDetailsProps } from '../types';
|
||||||
|
@ -19,16 +18,14 @@ export type UseMetadataProviderProps = Pick<AssetDetailsProps, 'asset' | 'assetT
|
||||||
export function useMetadataProvider({ asset, assetType }: UseMetadataProviderProps) {
|
export function useMetadataProvider({ asset, assetType }: UseMetadataProviderProps) {
|
||||||
const [, setUrlState] = useAssetDetailsUrlState();
|
const [, setUrlState] = useAssetDetailsUrlState();
|
||||||
const { getDateRangeInTimestamp } = useDateRangeProviderContext();
|
const { getDateRangeInTimestamp } = useDateRangeProviderContext();
|
||||||
const inventoryModel = findInventoryModel(assetType);
|
|
||||||
const { sourceId } = useSourceContext();
|
const { sourceId } = useSourceContext();
|
||||||
|
|
||||||
const { loading, error, metadata, reload } = useMetadata(
|
const { loading, error, metadata, reload } = useMetadata({
|
||||||
asset.id,
|
assetId: asset.id,
|
||||||
assetType,
|
assetType,
|
||||||
inventoryModel.requiredMetrics,
|
|
||||||
sourceId,
|
sourceId,
|
||||||
getDateRangeInTimestamp()
|
timeRange: getDateRangeInTimestamp(),
|
||||||
);
|
});
|
||||||
|
|
||||||
const refresh = useCallback(() => {
|
const refresh = useCallback(() => {
|
||||||
reload();
|
reload();
|
||||||
|
|
|
@ -11,7 +11,6 @@ import React, { useMemo } from 'react';
|
||||||
import { useKibanaContextForPlugin } from '../../../../../../../hooks/use_kibana';
|
import { useKibanaContextForPlugin } from '../../../../../../../hooks/use_kibana';
|
||||||
import { TabContent, TabProps } from '../shared';
|
import { TabContent, TabProps } from '../shared';
|
||||||
import { useSourceContext } from '../../../../../../../containers/metrics_source';
|
import { useSourceContext } from '../../../../../../../containers/metrics_source';
|
||||||
import { findInventoryModel } from '../../../../../../../../common/inventory_models';
|
|
||||||
import { InventoryItemType } from '../../../../../../../../common/inventory_models/types';
|
import { InventoryItemType } from '../../../../../../../../common/inventory_models/types';
|
||||||
import { useMetadata } from '../../../../../../../components/asset_details/hooks/use_metadata';
|
import { useMetadata } from '../../../../../../../components/asset_details/hooks/use_metadata';
|
||||||
import { useWaffleTimeContext } from '../../../../hooks/use_waffle_time';
|
import { useWaffleTimeContext } from '../../../../hooks/use_waffle_time';
|
||||||
|
@ -19,16 +18,14 @@ import { useWaffleTimeContext } from '../../../../hooks/use_waffle_time';
|
||||||
const TabComponent = (props: TabProps) => {
|
const TabComponent = (props: TabProps) => {
|
||||||
const nodeId = props.node.id;
|
const nodeId = props.node.id;
|
||||||
const nodeType = props.nodeType as InventoryItemType;
|
const nodeType = props.nodeType as InventoryItemType;
|
||||||
const inventoryModel = findInventoryModel(nodeType);
|
|
||||||
const { sourceId } = useSourceContext();
|
const { sourceId } = useSourceContext();
|
||||||
const { currentTimeRange } = useWaffleTimeContext();
|
const { currentTimeRange } = useWaffleTimeContext();
|
||||||
const { loading, metadata } = useMetadata(
|
const { loading, metadata } = useMetadata({
|
||||||
nodeId,
|
assetId: nodeId,
|
||||||
nodeType,
|
assetType: nodeType,
|
||||||
inventoryModel.requiredMetrics,
|
|
||||||
sourceId,
|
sourceId,
|
||||||
currentTimeRange
|
timeRange: currentTimeRange,
|
||||||
);
|
});
|
||||||
const {
|
const {
|
||||||
services: { osquery },
|
services: { osquery },
|
||||||
} = useKibanaContextForPlugin();
|
} = useKibanaContextForPlugin();
|
||||||
|
|
|
@ -11,7 +11,6 @@ import { EuiLoadingChart } from '@elastic/eui';
|
||||||
import { euiStyled } from '@kbn/kibana-react-plugin/common';
|
import { euiStyled } from '@kbn/kibana-react-plugin/common';
|
||||||
import { TabContent, TabProps } from '../shared';
|
import { TabContent, TabProps } from '../shared';
|
||||||
import { useSourceContext } from '../../../../../../../containers/metrics_source';
|
import { useSourceContext } from '../../../../../../../containers/metrics_source';
|
||||||
import { findInventoryModel } from '../../../../../../../../common/inventory_models';
|
|
||||||
import { InventoryItemType } from '../../../../../../../../common/inventory_models/types';
|
import { InventoryItemType } from '../../../../../../../../common/inventory_models/types';
|
||||||
import { useMetadata } from '../../../../../../../components/asset_details/hooks/use_metadata';
|
import { useMetadata } from '../../../../../../../components/asset_details/hooks/use_metadata';
|
||||||
import { getFields } from './build_fields';
|
import { getFields } from './build_fields';
|
||||||
|
@ -22,17 +21,15 @@ import { useWaffleFiltersContext } from '../../../../hooks/use_waffle_filters';
|
||||||
const TabComponent = (props: TabProps) => {
|
const TabComponent = (props: TabProps) => {
|
||||||
const nodeId = props.node.id;
|
const nodeId = props.node.id;
|
||||||
const nodeType = props.nodeType as InventoryItemType;
|
const nodeType = props.nodeType as InventoryItemType;
|
||||||
const inventoryModel = findInventoryModel(nodeType);
|
|
||||||
const { sourceId } = useSourceContext();
|
const { sourceId } = useSourceContext();
|
||||||
const { currentTimeRange } = useWaffleTimeContext();
|
const { currentTimeRange } = useWaffleTimeContext();
|
||||||
const { applyFilterQuery } = useWaffleFiltersContext();
|
const { applyFilterQuery } = useWaffleFiltersContext();
|
||||||
const { loading: metadataLoading, metadata } = useMetadata(
|
const { loading: metadataLoading, metadata } = useMetadata({
|
||||||
nodeId,
|
assetId: nodeId,
|
||||||
nodeType,
|
assetType: nodeType,
|
||||||
inventoryModel.requiredMetrics,
|
|
||||||
sourceId,
|
sourceId,
|
||||||
currentTimeRange
|
timeRange: currentTimeRange,
|
||||||
);
|
});
|
||||||
|
|
||||||
const hostFields = useMemo(() => {
|
const hostFields = useMemo(() => {
|
||||||
if (!metadata) return null;
|
if (!metadata) return null;
|
||||||
|
|
|
@ -13,7 +13,6 @@ import { AwsRDSLayout } from './layouts/aws_rds_layout';
|
||||||
import { AwsS3Layout } from './layouts/aws_s3_layout';
|
import { AwsS3Layout } from './layouts/aws_s3_layout';
|
||||||
import { AwsSQSLayout } from './layouts/aws_sqs_layout';
|
import { AwsSQSLayout } from './layouts/aws_sqs_layout';
|
||||||
import { ContainerLayout } from './layouts/container_layout';
|
import { ContainerLayout } from './layouts/container_layout';
|
||||||
import { HostLayout } from './layouts/host_layout';
|
|
||||||
import { PodLayout } from './layouts/pod_layout';
|
import { PodLayout } from './layouts/pod_layout';
|
||||||
|
|
||||||
export const Layout = ({
|
export const Layout = ({
|
||||||
|
@ -31,9 +30,9 @@ export const Layout = ({
|
||||||
return <AwsSQSLayout {...layoutProps} />;
|
return <AwsSQSLayout {...layoutProps} />;
|
||||||
case 'container':
|
case 'container':
|
||||||
return <ContainerLayout {...layoutProps} />;
|
return <ContainerLayout {...layoutProps} />;
|
||||||
case 'host':
|
|
||||||
return <HostLayout {...layoutProps} />;
|
|
||||||
case 'pod':
|
case 'pod':
|
||||||
return <PodLayout {...layoutProps} />;
|
return <PodLayout {...layoutProps} />;
|
||||||
|
default:
|
||||||
|
throw new Error(`${inventoryItemType} is not supported.`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,242 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { i18n } from '@kbn/i18n';
|
|
||||||
import { withTheme } from '@kbn/kibana-react-plugin/common';
|
|
||||||
import React from 'react';
|
|
||||||
import type { LayoutPropsWithTheme } from '../../types';
|
|
||||||
import { ChartSectionVis } from '../chart_section_vis';
|
|
||||||
import { GaugesSectionVis } from '../gauges_section_vis';
|
|
||||||
import { Section } from '../section';
|
|
||||||
import { SubSection } from '../sub_section';
|
|
||||||
|
|
||||||
export const AwsLayoutSection = withTheme(
|
|
||||||
({ metrics, onChangeRangeTime, theme }: LayoutPropsWithTheme) => (
|
|
||||||
<React.Fragment>
|
|
||||||
<Section
|
|
||||||
navLabel="AWS"
|
|
||||||
sectionLabel={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'AWS Overview',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
metrics={metrics}
|
|
||||||
onChangeRangeTime={onChangeRangeTime}
|
|
||||||
>
|
|
||||||
<SubSection id="awsOverview">
|
|
||||||
<GaugesSectionVis
|
|
||||||
seriesOverrides={{
|
|
||||||
'cpu-util': {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.cpuUtilizationSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'CPU Utilization',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: theme.eui.euiColorFullShade,
|
|
||||||
formatter: 'percent',
|
|
||||||
gaugeMax: 1,
|
|
||||||
},
|
|
||||||
'status-check-failed': {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.statusCheckFailedLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Status check failed',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: theme.eui.euiColorFullShade,
|
|
||||||
},
|
|
||||||
'packets-in': {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.networkPacketsInLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Packets (in)',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: theme.eui.euiColorFullShade,
|
|
||||||
formatter: 'number',
|
|
||||||
},
|
|
||||||
'packets-out': {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.networkPacketsOutLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Packets (out)',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: theme.eui.euiColorFullShade,
|
|
||||||
formatter: 'number',
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="awsCpuUtilization"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.cpuUtilSection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'CPU Utilization',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
type="area"
|
|
||||||
formatter="number"
|
|
||||||
seriesOverrides={{
|
|
||||||
'cpu-util': {
|
|
||||||
color: theme.eui.euiColorVis1,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.cpuUtilSection.percentSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'percent',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="awsNetworkBytes"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.networkBytesSection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Network Traffic',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
type="area"
|
|
||||||
formatter="bits"
|
|
||||||
formatterTemplate="{{value}}/s"
|
|
||||||
seriesOverrides={{
|
|
||||||
tx: {
|
|
||||||
color: theme.eui.euiColorVis1,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.networkBytesSection.txSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'out',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
rx: {
|
|
||||||
color: theme.eui.euiColorVis2,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.networkBytesSection.rxSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'in',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="awsNetworkPackets"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.networkPacketsSection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Network Packets (Average)',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
type="area"
|
|
||||||
formatter="number"
|
|
||||||
seriesOverrides={{
|
|
||||||
'packets-out': {
|
|
||||||
color: theme.eui.euiColorVis1,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.networkPacketsSection.packetsOutSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'out',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
'packets-in': {
|
|
||||||
color: theme.eui.euiColorVis2,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.networkPacketsSection.packetsInSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'in',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="awsDiskioOps"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.diskioOperationsSection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Disk I/O Operations',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
type="area"
|
|
||||||
formatter="number"
|
|
||||||
seriesOverrides={{
|
|
||||||
writes: {
|
|
||||||
color: theme.eui.euiColorVis1,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.diskioOperationsSection.writesSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'writes',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
reads: {
|
|
||||||
color: theme.eui.euiColorVis2,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.diskioOperationsSection.readsSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'reads',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="awsDiskioBytes"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.diskioBytesSection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Disk I/O Bytes',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
type="area"
|
|
||||||
formatter="number"
|
|
||||||
seriesOverrides={{
|
|
||||||
writes: {
|
|
||||||
color: theme.eui.euiColorVis1,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.diskioBytesSection.writesSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'writes',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
reads: {
|
|
||||||
color: theme.eui.euiColorVis2,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.awsMetricsLayout.diskioBytesSection.readsSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'reads',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
</Section>
|
|
||||||
</React.Fragment>
|
|
||||||
)
|
|
||||||
);
|
|
|
@ -1,376 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { EuiPanel } from '@elastic/eui';
|
|
||||||
import { i18n } from '@kbn/i18n';
|
|
||||||
import { withTheme } from '@kbn/kibana-react-plugin/common';
|
|
||||||
import React from 'react';
|
|
||||||
import type { LayoutPropsWithTheme } from '../../types';
|
|
||||||
import { ChartSectionVis } from '../chart_section_vis';
|
|
||||||
import { GaugesSectionVis } from '../gauges_section_vis';
|
|
||||||
import { MetadataDetails } from '../metadata_details';
|
|
||||||
import { Section } from '../section';
|
|
||||||
import { SubSection } from '../sub_section';
|
|
||||||
import { AwsLayoutSection } from './aws_layout_sections';
|
|
||||||
import { NginxLayoutSection } from './nginx_layout_sections';
|
|
||||||
|
|
||||||
export const HostLayout = withTheme(
|
|
||||||
({ metrics, onChangeRangeTime, theme }: LayoutPropsWithTheme) => (
|
|
||||||
<React.Fragment>
|
|
||||||
<MetadataDetails
|
|
||||||
fields={[
|
|
||||||
'host.hostname',
|
|
||||||
'host.os.name',
|
|
||||||
'host.os.kernel',
|
|
||||||
'host.containerized',
|
|
||||||
'cloud.provider',
|
|
||||||
'cloud.availability_zone',
|
|
||||||
'cloud.machine.type',
|
|
||||||
'cloud.project.id',
|
|
||||||
'cloud.instance.id',
|
|
||||||
'cloud.instance.name',
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
<EuiPanel>
|
|
||||||
<Section
|
|
||||||
navLabel={i18n.translate('xpack.infra.metricDetailPage.hostMetricsLayout.layoutLabel', {
|
|
||||||
defaultMessage: 'Host',
|
|
||||||
})}
|
|
||||||
sectionLabel={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Host Overview',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
metrics={metrics}
|
|
||||||
onChangeRangeTime={onChangeRangeTime}
|
|
||||||
>
|
|
||||||
<SubSection id="hostSystemOverview">
|
|
||||||
<GaugesSectionVis
|
|
||||||
seriesOverrides={{
|
|
||||||
cpu: {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.cpuUsageSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'CPU Usage',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: theme.eui.euiColorFullShade,
|
|
||||||
formatter: 'percent',
|
|
||||||
gaugeMax: 1,
|
|
||||||
},
|
|
||||||
load: {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.loadSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Load (5m)',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: theme.eui.euiColorFullShade,
|
|
||||||
},
|
|
||||||
memory: {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.memoryCapacitySeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Memory Usage',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: theme.eui.euiColorFullShade,
|
|
||||||
formatter: 'percent',
|
|
||||||
gaugeMax: 1,
|
|
||||||
},
|
|
||||||
rx: {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.inboundRXSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Inbound (RX)',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: theme.eui.euiColorFullShade,
|
|
||||||
formatter: 'bits',
|
|
||||||
formatterTemplate: '{{value}}/s',
|
|
||||||
},
|
|
||||||
tx: {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.outboundTXSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Outbound (TX)',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: theme.eui.euiColorFullShade,
|
|
||||||
formatter: 'bits',
|
|
||||||
formatterTemplate: '{{value}}/s',
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="hostCpuUsage"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.cpuUsageSection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'CPU Usage',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
stacked={true}
|
|
||||||
type="area"
|
|
||||||
formatter="percent"
|
|
||||||
seriesOverrides={{
|
|
||||||
user: { color: theme.eui.euiColorVis0 },
|
|
||||||
system: { color: theme.eui.euiColorVis2 },
|
|
||||||
steal: { color: theme.eui.euiColorVis9 },
|
|
||||||
irq: { color: theme.eui.euiColorVis4 },
|
|
||||||
softirq: { color: theme.eui.euiColorVis6 },
|
|
||||||
iowait: { color: theme.eui.euiColorVis7 },
|
|
||||||
nice: { color: theme.eui.euiColorVis5 },
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="hostLoad"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Load',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
seriesOverrides={{
|
|
||||||
load_1m: {
|
|
||||||
color: theme.eui.euiColorVis0,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.oneMinuteSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: '1m',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
load_5m: {
|
|
||||||
color: theme.eui.euiColorVis1,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.fiveMinuteSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: '5m',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
load_15m: {
|
|
||||||
color: theme.eui.euiColorVis3,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.fifteenMinuteSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: '15m',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="hostMemoryUsage"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.memoryUsageSection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Memory Usage',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
stacked={true}
|
|
||||||
formatter="bytes"
|
|
||||||
type="area"
|
|
||||||
seriesOverrides={{
|
|
||||||
used: { color: theme.eui.euiColorVis2 },
|
|
||||||
free: { color: theme.eui.euiColorVis0 },
|
|
||||||
cache: { color: theme.eui.euiColorVis1 },
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="hostNetworkTraffic"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.networkTrafficSection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Network Traffic',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
formatter="bits"
|
|
||||||
formatterTemplate="{{value}}/s"
|
|
||||||
type="area"
|
|
||||||
seriesOverrides={{
|
|
||||||
rx: {
|
|
||||||
color: theme.eui.euiColorVis1,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.networkTrafficSection.networkRxRateSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'in',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
tx: {
|
|
||||||
color: theme.eui.euiColorVis2,
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.hostMetricsLayout.networkTrafficSection.networkTxRateSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'out',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
</Section>
|
|
||||||
<Section
|
|
||||||
navLabel="Kubernetes"
|
|
||||||
sectionLabel={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Kubernetes Overview',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
metrics={metrics}
|
|
||||||
onChangeRangeTime={onChangeRangeTime}
|
|
||||||
>
|
|
||||||
<SubSection id="hostK8sOverview">
|
|
||||||
<GaugesSectionVis
|
|
||||||
seriesOverrides={{
|
|
||||||
cpucap: {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.cpuUsageSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'CPU Capacity',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: 'success',
|
|
||||||
formatter: 'percent',
|
|
||||||
gaugeMax: 1,
|
|
||||||
},
|
|
||||||
load: {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.loadSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Load (5m)',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: 'success',
|
|
||||||
},
|
|
||||||
memorycap: {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.memoryUsageSeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Memory Capacity',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: 'success',
|
|
||||||
formatter: 'percent',
|
|
||||||
gaugeMax: 1,
|
|
||||||
},
|
|
||||||
podcap: {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.podCapacitySeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Pod Capacity',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: 'success',
|
|
||||||
formatter: 'percent',
|
|
||||||
gaugeMax: 1,
|
|
||||||
},
|
|
||||||
diskcap: {
|
|
||||||
name: i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.diskCapacitySeriesLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Disk Capacity',
|
|
||||||
}
|
|
||||||
),
|
|
||||||
color: 'success',
|
|
||||||
formatter: 'percent',
|
|
||||||
gaugeMax: 1,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="hostK8sCpuCap"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodeCpuCapacitySection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Node CPU Capacity',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
formatter="abbreviatedNumber"
|
|
||||||
seriesOverrides={{
|
|
||||||
capacity: { color: theme.eui.euiColorVis2 },
|
|
||||||
used: { color: theme.eui.euiColorVis1, type: 'area' },
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="hostK8sMemoryCap"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodeMemoryCapacitySection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Node Memory Capacity',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
formatter="bytes"
|
|
||||||
seriesOverrides={{
|
|
||||||
capacity: { color: theme.eui.euiColorVis2 },
|
|
||||||
used: { color: theme.eui.euiColorVis1, type: 'area' },
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="hostK8sDiskCap"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodeDiskCapacitySection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Node Disk Capacity',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
formatter="bytes"
|
|
||||||
seriesOverrides={{
|
|
||||||
capacity: { color: theme.eui.euiColorVis2 },
|
|
||||||
used: { color: theme.eui.euiColorVis1, type: 'area' },
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
<SubSection
|
|
||||||
id="hostK8sPodCap"
|
|
||||||
label={i18n.translate(
|
|
||||||
'xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodePodCapacitySection.sectionLabel',
|
|
||||||
{
|
|
||||||
defaultMessage: 'Node Pod Capacity',
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<ChartSectionVis
|
|
||||||
formatter="number"
|
|
||||||
seriesOverrides={{
|
|
||||||
capacity: { color: theme.eui.euiColorVis2 },
|
|
||||||
used: { color: theme.eui.euiColorVis1, type: 'area' },
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</SubSection>
|
|
||||||
</Section>
|
|
||||||
<AwsLayoutSection metrics={metrics} onChangeRangeTime={onChangeRangeTime} />
|
|
||||||
<NginxLayoutSection metrics={metrics} onChangeRangeTime={onChangeRangeTime} />
|
|
||||||
</EuiPanel>
|
|
||||||
</React.Fragment>
|
|
||||||
)
|
|
||||||
);
|
|
|
@ -42,7 +42,13 @@ export const MetricDetailPage = () => {
|
||||||
loading: metadataLoading,
|
loading: metadataLoading,
|
||||||
cloudId,
|
cloudId,
|
||||||
metadata,
|
metadata,
|
||||||
} = useMetadata(nodeId, nodeType, inventoryModel.requiredMetrics, sourceId, parsedTimeRange);
|
} = useMetadata({
|
||||||
|
assetId: nodeId,
|
||||||
|
assetType: nodeType,
|
||||||
|
requiredMetrics: inventoryModel.requiredMetrics,
|
||||||
|
sourceId,
|
||||||
|
timeRange: parsedTimeRange,
|
||||||
|
});
|
||||||
|
|
||||||
const [sideNav, setSideNav] = useState<NavItem[]>([]);
|
const [sideNav, setSideNav] = useState<NavItem[]>([]);
|
||||||
|
|
||||||
|
|
|
@ -34,30 +34,46 @@ export const initNodeDetailsRoute = (libs: InfraBackendLibs) => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async (requestContext, request, response) => {
|
async (requestContext, request, response) => {
|
||||||
const { nodeId, cloudId, nodeType, metrics, timerange, sourceId } = pipe(
|
try {
|
||||||
NodeDetailsRequestRT.decode(request.body),
|
const { nodeId, cloudId, nodeType, metrics, timerange, sourceId } = pipe(
|
||||||
fold(throwErrors(Boom.badRequest), identity)
|
NodeDetailsRequestRT.decode(request.body),
|
||||||
);
|
fold(throwErrors(Boom.badRequest), identity)
|
||||||
const soClient = (await requestContext.core).savedObjects.client;
|
);
|
||||||
const source = await libs.sources.getSourceConfiguration(soClient, sourceId);
|
const soClient = (await requestContext.core).savedObjects.client;
|
||||||
|
const source = await libs.sources.getSourceConfiguration(soClient, sourceId);
|
||||||
|
|
||||||
UsageCollector.countNode(nodeType);
|
UsageCollector.countNode(nodeType);
|
||||||
|
|
||||||
const options: InfraMetricsRequestOptions = {
|
const options: InfraMetricsRequestOptions = {
|
||||||
nodeIds: {
|
nodeIds: {
|
||||||
nodeId,
|
nodeId,
|
||||||
cloudId,
|
cloudId,
|
||||||
},
|
},
|
||||||
nodeType,
|
nodeType,
|
||||||
sourceConfiguration: source.configuration,
|
sourceConfiguration: source.configuration,
|
||||||
metrics,
|
metrics,
|
||||||
timerange,
|
timerange,
|
||||||
};
|
};
|
||||||
return response.ok({
|
return response.ok({
|
||||||
body: NodeDetailsMetricDataResponseRT.encode({
|
body: NodeDetailsMetricDataResponseRT.encode({
|
||||||
metrics: await libs.metrics.getMetrics(requestContext, options, request),
|
metrics: await libs.metrics.getMetrics(requestContext, options, request),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
} catch (err) {
|
||||||
|
if (Boom.isBoom(err)) {
|
||||||
|
return response.customError({
|
||||||
|
statusCode: err.output.statusCode,
|
||||||
|
body: { message: err.output.payload.message },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return response.customError({
|
||||||
|
statusCode: err.statusCode ?? 500,
|
||||||
|
body: {
|
||||||
|
message: err.message ?? 'An unexpected error occurred',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -18996,25 +18996,6 @@
|
||||||
"xpack.infra.metadataEmbeddable.setFilterByValueTooltip": "Filtrer par valeur",
|
"xpack.infra.metadataEmbeddable.setFilterByValueTooltip": "Filtrer par valeur",
|
||||||
"xpack.infra.metadataEmbeddable.setRemoveFilterTooltip": "Supprimer le filtre",
|
"xpack.infra.metadataEmbeddable.setRemoveFilterTooltip": "Supprimer le filtre",
|
||||||
"xpack.infra.metadataEmbeddable.value": "Valeur",
|
"xpack.infra.metadataEmbeddable.value": "Valeur",
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.cpuUtilSection.percentSeriesLabel": "pour cent",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.cpuUtilSection.sectionLabel": "Utilisation CPU",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioBytesSection.readsSeriesLabel": "lit",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioBytesSection.sectionLabel": "Octets d'E/S sur le disque",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioBytesSection.writesSeriesLabel": "écrit",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioOperationsSection.readsSeriesLabel": "lit",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioOperationsSection.sectionLabel": "Opérations d'E/S sur le disque",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioOperationsSection.writesSeriesLabel": "écrit",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkBytesSection.rxSeriesLabel": "entrée",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkBytesSection.sectionLabel": "Trafic réseau",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkBytesSection.txSeriesLabel": "sortie",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkPacketsSection.packetsInSeriesLabel": "entrée",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkPacketsSection.packetsOutSeriesLabel": "sortie",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkPacketsSection.sectionLabel": "Paquets réseau (moyenne)",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.cpuUtilizationSeriesLabel": "Utilisation CPU",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.networkPacketsInLabel": "Paquets (entrée)",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.networkPacketsOutLabel": "Paquets (sortie)",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.sectionLabel": "Aperçu AWS",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.statusCheckFailedLabel": "La vérification du statut a échoué",
|
|
||||||
"xpack.infra.metricDetailPage.containerMetricsLayout.cpuUsageSection.sectionLabel": "Utilisation CPU",
|
"xpack.infra.metricDetailPage.containerMetricsLayout.cpuUsageSection.sectionLabel": "Utilisation CPU",
|
||||||
"xpack.infra.metricDetailPage.containerMetricsLayout.diskIoBytesSection.readRateSeriesLabel": "lit",
|
"xpack.infra.metricDetailPage.containerMetricsLayout.diskIoBytesSection.readRateSeriesLabel": "lit",
|
||||||
"xpack.infra.metricDetailPage.containerMetricsLayout.diskIoBytesSection.sectionLabel": "ES sur le disque (octets)",
|
"xpack.infra.metricDetailPage.containerMetricsLayout.diskIoBytesSection.sectionLabel": "ES sur le disque (octets)",
|
||||||
|
@ -19039,32 +19020,6 @@
|
||||||
"xpack.infra.metricDetailPage.ec2MetricsLayout.diskIOBytesSection.writeLabel": "écrit",
|
"xpack.infra.metricDetailPage.ec2MetricsLayout.diskIOBytesSection.writeLabel": "écrit",
|
||||||
"xpack.infra.metricDetailPage.ec2MetricsLayout.networkTrafficSection.sectionLabel": "Trafic réseau",
|
"xpack.infra.metricDetailPage.ec2MetricsLayout.networkTrafficSection.sectionLabel": "Trafic réseau",
|
||||||
"xpack.infra.metricDetailPage.ec2MetricsLayout.overviewSection.sectionLabel": "Aperçu EC2 AWS",
|
"xpack.infra.metricDetailPage.ec2MetricsLayout.overviewSection.sectionLabel": "Aperçu EC2 AWS",
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.cpuUsageSection.sectionLabel": "Utilisation CPU",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.layoutLabel": "Hôte",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.fifteenMinuteSeriesLabel": "15 min",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.fiveMinuteSeriesLabel": "5 min",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.oneMinuteSeriesLabel": "1 min",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.sectionLabel": "Charge",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.memoryUsageSection.sectionLabel": "Utilisation mémoire",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.networkTrafficSection.networkRxRateSeriesLabel": "entrée",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.networkTrafficSection.networkTxRateSeriesLabel": "sortie",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.networkTrafficSection.sectionLabel": "Trafic réseau",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.cpuUsageSeriesLabel": "Utilisation CPU",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.inboundRXSeriesLabel": "Entrant (RX)",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.loadSeriesLabel": "Charge (5 min)",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.memoryCapacitySeriesLabel": "Utilisation mémoire",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.outboundTXSeriesLabel": "Sortant (TX)",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.sectionLabel": "Aperçu de l'hôte",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodeCpuCapacitySection.sectionLabel": "Capacité CPU du nœud",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodeDiskCapacitySection.sectionLabel": "Capacité du disque du nœud",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodeMemoryCapacitySection.sectionLabel": "Capacité de mémoire du nœud",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodePodCapacitySection.sectionLabel": "Capacité de pod du nœud",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.cpuUsageSeriesLabel": "Capacité CPU",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.diskCapacitySeriesLabel": "Capacité du disque",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.loadSeriesLabel": "Charge (5 min)",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.memoryUsageSeriesLabel": "Capacité de mémoire",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.podCapacitySeriesLabel": "Capacité de pod",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.sectionLabel": "Aperçu Kubernetes",
|
|
||||||
"xpack.infra.metricDetailPage.nginxMetricsLayout.activeConnectionsSection.sectionLabel": "Connexions actives",
|
"xpack.infra.metricDetailPage.nginxMetricsLayout.activeConnectionsSection.sectionLabel": "Connexions actives",
|
||||||
"xpack.infra.metricDetailPage.nginxMetricsLayout.hitsSection.sectionLabel": "Résultats",
|
"xpack.infra.metricDetailPage.nginxMetricsLayout.hitsSection.sectionLabel": "Résultats",
|
||||||
"xpack.infra.metricDetailPage.nginxMetricsLayout.requestRateSection.sectionLabel": "Taux de requêtes",
|
"xpack.infra.metricDetailPage.nginxMetricsLayout.requestRateSection.sectionLabel": "Taux de requêtes",
|
||||||
|
@ -39848,4 +39803,4 @@
|
||||||
"xpack.painlessLab.walkthroughButtonLabel": "Présentation",
|
"xpack.painlessLab.walkthroughButtonLabel": "Présentation",
|
||||||
"xpack.serverlessObservability.nav.getStarted": "Démarrer"
|
"xpack.serverlessObservability.nav.getStarted": "Démarrer"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -19010,25 +19010,6 @@
|
||||||
"xpack.infra.metadataEmbeddable.setFilterByValueTooltip": "値でフィルタリング",
|
"xpack.infra.metadataEmbeddable.setFilterByValueTooltip": "値でフィルタリング",
|
||||||
"xpack.infra.metadataEmbeddable.setRemoveFilterTooltip": "フィルターを削除",
|
"xpack.infra.metadataEmbeddable.setRemoveFilterTooltip": "フィルターを削除",
|
||||||
"xpack.infra.metadataEmbeddable.value": "値",
|
"xpack.infra.metadataEmbeddable.value": "値",
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.cpuUtilSection.percentSeriesLabel": "パーセント",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.cpuUtilSection.sectionLabel": "CPU 使用状況",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioBytesSection.readsSeriesLabel": "読み取り",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioBytesSection.sectionLabel": "ディスク I/O バイト",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioBytesSection.writesSeriesLabel": "書き込み",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioOperationsSection.readsSeriesLabel": "読み取り",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioOperationsSection.sectionLabel": "ディスク I/O オペレーション",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioOperationsSection.writesSeriesLabel": "書き込み",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkBytesSection.rxSeriesLabel": "in",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkBytesSection.sectionLabel": "ネットワークトラフィック",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkBytesSection.txSeriesLabel": "出",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkPacketsSection.packetsInSeriesLabel": "in",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkPacketsSection.packetsOutSeriesLabel": "出",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkPacketsSection.sectionLabel": "ネットワークパケット(平均)",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.cpuUtilizationSeriesLabel": "CPU 使用状況",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.networkPacketsInLabel": "パケット(受信)",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.networkPacketsOutLabel": "パケット(送信)",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.sectionLabel": "AWS概要",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.statusCheckFailedLabel": "ステータス確認失敗",
|
|
||||||
"xpack.infra.metricDetailPage.containerMetricsLayout.cpuUsageSection.sectionLabel": "CPU使用状況",
|
"xpack.infra.metricDetailPage.containerMetricsLayout.cpuUsageSection.sectionLabel": "CPU使用状況",
|
||||||
"xpack.infra.metricDetailPage.containerMetricsLayout.diskIoBytesSection.readRateSeriesLabel": "読み取り",
|
"xpack.infra.metricDetailPage.containerMetricsLayout.diskIoBytesSection.readRateSeriesLabel": "読み取り",
|
||||||
"xpack.infra.metricDetailPage.containerMetricsLayout.diskIoBytesSection.sectionLabel": "ディスク IO(バイト)",
|
"xpack.infra.metricDetailPage.containerMetricsLayout.diskIoBytesSection.sectionLabel": "ディスク IO(バイト)",
|
||||||
|
@ -19053,32 +19034,6 @@
|
||||||
"xpack.infra.metricDetailPage.ec2MetricsLayout.diskIOBytesSection.writeLabel": "書き込み",
|
"xpack.infra.metricDetailPage.ec2MetricsLayout.diskIOBytesSection.writeLabel": "書き込み",
|
||||||
"xpack.infra.metricDetailPage.ec2MetricsLayout.networkTrafficSection.sectionLabel": "ネットワークトラフィック",
|
"xpack.infra.metricDetailPage.ec2MetricsLayout.networkTrafficSection.sectionLabel": "ネットワークトラフィック",
|
||||||
"xpack.infra.metricDetailPage.ec2MetricsLayout.overviewSection.sectionLabel": "Aws EC2概要",
|
"xpack.infra.metricDetailPage.ec2MetricsLayout.overviewSection.sectionLabel": "Aws EC2概要",
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.cpuUsageSection.sectionLabel": "CPU使用状況",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.layoutLabel": "ホスト",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.fifteenMinuteSeriesLabel": "15m",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.fiveMinuteSeriesLabel": "5m",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.oneMinuteSeriesLabel": "1m",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.sectionLabel": "読み込み",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.memoryUsageSection.sectionLabel": "メモリー使用状況",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.networkTrafficSection.networkRxRateSeriesLabel": "in",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.networkTrafficSection.networkTxRateSeriesLabel": "出",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.networkTrafficSection.sectionLabel": "ネットワークトラフィック",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.cpuUsageSeriesLabel": "CPU使用状況",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.inboundRXSeriesLabel": "受信(RX)",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.loadSeriesLabel": "読み込み(5m)",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.memoryCapacitySeriesLabel": "メモリー使用状況",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.outboundTXSeriesLabel": "送信(TX)",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.sectionLabel": "ホスト概要",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodeCpuCapacitySection.sectionLabel": "ノード CPU 処理能力",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodeDiskCapacitySection.sectionLabel": "ノードディスク容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodeMemoryCapacitySection.sectionLabel": "ノードメモリー容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodePodCapacitySection.sectionLabel": "ノードポッド容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.cpuUsageSeriesLabel": "CPU 処理能力",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.diskCapacitySeriesLabel": "ディスク容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.loadSeriesLabel": "読み込み(5m)",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.memoryUsageSeriesLabel": "メモリー容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.podCapacitySeriesLabel": "ポッド容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.sectionLabel": "Kubernetes概要",
|
|
||||||
"xpack.infra.metricDetailPage.nginxMetricsLayout.activeConnectionsSection.sectionLabel": "アクティブな接続",
|
"xpack.infra.metricDetailPage.nginxMetricsLayout.activeConnectionsSection.sectionLabel": "アクティブな接続",
|
||||||
"xpack.infra.metricDetailPage.nginxMetricsLayout.hitsSection.sectionLabel": "ヒット数",
|
"xpack.infra.metricDetailPage.nginxMetricsLayout.hitsSection.sectionLabel": "ヒット数",
|
||||||
"xpack.infra.metricDetailPage.nginxMetricsLayout.requestRateSection.sectionLabel": "リクエストレート",
|
"xpack.infra.metricDetailPage.nginxMetricsLayout.requestRateSection.sectionLabel": "リクエストレート",
|
||||||
|
@ -39839,4 +39794,4 @@
|
||||||
"xpack.painlessLab.walkthroughButtonLabel": "実地検証",
|
"xpack.painlessLab.walkthroughButtonLabel": "実地検証",
|
||||||
"xpack.serverlessObservability.nav.getStarted": "使ってみる"
|
"xpack.serverlessObservability.nav.getStarted": "使ってみる"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -19010,25 +19010,6 @@
|
||||||
"xpack.infra.metadataEmbeddable.setFilterByValueTooltip": "按值筛选",
|
"xpack.infra.metadataEmbeddable.setFilterByValueTooltip": "按值筛选",
|
||||||
"xpack.infra.metadataEmbeddable.setRemoveFilterTooltip": "移除筛选",
|
"xpack.infra.metadataEmbeddable.setRemoveFilterTooltip": "移除筛选",
|
||||||
"xpack.infra.metadataEmbeddable.value": "值",
|
"xpack.infra.metadataEmbeddable.value": "值",
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.cpuUtilSection.percentSeriesLabel": "百分比",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.cpuUtilSection.sectionLabel": "CPU 使用率",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioBytesSection.readsSeriesLabel": "读取数",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioBytesSection.sectionLabel": "磁盘 I/O 字节数",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioBytesSection.writesSeriesLabel": "写入数",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioOperationsSection.readsSeriesLabel": "读取数",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioOperationsSection.sectionLabel": "磁盘 I/O 操作数",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.diskioOperationsSection.writesSeriesLabel": "写入数",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkBytesSection.rxSeriesLabel": "于",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkBytesSection.sectionLabel": "网络流量",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkBytesSection.txSeriesLabel": "传出",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkPacketsSection.packetsInSeriesLabel": "于",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkPacketsSection.packetsOutSeriesLabel": "传出",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.networkPacketsSection.sectionLabel": "网络数据包(平均值)",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.cpuUtilizationSeriesLabel": "CPU 使用率",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.networkPacketsInLabel": "数据包(传入)",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.networkPacketsOutLabel": "数据包(传出)",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.sectionLabel": "AWS 概览",
|
|
||||||
"xpack.infra.metricDetailPage.awsMetricsLayout.overviewSection.statusCheckFailedLabel": "状态检查失败",
|
|
||||||
"xpack.infra.metricDetailPage.containerMetricsLayout.cpuUsageSection.sectionLabel": "CPU 使用率",
|
"xpack.infra.metricDetailPage.containerMetricsLayout.cpuUsageSection.sectionLabel": "CPU 使用率",
|
||||||
"xpack.infra.metricDetailPage.containerMetricsLayout.diskIoBytesSection.readRateSeriesLabel": "读取数",
|
"xpack.infra.metricDetailPage.containerMetricsLayout.diskIoBytesSection.readRateSeriesLabel": "读取数",
|
||||||
"xpack.infra.metricDetailPage.containerMetricsLayout.diskIoBytesSection.sectionLabel": "磁盘 IO(字节)",
|
"xpack.infra.metricDetailPage.containerMetricsLayout.diskIoBytesSection.sectionLabel": "磁盘 IO(字节)",
|
||||||
|
@ -19053,32 +19034,6 @@
|
||||||
"xpack.infra.metricDetailPage.ec2MetricsLayout.diskIOBytesSection.writeLabel": "写入数",
|
"xpack.infra.metricDetailPage.ec2MetricsLayout.diskIOBytesSection.writeLabel": "写入数",
|
||||||
"xpack.infra.metricDetailPage.ec2MetricsLayout.networkTrafficSection.sectionLabel": "网络流量",
|
"xpack.infra.metricDetailPage.ec2MetricsLayout.networkTrafficSection.sectionLabel": "网络流量",
|
||||||
"xpack.infra.metricDetailPage.ec2MetricsLayout.overviewSection.sectionLabel": "Aws EC2 概览",
|
"xpack.infra.metricDetailPage.ec2MetricsLayout.overviewSection.sectionLabel": "Aws EC2 概览",
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.cpuUsageSection.sectionLabel": "CPU 使用率",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.layoutLabel": "主机",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.fifteenMinuteSeriesLabel": "15 分钟",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.fiveMinuteSeriesLabel": "5 分钟",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.oneMinuteSeriesLabel": "1 分钟",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.loadSection.sectionLabel": "加载",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.memoryUsageSection.sectionLabel": "内存利用率",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.networkTrafficSection.networkRxRateSeriesLabel": "于",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.networkTrafficSection.networkTxRateSeriesLabel": "传出",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.networkTrafficSection.sectionLabel": "网络流量",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.cpuUsageSeriesLabel": "CPU 使用率",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.inboundRXSeriesLabel": "入站 (RX)",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.loadSeriesLabel": "负载(5 分钟)",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.memoryCapacitySeriesLabel": "内存利用率",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.outboundTXSeriesLabel": "出站 (TX)",
|
|
||||||
"xpack.infra.metricDetailPage.hostMetricsLayout.overviewSection.sectionLabel": "主机概览",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodeCpuCapacitySection.sectionLabel": "节点 CPU 容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodeDiskCapacitySection.sectionLabel": "节点磁盘容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodeMemoryCapacitySection.sectionLabel": "节点内存容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.nodePodCapacitySection.sectionLabel": "节点 Pod 容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.cpuUsageSeriesLabel": "CPU 容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.diskCapacitySeriesLabel": "磁盘容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.loadSeriesLabel": "负载(5 分钟)",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.memoryUsageSeriesLabel": "内存容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.podCapacitySeriesLabel": "Pod 容量",
|
|
||||||
"xpack.infra.metricDetailPage.kubernetesMetricsLayout.overviewSection.sectionLabel": "Kubernetes 概览",
|
|
||||||
"xpack.infra.metricDetailPage.nginxMetricsLayout.activeConnectionsSection.sectionLabel": "活动连接",
|
"xpack.infra.metricDetailPage.nginxMetricsLayout.activeConnectionsSection.sectionLabel": "活动连接",
|
||||||
"xpack.infra.metricDetailPage.nginxMetricsLayout.hitsSection.sectionLabel": "命中数",
|
"xpack.infra.metricDetailPage.nginxMetricsLayout.hitsSection.sectionLabel": "命中数",
|
||||||
"xpack.infra.metricDetailPage.nginxMetricsLayout.requestRateSection.sectionLabel": "请求速率",
|
"xpack.infra.metricDetailPage.nginxMetricsLayout.requestRateSection.sectionLabel": "请求速率",
|
||||||
|
@ -39833,4 +39788,4 @@
|
||||||
"xpack.painlessLab.walkthroughButtonLabel": "指导",
|
"xpack.painlessLab.walkthroughButtonLabel": "指导",
|
||||||
"xpack.serverlessObservability.nav.getStarted": "开始使用"
|
"xpack.serverlessObservability.nav.getStarted": "开始使用"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,7 +15,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';
|
||||||
|
|
||||||
import { DATES } from './constants';
|
import { DATES } from './constants';
|
||||||
|
|
||||||
const { min, max } = DATES['7.0.0'].hosts;
|
const { min, max } = DATES['8.0.0'].pods_only;
|
||||||
|
|
||||||
interface NodeDetailsRequest {
|
interface NodeDetailsRequest {
|
||||||
metrics: InventoryMetric[];
|
metrics: InventoryMetric[];
|
||||||
|
@ -31,8 +31,8 @@ export default function ({ getService }: FtrProviderContext) {
|
||||||
const supertest = getService('supertest');
|
const supertest = getService('supertest');
|
||||||
|
|
||||||
describe('metrics', () => {
|
describe('metrics', () => {
|
||||||
before(() => esArchiver.load('x-pack/test/functional/es_archives/infra/7.0.0/hosts'));
|
before(() => esArchiver.load('x-pack/test/functional/es_archives/infra/8.0.0/pods_only'));
|
||||||
after(() => esArchiver.unload('x-pack/test/functional/es_archives/infra/7.0.0/hosts'));
|
after(() => esArchiver.unload('x-pack/test/functional/es_archives/infra/8.0.0/pods_only'));
|
||||||
|
|
||||||
const fetchNodeDetails = async (
|
const fetchNodeDetails = async (
|
||||||
body: NodeDetailsRequest
|
body: NodeDetailsRequest
|
||||||
|
@ -48,14 +48,14 @@ export default function ({ getService }: FtrProviderContext) {
|
||||||
it('should basically work', async () => {
|
it('should basically work', async () => {
|
||||||
const data = fetchNodeDetails({
|
const data = fetchNodeDetails({
|
||||||
sourceId: 'default',
|
sourceId: 'default',
|
||||||
metrics: ['hostCpuUsage'],
|
metrics: ['podCpuUsage'],
|
||||||
timerange: {
|
timerange: {
|
||||||
to: max,
|
to: max,
|
||||||
from: min,
|
from: min,
|
||||||
interval: '>=1m',
|
interval: '>=1m',
|
||||||
},
|
},
|
||||||
nodeId: 'demo-stack-mysql-01',
|
nodeId: '7d6d7955-f853-42b1-8613-11f52d0d2725',
|
||||||
nodeType: 'host',
|
nodeType: 'pod',
|
||||||
});
|
});
|
||||||
return data.then((resp) => {
|
return data.then((resp) => {
|
||||||
if (!resp) {
|
if (!resp) {
|
||||||
|
@ -63,28 +63,28 @@ export default function ({ getService }: FtrProviderContext) {
|
||||||
}
|
}
|
||||||
expect(resp.metrics.length).to.equal(1);
|
expect(resp.metrics.length).to.equal(1);
|
||||||
const metric = first(resp.metrics) as any;
|
const metric = first(resp.metrics) as any;
|
||||||
expect(metric).to.have.property('id', 'hostCpuUsage');
|
expect(metric).to.have.property('id', 'podCpuUsage');
|
||||||
expect(metric).to.have.property('series');
|
expect(metric).to.have.property('series');
|
||||||
const series = first(metric.series) as any;
|
const series = first(metric.series) as any;
|
||||||
expect(series).to.have.property('id', 'user');
|
expect(series).to.have.property('id', 'cpu');
|
||||||
expect(series).to.have.property('data');
|
expect(series).to.have.property('data');
|
||||||
const datapoint = last(series.data) as any;
|
const datapoint = last(series.data) as any;
|
||||||
expect(datapoint).to.have.property('timestamp', 1547571780000);
|
expect(datapoint).to.have.property('timestamp', 1642698890000);
|
||||||
expect(datapoint).to.have.property('value', 0.0015);
|
expect(datapoint).to.have.property('value', 0.544);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support multiple metrics', async () => {
|
it('should support multiple metrics', async () => {
|
||||||
const data = fetchNodeDetails({
|
const data = fetchNodeDetails({
|
||||||
sourceId: 'default',
|
sourceId: 'default',
|
||||||
metrics: ['hostCpuUsage', 'hostLoad'],
|
metrics: ['podCpuUsage', 'podMemoryUsage'],
|
||||||
timerange: {
|
timerange: {
|
||||||
to: max,
|
to: max,
|
||||||
from: min,
|
from: min,
|
||||||
interval: '>=1m',
|
interval: '>=1m',
|
||||||
},
|
},
|
||||||
nodeId: 'demo-stack-mysql-01',
|
nodeId: '7d6d7955-f853-42b1-8613-11f52d0d2725',
|
||||||
nodeType: 'host',
|
nodeType: 'pod',
|
||||||
});
|
});
|
||||||
return data.then((resp) => {
|
return data.then((resp) => {
|
||||||
if (!resp) {
|
if (!resp) {
|
||||||
|
@ -95,28 +95,26 @@ export default function ({ getService }: FtrProviderContext) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return multiple values for hostSystemOverview metric', () => {
|
it('should return multiple values for podOverview metric', () => {
|
||||||
const data = fetchNodeDetails({
|
const data = fetchNodeDetails({
|
||||||
sourceId: 'default',
|
sourceId: 'default',
|
||||||
metrics: ['hostSystemOverview'],
|
metrics: ['podOverview'],
|
||||||
timerange: {
|
timerange: {
|
||||||
to: max,
|
to: max,
|
||||||
from: min,
|
from: min,
|
||||||
interval: '>=1m',
|
interval: '>=1m',
|
||||||
},
|
},
|
||||||
nodeId: 'demo-stack-mysql-01',
|
nodeId: '7d6d7955-f853-42b1-8613-11f52d0d2725',
|
||||||
nodeType: 'host',
|
nodeType: 'pod',
|
||||||
});
|
});
|
||||||
return data.then((resp) => {
|
return data.then((resp) => {
|
||||||
if (!resp) {
|
if (!resp) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const hostSystemOverviewMetric = resp.metrics.find(
|
const podOverviewMetric = resp.metrics.find((metric) => metric.id === 'podOverview');
|
||||||
(metric) => metric.id === 'hostSystemOverview'
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(hostSystemOverviewMetric?.series.length).to.be.greaterThan(1);
|
expect(podOverviewMetric?.series.length).to.be.greaterThan(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue