前言
Elasticsearch作為非關(guān)系型數(shù)據(jù)庫,在某種程度上和關(guān)系型數(shù)據(jù)庫相似,作為數(shù)據(jù)庫,我們的主要作用就是存儲(chǔ)數(shù)據(jù)、檢索數(shù)據(jù);在關(guān)系型數(shù)據(jù)庫中,我們可以使用SQL語句和數(shù)據(jù)庫進(jìn)行交互,而Elasticsearch則為我們提供了豐富的Rest風(fēng)格的API,通過客戶端操作ES本質(zhì)上依然是Restful API的調(diào)用!
ES Restful API GET、POST、PUT、DELETE、HEAD含義(這幾個(gè)是API的基本概念):
1)GET:獲取請(qǐng)求對(duì)象的當(dāng)前狀態(tài)。
2)POST:改變對(duì)象的當(dāng)前狀態(tài)。
3)PUT:創(chuàng)建一個(gè)對(duì)象。
4)DELETE:銷毀對(duì)象。
5)HEAD:請(qǐng)求獲取對(duì)象的基礎(chǔ)信息。
文檔類API
集群管理API
_cat系列
_cat
提供了一系列查詢elasticsearch集群狀態(tài)的接口, 用于獲取 Elasticsearch 集群的狀態(tài)信息,比如節(jié)點(diǎn)、索引、分片、健康狀態(tài)等。它的返回結(jié)果以文本格式呈現(xiàn),易于閱讀和理解
[root@genterator opt]# curl localhost:8888/_cat
=^.^=
/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_cat/tasks #查看當(dāng)前的任務(wù)信息
/_cat/indices #查看所有索引
/_cat/indices/{index} #查看{index}的索引
/_cat/segments #查看分片信息
/_cat/segments/{index} #查看指定索引分片信息
/_cat/count #查詢集群中所有索引的文檔數(shù)量
/_cat/count/{index} #查詢集群中指定索引的文檔數(shù)量
/_cat/recovery #正在進(jìn)行的分片恢復(fù)操作的狀態(tài)
/_cat/recovery/{index} #指定索引上正在進(jìn)行的分片恢復(fù)操作的狀態(tài)
/_cat/health #查詢集群健康狀態(tài)
/_cat/pending_tasks
/_cat/aliases
/_cat/aliases/{alias}
/_cat/thread_pool
/_cat/thread_pool/{thread_pools}
/_cat/plugins
/_cat/fielddata
/_cat/fielddata/{fields}
/_cat/nodeattrs
/_cat/repositories
/_cat/snapshots/{repository}
/_cat/templates
/_cat/ml/anomaly_detectors
/_cat/ml/anomaly_detectors/{job_id}
/_cat/ml/trained_models
/_cat/ml/trained_models/{model_id}
/_cat/ml/datafeeds
/_cat/ml/datafeeds/{datafeed_id}
/_cat/ml/data_frame/analytics
/_cat/ml/data_frame/analytics/{id}
/_cat/transforms
/_cat/transforms/{transform_id}
#以上的命令中,你也可以后面加一個(gè)v,讓輸出內(nèi)容表格顯示表頭,如:
[root@genterator opt]# curl localhost:8888/_cat/count?v
epoch timestamp count
1596028395 13:13:15 171
allocation
_cat/allocation
,此API可以查看節(jié)點(diǎn)在磁盤的資源分配信息
[root@Genterator opt]# curl http://localhost:9200/_cat/allocation?v
shards disk.indices disk.used disk.avail disk.total disk.percent host ip node
682 125.1gb 166.3gb 329gb 495.4gb 33 10.130.9.253 10.130.9.253 Node-(9.253)
682 77.9gb 88.7gb 906.7gb 995.4gb 8 10.130.11.219 10.130.11.219 Node-(11.219)
681 132.3gb 141.3gb 854.1gb 995.4gb 14 10.130.12.203 10.130.12.203 Node-(12.203)
681 77.8gb 87gb 908.3gb 995.4gb 8 10.130.10.254 10.130.10.254 Node-(10.254)
681 132.4gb 202.4gb 293gb 495.4gb 40 10.130.10.253 10.130.10.253 Node-(10.253)
字段說明:
- shards:分配給每個(gè)節(jié)點(diǎn)的分片數(shù)。這個(gè)數(shù)字可以用來確定集群中是否有節(jié)點(diǎn)承受了過多的負(fù)載或者沒有均勻地分配分片。如果某個(gè)節(jié)點(diǎn)上的分片數(shù)量遠(yuǎn)高于其他節(jié)點(diǎn),可能會(huì)導(dǎo)致該節(jié)點(diǎn)成為瓶頸,影響整個(gè)集群的性能。
- disk.indices:每個(gè)節(jié)點(diǎn)上索引使用的磁盤空間量。這個(gè)數(shù)字可以用來確定哪些節(jié)點(diǎn)的磁盤空間可能不足。如果某個(gè)節(jié)點(diǎn)的磁盤空間已經(jīng)接近滿了,可能需要添加更多的存儲(chǔ)空間或者遷移一些分片到其他節(jié)點(diǎn)上。
- disk.used:每個(gè)節(jié)點(diǎn)上已用的磁盤空間量,包括所有分片和其他數(shù)據(jù)。
- disk.avail: 每個(gè)節(jié)點(diǎn)上未使用的磁盤空間量。
- disk.total:每個(gè)節(jié)點(diǎn)上總共可用的磁盤空間量。
- disk.percent: 每個(gè)節(jié)點(diǎn)上分配給索引的分片所使用的磁盤空間百分比。
- node:節(jié)點(diǎn)的名稱。這個(gè)信息可以用來確定集群中的每個(gè)節(jié)點(diǎn)的身份。每個(gè)節(jié)點(diǎn)都應(yīng)該有一個(gè)唯一的名稱,以便在日志和統(tǒng)計(jì)數(shù)據(jù)中區(qū)分它們。
shards
/_cat/shards
, 該API可以查詢集群中所有分片的詳細(xì)信息/_cat/shards/{index}
,{index}為具體索引名稱,該API可以查詢具體索引的分片詳細(xì)信息
[root@Genterator opt]# curl http://localhost:9200/_cat/shards?v
index shard prirep state docs store ip node
issue-push-topic-2023.05.27 0 p STARTED 2211208 273.6mb 10.130.10.254 Node-(10.254)
abstract9 1 p STARTED 0 208b 10.130.10.254 Node-(10.254)
abstract9 2 p STARTED 0 208b 10.130.12.203 Node-(12.203)
abstract9 0 p STARTED 0 208b 10.130.11.219
字段說明:
- index: 索引名稱。
- prirep: 分片是主分片(“p”)還是副本分片(“r”)。
- state: 分片的狀態(tài),例如 “STARTED”、“RELOCATING” 或 “UNASSIGNED”。
- docs: 分片包含的文檔數(shù)量。
- store: 分片存儲(chǔ)的磁盤空間量。
- ip: 存儲(chǔ)該分片的節(jié)點(diǎn)的 IP 地址。
- node: 存儲(chǔ)該分片的節(jié)點(diǎn)的名稱。
master
_cat/master
, 該API可以查詢所有主節(jié)點(diǎn)的信息Elasticsearch 集群只會(huì)有一個(gè)主節(jié)點(diǎn)。該節(jié)點(diǎn)負(fù)責(zé)協(xié)調(diào)集群中的所有操作,并確保復(fù)制和分片合并等任務(wù)得到正確執(zhí)行
[root@Genterator opt]# curl http://localhost:9200/_cat/master
id host ip node
pjAwBikYSxK_FKFT1UnbeQ 10.130.9.253 10.130.9.253 Node-(9.253)
字段說明:
- id:節(jié)點(diǎn)的唯一標(biāo)識(shí)符
- host:節(jié)點(diǎn)的主機(jī)名
- ip:節(jié)點(diǎn)的 IP 地址
- node:節(jié)點(diǎn)名稱
nodes
_cat/nodes
, 該API可以查詢節(jié)點(diǎn)信息它返回一個(gè)表格,列出了集群中所有節(jié)點(diǎn)的詳細(xì)信息,包括節(jié)點(diǎn)名稱、IP 地址、節(jié)點(diǎn)角色、JVM 版本、操作系統(tǒng)、CPU 使用率、內(nèi)存使用率等等。這個(gè) API 對(duì)于監(jiān)控和調(diào)試 Elasticsearch 集群非常有用,可以幫助管理員快速了解節(jié)點(diǎn)的狀態(tài)和性能。
GET _cat/nodes?v
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
10.130.10.254 71 96 18 2.39 2.42 2.49 cdhilmrstw - Node-(10.254)
10.130.9.253 72 99 12 1.34 1.22 1.20 cdhilmrstw * Node-(9.253)
10.130.12.203 71 98 2 0.02 0.15 0.21 cdhilmrstw - Node-(12.203)
10.130.10.253 61 99 17 2.60 2.52 2.57 cdhilmrstw - Node-(10.253)
10.130.11.219 65 96 1 0.14 0.27 0.32 cdhilmrstw - Node-(11.219)
字段說明:
- ip: node節(jié)點(diǎn)的IP
- heap.percent: 堆內(nèi)存占用百分比
- ram.percent: 內(nèi)存占用百分比
- cpu: CPU占用百分比
- load_1m: 1分鐘的系統(tǒng)負(fù)載
- load_5m: 5分鐘的系統(tǒng)負(fù)載
- load_15m: 15分鐘的系統(tǒng)負(fù)載
- node.role: node節(jié)點(diǎn)的角色
- master:是否是master節(jié)點(diǎn)
- name:節(jié)點(diǎn)名稱
health
_cat/health
, 該接口用于查詢集群健康狀態(tài)
GET _cat/health?v
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1685016019 12:00:19 PUBLIC-ELK-UAT green 5 5 3442 3224 0 0 0 0 - 100.0%
字段說明:
- 名稱: 描述
- epoch: 自標(biāo)準(zhǔn)時(shí)間(1970-01-01 00:00:00)以來的秒數(shù)
- timestamp: 時(shí)間
- cluster: 集群名稱
- status: 集群狀態(tài)
- node.total: 節(jié)點(diǎn)總數(shù)
- node.data: 數(shù)據(jù)節(jié)點(diǎn)總數(shù)
- shards: 分片總數(shù)
- pri: 主分片總數(shù)
- repo: 復(fù)制節(jié)點(diǎn)的數(shù)量
- init: 初始化節(jié)點(diǎn)的數(shù)量
- unassign: 未分配分片的數(shù)量
- pending_tasks: 待定任務(wù)數(shù)
- max_task_wait_time: 等待最長(zhǎng)任務(wù)的等待時(shí)間
- active_shards_percent: 活動(dòng)分片百分比
shards
_cat/shards
, 該API可以查詢集群中所有索引的分片信息
GET _cat/shards/expis-issue-report-info-202305?v
index shard prirep state docs store ip node
expis-issue-report-info-202305 0 p STARTED 32 329.8kb 10.130.10.253 Node-(10.253)
expis-issue-report-info-202305 0 r STARTED 32 325.3kb 10.130.9.253 Node-(9.253)
expis-issue-report-info-202305 1 p STARTED 24 182.1kb 10.130.9.253 Node-(9.253)
expis-issue-report-info-202305 1 r STARTED 24 182.1kb 10.130.11.219 Node-(11.219)
expis-issue-report-info-202305 2 p STARTED 26 92.1kb 10.130.11.219 Node-(11.219)
expis-issue-report-info-202305 2 r STARTED 26 92.1kb 10.130.10.254 Node-(10.254)
expis-issue-report-info-202305 3 p STARTED 32 92.8kb 10.130.10.254 Node-(10.254)
expis-issue-report-info-202305 3 r STARTED 32 92.8kb 10.130.12.203 Node-(12.203)
expis-issue-report-info-202305 4 r STARTED 24 106.6kb 10.130.10.253 Node-(10.253)
expis-issue-report-info-202305 4 p STARTED 24 106.6kb 10.130.12.203 Node-(12.203)
expis-issue-report-info-202305 5 p STARTED 34 298.4kb 10.130.10.253 Node-(10.253)
expis-issue-report-info-202305 5 r STARTED 34 122.1kb 10.130.9.253 Node-(9.253)
字段說明:
- index: 索引名稱
- shard: 分片序號(hào)
- prirep: 分片類型,p表示是主分片,r表示是復(fù)制分片
- state: 分片狀態(tài)
- docs: 該分片存放的文檔數(shù)量
- store: 該分片占用的存儲(chǔ)空間大小
- ip: 該分片所在的服務(wù)器ip
- node: 該分片所在的節(jié)點(diǎn)名稱
indices
_cat/indices
, 該API接口用于獲取集群中所有索引的詳細(xì)信息/_cat/indices/{index}
,用于查看指定索引的詳細(xì)信息
GET _cat/indices?v
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open ecs-trade-topic-2023.05.29 51AD0AMZT3eo-Mz3L4_FTQ 1 0 15533 0 7.7mb 7.7mb
green open issue-inner-api-topic-2023.05.30 rRArQPxuQQqlWewxUfgeCg 1 0 2623106 0 1gb 1gb
green open yto_a_10031_topic-2023.05.18 nM4kRuvVTryuCWbpt88evA 1 0 50954 0 13.4mb 13.4mb
green open yto_a_10031_topic-2023.05.19 9vbk8vUHRmqbSvHwSGdPpw 1 0 45344 0 19.8mb 19.8mb
字段說明:
- health: 索引的健康狀態(tài)
- status: 索引的開啟狀態(tài)
- index: 索引名字
- uuid: 索引的uuid
- pri: 索引的主分片數(shù)量
- rep: 索引的復(fù)制分片數(shù)量
- docs.count: 索引下的文檔總數(shù)
- docs.deleted: 索引下刪除狀態(tài)的文檔數(shù)
- store.size: 主分片+復(fù)制分片的大小
- pri.store.size: 主分片的大小
_cluster系列
_cluster
命令提供了一系列elasticsearch集群操作的接口, 用于管理 Elasticsearch 集群的配置和狀態(tài),比如創(chuàng)建、刪除索引,設(shè)置集群級(jí)別的參數(shù)等。它的返回結(jié)果以 JSON 格式呈現(xiàn),需要進(jìn)行解析和處理
health
_cluster/health
:獲取集群的健康狀態(tài)
[root@Genterator opt]# curl -X GET http://localhost:9200/_cluster/health?pretty=true
{
"cluster_name" : "es-cluster",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 11,
"active_shards" : 11,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
stats
_cluster/stats
是 Elasticsearch 的一個(gè) API 命令,用于獲取整個(gè)集群的統(tǒng)計(jì)信息,包括節(jié)點(diǎn)、索引、分片等。返回結(jié)果以 JSON 格式呈現(xiàn),需要進(jìn)行解析和處理。
使用 _cluster/stats
命令可以獲取以下信息:
- 集群的基本統(tǒng)計(jì)信息,包括集群名稱、節(jié)點(diǎn)數(shù)量、索引數(shù)量、分片數(shù)量等。
- 集群的健康狀態(tài),包括簇內(nèi)節(jié)點(diǎn)數(shù)量、可用節(jié)點(diǎn)數(shù)量、分片狀態(tài)等。
- 集群的節(jié)點(diǎn)統(tǒng)計(jì)信息,包括每個(gè)節(jié)點(diǎn)的內(nèi)存使用情況、CPU 使用情況、磁盤使用情況等。
- 集群的索引統(tǒng)計(jì)信息,包括每個(gè)索引的文檔數(shù)量、存儲(chǔ)空間、分片數(shù)量等。
[root@Genterator opt]# curl -X GET http://localhost:9200/_cluster/stats?pretty=true
{
"_nodes" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"cluster_name" : "PUBLIC-ELK-UAT",
"cluster_uuid" : "StUim7arRyO1Ti1RvAjdIQ",
"timestamp" : 1685513640223,
"status" : "green",
"indices" : {
"count" : 2064,
"shards" : {
"total" : 3505,
"primaries" : 3310,
"replication" : 0.05891238670694864,
"index" : {
"shards" : {
"min" : 1,
"max" : 24,
"avg" : 1.6981589147286822
},
"primaries" : {
"min" : 1,
"max" : 24,
"avg" : 1.6036821705426356
},
"replication" : {
"min" : 0.0,
"max" : 1.0,
"avg" : 0.03924418604651163
}
}
},
…………
state
_cluster/state
是 Elasticsearch 的一個(gè) API 命令,用于獲取整個(gè)集群的狀態(tài)信息,包括節(jié)點(diǎn)、索引、分片等。返回結(jié)果以 JSON 格式呈現(xiàn),需要進(jìn)行解析和處理。
使用 _cluster/state
命令可以獲取以下信息:
- 集群的元數(shù)據(jù)信息,包括節(jié)點(diǎn)、索引、分片、映射關(guān)系等。
- 集群的健康狀態(tài),包括簇內(nèi)節(jié)點(diǎn)數(shù)量、可用節(jié)點(diǎn)數(shù)量、分片狀態(tài)等。
- 集群的設(shè)置信息,包括索引級(jí)別和集群級(jí)別的設(shè)置。
[root@Genterator opt]# curl -X GET http://localhost:9200/_cluster/state?pretty=true
{
"cluster_name" : "es-cluster",
"cluster_uuid" : "JS-w67X-RLiSWNqTKtwV1g",
"version" : 185,
"state_uuid" : "tXt9qKT3TU-XuA-zGtgvLQ",
"master_node" : "CQ7D0x6rTi6p3bNNBsTQiw",
"blocks" : { },
"nodes" : {
"CQ7D0x6rTi6p3bNNBsTQiw" : {
"name" : "es-single",
"ephemeral_id" : "hzv26YNHRGWch0SIS5fpAg",
"transport_address" : "172.30.0.2:9300",
"attributes" : {
"ml.machine_memory" : "1073741824",
"xpack.installed" : "true",
"transform.node" : "true",
"ml.max_open_jobs" : "512",
"ml.max_jvm_size" : "536870912"
},
……
pending_tasks
查詢集群堆積任務(wù)
[root@Genterator opt]# curl -X GET http://localhost:9200/_cluster/pending_tasks?pretty=true
{
"tasks" : [ ]
}
setting
_cluster/settings
是 Elasticsearch 的一個(gè) API 命令,用于獲取或修改整個(gè)集群的設(shè)置。返回結(jié)果以 JSON 格式呈現(xiàn),需要進(jìn)行解析和處理。
使用 _cluster/settings
命令可以獲取或修改以下設(shè)置:
- 集群的持久化設(shè)置,包括集群名稱、節(jié)點(diǎn)發(fā)現(xiàn)、集群路由等。
- 集群的臨時(shí)性設(shè)置,包括自動(dòng)創(chuàng)建索引、自動(dòng)擴(kuò)容、索引的分配等。
- 集群的默認(rèn)設(shè)置,包括分片和副本的數(shù)量、索引的刷新間隔、索引的存儲(chǔ)設(shè)置等。
[root@Genterator opt]# curl -X GET http://localhost:9200/_cluster/settings -d '{
“persistent” : {
“discovery.zen.minimum_master_nodes” : 2
}
}'
#transient 表示臨時(shí)的,persistent表示永久的
reroute
/_cluster/reroute
是 Elasticsearch 的一個(gè) API 命令,用于手動(dòng)控制分片在節(jié)點(diǎn)之間的分配。通過該命令,你可以手動(dòng)將某個(gè)分片從一個(gè)節(jié)點(diǎn)轉(zhuǎn)移到另一個(gè)節(jié)點(diǎn),或者將某個(gè)分片從一個(gè)節(jié)點(diǎn)的某個(gè)索引中移除。
使用 /_cluster/reroute
命令可以完成以下操作:
- 將某個(gè)分片從一個(gè)節(jié)點(diǎn)轉(zhuǎn)移到另一個(gè)節(jié)點(diǎn)。
- 將某個(gè)分片從一個(gè)節(jié)點(diǎn)的某個(gè)索引中移除。
- 將某個(gè)分片從一個(gè)節(jié)點(diǎn)的某個(gè)索引中移除,并將該分片轉(zhuǎn)移到另一個(gè)節(jié)點(diǎn)。
- 將某個(gè)節(jié)點(diǎn)上的所有分片轉(zhuǎn)移到其他節(jié)點(diǎn)上。
#該請(qǐng)求將把 my_index 索引中的第 0 個(gè)分片從 node1 節(jié)點(diǎn)轉(zhuǎn)移到 node2 節(jié)點(diǎn)
[root@Genterator opt]# curl -X POST http://localhost:9200/_cluster/reroute -H 'Content-Type: application/json' -d'
{
"commands" : [
{
"move" : {
"index" : "my_index",
"shard" : 0,
"from_node" : "node1",
"to_node" : "node2"
}
}
]
}
'
nodes
/_cluster/nodes
是 Elasticsearch 的一個(gè) API 命令,用于獲取集群中的節(jié)點(diǎn)信息。該命令返回一個(gè) JSON 對(duì)象,其中包含了集群中所有節(jié)點(diǎn)的詳細(xì)信息,例如節(jié)點(diǎn) ID、節(jié)點(diǎn)名稱、節(jié)點(diǎn) IP 地址、節(jié)點(diǎn)角色等。
使用 /_cluster/nodes
命令可以完成以下操作:
- 獲取集群中所有節(jié)點(diǎn)的信息。
- 獲取特定節(jié)點(diǎn)的信息。
- 獲取特定節(jié)點(diǎn)的詳細(xì)信息,包括該節(jié)點(diǎn)上運(yùn)行的所有索引、分片狀態(tài)等。
-
/_cluster/nodes
命令返回的信息可能比較多,如果只需要獲取某些特定的信息,可以在請(qǐng)求 URL 中添加查詢參數(shù), 如:curl -X GET “l(fā)ocalhost:9200/_cluster/nodes?filter_path=nodes..name,nodes..ip”
#關(guān)閉指定IP節(jié)點(diǎn)
curl -XPOST ‘http://172.30.0.2:8888/_cluster/nodes/_local/_shutdown’
curl -XPOST ‘http://localhost:8888/_cluster/nodes/172.30.0.2/_shutdown’
#關(guān)閉主節(jié)點(diǎn)
curl -XPOST ‘http://localhost:8888/_cluster/nodes/_master/_shutdown’
#關(guān)閉整個(gè)集群 delay=10s表示延遲10秒關(guān)閉
$ curl -XPOST ‘http://localhost:8888/_shutdown?delay=10s’
$ curl -XPOST ‘http://localhost:8888/_cluster/nodes/_shutdown’
$ curl -XPOST ‘http://localhost:8888/_cluster/nodes/_all/_shutdown’
_nodes系列
/_nodes
是 Elasticsearch 的一個(gè) API 命令,用于獲取集群中的節(jié)點(diǎn)信息。該命令返回一個(gè) JSON 對(duì)象,其中包含了集群中所有節(jié)點(diǎn)的詳細(xì)信息,例如節(jié)點(diǎn) ID、節(jié)點(diǎn)名稱、節(jié)點(diǎn) IP 地址、節(jié)點(diǎn)角色等。
使用 /_nodes
命令可以完成以下操作:文章來源:http://www.zghlxwxcb.cn/news/detail-805286.html
- 獲取集群中所有節(jié)點(diǎn)的信息。
- 獲取特定節(jié)點(diǎn)的信息。
- 獲取特定節(jié)點(diǎn)的詳細(xì)信息,包括該節(jié)點(diǎn)上運(yùn)行的所有索引、分片狀態(tài)等。
需要注意的是,/_nodes
命令返回的信息比較詳細(xì),如果只需要獲取某些特定的信息,可以在請(qǐng)求 URL 中添加查詢參數(shù),例如:文章來源地址http://www.zghlxwxcb.cn/news/detail-805286.html
curl XGET "http://localhost:9200/_nodes?filter_path=nodes.*.name,nodes.*.ip,nodes.*.jvm.mem.heap_used_percent"
curl -XGET http://localhost:9200/_nodes/stats?pretty=true
curl -XGET http://localhost:9200/_nodes/47.97.176.22/stats?pretty=true
curl -XGET http://localhost:9200/_nodes/process
curl -XGET http://localhost:9200/_nodes/_all/process
curl -XGET http://localhost:9200/_nodes/47.97.176.22,47.97.176.223/jvm,process
curl -XGET http://localhost:9200/_nodes/47.97.176.22,47.97.176.223/info/jvm,process
curl -XGET http://localhost:9200/_nodes/47.97.176.22,47.97.176.223/_all
curl -XGET http://localhost:9200/_nodes/hot_threads
到了這里,關(guān)于ES基礎(chǔ)篇 常用API之集群類API的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!