Marvel: Be more precise about the required stats
Original commit: elastic/x-pack-elasticsearch@2a0385ea85
This commit is contained in:
parent
fc321a02a1
commit
d377168a7f
|
@ -53,9 +53,17 @@ public class IndexStatsCollector extends AbstractCollector<IndexStatsCollector>
|
|||
List<MarvelDoc> results = new ArrayList<>(1);
|
||||
try {
|
||||
IndicesStatsResponse indicesStats = client.admin().indices().prepareStats()
|
||||
.setRefresh(true)
|
||||
.setIndices(marvelSettings.indices())
|
||||
.setIndicesOptions(IndicesOptions.lenientExpandOpen())
|
||||
.clear()
|
||||
.setDocs(true)
|
||||
.setFieldData(true)
|
||||
.setIndexing(true)
|
||||
.setMerge(true)
|
||||
.setSearch(true)
|
||||
.setSegments(true)
|
||||
.setStore(true)
|
||||
.setRefresh(true)
|
||||
.get(marvelSettings.indexStatsTimeout());
|
||||
|
||||
long timestamp = System.currentTimeMillis();
|
||||
|
|
|
@ -54,7 +54,11 @@ public class IndicesStatsCollector extends AbstractCollector<IndicesStatsCollect
|
|||
IndicesStatsResponse indicesStats = client.admin().indices().prepareStats()
|
||||
.setIndices(marvelSettings.indices())
|
||||
.setIndicesOptions(IndicesOptions.lenientExpandOpen())
|
||||
.setRefresh(true)
|
||||
.clear()
|
||||
.setDocs(true)
|
||||
.setIndexing(true)
|
||||
.setSearch(true)
|
||||
.setStore(true)
|
||||
.get(marvelSettings.indicesStatsTimeout());
|
||||
|
||||
return Collections.singletonList(new IndicesStatsMarvelDoc(clusterUUID(), TYPE, System.currentTimeMillis(), indicesStats));
|
||||
|
|
|
@ -7,6 +7,7 @@ package org.elasticsearch.marvel.agent.collector.node;
|
|||
|
||||
|
||||
import org.elasticsearch.action.admin.cluster.node.stats.NodeStats;
|
||||
import org.elasticsearch.action.admin.indices.stats.CommonStatsFlags;
|
||||
import org.elasticsearch.bootstrap.BootstrapInfo;
|
||||
import org.elasticsearch.cluster.ClusterService;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
|
@ -69,7 +70,7 @@ public class NodeStatsCollector extends AbstractCollector<NodeStatsCollector> {
|
|||
protected Collection<MarvelDoc> doCollect() throws Exception {
|
||||
List<MarvelDoc> results = new ArrayList<>(1);
|
||||
|
||||
NodeStats nodeStats = nodeService.stats();
|
||||
NodeStats nodeStats = nodeService.stats(CommonStatsFlags.ALL, true, true, true, true, true, false, false, false,false, false);
|
||||
|
||||
// Here we are calling directly the DiskThresholdDecider to retrieve the high watermark value
|
||||
// It would be nicer to use a settings API like documented in #6732
|
||||
|
|
Loading…
Reference in New Issue