Elasticsearch 监控运行状态
Elasticsearch 大约 1133 字监控运行状态
curl -X GET "localhost:9200/_cluster/health"
输出:
{"cluster_name":"elasticsearch","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":0,"active_shards":0,"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}
格式化后输出
添加pretty
参数
curl -X GET "localhost:9200/_cluster/health?pretty=true"
输出:
{
"cluster_name" : "elasticsearch",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 0,
"active_shards" : 0,
"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
}
status字段
当前集群(单机es
只有green
,curl
不通则表明服务已宕机)在总体上是否工作正常。它的三种颜色含义如下:
green
:所有的主分片和副本分片都正常运行。yellow
:所有的主分片都正常运行,但不是所有的副本分片都正常运行。red
:有主分片没能正常运行。
阅读 2471 · 发布于 2019-04-25
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓
昵称:
随便看看
换一批
-
Java jcmd 报 AttachNotSupportedException: Unable to open socket file阅读 1287
-
Java 计算分页参数 page 和 size 三种方法阅读 273
-
SpringMVC 请求体接收任意格式参数阅读 1234
-
数据结构:环形链表-约瑟夫环阅读 1435
-
HTTP 携带多个 Cookie 请求阅读 2610
-
JavaScript 实现 jQuery wrap 方法阅读 184
-
PHP 序列化与反序列化阅读 2219
-
Vue i18n 国际化阅读 704
-
通过 Windows 远程桌面修改远程电脑密码阅读 1921
-
软考-系统架构设计师:政府信息化与电子政务阅读 2198