Skip to content

Commit

Permalink
[Monitoring] Removing unused version.* fields (elastic#33584)
Browse files Browse the repository at this point in the history
This PR removes fields that are not actually used by the Monitoring UI. This will greatly simplify the eventual migration to using Metricbeat for monitoring Elasticsearch (see elastic/beats#8260 (comment) for more context and discussion around removing these fields from ES collection).
  • Loading branch information
ycombinator committed Sep 18, 2018
1 parent cdde837 commit 5c4b716
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@ protected void innerToXContent(XContentBuilder builder, Params params) throws IO
builder.field("created", metaData.getCreationDate());
builder.field("status", health.getStatus().name().toLowerCase(Locale.ROOT));

builder.startObject("version");
{
builder.field("created", metaData.getCreationVersion());
builder.field("upgraded", metaData.getUpgradedVersion());
}
builder.endObject();

builder.startObject("shards");
{
final int total = metaData.getTotalNumberOfShards();
Expand Down Expand Up @@ -128,8 +121,6 @@ protected void innerToXContent(XContentBuilder builder, Params params) throws IO
"index_stats.uuid",
"index_stats.created",
"index_stats.status",
"index_stats.version.created",
"index_stats.version.upgraded",
"index_stats.shards.total",
"index_stats.shards.primaries",
"index_stats.shards.replicas",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ private String indexStatsSummary() {
"\"uuid\":\"" + index.getUUID() + "\"," +
"\"created\":" + metaData.getCreationDate() + "," +
"\"status\":\"" + indexHealth.getStatus().name().toLowerCase(Locale.ROOT) + "\"," +
"\"version\":{" +
"\"created\":\"" + metaData.getCreationVersion() + "\"," +
"\"upgraded\":\"" + metaData.getUpgradedVersion() + "\"" +
"}," +
"\"shards\":{" +
"\"total\":" + total + "," +
"\"primaries\":" + primaries + "," +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ private void assertIndexStatsMonitoringDoc(final Map<String, Object> document) {

// particular field values checked in the index stats tests
final Map<String, Object> indexStats = (Map<String, Object>) source.get(IndexStatsMonitoringDoc.TYPE);
assertEquals(8, indexStats.size());
assertEquals(7, indexStats.size());
assertThat((String) indexStats.get("index"), not(isEmptyOrNullString()));
assertThat((String) indexStats.get("uuid"), not(isEmptyOrNullString()));
assertThat(indexStats.get("created"), notNullValue());
Expand Down

0 comments on commit 5c4b716

Please sign in to comment.