diff --git a/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/agent/renderer/indices/IndexStatsRenderer.java b/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/agent/renderer/indices/IndexStatsRenderer.java index 70933d33aad..07c59500143 100644 --- a/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/agent/renderer/indices/IndexStatsRenderer.java +++ b/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/agent/renderer/indices/IndexStatsRenderer.java @@ -19,6 +19,17 @@ public class IndexStatsRenderer extends AbstractRenderer { public static final String[] FILTERS = { "index_stats.index", "index_stats.primaries.docs.count", + "index_stats.primaries.fielddata.memory_size_in_bytes", + "index_stats.primaries.indexing.index_total", + "index_stats.primaries.indexing.index_time_in_millis", + "index_stats.primaries.indexing.throttle_time_in_millis", + "index_stats.primaries.merges.total_size_in_bytes", + "index_stats.primaries.search.query_total", + "index_stats.primaries.search.query_time_in_millis", + "index_stats.primaries.segments.memory_in_bytes", + "index_stats.primaries.store.size_in_bytes", + "index_stats.primaries.store.throttle_time_in_millis", + "index_stats.primaries.refresh.total_time_in_millis", "index_stats.total.docs.count", "index_stats.total.fielddata.memory_size_in_bytes", "index_stats.total.indexing.index_total", diff --git a/elasticsearch/x-pack/marvel/src/main/resources/monitoring-es.json b/elasticsearch/x-pack/marvel/src/main/resources/monitoring-es.json index 51994ef36cf..268ecd3dad5 100644 --- a/elasticsearch/x-pack/marvel/src/main/resources/monitoring-es.json +++ b/elasticsearch/x-pack/marvel/src/main/resources/monitoring-es.json @@ -112,6 +112,67 @@ "type": "long" } } + }, + "fielddata" : { + "properties": { + "memory_size_in_bytes": { + "type": "long" + } + } + }, + "store": { + "properties": { + "size_in_bytes": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "indexing": { + "properties": { + "index_total": { + "type": "long" + }, + "index_time_in_millis": { + "type": "long" + }, + "throttle_time_in_millis": { + "type": "long" + } + } + }, + "merges": { + "properties": { + "total_size_in_bytes": { + "type": "long" + } + } + }, + "search": { + "properties": { + "query_total": { + "type": "long" + }, + "query_time_in_millis": { + "type": "long" + } + } + }, + "segments": { + "properties": { + "memory_in_bytes": { + "type": "long" + } + } + }, + "refresh": { + "properties": { + "total_time_in_millis": { + "type": "long" + } + } } } }, diff --git a/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/agent/renderer/indices/IndexStatsRendererTests.java b/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/agent/renderer/indices/IndexStatsRendererTests.java index f563d37b8d3..48fc2013f5c 100644 --- a/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/agent/renderer/indices/IndexStatsRendererTests.java +++ b/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/agent/renderer/indices/IndexStatsRendererTests.java @@ -49,16 +49,23 @@ public class IndexStatsRendererTests extends ESTestCase { return stats; } - @Override - public CommonStats getPrimaries() { - // Primaries will be filtered out by the renderer - CommonStats stats = new CommonStats(); - stats.docs = new DocsStats(345678L, randomLong()); - stats.store = new StoreStats(randomLong(), randomLong()); - stats.indexing = new IndexingStats(new IndexingStats.Stats(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, true, randomLong()), null); - return stats; - } - }); + @Override + public CommonStats getPrimaries() { + // Primaries will be filtered out by the renderer + CommonStats stats = new CommonStats(); + stats.docs = new DocsStats(345678L, randomLong()); + stats.store = new StoreStats(randomLong(), randomLong()); + stats.indexing = new IndexingStats(new IndexingStats.Stats(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, true, randomLong()), null); + stats.search = new SearchStats(new SearchStats.Stats(1L, 7L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), 0L, null); + stats.merge = new MergeStats(); + stats.merge.add(0L, 0L, 0L, 42L, 0L, 0L, 0L, 0L, 0L, 0L); + stats.refresh = new RefreshStats(0L, 978L); + stats.fieldData = new FieldDataStats(123456L, 0L, null); + stats.segments = new SegmentsStats(); + stats.segments.add(0, 87965412L); + return stats; + } + }); logger.debug("--> rendering the document"); Renderer renderer = new IndexStatsRenderer(); diff --git a/elasticsearch/x-pack/marvel/src/test/resources/samples/index_stats.json b/elasticsearch/x-pack/marvel/src/test/resources/samples/index_stats.json index 77ed310e877..d365649fb11 100644 --- a/elasticsearch/x-pack/marvel/src/test/resources/samples/index_stats.json +++ b/elasticsearch/x-pack/marvel/src/test/resources/samples/index_stats.json @@ -36,6 +36,31 @@ "primaries" : { "docs" : { "count" : 345678 + }, + "store": { + "size_in_bytes": 5761573, + "throttle_time_in_millis": 0 + }, + "indexing": { + "index_total" : 3, + "index_time_in_millis" : 71, + "throttle_time_in_millis": 302 + }, + "search" : { + "query_total" : 1, + "query_time_in_millis" : 7 + }, + "merges" : { + "total_size_in_bytes" : 42 + }, + "refresh" : { + "total_time_in_millis" : 978 + }, + "fielddata" : { + "memory_size_in_bytes" : 123456 + }, + "segments" : { + "memory_in_bytes" : 87965412 } } }