mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-23 21:38:15 +00:00
[Monitoring] Removing unused version.* fields (#33584)
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 https://github.com/elastic/beats/pull/8260#discussion_r215885868 for more context and discussion around removing these fields from ES collection).
This commit is contained in:
parent
012b9c7539
commit
a95226bdae
@ -69,13 +69,6 @@ public class IndexStatsMonitoringDoc extends FilteredMonitoringDoc {
|
|||||||
builder.field("created", metaData.getCreationDate());
|
builder.field("created", metaData.getCreationDate());
|
||||||
builder.field("status", health.getStatus().name().toLowerCase(Locale.ROOT));
|
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");
|
builder.startObject("shards");
|
||||||
{
|
{
|
||||||
final int total = metaData.getTotalNumberOfShards();
|
final int total = metaData.getTotalNumberOfShards();
|
||||||
@ -128,8 +121,6 @@ public class IndexStatsMonitoringDoc extends FilteredMonitoringDoc {
|
|||||||
"index_stats.uuid",
|
"index_stats.uuid",
|
||||||
"index_stats.created",
|
"index_stats.created",
|
||||||
"index_stats.status",
|
"index_stats.status",
|
||||||
"index_stats.version.created",
|
|
||||||
"index_stats.version.upgraded",
|
|
||||||
"index_stats.shards.total",
|
"index_stats.shards.total",
|
||||||
"index_stats.shards.primaries",
|
"index_stats.shards.primaries",
|
||||||
"index_stats.shards.replicas",
|
"index_stats.shards.replicas",
|
||||||
|
@ -290,10 +290,6 @@ public class IndexStatsMonitoringDocTests extends BaseFilteredMonitoringDocTestC
|
|||||||
"\"uuid\":\"" + index.getUUID() + "\"," +
|
"\"uuid\":\"" + index.getUUID() + "\"," +
|
||||||
"\"created\":" + metaData.getCreationDate() + "," +
|
"\"created\":" + metaData.getCreationDate() + "," +
|
||||||
"\"status\":\"" + indexHealth.getStatus().name().toLowerCase(Locale.ROOT) + "\"," +
|
"\"status\":\"" + indexHealth.getStatus().name().toLowerCase(Locale.ROOT) + "\"," +
|
||||||
"\"version\":{" +
|
|
||||||
"\"created\":\"" + metaData.getCreationVersion() + "\"," +
|
|
||||||
"\"upgraded\":\"" + metaData.getUpgradedVersion() + "\"" +
|
|
||||||
"}," +
|
|
||||||
"\"shards\":{" +
|
"\"shards\":{" +
|
||||||
"\"total\":" + total + "," +
|
"\"total\":" + total + "," +
|
||||||
"\"primaries\":" + primaries + "," +
|
"\"primaries\":" + primaries + "," +
|
||||||
|
@ -417,7 +417,7 @@ public class MonitoringIT extends ESSingleNodeTestCase {
|
|||||||
|
|
||||||
// particular field values checked in the index stats tests
|
// particular field values checked in the index stats tests
|
||||||
final Map<String, Object> indexStats = (Map<String, Object>) source.get(IndexStatsMonitoringDoc.TYPE);
|
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("index"), not(isEmptyOrNullString()));
|
||||||
assertThat((String) indexStats.get("uuid"), not(isEmptyOrNullString()));
|
assertThat((String) indexStats.get("uuid"), not(isEmptyOrNullString()));
|
||||||
assertThat(indexStats.get("created"), notNullValue());
|
assertThat(indexStats.get("created"), notNullValue());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user