《Elastic Stack 实战手册》——三、产品能力——3.4.入门篇——3.4.3.Kibana基础应用(2) https://developer.aliyun.com/article/1228984
基础查询
更加详细的查询语法参考:
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
查看集群支持的选项
GET _cat
返回
=^.^= /_cat/allocation /_cat/shards /_cat/shards/{index} /_cat/master /_cat/nodes /_cat/tasks /_cat/indices /_cat/indices/{index} /_cat/segments /_cat/segments/{index} /_cat/count /_cat/count/{index} /_cat/recovery /_cat/recovery/{index} /_cat/health /_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}
查看节点信息
GET _cat/nodes?v
返回
id host ip node V_EuhAkbTS6T80mN3KX0XQ 10.0.0.41 10.0.0.41 1619503017001957432
查看所有节点上的热点线程
GET _nodes/hot_threads
返回
::: {1619503017001957332}{26XvIqLSRlC2hEJ7-kAPUw}{9ytH1jFvTxWT8XHKILnWGg}{10.0.0.38}{10.0.0.38:9300}{cdhilmrstw}{ml.machine_memory=1959018496, rack=cvm_33_330001, xpack.installed=true, set=330001, transform.node=true, ip=9.27.21.20, temperature=hot, ml.max_open_jobs=20, region=33} Hot threads at 2021-05-05T12:44:05.242Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true: ::: {1619503017001957532}{Chd-cONFTwOTtZ5H-SdnpQ}{UgtOpFLURSa-Otaq5ECJnQ}{10.0.0.32}{10.0.0.32:9300}{cdhilmrstw}{ml.machine_memory=1959018496, rack=cvm_33_330001, xpack.installed=true, set=330001, transform.node=true, ip=9.27.19.91, temperature=hot, ml.max_open_jobs=20, region=33} Hot threads at 2021-05-05T12:44:05.266Z, interval=500ms, busiestThreads=3, ignoreId leThreads=true: ::: {1619503017001957432}{V_EuhAkbTS6T80mN3KX0XQ}{VIcWTj5ERsmG_mY5jZSWtg}{10.0.0.41}{10.0.0.41:9300}{cdhilmrstw}{ml.machine_memory=1959018496, rack=cvm_33_330001, xpack.installed=true, set=330001, transform.node=true, ip=9.27.16.243, temperature=hot, ml.max_open_jobs=20, region=33} Hot threads at 2021-05-05T12:44:05.390Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:
查看不健康的分片或索引
GET _cluster/allocation/explain?pretty
返回
{ "error" : { "root_cause" : [ { "type" : "illegal_argument_exception", "reason" : "unable to find any unassigned shards to explain [ClusterAllocationExplainRequest[useAnyUnassignedShard=true,includeYesDecisions?=false]" } ], "type" : "illegal_argument_exception", "reason" : "unable to find any unassigned shards to explain [ClusterAllocationExplainRequest[useAnyUnassignedShard=true,includeYesDecisions?=false]" }, "status" : 400 }
查看线程池设置
GET _nodes/thread_pool/
返回
{ "_nodes" : { "total" : 3, "successful" : 3, "failed" : 0 }, "cluster_name" : "es-gcudgkos", "nodes" : { "Chd-cONFTwOTtZ5H-SdnpQ" : { "name" : "1619503017001957532", "transport_address" : "10.0.0.32:9300", "host" : "10.0.0.32", "ip" : "10.0.0.32", "version" : "7.10.1", "build_flavor" : "default", "build_type" : "tar", "build_hash" : "27aa98ee709dc860b4bec3994b44ba2e6c8dd73d", "roles" : [ "data", "data_cold", "data_content", "data_hot", "data_warm", "ingest", "master", "ml", "remote_cluster_client", "transform" ], ......
《Elastic Stack 实战手册》——三、产品能力——3.4.入门篇——3.4.3.Kibana基础应用(4) https://developer.aliyun.com/article/1228981