From 69ee9d77ad23d213d2e7a12e141e60b2fa19f014 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 18 Jan 2016 15:49:32 -0500 Subject: [PATCH] Reflect upstream load average change This commit addresses the handling of load averages in Marvel due to upstream changes in core Elasticsearch where the load average field was changed from an array to an object. Original commit: elastic/x-pack-elasticsearch@9ea57968bba0b4eea1638a2e66fa2e921d831f7c --- .../marvel/agent/renderer/node/NodeStatsRenderer.java | 2 +- .../marvel/src/test/resources/samples/node_stats.json | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/agent/renderer/node/NodeStatsRenderer.java b/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/agent/renderer/node/NodeStatsRenderer.java index 3c5d63efbb5..f0694fd665a 100644 --- a/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/agent/renderer/node/NodeStatsRenderer.java +++ b/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/agent/renderer/node/NodeStatsRenderer.java @@ -36,7 +36,7 @@ public class NodeStatsRenderer extends AbstractRenderer { "node_stats.fs.total.total_in_bytes", "node_stats.fs.total.free_in_bytes", "node_stats.fs.total.available_in_bytes", - "node_stats.os.cpu.load_average", + "node_stats.os.cpu.load_average.1m", "node_stats.process.cpu.percent", "node_stats.process.max_file_descriptors", "node_stats.process.open_file_descriptors", diff --git a/elasticsearch/x-pack/marvel/src/test/resources/samples/node_stats.json b/elasticsearch/x-pack/marvel/src/test/resources/samples/node_stats.json index 869fee2cf12..7e1f85e6429 100644 --- a/elasticsearch/x-pack/marvel/src/test/resources/samples/node_stats.json +++ b/elasticsearch/x-pack/marvel/src/test/resources/samples/node_stats.json @@ -30,11 +30,9 @@ }, "os": { "cpu": { - "load_average": [ - 0.66, - 0.87, - 1.28 - ] + "load_average": { + "1m": 0.66 + } } }, "process": {