一、概述:
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