简体   繁体   中英

Elasticsearch: How to query for number of connections?

How do I ask my Elasticsearch server how many connections are open to it right now?

Is this the same as the number of sockets? (I don't know how to get these numbers, either)

And this is different from the number of clients, right, since each client may open multiple connections?

Could not find any info on this, though I did find that you could specify a maxSockets per client on the Elasticsearch client side: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/configuration.html

The request layer uses a RESTful API, so connections don't stay open after any request has been served.

So if you're trying to gauge how many concurrent requests Elasticsearch is serving (whether it's query, index or bulk), you probably want to monitor the thread_pool on each node:

https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html

Or are you looking for more info into the discovery layer?

ES don't have number of connections.
But you can get some information about ES health, more info here :

curl 'localhost:9200/_cat/health?v'

And you can obtain extended statistics about shards, segments, indexes, searches counts and so on... more info here :

curl -XGET 'http://localhost:9200/_stats'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM