ELK
- E elasticsearch 负责对日志进行索引
- L logstash 负责收集日志,输出到els
- K Kibaba 负责展示es索引的页面
Kibaba5.5.0 只支持Es5.5.0及以上版本
安装 elasticsearch
- 注意问题
Likely root cause: expected '<document start>', but found BlockMappingStart
in 'reader', line 54, column 1:
network.bind_host: 0.0.0.0
^
- 解决办法
参数key 前面要加空格
- 最小配置
path.data: /Users/liuxin/elasticsearch-5.5.2/data
path.logs: /Users/liuxin/elasticsearch-5.5.2/logs
network.bind_host: 0.0.0.0
network.publish_host: 127.0.0.1
network.host: m000
安装Logstash
解压配置环境变量
liuxin@MacBook-Pro ~/logstash-2.4.0 cat pro.conf
input {
file {
type => "rabbitmq-test"
path => "/Users/liuxin/rabbitmql_pro.log"
}
}
output {
elasticsearch {
hosts => "127.0.0.1:9200"
index => "logstash-%{type}-%{+YYYY.MM.dd}"
template_overwrite => true
}
}
liuxin@MacBook-Pro ~/logstash-2.4.0
启动命令 : logstash -f pro.conf
安装Kibaba
最小配置
server.port: 5601
server.host: "localhost"
elasticsearch.url: "http://localhost:9200"
启动
bash kibana
网友评论