elk之elasticsearch 入门-阿里云开发者社区

开发者社区> 微服务> 正文
登录阅读全文

elk之elasticsearch 入门

简介: 一、概述:   1、查看elasticsearch集群的健康状况: 1 [root@node115 kibana]# curl -X GET http://192.168.39.115:9200/_cat/health?v 2 epoch timestamp cluster status node.

一、概述:

  1、查看elasticsearch集群的健康状况:

1 [root@node115 kibana]# curl -X GET  http://192.168.39.115:9200/_cat/health?v
2 epoch      timestamp cluster       status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
3 1487146452 16:14:12  elasticsearch green           2         2     42  21    0    0        0             0                  -                100.0%

  2、查看elasticsearch集群的节点信息:

1 [root@node115 kibana]# curl -X GET  http://192.168.39.115:9200/_cat/nodes?v
2 ip             heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
3 192.168.39.115           30          24   1    0.43    0.20     0.22 mdi       *      node-1
4 192.168.39.175           43         100   1    0.53    0.42     0.39 mdi       -      node-2

  3、查看index信息:

1 [root@node115 kibana]# curl -X GET  http://192.168.39.115:9200/_cat/indices?v
2 health status index               uuid                   pri rep docs.count docs.deleted store.size pri.store.size
3 green  open   .kibana             e1EFtVxJSeS1jLxeX7kLSg   1   1          2            0     21.4kb         10.7kb
4 green  open   logstash-2017.02.15 i2rSKoflRtiEZoj9CmgEOA   5   1    6916294            0      4.3gb          2.1gb
5 green  open   logstash-2017.02.14 zMnftdmDQRShH86XsmwWlw   5   1       6127            0      4.8mb          2.4mb
6 green  open   filebeat-2017.02.15 alVH725IQgmwZiYvuW3Dsg   5   1    6922434            0      3.8gb          1.9gb
7 green  open   filebeat-2017.02.14 E2v3vgcPQz6jrDhxZMprOw   5   1       6127            0        4mb            2mb

  4、创建index

1 PUT /customer?pretty    #创建名为customer的index

  5、查看index的详细信息:

1 curl -X GET http://192.168.39.115:9200/logstash-2017.02.15?pretty 

  6、删除index:

1 DELETE /customer?pretty    #删除index (customer)

   7、查看index上设置信息:

 1 [root@node115 kibana]# curl -X GET http://192.168.39.115:9200/logstash-2017.02.16/_settings 
 2 {
 3     "logstash-2017.02.16":{
 4         "settings":{
 5             "index":{
 6                 "refresh_interval":"5s",
 7                 "number_of_shards":"5",
 8                 "provided_name":"logstash-2017.02.16",
 9                 "creation_date":"1487203204821",
10                 "number_of_replicas":"1",
11                 "uuid":"-Bwpq-5TT8mzLMJeU7PQ7A",
12                 "version":{
13                     "created":"5020099"
14                 }
15             }
16         }
17     }
18 }

  8、修改index上的配置信息:

 

二、kafka相关:

  查看topic

    bin/kafka-topics.sh --list --zookeeper localhost:2181

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

分享: