elasticsearch+kibana搭建:
elasticsearch:
Elasticsearch是一个分布式搜索服务
下载网址:
https://www.elastic.co/downloads
https://www.elastic.co/downloads/past-releases/elasticsearch-5-0-2
yum install java-1.8.0-openjdk
rpm -i elasticsearc-6.2.1-x86_64.rpm
service elasticsearch start
chkconfig --level 35 elasticsearch on
curl http://localhost:9200
查看所有index:
curl http://localhost:9200/_cat/indices?v
创建icinga2索引:
curl -XPUT http://localhost:9200/icinga2
删除icinga2索引:
curl -XDELETE http://localhost:9200/icinga2
查看内容:
curl http://localhost:9200/_search?pretty
kibana(kibana需和elasticsearch版本保持一致):
Kibana是一套分析与可视化平台,构建于Elasticsearch之上,旨在帮助用户更好地实现数据理解。
下载网址:
https://www.elastic.co/downloads
rpm -i kibana-6.2.1-x86_64.rpm
vi ./kibana-5.1.1-linux-x86_64/config/kibana.yml
server.port: 5601 (默认为注释掉的)
server.host: "10.0.0.2" (默认为注释掉的,并改为ip)
elasticsearch.url: "http://localhost:9200" (默认为注释掉的)
kibana.index: ".kibana" (默认为注释掉的)
:wq
service kibana restart
页面访问:http://10.0.0.2:5601 (没有用户名密码)
原文地址:http://blog.51cto.com/yangzhiming/2070665
时间: 2024-10-04 16:05:13