Merge pull request elastic/elasticsearch#1807 from tlrx/add-more-threadpool-stats
Monitoring: Add more thread pool stats Original commit: elastic/x-pack-elasticsearch@b9e533b25d
This commit is contained in:
commit
ea2be5d4d9
|
@ -56,9 +56,27 @@ public class NodeStatsResolver extends MonitoringIndexNameResolver.Timestamped<N
|
|||
"node_stats.jvm.gc.collectors.old",
|
||||
"node_stats.jvm.gc.collectors.old.collection_count",
|
||||
"node_stats.jvm.gc.collectors.old.collection_time_in_millis",
|
||||
"node_stats.thread_pool.index.rejected",
|
||||
"node_stats.thread_pool.search.rejected",
|
||||
"node_stats.thread_pool.bulk.threads",
|
||||
"node_stats.thread_pool.bulk.queue",
|
||||
"node_stats.thread_pool.bulk.rejected",
|
||||
"node_stats.thread_pool.generic.threads",
|
||||
"node_stats.thread_pool.generic.queue",
|
||||
"node_stats.thread_pool.generic.rejected",
|
||||
"node_stats.thread_pool.get.threads",
|
||||
"node_stats.thread_pool.get.queue",
|
||||
"node_stats.thread_pool.get.rejected",
|
||||
"node_stats.thread_pool.index.threads",
|
||||
"node_stats.thread_pool.index.queue",
|
||||
"node_stats.thread_pool.index.rejected",
|
||||
"node_stats.thread_pool.management.threads",
|
||||
"node_stats.thread_pool.management.queue",
|
||||
"node_stats.thread_pool.management.rejected",
|
||||
"node_stats.thread_pool.search.threads",
|
||||
"node_stats.thread_pool.search.queue",
|
||||
"node_stats.thread_pool.search.rejected",
|
||||
"node_stats.thread_pool.watcher.threads",
|
||||
"node_stats.thread_pool.watcher.queue",
|
||||
"node_stats.thread_pool.watcher.rejected",
|
||||
};
|
||||
|
||||
public NodeStatsResolver(MonitoredSystem id, int version, Settings settings) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import org.elasticsearch.monitor.os.OsProbe;
|
|||
import org.elasticsearch.monitor.process.ProcessProbe;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.threadpool.ThreadPoolStats;
|
||||
import org.elasticsearch.watcher.execution.InternalWatchExecutor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
|
@ -122,9 +123,14 @@ public class NodeStatsResolverTests extends MonitoringIndexNameResolverTestCase<
|
|||
};
|
||||
Map<Index, List<IndexShardStats>> statsByShard = new HashMap<>();
|
||||
statsByShard.put(index, Collections.singletonList(new IndexShardStats(shardId, new ShardStats[]{shardStats})));
|
||||
List<ThreadPoolStats.Stats> threadPoolStats = Arrays.asList(new ThreadPoolStats.Stats(ThreadPool.Names.INDEX, 0, 0, 0, 0, 0, 0),
|
||||
List<ThreadPoolStats.Stats> threadPoolStats = Arrays.asList(
|
||||
new ThreadPoolStats.Stats(ThreadPool.Names.BULK, 0, 0, 0, 0, 0, 0),
|
||||
new ThreadPoolStats.Stats(ThreadPool.Names.SEARCH, 0, 0, 0, 0, 0, 0)
|
||||
new ThreadPoolStats.Stats(ThreadPool.Names.GENERIC, 0, 0, 0, 0, 0, 0),
|
||||
new ThreadPoolStats.Stats(ThreadPool.Names.GET, 0, 0, 0, 0, 0, 0),
|
||||
new ThreadPoolStats.Stats(ThreadPool.Names.INDEX, 0, 0, 0, 0, 0, 0),
|
||||
new ThreadPoolStats.Stats(ThreadPool.Names.MANAGEMENT, 0, 0, 0, 0, 0, 0),
|
||||
new ThreadPoolStats.Stats(ThreadPool.Names.SEARCH, 0, 0, 0, 0, 0, 0),
|
||||
new ThreadPoolStats.Stats(InternalWatchExecutor.THREAD_POOL_NAME, 0, 0, 0, 0, 0, 0)
|
||||
);
|
||||
return new NodeStats(new DiscoveryNode("node_0", DummyTransportAddress.INSTANCE, Version.CURRENT), 0,
|
||||
new NodeIndicesStats(new CommonStats(), statsByShard), OsProbe.getInstance().osStats(),
|
||||
|
|
Loading…
Reference in New Issue