Skip to content

Commit

Permalink
Add latency to index and node Elasticsearch stats (#22625)
Browse files Browse the repository at this point in the history
Closes #22503
  • Loading branch information
ruflin authored Oct 23, 2018
1 parent b99c516 commit e8451ad
Show file tree
Hide file tree
Showing 8 changed files with 2,888 additions and 6,631 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<div class="col-md-6"><monitoring-chart series="pageData.metrics.index_throttling"/></div>
<div class="col-md-6"><monitoring-chart series="pageData.metrics.index_disk"/></div>
<div class="col-md-6"><monitoring-chart series="pageData.metrics.index_segment_count"/></div>
<div class="col-md-6"><monitoring-chart series="pageData.metrics.index_latency"/></div>
</div>
</div>
</monitoring-main>
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<div class="col-md-6"><monitoring-chart series="pageData.metrics.node_read_threads"/></div>
<div class="col-md-6"><monitoring-chart series="pageData.metrics.node_cgroup_cpu"/></div>
<div class="col-md-6"><monitoring-chart series="pageData.metrics.node_cgroup_stats"/></div>
<div class="col-md-6"><monitoring-chart series="pageData.metrics.node_latency"/></div>
</div>
</div>
</monitoring-main>
Original file line number Diff line number Diff line change
Expand Up @@ -1955,6 +1955,47 @@ Object {
"units": "",
"uuidField": "source_node.uuid",
},
"index_index_latency": LatencyMetric {
"aggs": Object {
"event_time_in_millis": Object {
"max": Object {
"field": "index_stats.primaries.indexing.index_time_in_millis",
},
},
"event_time_in_millis_deriv": Object {
"derivative": Object {
"buckets_path": "event_time_in_millis",
"gap_policy": "skip",
"unit": "1s",
},
},
"event_total": Object {
"max": Object {
"field": "index_stats.primaries.indexing.index_total",
},
},
"event_total_deriv": Object {
"derivative": Object {
"buckets_path": "event_total",
"gap_policy": "skip",
"unit": "1s",
},
},
},
"app": "elasticsearch",
"calculation": [Function],
"derivative": false,
"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.",
"field": "index_stats.primaries.indexing.index_total",
"format": "0,0.[00]",
"label": "Indexing Latency",
"metricAgg": "sum",
"timestampField": "timestamp",
"title": "Latency",
"type": "cluster",
"units": "ms",
"uuidField": "source_node.uuid",
},
"index_indexing_primaries_time": ElasticsearchMetric {
"app": "elasticsearch",
"derivative": true,
Expand Down Expand Up @@ -1997,46 +2038,6 @@ Object {
"units": "ms",
"uuidField": "source_node.uuid",
},
"index_latency": LatencyMetric {
"aggs": Object {
"event_time_in_millis": Object {
"max": Object {
"field": "index_stats.primaries.indexing.index_time_in_millis",
},
},
"event_time_in_millis_deriv": Object {
"derivative": Object {
"buckets_path": "event_time_in_millis",
"gap_policy": "skip",
"unit": "1s",
},
},
"event_total": Object {
"max": Object {
"field": "index_stats.primaries.indexing.index_total",
},
},
"event_total_deriv": Object {
"derivative": Object {
"buckets_path": "event_total",
"gap_policy": "skip",
"unit": "1s",
},
},
},
"app": "elasticsearch",
"calculation": [Function],
"derivative": false,
"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.",
"field": "index_stats.primaries.indexing.index_total",
"format": "0,0.[00]",
"label": "Indexing Latency",
"metricAgg": "sum",
"timestampField": "timestamp",
"type": "cluster",
"units": "ms",
"uuidField": "source_node.uuid",
},
"index_mem_doc_values": SingleIndexMemoryMetric {
"app": "elasticsearch",
"derivative": false,
Expand Down Expand Up @@ -2274,6 +2275,46 @@ Object {
"units": "/s",
"uuidField": "source_node.uuid",
},
"index_query_latency": LatencyMetric {
"aggs": Object {
"event_time_in_millis": Object {
"max": Object {
"field": "index_stats.total.search.query_time_in_millis",
},
},
"event_time_in_millis_deriv": Object {
"derivative": Object {
"buckets_path": "event_time_in_millis",
"gap_policy": "skip",
"unit": "1s",
},
},
"event_total": Object {
"max": Object {
"field": "index_stats.total.search.query_total",
},
},
"event_total_deriv": Object {
"derivative": Object {
"buckets_path": "event_total",
"gap_policy": "skip",
"unit": "1s",
},
},
},
"app": "elasticsearch",
"calculation": [Function],
"derivative": false,
"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.",
"field": "index_stats.total.search.query_total",
"format": "0,0.[00]",
"label": "Search Latency",
"metricAgg": "sum",
"timestampField": "timestamp",
"type": "cluster",
"units": "ms",
"uuidField": "source_node.uuid",
},
"index_refresh_time": ElasticsearchMetric {
"app": "elasticsearch",
"derivative": true,
Expand Down Expand Up @@ -4505,46 +4546,6 @@ Object {
"units": "ms",
"uuidField": "source_node.uuid",
},
"query_latency": LatencyMetric {
"aggs": Object {
"event_time_in_millis": Object {
"max": Object {
"field": "index_stats.total.search.query_time_in_millis",
},
},
"event_time_in_millis_deriv": Object {
"derivative": Object {
"buckets_path": "event_time_in_millis",
"gap_policy": "skip",
"unit": "1s",
},
},
"event_total": Object {
"max": Object {
"field": "index_stats.total.search.query_total",
},
},
"event_total_deriv": Object {
"derivative": Object {
"buckets_path": "event_total",
"gap_policy": "skip",
"unit": "1s",
},
},
},
"app": "elasticsearch",
"calculation": [Function],
"derivative": false,
"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.",
"field": "index_stats.total.search.query_total",
"format": "0,0.[00]",
"label": "Search Latency",
"metricAgg": "sum",
"timestampField": "timestamp",
"type": "cluster",
"units": "ms",
"uuidField": "source_node.uuid",
},
"search_request_rate": RequestRateMetric {
"app": "elasticsearch",
"derivative": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ export const metrics = {
'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
type: 'node'
}),
index_latency: new LatencyMetric({
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
Expand All @@ -98,7 +99,7 @@ export const metrics = {
'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
type: 'node'
}),
query_latency: new LatencyMetric({
index_query_latency: new LatencyMetric({
metric: 'query',
fieldSource: 'index_stats.total',
field: 'index_stats.total.search.query_total',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ export const metricSet = {
{
keys: ['index_segment_count_total', 'index_segment_count_primaries'],
name: 'index_segment_count'
},
{
keys: ['index_index_latency', 'index_query_latency'],
name: 'index_latency'
}
],
overview: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ export const metricSets = {
{
keys: ['node_cgroup_periods', 'node_cgroup_throttled_count'],
name: 'node_cgroup_stats'
},
{
keys: ['node_query_latency', 'node_index_latency'],
name: 'node_latency'
}
],
overview: [
Expand Down
Loading

0 comments on commit e8451ad

Please sign in to comment.