From f19945a7dfaf38b7251c1e39cb4a6cec09a1d855 Mon Sep 17 00:00:00 2001 From: Nox911 Date: Fri, 23 Nov 2018 12:39:05 +0300 Subject: [PATCH] Feature/translate monitoring server(part_2) (#25402) * Translate monitoring -> server -> metrics * Add monitooring path to i18nrx.json file * Fix issues * Remove eslint rule disabling --- .../server/lib/metrics/apm/classes.js | 5 +- .../server/lib/metrics/apm/metrics.js | 356 +++-- .../server/lib/metrics/beats/classes.js | 11 +- .../server/lib/metrics/beats/metrics.js | 376 +++-- .../lib/metrics/elasticsearch/classes.js | 17 +- .../lib/metrics/elasticsearch/metrics.js | 1211 ++++++++++++----- .../server/lib/metrics/kibana/metrics.js | 158 ++- .../server/lib/metrics/logstash/classes.js | 16 +- .../server/lib/metrics/logstash/metrics.js | 273 ++-- 9 files changed, 1704 insertions(+), 719 deletions(-) diff --git a/x-pack/plugins/monitoring/server/lib/metrics/apm/classes.js b/x-pack/plugins/monitoring/server/lib/metrics/apm/classes.js index 2356f1ad03eb..e827b4af4a1b 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/apm/classes.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/apm/classes.js @@ -6,6 +6,7 @@ import { ClusterMetric, Metric } from '../classes'; import { SMALL_FLOAT, LARGE_FLOAT } from '../../../../common/formatting'; +import { i18n } from '@kbn/i18n'; export class ApmClusterMetric extends ClusterMetric { constructor(opts) { @@ -83,7 +84,9 @@ export class ApmEventsRateClusterMetric extends ApmClusterMetric { derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: '/m' + units: i18n.translate('xpack.monitoring.metrics.apm.perMinuteUnitLabel', { + defaultMessage: '/m' + }) }); this.aggs = { diff --git a/x-pack/plugins/monitoring/server/lib/metrics/apm/metrics.js b/x-pack/plugins/monitoring/server/lib/metrics/apm/metrics.js index c8249ccfddda..3e52c5fc1c65 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/apm/metrics.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/apm/metrics.js @@ -10,38 +10,66 @@ import { ApmCpuUtilizationMetric, ApmEventsRateClusterMetric, } from './classes'; +import { i18n } from '@kbn/i18n'; + +const instanceSystemLoadTitle = i18n.translate('xpack.monitoring.metrics.apmInstance.systemLoadTitle', { + defaultMessage: 'System Load' +}); +const instanceMemoryTitle = i18n.translate('xpack.monitoring.metrics.apmInstance.memoryTitle', { + defaultMessage: 'Memory' +}); +const transformationsTitle = i18n.translate('xpack.monitoring.metrics.apm.transformationsTitle', { + defaultMessage: 'Transformations' +}); export const metrics = { apm_cpu_total: new ApmCpuUtilizationMetric({ - title: 'CPU Utilization', - label: 'Total', - description: - 'Percentage of CPU time spent executing (user+kernel mode) for the APM process', + title: i18n.translate('xpack.monitoring.metrics.apmInstance.cpuUtilizationTitle', { + defaultMessage: 'CPU Utilization' + }), + label: i18n.translate('xpack.monitoring.metrics.apmInstance.cpuUtilization.totalLabel', { + defaultMessage: 'Total' + }), + description: i18n.translate('xpack.monitoring.metrics.apmInstance.cpuUtilization.totalDescription', { + defaultMessage: 'Percentage of CPU time spent executing (user+kernel mode) for the APM process' + }), field: 'beats_stats.metrics.beat.cpu.total.value' }), apm_system_os_load_1: new ApmMetric({ field: 'beats_stats.metrics.system.load.1', - label: '1m', - title: 'System Load', - description: 'Load average over the last 1 minute', + label: i18n.translate('xpack.monitoring.metrics.apmInstance.systemLoad.last1MinuteLabel', { + defaultMessage: '1m' + }), + title: instanceSystemLoadTitle, + description: i18n.translate('xpack.monitoring.metrics.apmInstance.systemLoad.last1MinuteDescription', { + defaultMessage: 'Load average over the last 1 minute' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' }), apm_system_os_load_5: new ApmMetric({ field: 'beats_stats.metrics.system.load.5', - label: '5m', - title: 'System Load', - description: 'Load average over the last 5 minutes', + label: i18n.translate('xpack.monitoring.metrics.apmInstance.systemLoad.last5MinutesLabel', { + defaultMessage: '5m' + }), + title: instanceSystemLoadTitle, + description: i18n.translate('xpack.monitoring.metrics.apmInstance.systemLoad.last5MinutesDescription', { + defaultMessage: 'Load average over the last 5 minutes' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' }), apm_system_os_load_15: new ApmMetric({ field: 'beats_stats.metrics.system.load.15', - label: '15m', - title: 'System Load', - description: 'Load average over the last 15 minutes', + label: i18n.translate('xpack.monitoring.metrics.apmInstance.systemLoad.last15MinutesLabel', { + defaultMessage: '15m' + }), + title: instanceSystemLoadTitle, + description: i18n.translate('xpack.monitoring.metrics.apmInstance.systemLoad.last15MinutesDescription', { + defaultMessage: 'Load average over the last 15 minutes' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' @@ -49,29 +77,39 @@ export const metrics = { apm_mem_gc_next: new ApmMetric({ field: 'beats_stats.metrics.beat.memstats.gc_next', - label: 'GC Next', - title: 'Memory', - description: - 'Limit of allocated memory at which garbage collection will occur', + label: i18n.translate('xpack.monitoring.metrics.apmInstance.memory.gcNextLabel', { + defaultMessage: 'GC Next' + }), + title: instanceMemoryTitle, + description: i18n.translate('xpack.monitoring.metrics.apmInstance.memory.gcNextDescription', { + defaultMessage: 'Limit of allocated memory at which garbage collection will occur' + }), format: LARGE_BYTES, metricAgg: 'max', units: 'B' }), apm_mem_alloc: new ApmMetric({ field: 'beats_stats.metrics.beat.memstats.memory_alloc', - label: 'Allocated Memory', - title: 'Memory', - description: - 'Allocated memory', + label: i18n.translate('xpack.monitoring.metrics.apmInstance.memory.allocatedMemoryLabel', { + defaultMessage: 'Allocated Memory' + }), + title: instanceMemoryTitle, + description: i18n.translate('xpack.monitoring.metrics.apmInstance.memory.allocatedMemoryDescription', { + defaultMessage: 'Allocated memory' + }), format: LARGE_BYTES, metricAgg: 'max', units: 'B' }), apm_mem_rss: new ApmMetric({ field: 'beats_stats.metrics.beat.memstats.rss', - label: 'Process Total', - title: 'Memory', - description: 'Resident set size of memory reserved by the APM service from the OS', + label: i18n.translate('xpack.monitoring.metrics.apmInstance.memory.processTotalLabel', { + defaultMessage: 'Process Total' + }), + title: instanceMemoryTitle, + description: i18n.translate('xpack.monitoring.metrics.apmInstance.memory.processTotalDescription', { + defaultMessage: 'Resident set size of memory reserved by the APM service from the OS' + }), format: LARGE_BYTES, metricAgg: 'max', units: 'B' @@ -79,144 +117,276 @@ export const metrics = { apm_requests: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.request.count', - title: 'Requests', - label: 'Requested', - description: 'HTTP Requests received by server' + title: i18n.translate('xpack.monitoring.metrics.apm.requestsTitle', { + defaultMessage: 'Requests' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.requests.requestedLabel', { + defaultMessage: 'Requested' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.requests.requestedDescription', { + defaultMessage: 'HTTP Requests received by server' + }) }), apm_responses_count: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.count', - title: 'Response Count', - label: 'Total', - description: 'HTTP Requests responded to by server' + title: i18n.translate('xpack.monitoring.metrics.apm.responseCountTitle', { + defaultMessage: 'Response Count' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.responseCount.totalLabel', { + defaultMessage: 'Total' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.responseCount.totalDescription', { + defaultMessage: 'HTTP Requests responded to by server' + }) }), apm_responses_valid_ok: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.valid.ok', - title: 'Ok', - label: 'Ok', - description: '200 OK response count' + title: i18n.translate('xpack.monitoring.metrics.apm.response.okTitle', { + defaultMessage: 'Ok' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.response.okLabel', { + defaultMessage: 'Ok' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.response.okDescription', { + defaultMessage: '200 OK response count' + }) }), apm_responses_valid_accepted: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.valid.accepted', - title: 'Accepted', - label: 'Accepted', - description: 'HTTP Requests successfully reporting new events' + title: i18n.translate('xpack.monitoring.metrics.apm.response.acceptedTitle', { + defaultMessage: 'Accepted' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.response.acceptedLabel', { + defaultMessage: 'Accepted' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.response.acceptedDescription', { + defaultMessage: 'HTTP Requests successfully reporting new events' + }) }), apm_responses_errors_toolarge: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.errors.toolarge', - title: 'Response Errors', - label: 'Too large', - description: 'HTTP Requests rejected due to excessive payload size' + title: i18n.translate('xpack.monitoring.metrics.apm.responseErrorsTitle', { + defaultMessage: 'Response Errors' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.tooLargeLabelTitle', { + defaultMessage: 'Too large' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.tooLargeLabelDescription', { + defaultMessage: 'HTTP Requests rejected due to excessive payload size' + }) }), apm_responses_errors_validate: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.errors.validate', - title: 'Validate', - label: 'Validate', - description: 'HTTP Requests rejected due to payload validation error' + title: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.validateTitle', { + defaultMessage: 'Validate' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.validateLabel', { + defaultMessage: 'Validate' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.validateDescription', { + defaultMessage: 'HTTP Requests rejected due to payload validation error' + }) }), apm_responses_errors_method: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.errors.method', - title: 'Method', - label: 'Method', - description: 'HTTP Requests rejected due to incorrect HTTP method' + title: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.methodTitle', { + defaultMessage: 'Method' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.methodLabel', { + defaultMessage: 'Method' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.methodDescription', { + defaultMessage: 'HTTP Requests rejected due to incorrect HTTP method' + }) }), apm_responses_errors_unauthorized: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.errors.unauthorized', - title: 'Unauthorized', - label: 'Unauthorized', - description: 'HTTP Requests rejected due to invalid secret token' + title: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.unauthorizedTitle', { + defaultMessage: 'Unauthorized' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.unauthorizedLabel', { + defaultMessage: 'Unauthorized' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.unauthorizedDescription', { + defaultMessage: 'HTTP Requests rejected due to invalid secret token' + }) }), apm_responses_errors_ratelimit: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.errors.ratelimit', - title: 'Rate limit', - label: 'Rate limit', - description: 'HTTP Requests rejected to due excessive rate limit' + title: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.rateLimitTitle', { + defaultMessage: 'Rate limit' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.rateLimitLabel', { + defaultMessage: 'Rate limit' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.rateLimitDescription', { + defaultMessage: 'HTTP Requests rejected to due excessive rate limit' + }) }), apm_responses_errors_queue: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.errors.queue', - title: 'Queue', - label: 'Queue', - description: 'HTTP Requests rejected to due internal queue filling up' + title: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.queueTitle', { + defaultMessage: 'Queue' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.queueLabel', { + defaultMessage: 'Queue' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.queueDescription', { + defaultMessage: 'HTTP Requests rejected to due internal queue filling up' + }) }), apm_responses_errors_decode: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.errors.decode', - title: 'Decode', - label: 'Decode', - description: 'HTTP Requests rejected to due decoding errors - invalid json, incorrect data type for entity' + title: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.decodeTitle', { + defaultMessage: 'Decode' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.decodeLabel', { + defaultMessage: 'Decode' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.decodeDescription', { + defaultMessage: 'HTTP Requests rejected to due decoding errors - invalid json, incorrect data type for entity' + }) }), apm_responses_errors_forbidden: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.errors.forbidden', - title: 'Forbidden', - label: 'Forbidden', - description: 'Forbidden HTTP Requests rejected - CORS violation, disabled enpoint' + title: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.forbiddenTitle', { + defaultMessage: 'Forbidden' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.forbiddenLabel', { + defaultMessage: 'Forbidden' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.forbiddenDescription', { + defaultMessage: 'Forbidden HTTP Requests rejected - CORS violation, disabled enpoint' + }) }), apm_responses_errors_concurrency: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.errors.concurrency', - title: 'Concurrency', - label: 'Concurrency', - description: 'HTTP Requests rejected due to overall concurrency limit breach' + title: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.concurrencyTitle', { + defaultMessage: 'Concurrency' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.concurrencyLabel', { + defaultMessage: 'Concurrency' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.concurrencyDescription', { + defaultMessage: 'HTTP Requests rejected due to overall concurrency limit breach' + }) }), apm_responses_errors_closed: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.server.response.errors.closed', - title: 'Closed', - label: 'Closed', - description: 'HTTP Requests rejected during server shutdown' + title: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.closedTitle', { + defaultMessage: 'Closed' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.closedLabel', { + defaultMessage: 'Closed' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.responseErrors.closedDescription', { + defaultMessage: 'HTTP Requests rejected during server shutdown' + }) }), apm_processor_transaction_transformations: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.processor.transaction.transformations', - title: 'Processed Events', - label: 'Transaction', - description: 'Transaction events processed' + title: i18n.translate('xpack.monitoring.metrics.apm.processedEventsTitle', { + defaultMessage: 'Processed Events' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.processedEvents.transactionLabel', { + defaultMessage: 'Transaction' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.processedEvents.transactionDescription', { + defaultMessage: 'Transaction events processed' + }) }), apm_processor_span_transformations: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.processor.span.transformations', - title: 'Transformations', - label: 'Span', - description: 'Span events processed' + title: transformationsTitle, + label: i18n.translate('xpack.monitoring.metrics.apm.transformations.spanLabel', { + defaultMessage: 'Span' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.transformations.spanDescription', { + defaultMessage: 'Span events processed' + }) }), apm_processor_error_transformations: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.processor.error.transformations', - title: 'Transformations', - label: 'Error', - description: 'Error events processed' + title: transformationsTitle, + label: i18n.translate('xpack.monitoring.metrics.apm.transformations.errorLabel', { + defaultMessage: 'Error' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.transformations.errorDescription', { + defaultMessage: 'Error events processed' + }) }), apm_processor_metric_transformations: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.apm-server.processor.metric.transformations', - title: 'Transformations', - label: 'Metric', - description: 'Metric events processed' + title: transformationsTitle, + label: i18n.translate('xpack.monitoring.metrics.apm.transformations.metricLabel', { + defaultMessage: 'Metric' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.transformations.metricDescription', { + defaultMessage: 'Metric events processed' + }) }), apm_output_events_total: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.output.events.total', - title: 'Output Events Rate', - label: 'Total', - description: 'Events processed by the output (including retries)' + title: i18n.translate('xpack.monitoring.metrics.apm.outputEventsRateTitle', { + defaultMessage: 'Output Events Rate' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.outputEventsRate.totalLabel', { + defaultMessage: 'Total' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.outputEventsRate.totalDescription', { + defaultMessage: 'Events processed by the output (including retries)' + }) }), apm_output_events_failed: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.output.events.failed', - title: 'Output Failed Events Rate', - label: 'Failed', - description: 'Events processed by the output (including retries)' + title: i18n.translate('xpack.monitoring.metrics.apm.outputFailedEventsRateTitle', { + defaultMessage: 'Output Failed Events Rate' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.outputFailedEventsRate.failedLabel', { + defaultMessage: 'Failed' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.outputFailedEventsRate.failedDescription', { + defaultMessage: 'Events processed by the output (including retries)' + }) }), apm_output_events_dropped: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.output.events.dropped', - title: 'Output Dropped Events Rate', - label: 'Dropped', - description: 'Events processed by the output (including retries)' + title: i18n.translate('xpack.monitoring.metrics.apm.outputDroppedEventsRateTitle', { + defaultMessage: 'Output Dropped Events Rate' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.outputDroppedEventsRate.droppedLabel', { + defaultMessage: 'Dropped' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.outputDroppedEventsRate.droppedDescription', { + defaultMessage: 'Events processed by the output (including retries)' + }) }), apm_output_events_active: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.output.events.active', - title: 'Output Active Events Rate', - label: 'Active', - description: 'Events processed by the output (including retries)' + title: i18n.translate('xpack.monitoring.metrics.apm.outputActiveEventsRateTitle', { + defaultMessage: 'Output Active Events Rate' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.outputActiveEventsRate.activeLabel', { + defaultMessage: 'Active' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.outputActiveEventsRate.activeDescription', { + defaultMessage: 'Events processed by the output (including retries)' + }) }), apm_output_events_acked: new ApmEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.output.events.acked', - title: 'Output Acked Events Rate', - label: 'Acked', - description: 'Events processed by the output (including retries)' + title: i18n.translate('xpack.monitoring.metrics.apm.outputAckedEventsRateTitle', { + defaultMessage: 'Output Acked Events Rate' + }), + label: i18n.translate('xpack.monitoring.metrics.apm.outputAckedEventsRate.ackedLabel', { + defaultMessage: 'Acked' + }), + description: i18n.translate('xpack.monitoring.metrics.apm.outputAckedEventsRate.ackedDescription', { + defaultMessage: 'Events processed by the output (including retries)' + }) }), }; diff --git a/x-pack/plugins/monitoring/server/lib/metrics/beats/classes.js b/x-pack/plugins/monitoring/server/lib/metrics/beats/classes.js index f7da44c050b3..eb11536d87a7 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/beats/classes.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/beats/classes.js @@ -11,6 +11,11 @@ import { LARGE_BYTES } from '../../../../common/formatting'; import { NORMALIZED_DERIVATIVE_UNIT } from '../../../../common/constants'; +import { i18n } from '@kbn/i18n'; + +const perSecondUnitLabel = i18n.translate('xpack.monitoring.metrics.beats.perSecondUnitLabel', { + defaultMessage: '/s' +}); export class BeatsClusterMetric extends ClusterMetric { constructor(opts) { @@ -36,7 +41,7 @@ export class BeatsEventsRateClusterMetric extends BeatsClusterMetric { derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: '/s' + units: perSecondUnitLabel }); this.aggs = { @@ -102,7 +107,7 @@ export class BeatsEventsRateMetric extends BeatsMetric { ...opts, format: LARGE_FLOAT, metricAgg: 'max', - units: '/s', + units: perSecondUnitLabel, derivative: true }); } @@ -114,7 +119,7 @@ export class BeatsByteRateMetric extends BeatsMetric { ...opts, format: LARGE_BYTES, metricAgg: 'max', - units: '/s', + units: perSecondUnitLabel, derivative: true }); } diff --git a/x-pack/plugins/monitoring/server/lib/metrics/beats/metrics.js b/x-pack/plugins/monitoring/server/lib/metrics/beats/metrics.js index 371d64f61f0a..1c43e43b568b 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/beats/metrics.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/beats/metrics.js @@ -13,89 +13,164 @@ import { BeatsMetric } from './classes'; import { LARGE_FLOAT, LARGE_BYTES, SMALL_FLOAT } from '../../../../common/formatting'; +import { i18n } from '@kbn/i18n'; + +const eventsRateTitle = i18n.translate('xpack.monitoring.metrics.beats.eventsRateTitle', { + defaultMessage: 'Events Rate' +}); +const throughputTitle = i18n.translate('xpack.monitoring.metrics.beats.throughputTitle', { + defaultMessage: 'Throughput' +}); +const failRatesTitle = i18n.translate('xpack.monitoring.metrics.beats.failRatesTitle', { + defaultMessage: 'Fail Rates' +}); +const outputErrorsTitle = i18n.translate('xpack.monitoring.metrics.beats.outputErrorsTitle', { + defaultMessage: 'Output Errors' +}); +const instanceEventsRateTitle = i18n.translate('xpack.monitoring.metrics.beatsInstance.eventsRateTitle', { + defaultMessage: 'Events Rate' +}); +const instanceFailRatesTitle = i18n.translate('xpack.monitoring.metrics.beatsInstance.failRatesTitle', { + defaultMessage: 'Fail Rates' +}); +const instanceThroughputTitle = i18n.translate('xpack.monitoring.metrics.beatsInstance.throughputTitle', { + defaultMessage: 'Throughput' +}); +const instanceOutputErrorsTitle = i18n.translate('xpack.monitoring.metrics.beatsInstance.outputErrorsTitle', { + defaultMessage: 'Output Errors' +}); +const instanceMemoryTitle = i18n.translate('xpack.monitoring.metrics.beatsInstance.memoryTitle', { + defaultMessage: 'Memory' +}); +const instanceSystemLoadTitle = i18n.translate('xpack.monitoring.metrics.beatsInstance.systemLoadTitle', { + defaultMessage: 'System Load' +}); export const metrics = { beat_cluster_pipeline_events_total_rate: new BeatsEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.pipeline.events.total', - title: 'Events Rate', - label: 'Total', - description: 'All events newly created in the publishing pipeline' + title: eventsRateTitle, + label: i18n.translate('xpack.monitoring.metrics.beats.eventsRate.totalLabel', { + defaultMessage: 'Total' + }), + description: i18n.translate('xpack.monitoring.metrics.beats.eventsRate.totalDescription', { + defaultMessage: 'All events newly created in the publishing pipeline' + }) }), beat_cluster_output_events_total: new BeatsEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.output.events.total', - title: 'Events Rate', - label: 'Emitted', - description: 'Events processed by the output (including retries)' + title: eventsRateTitle, + label: i18n.translate('xpack.monitoring.metrics.beats.eventsRate.emittedLabel', { + defaultMessage: 'Emitted' + }), + description: i18n.translate('xpack.monitoring.metrics.beats.eventsRate.emittedDescription', { + defaultMessage: 'Events processed by the output (including retries)' + }) }), beat_cluster_output_events_ack_rate: new BeatsEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.output.events.acked', - title: 'Events Rate', - label: 'Acknowledged', - description: - 'Events acknowledged by the output (includes events dropped by the output)' + title: eventsRateTitle, + label: i18n.translate('xpack.monitoring.metrics.beats.eventsRate.acknowledgedLabel', { + defaultMessage: 'Acknowledged' + }), + description: i18n.translate('xpack.monitoring.metrics.beats.eventsRate.acknowledgedDescription', { + defaultMessage: 'Events acknowledged by the output (includes events dropped by the output)' + }) }), beat_cluster_pipeline_events_emitted_rate: new BeatsEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.pipeline.events.published', - title: 'Events Rate', - label: 'Queued', - description: 'Events added to the event pipeline queue' + title: eventsRateTitle, + label: i18n.translate('xpack.monitoring.metrics.beats.eventsRate.queuedLabel', { + defaultMessage: 'Queued' + }), + description: i18n.translate('xpack.monitoring.metrics.beats.eventsRate.queuedDescription', { + defaultMessage: 'Events added to the event pipeline queue' + }) }), beat_cluster_output_write_bytes_rate: new BeatsByteRateClusterMetric({ field: 'beats_stats.metrics.libbeat.output.write.bytes', - title: 'Throughput', - label: 'Bytes Sent', - description: - 'Bytes written to the output (consists of size of network headers and compressed payload)' + title: throughputTitle, + label: i18n.translate('xpack.monitoring.metrics.beats.throughput.bytesSentLabel', { + defaultMessage: 'Bytes Sent' + }), + description: i18n.translate('xpack.monitoring.metrics.beats.throughput.bytesSentDescription', { + defaultMessage: 'Bytes written to the output (consists of size of network headers and compressed payload)' + }) }), beat_cluster_output_read_bytes_rate: new BeatsByteRateClusterMetric({ field: 'beats_stats.metrics.libbeat.output.read.bytes', - title: 'Throughput', - label: 'Bytes Received', - description: 'Bytes read in response from the output' + title: throughputTitle, + label: i18n.translate('xpack.monitoring.metrics.beats.throughput.bytesReceivedLabel', { + defaultMessage: 'Bytes Received' + }), + description: i18n.translate('xpack.monitoring.metrics.beats.throughput.bytesReceivedDescription', { + defaultMessage: 'Bytes read in response from the output' + }), }), beat_cluster_pipeline_events_failed_rate: new BeatsEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.pipeline.events.failed', - title: 'Fail Rates', - label: 'Failed in Pipeline', - description: - 'Failures that happened before event was added to the publishing pipeline (output was disabled or publisher client closed)' + title: failRatesTitle, + label: i18n.translate('xpack.monitoring.metrics.beats.failRates.failedInPipelineLabel', { + defaultMessage: 'Failed in Pipeline' + }), + description: i18n.translate('xpack.monitoring.metrics.beats.failRates.failedInPipelineDescription', { + defaultMessage: + 'Failures that happened before event was added to the publishing pipeline (output was disabled or publisher client closed)' + }) }), beat_cluster_pipeline_events_dropped_rate: new BeatsEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.pipeline.events.dropped', - title: 'Fail Rates', - label: 'Dropped in Pipeline', - description: - 'Events that have been dropped after N retries (N = max_retries setting)' + title: failRatesTitle, + label: i18n.translate('xpack.monitoring.metrics.beats.failRates.droppedInPipelineLabel', { + defaultMessage: 'Dropped in Pipeline' + }), + description: i18n.translate('xpack.monitoring.metrics.beats.failRates.droppedInPipelineDescription', { + defaultMessage: 'Events that have been dropped after N retries (N = max_retries setting)' + }) }), beat_cluster_output_events_dropped_rate: new BeatsEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.output.events.dropped', - title: 'Fail Rates', - label: 'Dropped in Output', - description: - '(Fatal drop) Events dropped by the output as being "invalid." The output ' + - 'still acknowledges the event for the Beat to remove it from the queue.' + title: failRatesTitle, + label: i18n.translate('xpack.monitoring.metrics.beats.failRates.droppedInOutputLabel', { + defaultMessage: 'Dropped in Output' + }), + description: i18n.translate('xpack.monitoring.metrics.beats.failRates.droppedInOutputDescription', { + defaultMessage: '(Fatal drop) Events dropped by the output as being "invalid." The output still acknowledges the event ' + + 'for the Beat to remove it from the queue.' + }) }), beat_cluster_pipeline_events_retry_rate: new BeatsEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.pipeline.events.retry', - title: 'Fail Rates', - label: 'Retry in Pipeline', - description: - 'Events in the pipeline that are trying again to be sent to the output' + title: failRatesTitle, + label: i18n.translate('xpack.monitoring.metrics.beats.failRates.retryInPipelineLabel', { + defaultMessage: 'Retry in Pipeline' + }), + description: i18n.translate('xpack.monitoring.metrics.beats.failRates.retryInPipelineDescription', { + defaultMessage: 'Events in the pipeline that are trying again to be sent to the output' + }) }), beat_cluster_output_sending_errors: new BeatsEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.output.write.errors', - title: 'Output Errors', - label: 'Sending', - description: 'Errors in writing the response from the output' + title: outputErrorsTitle, + label: i18n.translate('xpack.monitoring.metrics.beats.outputErrors.sendingLabel', { + defaultMessage: 'Sending' + }), + description: i18n.translate('xpack.monitoring.metrics.beats.outputErrors.sendingDescription', { + defaultMessage: 'Errors in writing the response from the output' + }) }), beat_cluster_output_receiving_errors: new BeatsEventsRateClusterMetric({ field: 'beats_stats.metrics.libbeat.output.read.errors', - title: 'Output Errors', - label: 'Receiving', - description: 'Errors in reading the response from the output' + title: outputErrorsTitle, + label: i18n.translate('xpack.monitoring.metrics.beats.outputErrors.receivingLabel', { + defaultMessage: 'Receiving' + }), + description: i18n.translate('xpack.monitoring.metrics.beats.outputErrors.receivingDescription', { + defaultMessage: 'Errors in reading the response from the output' + }) }), /* @@ -104,147 +179,218 @@ export const metrics = { beat_pipeline_events_total_rate: new BeatsEventsRateMetric({ field: 'beats_stats.metrics.libbeat.pipeline.events.total', - title: 'Events Rate', - label: 'New', - description: 'New events sent to the publishing pipeline' + title: instanceEventsRateTitle, + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.eventsRate.newLabel', { + defaultMessage: 'New' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.eventsRate.newDescription', { + defaultMessage: 'New events sent to the publishing pipeline' + }) }), beat_output_events_total: new BeatsEventsRateMetric({ field: 'beats_stats.metrics.libbeat.output.events.total', - title: 'Events Rate', - label: 'Emitted', - description: 'Events processed by the output (including retries)' + title: instanceEventsRateTitle, + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.eventsRate.emittedLabel', { + defaultMessage: 'Emitted' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.eventsRate.emittedDescription', { + defaultMessage: 'Events processed by the output (including retries)' + }) }), beat_output_events_ack_rate: new BeatsEventsRateMetric({ field: 'beats_stats.metrics.libbeat.output.events.acked', - title: 'Events Rate', - label: 'Acknowledged', - description: - 'Events acknowledged by the output (includes events dropped by the output)' + title: instanceEventsRateTitle, + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.eventsRate.acknowledgedLabel', { + defaultMessage: 'Acknowledged' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.eventsRate.acknowledgedDescription', { + defaultMessage: 'Events acknowledged by the output (includes events dropped by the output)' + }) }), beat_pipeline_events_emitted_rate: new BeatsEventsRateMetric({ field: 'beats_stats.metrics.libbeat.pipeline.events.published', - title: 'Events Rate', - label: 'Queued', - description: 'Events added to the event pipeline queue' + title: instanceEventsRateTitle, + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.eventsRate.queuedLabel', { + defaultMessage: 'Queued' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.eventsRate.queuedDescription', { + defaultMessage: 'Events added to the event pipeline queue' + }) }), beat_pipeline_events_failed_rate: new BeatsEventsRateMetric({ field: 'beats_stats.metrics.libbeat.pipeline.events.failed', - title: 'Fail Rates', - label: 'Failed in Pipeline', - description: - 'Failures that happened before event was added to the publishing pipeline (output was disabled or publisher client closed)' + title: instanceFailRatesTitle, + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.failRates.failedInPipelineLabel', { + defaultMessage: 'Failed in Pipeline' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.failRates.failedInPipelineDescription', { + defaultMessage: + 'Failures that happened before event was added to the publishing pipeline (output was disabled or publisher client closed)' + }) }), beat_pipeline_events_dropped_rate: new BeatsEventsRateMetric({ field: 'beats_stats.metrics.libbeat.pipeline.events.dropped', - title: 'Fail Rates', - label: 'Dropped in Pipeline', - description: - 'Events that have been dropped after N retries (N = max_retries setting)' + title: instanceFailRatesTitle, + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.failRates.droppedInPipelineLabel', { + defaultMessage: 'Dropped in Pipeline' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.failRates.droppedInPipelineDescription', { + defaultMessage: 'Events that have been dropped after N retries (N = max_retries setting)' + }) }), beat_output_events_dropped_rate: new BeatsEventsRateMetric({ field: 'beats_stats.metrics.libbeat.output.events.dropped', - title: 'Fail Rates', - label: 'Dropped in Output', - description: - '(Fatal drop) Events dropped by the output as being "invalid." The output ' + - 'still acknowledges the event for the Beat to remove it from the queue.' + title: instanceFailRatesTitle, + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.failRates.droppedInOutputLabel', { + defaultMessage: 'Dropped in Output' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.failRates.droppedInOutputDescription', { + defaultMessage: '(Fatal drop) Events dropped by the output as being "invalid." The output ' + + 'still acknowledges the event for the Beat to remove it from the queue.' + }) }), beat_pipeline_events_retry_rate: new BeatsEventsRateMetric({ field: 'beats_stats.metrics.libbeat.pipeline.events.retry', - title: 'Fail Rates', - label: 'Retry in Pipeline', - description: - 'Events in the pipeline that are trying again to be sent to the output' + title: instanceFailRatesTitle, + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.failRates.retryInPipelineLabel', { + defaultMessage: 'Retry in Pipeline' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.failRates.retryInPipelineDescription', { + defaultMessage: 'Events in the pipeline that are trying again to be sent to the output' + }) }), beat_bytes_written: new BeatsByteRateMetric({ field: 'beats_stats.metrics.libbeat.output.write.bytes', - title: 'Throughput', - label: 'Bytes Sent', - description: - 'Bytes written to the output (consists of size of network headers and compressed payload)' + title: instanceThroughputTitle, + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.throughput.bytesSentLabel', { + defaultMessage: 'Bytes Sent' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.throughput.bytesSentDescription', { + defaultMessage: 'Bytes written to the output (consists of size of network headers and compressed payload)' + }) }), beat_output_write_bytes_rate: new BeatsByteRateMetric({ field: 'beats_stats.metrics.libbeat.output.read.bytes', - title: 'Throughput', - label: 'Bytes Received', - description: 'Bytes read in response from the output' + title: instanceThroughputTitle, + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.throughput.bytesReceivedLabel', { + defaultMessage: 'Bytes Received' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.throughput.bytesReceivedDescription', { + defaultMessage: 'Bytes read in response from the output' + }) }), beat_output_sending_errors: new BeatsEventsRateMetric({ field: 'beats_stats.metrics.libbeat.output.write.errors', - title: 'Output Errors', - label: 'Sending', - description: 'Errors in writing the response from the output' + title: instanceOutputErrorsTitle, + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.outputErrors.sendingLabel', { + defaultMessage: 'Sending' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.outputErrors.sendingDescription', { + defaultMessage: 'Errors in writing the response from the output' + }) }), beat_output_receiving_errors: new BeatsEventsRateMetric({ field: 'beats_stats.metrics.libbeat.output.read.errors', - title: 'Output Errors', - label: 'Receiving', - description: 'Errors in reading the response from the output' + title: instanceOutputErrorsTitle, + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.outputErrors.receivingLabel', { + defaultMessage: 'Receiving' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.outputErrors.receivingDescription', { + defaultMessage: 'Errors in reading the response from the output' + }) }), beat_mem_alloc: new BeatsMetric({ field: 'beats_stats.metrics.beat.memstats.memory_alloc', - label: 'Active', - title: 'Memory', - description: 'Private memory in active use by the Beat', + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.memory.activeLabel', { + defaultMessage: 'Active' + }), + title: instanceMemoryTitle, + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.memory.activeDescription', { + defaultMessage: 'Private memory in active use by the Beat' + }), format: LARGE_BYTES, metricAgg: 'max', units: 'B' }), beat_mem_rss: new BeatsMetric({ field: 'beats_stats.metrics.beat.memstats.rss', - label: 'Process Total', - title: 'Memory', - description: 'Resident set size of memory reserved by the Beat from the OS', + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.memory.processTotalLabel', { + defaultMessage: 'Process Total' + }), + title: instanceMemoryTitle, + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.memory.processTotalDescription', { + defaultMessage: 'Resident set size of memory reserved by the Beat from the OS' + }), format: LARGE_BYTES, metricAgg: 'max', units: 'B' }), beat_mem_gc_next: new BeatsMetric({ field: 'beats_stats.metrics.beat.memstats.gc_next', - label: 'GC Next', - title: 'Memory', - description: - 'Limit of allocated memory at which garbage collection will occur', + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.memory.gcNextLabel', { + defaultMessage: 'GC Next' + }), + title: instanceMemoryTitle, + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.memory.gcNextDescription', { + defaultMessage: 'Limit of allocated memory at which garbage collection will occur' + }), format: LARGE_BYTES, metricAgg: 'max', units: 'B' }), beat_cpu_utilization: new BeatsCpuUtilizationMetric({ - title: 'CPU Utilization', - label: 'Total', - description: - 'Percentage of CPU time spent executing (user+kernel mode) for the Beat process', + title: i18n.translate('xpack.monitoring.metrics.beatsInstance.cpuUtilizationTitle', { + defaultMessage: 'CPU Utilization' + }), + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.cpuUtilization.totalLabel', { + defaultMessage: 'Total' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.cpuUtilization.totalDescription', { + defaultMessage: 'Percentage of CPU time spent executing (user+kernel mode) for the Beat process' + }), field: 'beats_stats.metrics.beat.cpu.total.value' }), beat_system_os_load_1: new BeatsMetric({ field: 'beats_stats.metrics.system.load.1', - label: '1m', - title: 'System Load', - description: 'Load average over the last 1 minute', + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.systemLoad.last1MinuteLabel', { + defaultMessage: '1m' + }), + title: instanceSystemLoadTitle, + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.systemLoad.last1MinuteDescription', { + defaultMessage: 'Load average over the last 1 minute' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' }), beat_system_os_load_5: new BeatsMetric({ field: 'beats_stats.metrics.system.load.5', - label: '5m', - title: 'System Load', - description: 'Load average over the last 5 minutes', + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.systemLoad.last5MinutesLabel', { + defaultMessage: '5m' + }), + title: instanceSystemLoadTitle, + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.systemLoad.last5MinutesDescription', { + defaultMessage: 'Load average over the last 5 minutes' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' }), beat_system_os_load_15: new BeatsMetric({ field: 'beats_stats.metrics.system.load.15', - label: '15m', - title: 'System Load', - description: 'Load average over the last 15 minutes', + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.systemLoad.last15MinutesLabel', { + defaultMessage: '15m' + }), + title: instanceSystemLoadTitle, + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.systemLoad.last15MinutesDescription', { + defaultMessage: 'Load average over the last 15 minutes' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' @@ -252,9 +398,15 @@ export const metrics = { beat_handles_open: new BeatsMetric({ field: 'beats_stats.metrics.beat.handles.open', - label: 'Open Handles', - title: 'Open Handles', - description: 'Count of open file handlers', + label: i18n.translate('xpack.monitoring.metrics.beatsInstance.openHandlesTitle', { + defaultMessage: 'Open Handles' + }), + title: i18n.translate('xpack.monitoring.metrics.beatsInstance.openHandlesLabel', { + defaultMessage: 'Open Handles' + }), + description: i18n.translate('xpack.monitoring.metrics.beatsInstance.openHandlesDescription', { + defaultMessage: 'Count of open file handlers' + }), format: SMALL_FLOAT, metricAgg: 'max', units: '', diff --git a/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/classes.js b/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/classes.js index 244579153867..d952ad332283 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/classes.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/classes.js @@ -12,6 +12,7 @@ import { SMALL_BYTES } from '../../../../common/formatting'; import { NORMALIZED_DERIVATIVE_UNIT } from '../../../../common/constants'; +import { i18n } from '@kbn/i18n'; export class ElasticsearchMetric extends Metric { constructor(opts) { @@ -70,7 +71,9 @@ export class LatencyMetric extends ElasticsearchMetric { ...opts, format: LARGE_FLOAT, metricAgg: 'sum', // NOTE: this is used for a pointless aggregation - units: 'ms' + units: i18n.translate('xpack.monitoring.metrics.es.msTimeUnitLabel', { + defaultMessage: 'ms' + }) }); this.checkRequiredParams({ @@ -85,7 +88,9 @@ export class LatencyMetric extends ElasticsearchMetric { metricField = 'search.query'; } else { throw new Error( - 'Latency metric param must be a string equal to `index` or `query`' + i18n.translate('xpack.monitoring.metrics.es.latencyMetricParamErrorMessage', { + defaultMessage: 'Latency metric param must be a string equal to `index` or `query`' + }) ); } @@ -139,7 +144,9 @@ export class RequestRateMetric extends ElasticsearchMetric { derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: '/s' + units: i18n.translate('xpack.monitoring.metrics.es.perSecondsUnitLabel', { + defaultMessage: '/s' + }) }); } } @@ -329,7 +336,9 @@ export class MillisecondsToSecondsMetric extends ElasticsearchMetric { constructor(opts) { super({ ...opts, - units: 's', + units: i18n.translate('xpack.monitoring.metrics.es.secondsUnitLabel', { + defaultMessage: 's' + }) }); this.calculation = bucket => { diff --git a/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.js b/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.js index 8b62c92e4d02..1cf8fd939086 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.js @@ -26,117 +26,234 @@ import { LARGE_BYTES, LARGE_ABBREVIATED } from '../../../../common/formatting'; +import { i18n } from '@kbn/i18n'; + +const indexingRateTitle = i18n.translate('xpack.monitoring.metrics.es.indexingRateTitle', { + defaultMessage: 'Indexing Rate' // title to use for the chart +}); +const nodeLatencyTitle = i18n.translate('xpack.monitoring.metrics.esNode.latencyTitle', { + defaultMessage: 'Latency' +}); +const indexRequestTimeTitle = i18n.translate('xpack.monitoring.metrics.esIndex.requestTimeTitle', { + defaultMessage: 'Request Time' +}); +const indexIndexingRateTitle = i18n.translate('xpack.monitoring.metrics.esIndex.indexingRateTitle', { + defaultMessage: 'Indexing Rate' +}); +const indexSegmentCountTitle = i18n.translate('xpack.monitoring.metrics.esIndex.segmentCountTitle', { + defaultMessage: 'Segment Count' +}); +const indexDiskTitle = i18n.translate('xpack.monitoring.metrics.esIndex.diskTitle', { + defaultMessage: 'Disk' +}); +const indexRefreshTimeTitle = i18n.translate('xpack.monitoring.metrics.esIndex.refreshTimeTitle', { + defaultMessage: 'Refresh Time' +}); +const indexThrottleTimeTitle = i18n.translate('xpack.monitoring.metrics.esIndex.throttleTimeTitle', { + defaultMessage: 'Throttle Time' +}); +const nodeCgroupCfsStats = i18n.translate('xpack.monitoring.metrics.esNode.cgroupCfsStatsTitle', { + defaultMessage: 'Cgroup CFS Stats' +}); +const nodeCgroupCpuPerformance = i18n.translate('xpack.monitoring.metrics.esNode.cgroupCpuPerformanceTitle', { + defaultMessage: 'Cgroup CPU Performance' +}); +const nodeCpuUtilizationLabel = i18n.translate('xpack.monitoring.metrics.esNode.cpuUtilizationLabel', { + defaultMessage: 'CPU Utilization' +}); +const nodeGcCount = i18n.translate('xpack.monitoring.metrics.esNode.gsCountTitle', { + defaultMessage: 'GC Count' +}); +const nodeGcDuration = i18n.translate('xpack.monitoring.metrics.esNode.gsDurationTitle', { + defaultMessage: 'GC Duration' +}); +const nodeJvmHeap = i18n.translate('xpack.monitoring.metrics.esNode.jvmHeapTitle', { + defaultMessage: '{javaVirtualMachine} Heap', + values: { javaVirtualMachine: 'JVM' } +}); +const nodeUsedHeapLabel = i18n.translate('xpack.monitoring.metrics.esNode.jvmHeap.usedHeapLabel', { + defaultMessage: 'Used Heap' +}); +const nodeUsedHeapDescription = i18n.translate('xpack.monitoring.metrics.esNode.jvmHeap.usedHeapDescription', { + defaultMessage: 'Total heap used by Elasticsearch running in the JVM.' +}); +const nodeReadThreads = i18n.translate('xpack.monitoring.metrics.esNode.readThreadsTitle', { + defaultMessage: 'Read Threads' +}); +const nodeIndexingThreads = i18n.translate('xpack.monitoring.metrics.esNode.indexingThreadsTitle', { + defaultMessage: 'Indexing Threads' +}); +const msTimeUnitLabel = i18n.translate('xpack.monitoring.metrics.es.msTimeUnitLabel', { + defaultMessage: 'ms' +}); +const nsTimeUnitLabel = i18n.translate('xpack.monitoring.metrics.es.nsTimeUnitLabel', { + defaultMessage: 'ns' +}); +const perSecondUnitLabel = i18n.translate('xpack.monitoring.metrics.es.perSecondTimeUnitLabel', { + defaultMessage: '/s' +}); export const metrics = { cluster_index_request_rate_primary: new RequestRateMetric({ - title: 'Indexing Rate', // title to use for the chart - label: 'Primary Shards', // label to use for this line in the chart + title: indexingRateTitle, // title to use for the chart + label: i18n.translate('xpack.monitoring.metrics.es.indexingRate.primaryShardsLabel', { + defaultMessage: 'Primary Shards' // label to use for this line in the chart + }), field: 'indices_stats._all.primaries.indexing.index_total', - description: 'Number of documents being indexed for primary shards.', + description: i18n.translate('xpack.monitoring.metrics.es.indexingRate.primaryShardsDescription', { + defaultMessage: 'Number of documents being indexed for primary shards.' + }), type: 'index' }), cluster_index_request_rate_total: new RequestRateMetric({ field: 'indices_stats._all.total.indexing.index_total', - title: 'Indexing Rate', - label: 'Total Shards', - description: - 'Number of documents being indexed for primary and replica shards.', + title: indexingRateTitle, + label: i18n.translate('xpack.monitoring.metrics.es.indexingRate.totalShardsLabel', { + defaultMessage: 'Total Shards' + }), + description: i18n.translate('xpack.monitoring.metrics.es.indexingRate.totalShardsDescription', { + defaultMessage: 'Number of documents being indexed for primary and replica shards.' + }), type: 'index' }), cluster_search_request_rate: new RequestRateMetric({ field: 'indices_stats._all.total.search.query_total', - title: 'Search Rate', - label: 'Total Shards', - description: - 'Number of search requests being executed across primary and replica shards. A single search can run against multiple shards!', // eslint-disable-line max-len + title: i18n.translate('xpack.monitoring.metrics.es.searchRateTitle', { + defaultMessage: 'Search Rate' + }), + label: i18n.translate('xpack.monitoring.metrics.es.searchRate.totalShardsLabel', { + defaultMessage: 'Total Shards' + }), + description: i18n.translate('xpack.monitoring.metrics.es.searchRate.totalShardsDescription', { + defaultMessage: + 'Number of search requests being executed across primary and replica shards. A single search can run against multiple shards!' + }), type: 'cluster' }), cluster_index_latency: new LatencyMetric({ metric: 'index', fieldSource: 'indices_stats._all.primaries', field: 'indices_stats._all.primaries.indexing.index_total', - label: 'Indexing Latency', - description: - 'Average latency for indexing documents, which is time it takes to index documents divided by number that were indexed. This only considers primary shards.', // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.es.indexingLatencyLabel', { + defaultMessage: 'Indexing Latency' + }), + description: i18n.translate('xpack.monitoring.metrics.es.indexingLatencyDescription', { + defaultMessage: 'Average latency for indexing documents, which is time it takes to index documents divided by number ' + + 'that were indexed. This only considers primary shards.' + }), type: 'cluster' }), node_index_latency: new LatencyMetric({ metric: 'index', fieldSource: 'node_stats.indices', field: 'node_stats.indices.indexing.index_total', - title: 'Latency', - label: 'Indexing', - description: - 'Average latency for indexing documents, which is time it takes to index documents divided by number that were indexed. This considers any shard located on this node, including replicas.', // eslint-disable-line max-len + title: nodeLatencyTitle, + label: i18n.translate('xpack.monitoring.metrics.esNode.latency.indexingLabel', { + defaultMessage: 'Indexing' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.latency.indexingDescription', { + defaultMessage: 'Average latency for indexing documents, which is time it takes to index documents divided by number ' + + 'that were indexed. This considers any shard located on this node, including replicas.' + }), type: 'node' }), index_index_latency: new LatencyMetric({ metric: 'index', fieldSource: 'index_stats.primaries', field: 'index_stats.primaries.indexing.index_total', - title: 'Latency', - label: 'Indexing Latency', - description: - 'Average latency for indexing documents, which is time it takes to index documents divided by number that were indexed. This only considers primary shards.', // eslint-disable-line max-len + title: i18n.translate('xpack.monitoring.metrics.esIndex.latencyTitle', { + defaultMessage: 'Latency' + }), + label: i18n.translate('xpack.monitoring.metrics.esIndex.latency.indexingLatencyLabel', { + defaultMessage: 'Indexing Latency' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.latency.indexingLatencyDescription', { + defaultMessage: 'Average latency for indexing documents, which is time it takes to index documents divided by number ' + + 'that were indexed. This only considers primary shards.' + }), type: 'cluster' }), cluster_query_latency: new LatencyMetric({ metric: 'query', fieldSource: 'indices_stats._all.total', field: 'indices_stats._all.total.search.query_total', - label: 'Search Latency', - description: - 'Average latency for searching, which is time it takes to execute searches divided by number of searches submitted. This considers primary and replica shards.', // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.es.searchLatencyLabel', { + defaultMessage: 'Search Latency' + }), + description: i18n.translate('xpack.monitoring.metrics.es.searchLatencyDescription', { + defaultMessage: 'Average latency for searching, which is time it takes to execute searches divided by number of ' + + 'searches submitted. This considers primary and replica shards.' + }), type: 'cluster' }), node_query_latency: new LatencyMetric({ metric: 'query', fieldSource: 'node_stats.indices', field: 'node_stats.indices.search.query_total', - title: 'Latency', - label: 'Search', - description: - 'Average latency for searching, which is time it takes to execute searches divided by number of searches submitted. This considers primary and replica shards.', // eslint-disable-line max-len + title: nodeLatencyTitle, + label: i18n.translate('xpack.monitoring.metrics.esNode.latency.searchLabel', { + defaultMessage: 'Search' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.latency.searchDescription', { + defaultMessage: 'Average latency for searching, which is time it takes to execute searches divided by number of searches ' + + 'submitted. This considers primary and replica shards.' + }), type: 'node' }), index_query_latency: new LatencyMetric({ metric: 'query', fieldSource: 'index_stats.total', field: 'index_stats.total.search.query_total', - label: 'Search Latency', - description: - 'Average latency for searching, which is time it takes to execute searches divided by number of searches submitted. This considers primary and replica shards.', // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.esIndex.latency.searchLatencyLabel', { + defaultMessage: 'Search Latency' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.latency.searchLatencyDescription', { + defaultMessage: 'Average latency for searching, which is time it takes to execute searches divided by number of searches ' + + 'submitted. This considers primary and replica shards.' + }), type: 'cluster' }), index_indexing_primaries_time: new ElasticsearchMetric({ field: 'index_stats.primaries.indexing.index_time_in_millis', - title: 'Request Time', - label: 'Indexing (Primaries)', - description: - 'Amount of time spent performing index operations on primary shards only.', + title: indexRequestTimeTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.requestTime.indexingPrimariesLabel', { + defaultMessage: 'Indexing (Primaries)' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.requestTime.indexingPrimariesDescription', { + defaultMessage: 'Amount of time spent performing index operations on primary shards only.' + }), type: 'index', derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), index_indexing_total_time: new ElasticsearchMetric({ field: 'index_stats.total.indexing.index_time_in_millis', - title: 'Request Time', - label: 'Indexing', - description: - 'Amount of time spent performing index operations on primary and replica shards.', + title: indexRequestTimeTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.requestTime.indexingLabel', { + defaultMessage: 'Indexing' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.requestTime.indexingDescription', { + defaultMessage: 'Amount of time spent performing index operations on primary and replica shards.' + }), type: 'index', derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), index_indexing_total: new ElasticsearchMetric({ field: 'index_stats.primaries.indexing.index_total', - title: 'Request Rate', - label: 'Index Total', - description: 'Amount of indexing operations.', + title: i18n.translate('xpack.monitoring.metrics.esIndex.requestRateTitle', { + defaultMessage: 'Request Rate' + }), + label: i18n.translate('xpack.monitoring.metrics.esIndex.requestRate.indexTotalLabel', { + defaultMessage: 'Index Total' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.requestRate.indexTotalDescription', { + defaultMessage: 'Amount of indexing operations.' + }), type: 'index', derivative: true, format: LARGE_FLOAT, @@ -145,146 +262,223 @@ export const metrics = { }), index_mem_overall: new SingleIndexMemoryMetric({ field: 'memory_in_bytes', - label: 'Lucene Total', - description: - 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards.' + label: i18n.translate('xpack.monitoring.metrics.esIndex.luceneTotalLabel', { + defaultMessage: 'Lucene Total' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.luceneTotalDescription', { + defaultMessage: 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards.' + }) }), index_mem_overall_1: new SingleIndexMemoryMetric({ field: 'memory_in_bytes', - title: 'Index Memory - Lucene 1', - label: 'Lucene Total', - description: - 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards.' + title: i18n.translate('xpack.monitoring.metrics.esIndex.indexMemoryLucene1Title', { + defaultMessage: 'Index Memory - Lucene 1' + }), + label: i18n.translate('xpack.monitoring.metrics.esIndex.indexMemoryLucene1.luceneTotalLabel', { + defaultMessage: 'Lucene Total' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.indexMemoryLucene1.luceneTotalDescription', { + defaultMessage: 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards.' + }) }), index_mem_overall_2: new SingleIndexMemoryMetric({ field: 'memory_in_bytes', - title: 'Index Memory - Lucene 2', - label: 'Lucene Total', - description: - 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards.' + title: i18n.translate('xpack.monitoring.metrics.esIndex.indexMemoryLucene2Title', { + defaultMessage: 'Index Memory - Lucene 2' + }), + label: i18n.translate('xpack.monitoring.metrics.esIndex.indexMemoryLucene2.luceneTotalLabel', { + defaultMessage: 'Lucene Total' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.indexMemoryLucene2.luceneTotalDescription', { + defaultMessage: 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards.' + }) }), index_mem_overall_3: new SingleIndexMemoryMetric({ field: 'memory_in_bytes', - title: 'Index Memory - Lucene 3', - label: 'Lucene Total', - description: - 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards.' + title: i18n.translate('xpack.monitoring.metrics.esIndex.indexMemoryLucene3Title', { + defaultMessage: 'Index Memory - Lucene 3' + }), + label: i18n.translate('xpack.monitoring.metrics.esIndex.indexMemoryLucene3.luceneTotalLabel', { + defaultMessage: 'Lucene Total' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.indexMemoryLucene3.luceneTotalDescription', { + defaultMessage: 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards.' + }) }), index_mem_doc_values: new SingleIndexMemoryMetric({ field: 'doc_values_memory_in_bytes', - label: 'Doc Values', - description: - 'Heap memory used by Doc Values. This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esIndex.docValuesLabel', { + defaultMessage: 'Doc Values' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.docValuesDescription', { + defaultMessage: 'Heap memory used by Doc Values. This is a part of Lucene Total.' + }) }), // Note: This is not segment memory, unlike SingleIndexMemoryMetrics index_mem_fielddata: new IndexMemoryMetric({ field: 'index_stats.total.fielddata.memory_size_in_bytes', - label: 'Fielddata', - description: - 'Heap memory used by Fielddata (e.g., global ordinals or explicitly enabled fielddata on text fields). This is for the same shards, but not a part of Lucene Total.', // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.esIndex.fielddataLabel', { + defaultMessage: 'Fielddata' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.fielddataDescription', { + defaultMessage: 'Heap memory used by Fielddata (e.g., global ordinals or explicitly enabled fielddata on text fields). ' + + 'This is for the same shards, but not a part of Lucene Total.' + }), type: 'index' }), index_mem_fixed_bit_set: new SingleIndexMemoryMetric({ field: 'fixed_bit_set_memory_in_bytes', - label: 'Fixed Bitsets', - description: - 'Heap memory used by Fixed Bit Sets (e.g., deeply nested documents). This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esIndex.fixedBitsetsLabel', { + defaultMessage: 'Fixed Bitsets' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.fixedBitsetsDescription', { + defaultMessage: 'Heap memory used by Fixed Bit Sets (e.g., deeply nested documents). This is a part of Lucene Total.' + }) }), index_mem_norms: new SingleIndexMemoryMetric({ field: 'norms_memory_in_bytes', - label: 'Norms', - description: - 'Heap memory used by Norms (normalization factors for query-time, text scoring). This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esIndex.normsLabel', { + defaultMessage: 'Norms' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.normsDescription', { + defaultMessage: 'Heap memory used by Norms (normalization factors for query-time, text scoring). This is a part of Lucene Total.' + }) }), index_mem_points: new SingleIndexMemoryMetric({ field: 'points_memory_in_bytes', - label: 'Points', - description: - 'Heap memory used by Points (e.g., numbers, IPs, and geo data). This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esIndex.pointsLabel', { + defaultMessage: 'Points' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.pointsDescription', { + defaultMessage: 'Heap memory used by Points (e.g., numbers, IPs, and geo data). This is a part of Lucene Total.' + }) }), // Note: This is not segment memory, unlike SingleIndexMemoryMetrics index_mem_query_cache: new IndexMemoryMetric({ field: 'index_stats.total.query_cache.memory_size_in_bytes', - title: 'Index Memory - Elasticsearch', - label: 'Query Cache', - description: - 'Heap memory used by Query Cache (e.g., cached filters). This is for the same shards, but not a part of Lucene Total.', + title: i18n.translate('xpack.monitoring.metrics.esIndex.indexMemoryEsTitle', { + defaultMessage: 'Index Memory - {elasticsearch}', + values: { elasticsearch: 'Elasticsearch' } + }), + label: i18n.translate('xpack.monitoring.metrics.esIndex.indexMemoryEs.queryCacheLabel', { + defaultMessage: 'Query Cache' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.indexMemoryEs.queryCacheDescription', { + defaultMessage: 'Heap memory used by Query Cache (e.g., cached filters). This is for the same shards, but not a part of Lucene Total.' + }), type: 'index' }), // Note: This is not segment memory, unlike SingleIndexMemoryMetrics index_mem_request_cache: new IndexMemoryMetric({ field: 'index_stats.total.request_cache.memory_size_in_bytes', - label: 'Request Cache', - description: - 'Heap memory used by Request Cache (e.g., instant aggregations). This is for the same shards, but not a part of Lucene Total.', // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.esIndex.requestCacheLabel', { + defaultMessage: 'Request Cache' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.requestCacheDescription', { + defaultMessage: + 'Heap memory used by Request Cache (e.g., instant aggregations). This is for the same shards, but not a part of Lucene Total.' + }), type: 'index' }), index_mem_stored_fields: new SingleIndexMemoryMetric({ field: 'stored_fields_memory_in_bytes', - label: 'Stored Fields', - description: - 'Heap memory used by Stored Fields (e.g., _source). This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esIndex.storedFieldsLabel', { + defaultMessage: 'Stored Fields' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.storedFieldsDescription', { + defaultMessage: 'Heap memory used by Stored Fields (e.g., _source). This is a part of Lucene Total.' + }) }), index_mem_term_vectors: new SingleIndexMemoryMetric({ field: 'term_vectors_memory_in_bytes', - label: 'Term Vectors', - description: - 'Heap memory used by Term Vectors. This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esIndex.termVectorsLabel', { + defaultMessage: 'Term Vectors' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.termVectorsDescription', { + defaultMessage: 'Heap memory used by Term Vectors. This is a part of Lucene Total.' + }) }), index_mem_terms: new SingleIndexMemoryMetric({ field: 'terms_memory_in_bytes', - label: 'Terms', - description: - 'Heap memory used by Terms (e.g., text). This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esIndex.termsLabel', { + defaultMessage: 'Terms' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.termsDescription', { + defaultMessage: 'Heap memory used by Terms (e.g., text). This is a part of Lucene Total.' + }) }), index_mem_versions: new SingleIndexMemoryMetric({ field: 'version_map_memory_in_bytes', - label: 'Version Map', - description: - 'Heap memory used by Versioning (e.g., updates and deletes). This is NOT a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esIndex.versionMapLabel', { + defaultMessage: 'Version Map' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.versionMapDescription', { + defaultMessage: 'Heap memory used by Versioning (e.g., updates and deletes). This is NOT a part of Lucene Total.' + }) }), index_mem_writer: new SingleIndexMemoryMetric({ field: 'index_writer_memory_in_bytes', - label: 'Index Writer', - description: - 'Heap memory used by the Index Writer. This is NOT a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esIndex.indexWriterLabel', { + defaultMessage: 'Index Writer' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.indexWriterDescription', { + defaultMessage: 'Heap memory used by the Index Writer. This is NOT a part of Lucene Total.' + }) }), index_request_rate_primary: new ElasticsearchMetric({ field: 'index_stats.primaries.indexing.index_total', - title: 'Indexing Rate', - label: 'Primary Shards', - description: 'Number of documents being indexed for primary shards.', + title: indexIndexingRateTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.indexingRate.primaryShardsLabel', { + defaultMessage: 'Primary Shards' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.indexingRate.primaryShardsDescription', { + defaultMessage: 'Number of documents being indexed for primary shards.' + }), format: LARGE_FLOAT, metricAgg: 'max', - units: '/s', + units: perSecondUnitLabel, type: 'index', derivative: true }), index_request_rate_total: new RequestRateMetric({ field: 'index_stats.total.indexing.index_total', - title: 'Indexing Rate', - label: 'Total Shards', - description: - 'Number of documents being indexed for primary and replica shards.', + title: indexIndexingRateTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.indexingRate.totalShardsLabel', { + defaultMessage: 'Total Shards' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.indexingRate.totalShardsDescription', { + defaultMessage: 'Number of documents being indexed for primary and replica shards.' + }), type: 'index' }), index_searching_time: new ElasticsearchMetric({ field: 'index_stats.total.search.query_time_in_millis', - title: 'Request Time', - label: 'Search', - description: - 'Amount of time spent performing search operations (per shard).', + title: i18n.translate('xpack.monitoring.metrics.esIndex.requestTimeTitle', { + defaultMessage: 'Request Time' + }), + label: i18n.translate('xpack.monitoring.metrics.esIndex.requestTime.searchLabel', { + defaultMessage: 'Search' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.requestTime.searchDescription', { + defaultMessage: 'Amount of time spent performing search operations (per shard).' + }), type: 'index', derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), index_searching_total: new ElasticsearchMetric({ field: 'index_stats.total.search.query_total', - title: 'Request Rate', - label: 'Search Total', - description: 'Amount of search operations (per shard).', + title: i18n.translate('xpack.monitoring.metrics.esIndex.requestRateTitle', { + defaultMessage: 'Request Rate' + }), + label: i18n.translate('xpack.monitoring.metrics.esIndex.requestRate.searchTotalLabel', { + defaultMessage: 'Search Total' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.requestRate.searchTotalDescription', { + defaultMessage: 'Amount of search operations (per shard).' + }), type: 'index', derivative: true, format: LARGE_FLOAT, @@ -293,9 +487,13 @@ export const metrics = { }), index_segment_count_primaries: new ElasticsearchMetric({ field: 'index_stats.primaries.segments.count', - title: 'Segment Count', - label: 'Primaries', - description: 'Number of segments for primary shards.', + title: indexSegmentCountTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.segmentCount.primariesLabel', { + defaultMessage: 'Primaries' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.segmentCount.primariesDescription', { + defaultMessage: 'Number of segments for primary shards.' + }), type: 'index', format: LARGE_FLOAT, metricAgg: 'max', @@ -303,9 +501,13 @@ export const metrics = { }), index_segment_count_total: new ElasticsearchMetric({ field: 'index_stats.total.segments.count', - title: 'Segment Count', - label: 'Total', - description: 'Number of segments for primary and replica shards.', + title: indexSegmentCountTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.segmentCount.totalLabel', { + defaultMessage: 'Total' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.segmentCount.totalDescription', { + defaultMessage: 'Number of segments for primary and replica shards.' + }), type: 'index', format: LARGE_FLOAT, metricAgg: 'max', @@ -313,9 +515,13 @@ export const metrics = { }), index_segment_merge_primaries_size: new ElasticsearchMetric({ field: 'index_stats.primaries.merges.total_size_in_bytes', - title: 'Disk', - label: 'Merges (Primaries)', - description: 'Size of merges on primary shards.', + title: indexDiskTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.disk.mergesPrimariesLabel', { + defaultMessage: 'Merges (Primaries)' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.disk.mergesPrimariesDescription', { + defaultMessage: 'Size of merges on primary shards.' + }), type: 'index', derivative: true, format: LARGE_BYTES, @@ -324,9 +530,13 @@ export const metrics = { }), index_segment_merge_total_size: new ElasticsearchMetric({ field: 'index_stats.total.merges.total_size_in_bytes', - title: 'Disk', - label: 'Merges', - description: 'Size of merges on primary and replica shards.', + title: indexDiskTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.disk.mergesLabel', { + defaultMessage: 'Merges' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.disk.mergesDescription', { + defaultMessage: 'Size of merges on primary and replica shards.' + }), type: 'index', derivative: true, format: LARGE_BYTES, @@ -335,57 +545,73 @@ export const metrics = { }), index_segment_refresh_primaries_time: new ElasticsearchMetric({ field: 'index_stats.primaries.refresh.total_time_in_millis', - title: 'Refresh Time', - label: 'Primaries', - description: - 'Amount of time spent to perform refresh operations on primary shards.', + title: indexRefreshTimeTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.refreshTime.primariesLabel', { + defaultMessage: 'Primaries' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.refreshTime.primariesDescription', { + defaultMessage: 'Amount of time spent to perform refresh operations on primary shards.' + }), type: 'index', derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), index_segment_refresh_total_time: new ElasticsearchMetric({ field: 'index_stats.total.refresh.total_time_in_millis', - title: 'Refresh Time', - label: 'Total', - description: - 'Amount of time spent to perform refresh operations on primary and replica shards.', + title: indexRefreshTimeTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.refreshTime.totalLabel', { + defaultMessage: 'Total' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.refreshTime.totalDescription', { + defaultMessage: 'Amount of time spent to perform refresh operations on primary and replica shards.' + }), type: 'index', derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), index_throttling_indexing_primaries_time: new ElasticsearchMetric({ field: 'index_stats.primaries.indexing.throttle_time_in_millis', - title: 'Throttle Time', - label: 'Indexing (Primaries)', - description: - 'Amount of time spent throttling index operations on primary shards.', + title: indexThrottleTimeTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.throttleTime.indexingPrimariesLabel', { + defaultMessage: 'Indexing (Primaries)' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.throttleTime.indexingPrimariesDescription', { + defaultMessage: 'Amount of time spent throttling index operations on primary shards.' + }), type: 'index', derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), index_throttling_indexing_total_time: new ElasticsearchMetric({ field: 'index_stats.total.indexing.throttle_time_in_millis', - title: 'Throttle Time', - label: 'Indexing', - description: - 'Amount of time spent throttling index operations on primary and replica shards.', + title: indexThrottleTimeTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.throttleTime.indexingLabel', { + defaultMessage: 'Indexing' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.throttleTime.indexingDescription', { + defaultMessage: 'Amount of time spent throttling index operations on primary and replica shards.' + }), type: 'index', derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), index_store_primaries_size: new ElasticsearchMetric({ field: 'index_stats.primaries.store.size_in_bytes', - title: 'Disk', - label: 'Store (Primaries)', - description: 'Size of primary shards on disk.', + title: indexDiskTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.disk.storePrimariesLabel', { + defaultMessage: 'Store (Primaries)' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.disk.storePrimariesDescription', { + defaultMessage: 'Size of primary shards on disk.' + }), type: 'index', derivative: false, format: LARGE_BYTES, @@ -394,9 +620,13 @@ export const metrics = { }), index_store_total_size: new ElasticsearchMetric({ field: 'index_stats.total.store.size_in_bytes', - title: 'Disk', - label: 'Store', - description: 'Size of primary and replica shards on disk.', + title: indexDiskTitle, + label: i18n.translate('xpack.monitoring.metrics.esIndex.disk.storeLabel', { + defaultMessage: 'Store' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.disk.storeDescription', { + defaultMessage: 'Size of primary and replica shards on disk.' + }), type: 'index', derivative: false, format: LARGE_BYTES, @@ -405,18 +635,28 @@ export const metrics = { }), search_request_rate: new RequestRateMetric({ field: 'index_stats.total.search.query_total', - title: 'Search Rate', - label: 'Total Shards', - description: - 'Number of search requests being executed across primary and replica shards. A single search can run against multiple shards!', // eslint-disable-line max-len + title: i18n.translate('xpack.monitoring.metrics.esIndex.searchRateTitle', { + defaultMessage: 'Search Rate' + }), + label: i18n.translate('xpack.monitoring.metrics.esIndex.searchRate.totalShardsLabel', { + defaultMessage: 'Total Shards' + }), + description: i18n.translate('xpack.monitoring.metrics.esIndex.searchRate.totalShardsDescription', { + defaultMessage: + 'Number of search requests being executed across primary and replica shards. A single search can run against multiple shards!' + }), type: 'cluster' }), node_cgroup_periods: new ElasticsearchMetric({ field: 'node_stats.os.cgroup.cpu.stat.number_of_elapsed_periods', - title: 'Cgroup CFS Stats', - label: 'Cgroup Elapsed Periods', - description: - 'The number of sampling periods from the Completely Fair Scheduler (CFS). Compare against the number of times throttled.', + title: nodeCgroupCfsStats, + label: i18n.translate('xpack.monitoring.metrics.esNode.cgroupCfsStats.cgroupElapsedPeriodsLabel', { + defaultMessage: 'Cgroup Elapsed Periods' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.cgroupCfsStats.cgroupElapsedPeriodsDescription', { + defaultMessage: + 'The number of sampling periods from the Completely Fair Scheduler (CFS). Compare against the number of times throttled.' + }), type: 'node', format: LARGE_FLOAT, metricAgg: 'max', @@ -425,22 +665,28 @@ export const metrics = { }), node_cgroup_throttled: new ElasticsearchMetric({ field: 'node_stats.os.cgroup.cpu.stat.time_throttled_nanos', - title: 'Cgroup CPU Performance', - label: 'Cgroup Throttling', - description: - 'The amount of throttled time, reported in nanoseconds, of the Cgroup.', + title: nodeCgroupCpuPerformance, + label: i18n.translate('xpack.monitoring.metrics.esNode.cgroupCpuPerformance.cgroupThrottlingLabel', { + defaultMessage: 'Cgroup Throttling' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.cgroupCpuPerformance.cgroupThrottlingDescription', { + defaultMessage: 'The amount of throttled time, reported in nanoseconds, of the Cgroup.' + }), type: 'node', format: LARGE_ABBREVIATED, metricAgg: 'max', derivative: true, - units: 'ns' + units: nsTimeUnitLabel }), node_cgroup_throttled_count: new ElasticsearchMetric({ field: 'node_stats.os.cgroup.cpu.stat.number_of_times_throttled', - title: 'Cgroup CFS Stats', - label: 'Cgroup Throttled Count', - description: - 'The number of times that the CPU was throttled by the Cgroup.', + title: nodeCgroupCfsStats, + label: i18n.translate('xpack.monitoring.metrics.esNode.cgroupCfsStats.cgroupThrottledCountLabel', { + defaultMessage: 'Cgroup Throttled Count' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.cgroupCfsStats.cgroupThrottledCountDescription', { + defaultMessage: 'The number of times that the CPU was throttled by the Cgroup.' + }), type: 'node', format: LARGE_FLOAT, metricAgg: 'max', @@ -449,15 +695,18 @@ export const metrics = { }), node_cgroup_usage: new ElasticsearchMetric({ field: 'node_stats.os.cgroup.cpuacct.usage_nanos', - title: 'Cgroup CPU Performance', - label: 'Cgroup Usage', - description: - 'The usage, reported in nanoseconds, of the Cgroup. Compare this with the throttling to discover issues.', + title: nodeCgroupCpuPerformance, + label: i18n.translate('xpack.monitoring.metrics.esNode.cgroupCpuPerformance.cgroupUsageLabel', { + defaultMessage: 'Cgroup Usage' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.cgroupCpuPerformance.cgroupUsageDescription', { + defaultMessage: 'The usage, reported in nanoseconds, of the Cgroup. Compare this with the throttling to discover issues.' + }), type: 'node', format: LARGE_ABBREVIATED, metricAgg: 'max', derivative: true, - units: 'ns' + units: nsTimeUnitLabel }), ...(() => { // CGroup CPU Utilization Fields @@ -470,27 +719,34 @@ export const metrics = { periodsField: 'cpu.stat.number_of_elapsed_periods', quotaField: 'cpu.cfs_quota_micros', field: 'node_stats.process.cpu.percent', // backup field if quota is not configured - label: 'Cgroup CPU Utilization', - description: - 'CPU Usage time compared to the CPU quota shown in percentage. If CPU ' + - 'quotas are not set, then no data will be shown.', + label: i18n.translate('xpack.monitoring.metrics.esNode.cpuUtilization.cgroupCpuUtilizationLabel', { + defaultMessage: 'Cgroup CPU Utilization' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.cpuUtilization.cgroupCpuUtilizationDescription', { + defaultMessage: + 'CPU Usage time compared to the CPU quota shown in percentage. If CPU quotas are not set, then no data will be shown.' + }), type: 'node' }; return { node_cgroup_quota: new QuotaMetric({ ...quotaMetricConfig, - title: 'CPU Utilization' + title: i18n.translate('xpack.monitoring.metrics.esNode.cpuUtilizationTitle', { + defaultMessage: 'CPU Utilization' + }) }), node_cgroup_quota_as_cpu_utilization: new QuotaMetric({ ...quotaMetricConfig, - label: 'CPU Utilization' // override the "Cgroup CPU..." label + label: nodeCpuUtilizationLabel // override the "Cgroup CPU..." label }) }; })(), node_cpu_utilization: new ElasticsearchMetric({ field: 'node_stats.process.cpu.percent', - label: 'CPU Utilization', - description: 'Percentage of CPU usage for the Elasticsearch process.', + label: nodeCpuUtilizationLabel, + description: i18n.translate('xpack.monitoring.metrics.esNode.cpuUtilizationDescription', { + defaultMessage: 'Percentage of CPU usage for the Elasticsearch process.' + }), type: 'node', format: LARGE_FLOAT, metricAgg: 'max', @@ -498,9 +754,12 @@ export const metrics = { }), node_segment_count: new ElasticsearchMetric({ field: 'node_stats.indices.segments.count', - label: 'Segment Count', - description: - 'Maximum segment count for primary and replica shards on this node.', + label: i18n.translate('xpack.monitoring.metrics.esNode.segmentCountLabel', { + defaultMessage: 'Segment Count' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.segmentCountDescription', { + defaultMessage: 'Maximum segment count for primary and replica shards on this node.' + }), type: 'node', format: LARGE_FLOAT, metricAgg: 'max', @@ -508,9 +767,13 @@ export const metrics = { }), node_jvm_gc_old_count: new ElasticsearchMetric({ field: 'node_stats.jvm.gc.collectors.old.collection_count', - title: 'GC Count', - label: 'Old', - description: 'Number of old Garbage Collections.', + title: nodeGcCount, + label: i18n.translate('xpack.monitoring.metrics.esNode.gcCount.oldLabel', { + defaultMessage: 'Old' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.gcCount.oldDescription', { + defaultMessage: 'Number of old Garbage Collections.' + }), derivative: true, format: SMALL_FLOAT, metricAgg: 'max', @@ -519,20 +782,28 @@ export const metrics = { }), node_jvm_gc_old_time: new ElasticsearchMetric({ field: 'node_stats.jvm.gc.collectors.old.collection_time_in_millis', - title: 'GC Duration', - label: 'Old', + title: nodeGcDuration, + label: i18n.translate('xpack.monitoring.metrics.esNode.gcDuration.oldLabel', { + defaultMessage: 'Old' + }), derivative: true, - description: 'Time spent performing old Garbage Collections.', + description: i18n.translate('xpack.monitoring.metrics.esNode.gcDuration.oldDescription', { + defaultMessage: 'Time spent performing old Garbage Collections.' + }), format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms', + units: msTimeUnitLabel, type: 'node' }), node_jvm_gc_young_count: new ElasticsearchMetric({ field: 'node_stats.jvm.gc.collectors.young.collection_count', - title: 'GC Count', - label: 'Young', - description: 'Number of young Garbage Collections.', + title: nodeGcCount, + label: i18n.translate('xpack.monitoring.metrics.esNode.gcCount.youngLabel', { + defaultMessage: 'Young' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.gcCount.youngDescription', { + defaultMessage: 'Number of young Garbage Collections.' + }), derivative: true, format: SMALL_FLOAT, metricAgg: 'max', @@ -541,20 +812,28 @@ export const metrics = { }), node_jvm_gc_young_time: new ElasticsearchMetric({ field: 'node_stats.jvm.gc.collectors.young.collection_time_in_millis', - title: 'GC Duration', - label: 'Young', - description: 'Time spent performing young Garbage Collections.', + title: nodeGcDuration, + label: i18n.translate('xpack.monitoring.metrics.esNode.gcDuration.youngLabel', { + defaultMessage: 'Young' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.gcDuration.youngDescription', { + defaultMessage: 'Time spent performing young Garbage Collections.' + }), derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms', + units: msTimeUnitLabel, type: 'node' }), node_jvm_mem_max_in_bytes: new ElasticsearchMetric({ field: 'node_stats.jvm.mem.heap_max_in_bytes', - title: 'JVM Heap', - label: 'Max Heap', - description: 'Total heap available to Elasticsearch running in the JVM.', + title: nodeJvmHeap, + label: i18n.translate('xpack.monitoring.metrics.esNode.jvmHeap.maxHeapLabel', { + defaultMessage: 'Max Heap' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.jvmHeap.maxHeapDescription', { + defaultMessage: 'Total heap available to Elasticsearch running in the JVM.' + }), type: 'node', format: SMALL_BYTES, metricAgg: 'max', @@ -562,9 +841,9 @@ export const metrics = { }), node_jvm_mem_used_in_bytes: new ElasticsearchMetric({ field: 'node_stats.jvm.mem.heap_used_in_bytes', - title: 'JVM Heap', - label: 'Used Heap', - description: 'Total heap used by Elasticsearch running in the JVM.', + title: nodeJvmHeap, + label: nodeUsedHeapLabel, + description: nodeUsedHeapDescription, type: 'node', format: SMALL_BYTES, metricAgg: 'max', @@ -572,9 +851,9 @@ export const metrics = { }), node_jvm_mem_percent: new ElasticsearchMetric({ field: 'node_stats.jvm.mem.heap_used_percent', - title: 'JVM Heap', - label: 'Used Heap', - description: 'Total heap used by Elasticsearch running in the JVM.', + title: nodeJvmHeap, + label: nodeUsedHeapLabel, + description: nodeUsedHeapDescription, type: 'node', format: LARGE_FLOAT, metricAgg: 'max', @@ -582,9 +861,15 @@ export const metrics = { }), node_load_average: new ElasticsearchMetric({ field: 'node_stats.os.cpu.load_average.1m', - title: 'System Load', - label: '1m', - description: 'Load average over the last minute.', + title: i18n.translate('xpack.monitoring.metrics.esNode.systemLoadTitle', { + defaultMessage: 'System Load' + }), + label: i18n.translate('xpack.monitoring.metrics.esNode.systemLoad.last1MinuteLabel', { + defaultMessage: '1m' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.systemLoad.last1MinuteDescription', { + defaultMessage: 'Load average over the last minute.' + }), type: 'node', format: LARGE_FLOAT, metricAgg: 'max', @@ -592,115 +877,182 @@ export const metrics = { }), node_index_mem_overall: new NodeIndexMemoryMetric({ field: 'memory_in_bytes', - label: 'Lucene Total', - description: - 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards on this node.' // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.esNode.luceneTotalLabel', { + defaultMessage: 'Lucene Total' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.luceneTotalDescription', { + defaultMessage: + 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards on this node.' + }) }), node_index_mem_overall_1: new NodeIndexMemoryMetric({ field: 'memory_in_bytes', - label: 'Lucene Total', - title: 'Index Memory - Lucene 1', - description: - 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards on this node.' // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.esNode.indexMemoryLucene1.lucenceTotalLabel', { + defaultMessage: 'Lucene Total' + }), + title: i18n.translate('xpack.monitoring.metrics.esNode.indexMemoryLucene1Title', { + defaultMessage: 'Index Memory - Lucene 1' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.indexMemoryLucene1.lucenceTotalDescription', { + defaultMessage: + 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards on this node.' + }) }), node_index_mem_overall_2: new NodeIndexMemoryMetric({ field: 'memory_in_bytes', - label: 'Lucene Total', - title: 'Index Memory - Lucene 2', - description: - 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards on this node.' // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.esNode.indexMemoryLucene2.lucenceTotalLabel', { + defaultMessage: 'Lucene Total' + }), + title: i18n.translate('xpack.monitoring.metrics.esNode.indexMemoryLucene2Title', { + defaultMessage: 'Index Memory - Lucene 2' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.indexMemoryLucene2.lucenceTotalDescription', { + defaultMessage: + 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards on this node.' + }) }), node_index_mem_overall_3: new NodeIndexMemoryMetric({ field: 'memory_in_bytes', - label: 'Lucene Total', - title: 'Index Memory - Lucene 3', - description: - 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards on this node.' // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.esNode.indexMemoryLucene3.lucenceTotalLabel', { + defaultMessage: 'Lucene Total' + }), + title: i18n.translate('xpack.monitoring.metrics.esNode.indexMemoryLucene3Title', { + defaultMessage: 'Index Memory - Lucene 3' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.indexMemoryLucene3.lucenceTotalDescription', { + defaultMessage: + 'Total heap memory used by Lucene for current index. This is the sum of other fields for primary and replica shards on this node.' + }) }), node_index_mem_doc_values: new NodeIndexMemoryMetric({ field: 'doc_values_memory_in_bytes', - label: 'Doc Values', - description: - 'Heap memory used by Doc Values. This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esNode.docValuesLabel', { + defaultMessage: 'Doc Values' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.docValuesDescription', { + defaultMessage: 'Heap memory used by Doc Values. This is a part of Lucene Total.' + }) }), // Note: This is not segment memory, unlike the rest of the SingleIndexMemoryMetrics node_index_mem_fielddata: new IndexMemoryMetric({ field: 'node_stats.indices.fielddata.memory_size_in_bytes', - label: 'Fielddata', - description: - 'Heap memory used by Fielddata (e.g., global ordinals or explicitly enabled fielddata on text fields). This is for the same shards, but not a part of Lucene Total.', // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.esNode.fielddataLabel', { + defaultMessage: 'Fielddata' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.fielddataDescription', { + defaultMessage: 'Heap memory used by Fielddata (e.g., global ordinals or explicitly enabled fielddata on text fields). ' + + 'This is for the same shards, but not a part of Lucene Total.' + }), type: 'node' }), node_index_mem_fixed_bit_set: new NodeIndexMemoryMetric({ field: 'fixed_bit_set_memory_in_bytes', - label: 'Fixed Bitsets', - description: - 'Heap memory used by Fixed Bit Sets (e.g., deeply nested documents). This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esNode.fixedBitsetsLabel', { + defaultMessage: 'Fixed Bitsets' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.fixedBitsetsDescription', { + defaultMessage: 'Heap memory used by Fixed Bit Sets (e.g., deeply nested documents). This is a part of Lucene Total.' + }) }), node_index_mem_norms: new NodeIndexMemoryMetric({ field: 'norms_memory_in_bytes', - label: 'Norms', - description: - 'Heap memory used by Norms (normalization factors for query-time, text scoring). This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esNode.normsLabel', { + defaultMessage: 'Norms' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.normsDescription', { + defaultMessage: 'Heap memory used by Norms (normalization factors for query-time, text scoring). This is a part of Lucene Total.' + }) }), node_index_mem_points: new NodeIndexMemoryMetric({ field: 'points_memory_in_bytes', - label: 'Points', - description: - 'Heap memory used by Points (e.g., numbers, IPs, and geo data). This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esNode.pointsLabel', { + defaultMessage: 'Points' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.pointsDescription', { + defaultMessage: 'Heap memory used by Points (e.g., numbers, IPs, and geo data). This is a part of Lucene Total.' + }) }), // Note: This is not segment memory, unlike SingleIndexMemoryMetrics node_index_mem_query_cache: new IndexMemoryMetric({ field: 'node_stats.indices.query_cache.memory_size_in_bytes', - label: 'Query Cache', - title: 'Index Memory - Elasticsearch', - description: - 'Heap memory used by Query Cache (e.g., cached filters). This is for the same shards, but not a part of Lucene Total.', + label: i18n.translate('xpack.monitoring.metrics.esNode.indexMemoryEs.queryCacheLabel', { + defaultMessage: 'Query Cache' + }), + title: i18n.translate('xpack.monitoring.metrics.esNode.indexMemoryEsTitle', { + defaultMessage: 'Index Memory - {elasticsearch}', + values: { elasticsearch: 'Elasticsearch' } + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.indexMemoryEs.queryCacheDescription', { + defaultMessage: 'Heap memory used by Query Cache (e.g., cached filters). This is for the same shards, but not a part of Lucene Total.' + }), type: 'node' }), // Note: This is not segment memory, unlike SingleIndexMemoryMetrics node_index_mem_request_cache: new IndexMemoryMetric({ field: 'node_stats.indices.request_cache.memory_size_in_bytes', - label: 'Request Cache', - description: - 'Heap memory used by Request Cache (e.g., instant aggregations). This is for the same shards, but not a part of Lucene Total.', // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.esNode.requestCacheLabel', { + defaultMessage: 'Request Cache' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.requestCacheDescription', { + defaultMessage: + 'Heap memory used by Request Cache (e.g., instant aggregations). This is for the same shards, but not a part of Lucene Total.' + }), type: 'node' }), node_index_mem_stored_fields: new NodeIndexMemoryMetric({ field: 'stored_fields_memory_in_bytes', - label: 'Stored Fields', - description: - 'Heap memory used by Stored Fields (e.g., _source). This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esNode.storedFieldsLabel', { + defaultMessage: 'Stored Fields' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.storedFieldsDescription', { + defaultMessage: 'Heap memory used by Stored Fields (e.g., _source). This is a part of Lucene Total.' + }) }), node_index_mem_term_vectors: new NodeIndexMemoryMetric({ field: 'term_vectors_memory_in_bytes', - label: 'Term Vectors', - description: - 'Heap memory used by Term Vectors. This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esNode.termVectorsLabel', { + defaultMessage: 'Term Vectors' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.termVectorsDescription', { + defaultMessage: 'Heap memory used by Term Vectors. This is a part of Lucene Total.' + }) }), node_index_mem_terms: new NodeIndexMemoryMetric({ field: 'terms_memory_in_bytes', - label: 'Terms', - description: - 'Heap memory used by Terms (e.g., text). This is a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esNode.termsLabel', { + defaultMessage: 'Terms' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.termsDescription', { + defaultMessage: 'Heap memory used by Terms (e.g., text). This is a part of Lucene Total.' + }) }), node_index_mem_versions: new NodeIndexMemoryMetric({ field: 'version_map_memory_in_bytes', - label: 'Version Map', - description: - 'Heap memory used by Versioning (e.g., updates and deletes). This is NOT a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esNode.versionMapLabel', { + defaultMessage: 'Version Map' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.versionMapDescription', { + defaultMessage: 'Heap memory used by Versioning (e.g., updates and deletes). This is NOT a part of Lucene Total.' + }) }), node_index_mem_writer: new NodeIndexMemoryMetric({ field: 'index_writer_memory_in_bytes', - label: 'Index Writer', - description: - 'Heap memory used by the Index Writer. This is NOT a part of Lucene Total.' + label: i18n.translate('xpack.monitoring.metrics.esNode.indexWriterLabel', { + defaultMessage: 'Index Writer' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.indexWriterDescription', { + defaultMessage: 'Heap memory used by the Index Writer. This is NOT a part of Lucene Total.' + }) }), node_index_threads_get_queue: new ElasticsearchMetric({ field: 'node_stats.thread_pool.get.queue', - title: 'Read Threads', - label: 'GET Queue', - description: 'Number of GET operations in the queue.', + title: nodeReadThreads, + label: i18n.translate('xpack.monitoring.metrics.esNode.readThreads.getQueueLabel', { + defaultMessage: 'GET Queue' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.readThreads.getQueueDescription', { + defaultMessage: 'Number of GET operations in the queue.' + }), type: 'node', derivative: true, format: LARGE_FLOAT, @@ -710,10 +1062,13 @@ export const metrics = { }), node_index_threads_get_rejected: new ElasticsearchMetric({ field: 'node_stats.thread_pool.get.rejected', - title: 'Read Threads', - label: 'GET Rejections', - description: - 'Number of GET operations that have been rejected, which occurs when the queue is full.', + title: nodeReadThreads, + label: i18n.translate('xpack.monitoring.metrics.esNode.readThreads.getRejectionsLabel', { + defaultMessage: 'GET Rejections' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.readThreads.getRejectionsDescription', { + defaultMessage: 'Number of GET operations that have been rejected, which occurs when the queue is full.' + }), type: 'node', derivative: true, format: LARGE_FLOAT, @@ -722,28 +1077,35 @@ export const metrics = { min: 0 }), node_index_threads_write_queue: new WriteThreadPoolQueueMetric({ - title: 'Indexing Threads', - label: 'Write Queue', - description: ( - 'Number of index, bulk, and write operations in the queue. ' + - 'The bulk threadpool was renamed to write in 6.3, and the index threadpool is deprecated.' - ), + title: nodeIndexingThreads, + label: i18n.translate('xpack.monitoring.metrics.esNode.indexingThreads.writeQueueLabel', { + defaultMessage: 'Write Queue' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.indexingThreads.writeQueueDescription', { + defaultMessage: 'Number of index, bulk, and write operations in the queue. ' + + 'The bulk threadpool was renamed to write in 6.3, and the index threadpool is deprecated.' + }) }), node_index_threads_write_rejected: new WriteThreadPoolRejectedMetric({ field: 'node_stats.thread_pool.bulk.rejected', - title: 'Indexing Threads', - label: 'Write Rejections', - description: ( - 'Number of index, bulk, and write operations that have been rejected, which occurs when the queue is full. ' + - 'The bulk threadpool was renamed to write in 6.3, and the index threadpool is deprecated.' - ), + title: nodeIndexingThreads, + label: i18n.translate('xpack.monitoring.metrics.esNode.indexingThreads.writeRejectionsLabel', { + defaultMessage: 'Write Rejections' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.indexingThreads.writeRejectionsDescription', { + defaultMessage: 'Number of index, bulk, and write operations that have been rejected, which occurs when the queue is full. ' + + 'The bulk threadpool was renamed to write in 6.3, and the index threadpool is deprecated.' + }) }), node_index_threads_search_queue: new ElasticsearchMetric({ field: 'node_stats.thread_pool.search.queue', - title: 'Read Threads', - label: 'Search Queue', - description: - 'Number of search operations in the queue (e.g., shard level searches).', + title: nodeReadThreads, + label: i18n.translate('xpack.monitoring.metrics.esNode.readThreads.searchQueueLabel', { + defaultMessage: 'Search Queue' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.readThreads.searchQueueDescription', { + defaultMessage: 'Number of search operations in the queue (e.g., shard level searches).' + }), type: 'node', derivative: true, format: LARGE_FLOAT, @@ -753,10 +1115,13 @@ export const metrics = { }), node_index_threads_search_rejected: new ElasticsearchMetric({ field: 'node_stats.thread_pool.search.rejected', - title: 'Read Threads', - label: 'Search Rejections', - description: - 'Number of search operations that have been rejected, which occurs when the queue is full.', + title: nodeReadThreads, + label: i18n.translate('xpack.monitoring.metrics.esNode.indexingThreads.searchRejectionsLabel', { + defaultMessage: 'Search Rejections' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.indexingThreads.searchRejectionsDescription', { + defaultMessage: 'Number of search operations that have been rejected, which occurs when the queue is full.' + }), type: 'node', derivative: true, format: LARGE_FLOAT, @@ -766,9 +1131,15 @@ export const metrics = { }), node_index_total: new ElasticsearchMetric({ field: 'node_stats.indices.indexing.index_total', - title: 'Request Rate', - label: 'Indexing Total', - description: 'Amount of indexing operations.', + title: i18n.translate('xpack.monitoring.metrics.esNode.requestRateTitle', { + defaultMessage: 'Request Rate' + }), + label: i18n.translate('xpack.monitoring.metrics.esNode.requestRate.indexingTotalLabel', { + defaultMessage: 'Indexing Total' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.requestRate.indexingTotalDescription', { + defaultMessage: 'Amount of indexing operations.' + }), type: 'node', derivative: true, format: LARGE_FLOAT, @@ -777,19 +1148,29 @@ export const metrics = { }), node_index_time: new ElasticsearchMetric({ field: 'node_stats.indices.indexing.index_time_in_millis', - title: 'Indexing Time', - label: 'Index Time', - description: 'Amount of time spent on indexing operations.', + title: i18n.translate('xpack.monitoring.metrics.esNode.indexingTimeTitle', { + defaultMessage: 'Indexing Time' + }), + label: i18n.translate('xpack.monitoring.metrics.esNode.indexingTime.indexTimeLabel', { + defaultMessage: 'Index Time' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.indexingTime.indexTimeDescription', { + defaultMessage: 'Amount of time spent on indexing operations.' + }), type: 'node', derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), node_free_space: new ElasticsearchMetric({ field: 'node_stats.fs.total.available_in_bytes', - label: 'Disk Free Space', - description: 'Free disk space available on the node.', + label: i18n.translate('xpack.monitoring.metrics.esNode.diskFreeSpaceLabel', { + defaultMessage: 'Disk Free Space' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.diskFreeSpaceDescription', { + defaultMessage: 'Free disk space available on the node.' + }), type: 'node', format: SMALL_BYTES, metricAgg: 'max', @@ -797,9 +1178,15 @@ export const metrics = { }), node_search_total: new ElasticsearchMetric({ field: 'node_stats.indices.search.query_total', - title: 'Request Rate', - label: 'Search Total', - description: 'Amount of search operations (per shard).', + title: i18n.translate('xpack.monitoring.metrics.esNode.requestRateTitle', { + defaultMessage: 'Request Rate' + }), + label: i18n.translate('xpack.monitoring.metrics.esNode.requestRate.searchTotalLabel', { + defaultMessage: 'Search Total' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.requestRate.searchTotalDescription', { + defaultMessage: 'Amount of search operations (per shard).' + }), type: 'node', derivative: true, format: LARGE_FLOAT, @@ -808,115 +1195,175 @@ export const metrics = { }), node_threads_queued_bulk: new ThreadPoolQueueMetric({ field: 'node_stats.thread_pool.bulk.queue', - label: 'Bulk', - description: - 'Number of bulk indexing operations waiting to be processed on this node. A single bulk request can create multiple bulk operations.' // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsQueued.bulkLabel', { + defaultMessage: 'Bulk' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsQueued.bulkDescription', { + defaultMessage: + 'Number of bulk indexing operations waiting to be processed on this node. A single bulk request can create multiple bulk operations.' + }) }), node_threads_queued_generic: new ThreadPoolQueueMetric({ field: 'node_stats.thread_pool.generic.queue', - label: 'Generic', - description: - 'Number of generic (internal) operations waiting to be processed on this node.' + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsQueued.genericLabel', { + defaultMessage: 'Generic' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsQueued.genericDescription', { + defaultMessage: 'Number of generic (internal) operations waiting to be processed on this node.' + }) }), node_threads_queued_get: new ThreadPoolQueueMetric({ field: 'node_stats.thread_pool.get.queue', - title: 'Thread Queue', - label: 'Get', - description: - 'Number of get operations waiting to be processed on this node.' + title: i18n.translate('xpack.monitoring.metrics.esNode.threadQueueTitle', { + defaultMessage: 'Thread Queue' + }), + label: i18n.translate('xpack.monitoring.metrics.esNode.threadQueue.getLabel', { + defaultMessage: 'Get' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadQueue.getDescription', { + defaultMessage: 'Number of get operations waiting to be processed on this node.' + }) }), node_threads_queued_index: new ThreadPoolQueueMetric({ field: 'node_stats.thread_pool.index.queue', - label: 'Index', - description: - 'Number of non-bulk, index operations waiting to be processed on this node.' + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsQueued.indexLabel', { + defaultMessage: 'Index' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsQueued.indexDescription', { + defaultMessage: 'Number of non-bulk, index operations waiting to be processed on this node.' + }) }), node_threads_queued_management: new ThreadPoolQueueMetric({ field: 'node_stats.thread_pool.management.queue', - label: 'Management', - description: - 'Number of management (internal) operations waiting to be processed on this node.' + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsQueued.managementLabel', { + defaultMessage: 'Management' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsQueued.managementDescription', { + defaultMessage: 'Number of management (internal) operations waiting to be processed on this node.' + }) }), node_threads_queued_search: new ThreadPoolQueueMetric({ field: 'node_stats.thread_pool.search.queue', - label: 'Search', - description: - 'Number of search operations waiting to be processed on this node. A single search request can create multiple search operations.' // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsQueued.searchLabel', { + defaultMessage: 'Search' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsQueued.searchDescription', { + defaultMessage: + 'Number of search operations waiting to be processed on this node. A single search request can create multiple search operations.' + }) }), node_threads_queued_watcher: new ThreadPoolQueueMetric({ field: 'node_stats.thread_pool.watcher.queue', - label: 'Watcher', - description: - 'Number of Watcher operations waiting to be processed on this node.' + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsQueued.watcherLabel', { + defaultMessage: 'Watcher' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsQueued.watcherDescription', { + defaultMessage: 'Number of Watcher operations waiting to be processed on this node.' + }) }), node_threads_rejected_bulk: new ThreadPoolRejectedMetric({ field: 'node_stats.thread_pool.bulk.rejected', - label: 'Bulk', - description: 'Bulk rejections. These occur when the queue is full.' + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.bulkLabel', { + defaultMessage: 'Bulk' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.bulkDescription', { + defaultMessage: 'Bulk rejections. These occur when the queue is full.' + }) }), node_threads_rejected_generic: new ThreadPoolRejectedMetric({ field: 'node_stats.thread_pool.generic.rejected', - label: 'Generic', - description: - 'Generic (internal) rejections. These occur when the queue is full.' + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.genericLabel', { + defaultMessage: 'Generic' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.genericDescription', { + defaultMessage: 'Generic (internal) rejections. These occur when the queue is full.' + }) }), node_threads_rejected_get: new ThreadPoolRejectedMetric({ field: 'node_stats.thread_pool.get.rejected', - label: 'Get', - description: 'Get rejections. These occur when the queue is full.' + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.getLabel', { + defaultMessage: 'Get' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.getDescription', { + defaultMessage: 'Get rejections. These occur when the queue is full.' + }) }), node_threads_rejected_index: new ThreadPoolRejectedMetric({ field: 'node_stats.thread_pool.index.rejected', - label: 'Index', - description: - 'Index rejections. These occur when the queue is full. You should look at bulk indexing.' + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.indexLabel', { + defaultMessage: 'Index' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.indexDescription', { + defaultMessage: 'Index rejections. These occur when the queue is full. You should look at bulk indexing.' + }) }), node_threads_rejected_management: new ThreadPoolRejectedMetric({ field: 'node_stats.thread_pool.management.rejected', - label: 'Management', - description: - 'Get (internal) rejections. These occur when the queue is full.' + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.managementLabel', { + defaultMessage: 'Management' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.managementDescription', { + defaultMessage: 'Get (internal) rejections. These occur when the queue is full.' + }) }), node_threads_rejected_search: new ThreadPoolRejectedMetric({ field: 'node_stats.thread_pool.search.rejected', - label: 'Search', - description: - 'Search rejections. These occur when the queue is full. This can indicate over-sharding.' + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.searchLabel', { + defaultMessage: 'Search' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.searchDescription', { + defaultMessage: 'Search rejections. These occur when the queue is full. This can indicate over-sharding.' + }) }), node_threads_rejected_watcher: new ThreadPoolRejectedMetric({ field: 'node_stats.thread_pool.watcher.rejected', - label: 'Watcher', - description: - 'Watch rejections. These occur when the queue is full. This can indicate stuck-Watches.' + label: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.watcherLabel', { + defaultMessage: 'Watcher' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.threadsRejected.watcherDescription', { + defaultMessage: 'Watch rejections. These occur when the queue is full. This can indicate stuck-Watches.' + }) }), node_throttle_index_time: new ElasticsearchMetric({ field: 'node_stats.indices.indexing.throttle_time_in_millis', - title: 'Indexing Time', - label: 'Index Throttling Time', - description: - 'Amount of time spent with index throttling, which indicates slow disks on a node.', + title: i18n.translate('xpack.monitoring.metrics.esNode.indexingTimeTitle', { + defaultMessage: 'Indexing Time' + }), + label: i18n.translate('xpack.monitoring.metrics.esNode.indexingTime.indexThrottlingTimeLabel', { + defaultMessage: 'Index Throttling Time' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.indexingTime.indexThrottlingTimeDescription', { + defaultMessage: 'Amount of time spent with index throttling, which indicates slow disks on a node.' + }), type: 'node', derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms', + units: msTimeUnitLabel, min: 0 }), index_throttle_time: new ElasticsearchMetric({ field: 'index_stats.primaries.indexing.throttle_time_in_millis', - label: 'Index Throttling Time', - description: - 'Amount of time spent with index throttling, which indicates slow merging.', + label: i18n.translate('xpack.monitoring.metrics.esNode.indexThrottlingTimeLabel', { + defaultMessage: 'Index Throttling Time' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.indexThrottlingTimeDescription', { + defaultMessage: 'Amount of time spent with index throttling, which indicates slow merging.' + }), type: 'index', derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), index_document_count: new ElasticsearchMetric({ field: 'index_stats.primaries.docs.count', - label: 'Document Count', - description: 'Total number of documents, only including primary shards.', + label: i18n.translate('xpack.monitoring.metrics.esNode.documentCountLabel', { + defaultMessage: 'Document Count' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.documentCountDescription', { + defaultMessage: 'Total number of documents, only including primary shards.' + }), type: 'index', format: LARGE_ABBREVIATED, metricAgg: 'max', @@ -924,24 +1371,36 @@ export const metrics = { }), index_search_request_rate: new RequestRateMetric({ field: 'index_stats.total.search.query_total', - title: 'Search Rate', - label: 'Total Shards', - description: - 'Number of search requests being executed across primary and replica shards. A single search can run against multiple shards!', // eslint-disable-line max-len + title: i18n.translate('xpack.monitoring.metrics.esNode.searchRateTitle', { + defaultMessage: 'Search Rate' + }), + label: i18n.translate('xpack.monitoring.metrics.esNode.searchRate.totalShardsLabel', { + defaultMessage: 'Total Shards' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.searchRate.totalShardsDescription', { + defaultMessage: + 'Number of search requests being executed across primary and replica shards. A single search can run against multiple shards!' + }), type: 'index' }), index_merge_rate: new RequestRateMetric({ field: 'index_stats.total.merges.total_size_in_bytes', - label: 'Merge Rate', - description: - 'Amount in bytes of merged segments. Larger numbers indicate heavier disk activity.', + label: i18n.translate('xpack.monitoring.metrics.esNode.mergeRateLabel', { + defaultMessage: 'Merge Rate' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.mergeRateDescription', { + defaultMessage: 'Amount in bytes of merged segments. Larger numbers indicate heavier disk activity.' + }), type: 'index' }), index_refresh_time: new ElasticsearchMetric({ field: 'index_stats.total.refresh.total_time_in_millis', - label: 'Total Refresh Time', - description: - 'Time spent on Elasticsearch refresh for primary and replica shards.', + label: i18n.translate('xpack.monitoring.metrics.esNode.totalRefreshTimeLabel', { + defaultMessage: 'Total Refresh Time' + }), + description: i18n.translate('xpack.monitoring.metrics.esNode.totalRefreshTimeDescription', { + defaultMessage: 'Time spent on Elasticsearch refresh for primary and replica shards.' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '', @@ -951,23 +1410,35 @@ export const metrics = { // CCR ccr_sync_lag_time: new MillisecondsToSecondsMetric({ - title: 'Fetch delay', // title to use for the chart + title: i18n.translate('xpack.monitoring.metrics.esCcr.fetchDelayTitle', { + defaultMessage: 'Fetch delay' // title to use for the chart + }), type: 'ccr', field: 'ccr_stats.time_since_last_read_millis', - label: 'Fetch delay', - description: 'The amount of time the follower index is lagging behind the leader.', + label: i18n.translate('xpack.monitoring.metrics.esCcr.fetchDelayLabel', { + defaultMessage: 'Fetch delay' + }), + description: i18n.translate('xpack.monitoring.metrics.esCcr.fetchDelayDescription', { + defaultMessage: 'The amount of time the follower index is lagging behind the leader.' + }), format: SMALL_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), ccr_sync_lag_ops: new DifferenceMetric({ - title: 'Ops delay', // title to use for the chart + title: i18n.translate('xpack.monitoring.metrics.esCcr.opsDelayTitle', { + defaultMessage: 'Ops delay' // title to use for the chart + }), type: 'ccr', fieldSource: 'ccr_stats', metric: 'leader_max_seq_no', metric2: 'follower_global_checkpoint', - label: 'Ops delay', - description: 'The number of operations the follower index is lagging behind the leader.', + label: i18n.translate('xpack.monitoring.metrics.esCcr.opsDelayLabel', { + defaultMessage: 'Ops delay' + }), + description: i18n.translate('xpack.monitoring.metrics.esCcr.opsDelayDescription', { + defaultMessage: 'The number of operations the follower index is lagging behind the leader.' + }), format: SMALL_FLOAT, metricAgg: 'max', units: '' diff --git a/x-pack/plugins/monitoring/server/lib/metrics/kibana/metrics.js b/x-pack/plugins/monitoring/server/lib/metrics/kibana/metrics.js index 944ccb07ece0..3aafbcb3674c 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/kibana/metrics.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/kibana/metrics.js @@ -10,122 +10,184 @@ import { SMALL_FLOAT, LARGE_BYTES } from '../../../../common/formatting'; +import { i18n } from '@kbn/i18n'; + +const clientResponseTimeTitle = i18n.translate('xpack.monitoring.metrics.kibana.clientResponseTimeTitle', { + defaultMessage: 'Client Response Time' +}); +const instanceSystemLoadTitle = i18n.translate('xpack.monitoring.metrics.kibanaInstance.systemLoadTitle', { + defaultMessage: 'System Load' +}); +const instanceMemorySizeTitle = i18n.translate('xpack.monitoring.metrics.kibanaInstance.memorySizeTitle', { + defaultMessage: 'Memory Size' +}); +const instanceClientResponseTimeTitle = i18n.translate('xpack.monitoring.metrics.kibanaInstance.clientResponseTimeTitle', { + defaultMessage: 'Client Response Time' +}); +const msTimeUnitLabel = i18n.translate('xpack.monitoring.metrics.kibana.msTimeUnitLabel', { + defaultMessage: 'ms' +}); export const metrics = { kibana_cluster_requests: new KibanaEventsRateClusterMetric({ field: 'kibana_stats.requests.total', - label: 'Client Requests', - description: - 'Total number of client requests received by the Kibana instance.', + label: i18n.translate('xpack.monitoring.metrics.kibana.clientRequestsLabel', { + defaultMessage: 'Client Requests' + }), + description: i18n.translate('xpack.monitoring.metrics.kibana.clientRequestsDescription', { + defaultMessage: 'Total number of client requests received by the Kibana instance.' + }), format: SMALL_FLOAT, units: '' }), kibana_cluster_max_response_times: new KibanaEventsRateClusterMetric({ - title: 'Client Response Time', + title: clientResponseTimeTitle, field: 'kibana_stats.response_times.max', - label: 'Max', - description: - 'Maximum response time for client requests to the Kibana instance.', + label: i18n.translate('xpack.monitoring.metrics.kibana.clientResponseTime.maxLabel', { + defaultMessage: 'Max' + }), + description: i18n.translate('xpack.monitoring.metrics.kibana.clientResponseTime.maxDescription', { + defaultMessage: 'Maximum response time for client requests to the Kibana instance.' + }), format: SMALL_FLOAT, - units: 'ms' + units: msTimeUnitLabel }), kibana_cluster_average_response_times: new KibanaEventsRateClusterMetric({ - title: 'Client Response Time', + title: clientResponseTimeTitle, field: 'kibana_stats.response_times.average', - label: 'Average', - description: - 'Average response time for client requests to the Kibana instance.', + label: i18n.translate('xpack.monitoring.metrics.kibana.clientResponseTime.averageLabel', { + defaultMessage: 'Average' + }), + description: i18n.translate('xpack.monitoring.metrics.kibana.clientResponseTime.averageDescription', { + defaultMessage: 'Average response time for client requests to the Kibana instance.' + }), format: SMALL_FLOAT, - units: 'ms' + units: msTimeUnitLabel }), kibana_os_load_1m: new KibanaMetric({ - title: 'System Load', + title: instanceSystemLoadTitle, field: 'kibana_stats.os.load.1m', - label: '1m', - description: 'Load average over the last minute.', + label: i18n.translate('xpack.monitoring.metrics.kibanaInstance.systemLoad.last1MinuteLabel', { + defaultMessage: '1m' + }), + description: i18n.translate('xpack.monitoring.metrics.kibanaInstance.systemLoad.last1MinuteDescription', { + defaultMessage: 'Load average over the last minute.' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' }), kibana_os_load_5m: new KibanaMetric({ - title: 'System Load', + title: instanceSystemLoadTitle, field: 'kibana_stats.os.load.5m', - label: '5m', - description: 'Load average over the last 5 minutes.', + label: i18n.translate('xpack.monitoring.metrics.kibanaInstance.systemLoad.last5MinutesLabel', { + defaultMessage: '5m' + }), + description: i18n.translate('xpack.monitoring.metrics.kibanaInstance.systemLoad.last5MinutesDescription', { + defaultMessage: 'Load average over the last 5 minutes.' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' }), kibana_os_load_15m: new KibanaMetric({ - title: 'System Load', + title: instanceSystemLoadTitle, field: 'kibana_stats.os.load.15m', - label: '15m', - description: 'Load average over the last 15 minutes.', + label: i18n.translate('xpack.monitoring.metrics.kibanaInstance.systemLoad.last15MinutesLabel', { + defaultMessage: '15m' + }), + description: i18n.translate('xpack.monitoring.metrics.kibanaInstance.systemLoad.last15MinutesDescription', { + defaultMessage: 'Load average over the last 15 minutes.' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' }), kibana_memory_heap_size_limit: new KibanaMetric({ - title: 'Memory Size', + title: instanceMemorySizeTitle, field: 'kibana_stats.process.memory.heap.size_limit', - label: 'Heap Size Limit', - description: 'Limit of memory usage before garbage collection.', + label: i18n.translate('xpack.monitoring.metrics.kibanaInstance.memorySize.heapSizeLimitLabel', { + defaultMessage: 'Heap Size Limit' + }), + description: i18n.translate('xpack.monitoring.metrics.kibanaInstance.memorySize.heapSizeLimitDescription', { + defaultMessage: 'Limit of memory usage before garbage collection.' + }), format: LARGE_BYTES, metricAgg: 'max', units: 'B' }), kibana_memory_size: new KibanaMetric({ - title: 'Memory Size', + title: instanceMemorySizeTitle, field: 'kibana_stats.process.memory.resident_set_size_in_bytes', - label: 'Memory Size', - description: 'Total heap used by Kibana running in Node.js.', + label: i18n.translate('xpack.monitoring.metrics.kibanaInstance.memorySizeLabel', { + defaultMessage: 'Memory Size' + }), + description: i18n.translate('xpack.monitoring.metrics.kibanaInstance.memorySizeDescription', { + defaultMessage: 'Total heap used by Kibana running in Node.js.' + }), format: LARGE_BYTES, metricAgg: 'max', units: 'B' }), kibana_process_delay: new KibanaMetric({ field: 'kibana_stats.process.event_loop_delay', - label: 'Event Loop Delay', - description: - 'Delay in Kibana server event loops. Longer delays may indicate blocking events in server thread, such as synchronous functions taking large amount of CPU time.', // eslint-disable-line max-len + label: i18n.translate('xpack.monitoring.metrics.kibanaInstance.eventLoopDelayLabel', { + defaultMessage: 'Event Loop Delay' + }), + description: i18n.translate('xpack.monitoring.metrics.kibanaInstance.eventLoopDelayDescription', { + defaultMessage: 'Delay in Kibana server event loops. Longer delays may indicate blocking events in server thread, ' + + 'such as synchronous functions taking large amount of CPU time.' + }), format: SMALL_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), kibana_average_response_times: new KibanaMetric({ - title: 'Client Response Time', + title: instanceClientResponseTimeTitle, field: 'kibana_stats.response_times.average', - label: 'Average', - description: - 'Average response time for client requests to the Kibana instance.', + label: i18n.translate('xpack.monitoring.metrics.kibanaInstance.clientResponseTime.averageLabel', { + defaultMessage: 'Average' + }), + description: i18n.translate('xpack.monitoring.metrics.kibanaInstance.clientResponseTime.averageDescription', { + defaultMessage: 'Average response time for client requests to the Kibana instance.' + }), format: SMALL_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), kibana_max_response_times: new KibanaMetric({ - title: 'Client Response Time', + title: instanceClientResponseTimeTitle, field: 'kibana_stats.response_times.max', - label: 'Max', - description: - 'Maximum response time for client requests to the Kibana instance.', + label: i18n.translate('xpack.monitoring.metrics.kibanaInstance.clientResponseTime.maxLabel', { + defaultMessage: 'Max' + }), + description: i18n.translate('xpack.monitoring.metrics.kibanaInstance.clientResponseTime.maxDescription', { + defaultMessage: 'Maximum response time for client requests to the Kibana instance.' + }), format: SMALL_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }), kibana_average_concurrent_connections: new KibanaMetric({ field: 'kibana_stats.concurrent_connections', - label: 'HTTP Connections', - description: - 'Total number of open socket connections to the Kibana instance.', + label: i18n.translate('xpack.monitoring.metrics.kibana.httpConnectionsLabel', { + defaultMessage: 'HTTP Connections' + }), + description: i18n.translate('xpack.monitoring.metrics.kibana.httpConnectionsDescription', { + defaultMessage: 'Total number of open socket connections to the Kibana instance.' + }), format: SMALL_FLOAT, metricAgg: 'max', units: '' }), kibana_requests: new KibanaMetric({ field: 'kibana_stats.requests.total', - label: 'Client Requests', - description: - 'Total number of client requests received by the Kibana instance.', + label: i18n.translate('xpack.monitoring.metrics.kibanaInstance.clientRequestsLabel', { + defaultMessage: 'Client Requests' + }), + description: i18n.translate('xpack.monitoring.metrics.kibanaInstance.clientRequestsDescription', { + defaultMessage: 'Total number of client requests received by the Kibana instance.' + }), format: SMALL_FLOAT, metricAgg: 'max', units: '' diff --git a/x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.js b/x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.js index f2729f597ed8..dade736cd53f 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/logstash/classes.js @@ -8,6 +8,14 @@ import _ from 'lodash'; import { ClusterMetric, Metric } from '../classes'; import { LARGE_FLOAT } from '../../../../common/formatting'; import { NORMALIZED_DERIVATIVE_UNIT } from '../../../../common/constants'; +import { i18n } from '@kbn/i18n'; + +const msTimeUnitLabel = i18n.translate('xpack.monitoring.metrics.logstash.msTimeUnitLabel', { + defaultMessage: 'ms' +}); +const perSecondUnitLabel = i18n.translate('xpack.monitoring.metrics.logstash.perSecondUnitLabel', { + defaultMessage: '/s' +}); export class LogstashClusterMetric extends ClusterMetric { constructor(opts) { @@ -32,7 +40,7 @@ export class LogstashEventsLatencyClusterMetric extends LogstashClusterMetric { ...opts, format: LARGE_FLOAT, metricAgg: 'max', - units: 'ms' + units: msTimeUnitLabel }); this.aggs = { @@ -106,7 +114,7 @@ export class LogstashEventsRateClusterMetric extends LogstashClusterMetric { derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: '/s' + units: perSecondUnitLabel }); this.aggs = { @@ -163,7 +171,7 @@ export class LogstashEventsLatencyMetric extends LogstashMetric { ...opts, format: LARGE_FLOAT, metricAgg: 'sum', - units: 'ms' + units: msTimeUnitLabel }); this.aggs = { @@ -213,7 +221,7 @@ export class LogstashEventsRateMetric extends LogstashMetric { derivative: true, format: LARGE_FLOAT, metricAgg: 'max', - units: '/s' + units: perSecondUnitLabel }); } } diff --git a/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.js b/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.js index 63ba1c5be0e3..a87f79533da3 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.js +++ b/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.js @@ -21,106 +21,185 @@ import { SMALL_BYTES, LARGE_ABBREVIATED } from '../../../../common/formatting'; +import { i18n } from '@kbn/i18n'; + +const instanceSystemLoadTitle = i18n.translate('xpack.monitoring.metrics.logstash.systemLoadTitle', { + defaultMessage: 'System Load' +}); +const instanceJvmHeapTitle = i18n.translate('xpack.monitoring.metrics.logstashInstance.jvmHeapTitle', { + defaultMessage: '{javaVirtualMachine} Heap', + values: { javaVirtualMachine: 'JVM' } +}); +const instanceCpuUtilizationLabel = i18n.translate('xpack.monitoring.metrics.logstashInstance.cpuUtilizationLabel', { + defaultMessage: 'CPU Utilization' +}); +const instanceCgroupCfsStatsTitle = i18n.translate('xpack.monitoring.metrics.logstashInstance.cgroupCfsStatsTitle', { + defaultMessage: 'Cgroup CFS Stats' +}); +const instanceCgroupCpuPerformanceTitle = i18n.translate('xpack.monitoring.metrics.logstashInstance.cgroupCpuPerformanceTitle', { + defaultMessage: 'Cgroup CPU Performance' +}); +const pipelineThroughputLabel = i18n.translate('xpack.monitoring.metrics.logstashInstance.pipelineThroughputLabel', { + defaultMessage: 'Pipeline Throughput' +}); +const pipelineThroughputDescription = i18n.translate('xpack.monitoring.metrics.logstashInstance.pipelineThroughputDescription', { + defaultMessage: 'Number of events emitted per second by the Logstash pipeline at the outputs stage.' +}); +const pipelineNodeCountLabel = i18n.translate('xpack.monitoring.metrics.logstashInstance.pipelineNodeCountLabel', { + defaultMessage: 'Pipeline Node Count' +}); +const pipelineNodeCountDescription = i18n.translate('xpack.monitoring.metrics.logstashInstance.pipelineNodeCountDescription', { + defaultMessage: 'Number of nodes on which the Logstash pipeline is running.' +}); +const nsTimeUnitLabel = i18n.translate('xpack.monitoring.metrics.logstash.nsTimeUnitLabel', { + defaultMessage: 'ns' +}); +const eventsPerSecondUnitLabel = i18n.translate('xpack.monitoring.metrics.logstash.eventsPerSecondUnitLabel', { + defaultMessage: 'e/s' +}); export const metrics = { logstash_cluster_events_input_rate: new LogstashEventsRateClusterMetric({ field: 'logstash_stats.events.in', - label: 'Events Received Rate', - description: - 'Number of events received per second by all Logstash nodes at the inputs stage.' + label: i18n.translate('xpack.monitoring.metrics.logstash.eventsReceivedRateLabel', { + defaultMessage: 'Events Received Rate' + }), + description: i18n.translate('xpack.monitoring.metrics.logstash.eventsReceivedRateDescription', { + defaultMessage: 'Number of events received per second by all Logstash nodes at the inputs stage.' + }) }), logstash_cluster_events_output_rate: new LogstashEventsRateClusterMetric({ field: 'logstash_stats.events.out', - label: 'Events Emitted Rate', - description: - 'Number of events emitted per second by all Logstash nodes at the outputs stage.' + label: i18n.translate('xpack.monitoring.metrics.logstash.eventsEmittedRateLabel', { + defaultMessage: 'Events Emitted Rate' + }), + description: i18n.translate('xpack.monitoring.metrics.logstash.eventsEmittedRateDescription', { + defaultMessage: 'Number of events emitted per second by all Logstash nodes at the outputs stage.' + }) }), logstash_cluster_events_latency: new LogstashEventsLatencyClusterMetric({ field: 'logstash_stats.events.out', - label: 'Event Latency', - description: - 'Average time spent by events in the filter and output stages, which is the total ' + - 'time it takes to process events divided by number of events emitted.' + label: i18n.translate('xpack.monitoring.metrics.logstash.eventLatencyLabel', { + defaultMessage: 'Event Latency' + }), + description: i18n.translate('xpack.monitoring.metrics.logstash.eventLatencyDescription', { + defaultMessage: 'Average time spent by events in the filter and output stages, which is the total ' + + 'time it takes to process events divided by number of events emitted.' + }) }), logstash_events_input_rate: new LogstashEventsRateMetric({ field: 'logstash_stats.events.in', - label: 'Events Received Rate', - description: - 'Number of events received per second by the Logstash node at the inputs stage.' + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.eventsReceivedRateLabel', { + defaultMessage: 'Events Received Rate' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.eventsReceivedRateDescription', { + defaultMessage: 'Number of events received per second by the Logstash node at the inputs stage.' + }) }), logstash_events_output_rate: new LogstashEventsRateMetric({ field: 'logstash_stats.events.out', - label: 'Events Emitted Rate', - description: - 'Number of events emitted per second by the Logstash node at the outputs stage.' + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.eventsEmittedRateLabel', { + defaultMessage: 'Events Emitted Rate' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.eventsEmittedRateDescription', { + defaultMessage: 'Number of events emitted per second by the Logstash node at the outputs stage.' + }) }), logstash_events_latency: new LogstashEventsLatencyMetric({ field: 'logstash_stats.events.out', - label: 'Event Latency', - description: - 'Average time spent by events in the filter and output stages, which is the total ' + - 'time it takes to process events divided by number of events emitted.' + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.eventLatencyLabel', { + defaultMessage: 'Event Latency' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.eventLatencyDescription', { + defaultMessage: 'Average time spent by events in the filter and output stages, which is the total ' + + 'time it takes to process events divided by number of events emitted.' + }) }), logstash_os_load_1m: new LogstashMetric({ - title: 'System Load', + title: instanceSystemLoadTitle, field: 'logstash_stats.os.cpu.load_average.1m', - label: '1m', - description: 'Load average over the last minute.', + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.systemLoad.last1MinuteLabel', { + defaultMessage: '1m' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.systemLoad.last1MinuteDescription', { + defaultMessage: 'Load average over the last minute.' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' }), logstash_os_load_5m: new LogstashMetric({ - title: 'System Load', + title: instanceSystemLoadTitle, field: 'logstash_stats.os.cpu.load_average.5m', - label: '5m', - description: 'Load average over the last 5 minutes.', + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.systemLoad.last5MinutesLabel', { + defaultMessage: '5m' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.systemLoad.last5MinutesDescription', { + defaultMessage: 'Load average over the last 5 minutes.' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' }), logstash_os_load_15m: new LogstashMetric({ - title: 'System Load', + title: instanceSystemLoadTitle, field: 'logstash_stats.os.cpu.load_average.15m', - label: '15m', - description: 'Load average over the last 15 minutes.', + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.systemLoad.last15MinutesLabel', { + defaultMessage: '15m' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.systemLoad.last15MinutesDescription', { + defaultMessage: 'Load average over the last 15 minutes.' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' }), logstash_node_jvm_mem_max_in_bytes: new LogstashMetric({ field: 'logstash_stats.jvm.mem.heap_max_in_bytes', - title: 'JVM Heap', - label: 'Max Heap', - description: 'Total heap available to Logstash running in the JVM.', + title: instanceJvmHeapTitle, + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.jvmHeap.maxHeapLabel', { + defaultMessage: 'Max Heap' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.jvmHeap.maxHeapDescription', { + defaultMessage: 'Total heap available to Logstash running in the JVM.' + }), format: SMALL_BYTES, metricAgg: 'max', units: 'B' }), logstash_node_jvm_mem_used_in_bytes: new LogstashMetric({ field: 'logstash_stats.jvm.mem.heap_used_in_bytes', - title: 'JVM Heap', - label: 'Used Heap', - description: 'Total heap used by Logstash running in the JVM.', + title: instanceJvmHeapTitle, + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.jvmHeap.usedHeapLabel', { + defaultMessage: 'Used Heap' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.jvmHeap.usedHeapDescription', { + defaultMessage: 'Total heap used by Logstash running in the JVM.' + }), format: SMALL_BYTES, metricAgg: 'max', units: 'B' }), logstash_node_cpu_utilization: new LogstashMetric({ field: 'logstash_stats.process.cpu.percent', - label: 'CPU Utilization', - description: - 'Percentage of CPU usage reported by the OS (100% is the max).', + label: instanceCpuUtilizationLabel, + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.cpuUtilizationDescription', { + defaultMessage: 'Percentage of CPU usage reported by the OS (100% is the max).' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '%' }), logstash_node_cgroup_periods: new LogstashMetric({ field: 'logstash_stats.os.cgroup.cpu.stat.number_of_elapsed_periods', - title: 'Cgroup CFS Stats', - label: 'Cgroup Elapsed Periods', - description: - 'The number of sampling periods from the Completely Fair Scheduler (CFS). Compare against the number of times throttled.', + title: instanceCgroupCfsStatsTitle, + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.cgroupCfsStats.cgroupElapsedPeriodsLabel', { + defaultMessage: 'Cgroup Elapsed Periods' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.cgroupCfsStats.cgroupElapsedPeriodsDescription', { + defaultMessage: + 'The number of sampling periods from the Completely Fair Scheduler (CFS). Compare against the number of times throttled.' + }), format: LARGE_FLOAT, metricAgg: 'max', derivative: true, @@ -128,21 +207,27 @@ export const metrics = { }), logstash_node_cgroup_throttled: new LogstashMetric({ field: 'logstash_stats.os.cgroup.cpu.stat.time_throttled_nanos', - title: 'Cgroup CPU Performance', - label: 'Cgroup Throttling', - description: - 'The amount of throttled time, reported in nanoseconds, of the Cgroup.', + title: instanceCgroupCpuPerformanceTitle, + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.cgroupCpuPerformance.cgroupThrottlingLabel', { + defaultMessage: 'Cgroup Throttling' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.cgroupCpuPerformance.cgroupThrottlingDescription', { + defaultMessage: 'The amount of throttled time, reported in nanoseconds, of the Cgroup.' + }), format: LARGE_ABBREVIATED, metricAgg: 'max', derivative: true, - units: 'ns' + units: nsTimeUnitLabel }), logstash_node_cgroup_throttled_count: new LogstashMetric({ field: 'logstash_stats.os.cgroup.cpu.stat.number_of_times_throttled', - title: 'Cgroup CFS Stats', - label: 'Cgroup Throttled Count', - description: - 'The number of times that the CPU was throttled by the Cgroup.', + title: instanceCgroupCfsStatsTitle, + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.cgroupCfsStats.cgroupThrottledCountLabel', { + defaultMessage: 'Cgroup Throttled Count' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.cgroupCfsStats.cgroupThrottledCountDescription', { + defaultMessage: 'The number of times that the CPU was throttled by the Cgroup.' + }), format: LARGE_FLOAT, metricAgg: 'max', derivative: true, @@ -150,14 +235,17 @@ export const metrics = { }), logstash_node_cgroup_usage: new LogstashMetric({ field: 'logstash_stats.os.cgroup.cpuacct.usage_nanos', - title: 'Cgroup CPU Performance', - label: 'Cgroup Usage', - description: - 'The usage, reported in nanoseconds, of the Cgroup. Compare this with the throttling to discover issues.', + title: instanceCgroupCpuPerformanceTitle, + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.cgroupCpuPerformance.cgroupUsageLabel', { + defaultMessage: 'Cgroup Usage' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.cgroupCpuPerformance.cgroupUsageDescription', { + defaultMessage: 'The usage, reported in nanoseconds, of the Cgroup. Compare this with the throttling to discover issues.' + }), format: LARGE_ABBREVIATED, metricAgg: 'max', derivative: true, - units: 'ns' + units: nsTimeUnitLabel }), ...(() => { // CGroup CPU Utilization Fields @@ -170,77 +258,94 @@ export const metrics = { periodsField: 'cpu.stat.number_of_elapsed_periods', quotaField: 'cpu.cfs_quota_micros', field: 'logstash_stats.process.cpu.percent', // backup field if quota is not configured - label: 'Cgroup CPU Utilization', - description: - 'CPU Usage time compared to the CPU quota shown in percentage. If CPU ' + - 'quotas are not set, then no data will be shown.' + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.cpuUtilization.cgroupCpuUtilizationLabel', { + defaultMessage: 'Cgroup CPU Utilization' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.cgroupCpuUtilizationDescription', { + defaultMessage: + 'CPU Usage time compared to the CPU quota shown in percentage. If CPU quotas are not set, then no data will be shown.' + }) }; return { logstash_node_cgroup_quota: new QuotaMetric({ ...quotaMetricConfig, - title: 'CPU Utilization' + title: i18n.translate('xpack.monitoring.metrics.logstashInstance.cpuUtilizationTitle', { + defaultMessage: 'CPU Utilization' + }) }), logstash_node_cgroup_quota_as_cpu_utilization: new QuotaMetric({ ...quotaMetricConfig, - label: 'CPU Utilization' // override the "Cgroup CPU..." label + label: instanceCpuUtilizationLabel // override the "Cgroup CPU..." label }) }; })(), logstash_queue_events_count: new LogstashMetric({ field: 'logstash_stats.queue.events_count', - label: 'Events Queued', - title: 'Persistent Queue Events', - description: - 'Average number of events in the persistent queue waiting to be processed by the filter and output stages.', + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.eventsQueuedLabel', { + defaultMessage: 'Events Queued' + }), + title: i18n.translate('xpack.monitoring.metrics.logstashInstance.persistentQueueEventsTitle', { + defaultMessage: 'Persistent Queue Events' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.eventsQueuedDescription', { + defaultMessage: 'Average number of events in the persistent queue waiting to be processed by the filter and output stages.' + }), format: LARGE_FLOAT, metricAgg: 'max', units: '' }), logstash_pipeline_queue_size: new LogstashPipelineQueueSizeMetric({ field: 'logstash_stats.pipelines.queue.queue_size_in_bytes', - label: 'Queue Size', - description: - 'Current size of all persistent queues in the Logstash pipelines on this node.', - title: 'Persistent Queue Size', + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.queueSizeLabel', { + defaultMessage: 'Queue Size' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.queueSizeDescription', { + defaultMessage: 'Current size of all persistent queues in the Logstash pipelines on this node.' + }), + title: i18n.translate('xpack.monitoring.metrics.logstashInstance.persistentQueueSizeTitle', { + defaultMessage: 'Persistent Queue Size' + }), format: LARGE_BYTES, units: 'B' }), logstash_pipeline_max_queue_size: new LogstashPipelineQueueSizeMetric({ field: 'logstash_stats.pipelines.queue.max_queue_size_in_bytes', - label: 'Max Queue Size', - description: 'Maximum size set for the persistent queues on this node.', + label: i18n.translate('xpack.monitoring.metrics.logstashInstance.maxQueueSizeLabel', { + defaultMessage: 'Max Queue Size' + }), + description: i18n.translate('xpack.monitoring.metrics.logstashInstance.maxQueueSizeDescription', { + defaultMessage: 'Maximum size set for the persistent queues on this node.' + }), format: LARGE_BYTES, units: 'B' }), logstash_cluster_pipeline_throughput: new LogstashPipelineThroughputMetric({ field: 'logstash_stats.pipelines.events.out', - label: 'Pipeline Throughput', - description: - 'Number of events emitted per second by the Logstash pipeline at the outputs stage.', + label: pipelineThroughputLabel, + description: pipelineThroughputDescription, format: LARGE_FLOAT, - units: 'e/s' + units: eventsPerSecondUnitLabel }), logstash_node_pipeline_throughput: new LogstashPipelineThroughputMetric({ uuidField: 'logstash_stats.logstash.uuid', // TODO: add comment explaining why field: 'logstash_stats.pipelines.events.out', - label: 'Pipeline Throughput', - description: - 'Number of events emitted per second by the Logstash pipeline at the outputs stage.', + label: pipelineThroughputLabel, + description: pipelineThroughputDescription, format: LARGE_FLOAT, - units: 'e/s' + units: eventsPerSecondUnitLabel }), logstash_cluster_pipeline_nodes_count: new LogstashPipelineNodeCountMetric({ field: 'logstash_stats.logstash.uuid', - label: 'Pipeline Node Count', - description: 'Number of nodes on which the Logstash pipeline is running.', + label: pipelineNodeCountLabel, + description: pipelineNodeCountDescription, format: LARGE_FLOAT, units: '' }), logstash_node_pipeline_nodes_count: new LogstashPipelineNodeCountMetric({ uuidField: 'logstash_stats.logstash.uuid', // TODO: add comment explaining why field: 'logstash_stats.logstash.uuid', - label: 'Pipeline Node Count', - description: 'Number of nodes on which the Logstash pipeline is running.', + label: pipelineNodeCountLabel, + description: pipelineNodeCountDescription, format: LARGE_FLOAT, units: '' })