kibana安装及其配置

goodstudy 2020-03-05

kibana安装及其配置
1、下载
https://artifacts.elastic.co/downloads/kibana/kibana-5.4.3-x86_64.rpm
2、安装、修改配置
yum install -y kibana-5.4.3-x86_64.rpm
grep "^[a-z]" /etc/kibana/kibana.yml
server.port: 5601
server.host: "10.1.2.189"
elasticsearch.url: "http://10.1.2.184:9200"
3、访问
10.1.2.189:5601
查看配置状态
http://10.1.2.189:5601/status
4、配置正则匹配
在控制台的Management菜单配置如下正则匹配:

5、收集系统日志
1)先修改配置文件
vim /etc/logstash/conf.d/system.conf
input {
file {
path => "/var/log/messages"
type => "systemlog"
start_position => "beginning"
stat_interval => "2"
}
}

output {
elasticsearch {
hosts => ["10.1.2.184:9200"]
index => "logstash-systemlog-%{+YYYY.MM.dd}"
}
}
2)检测配置文件有没有错
/usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/system.conf -t
当出现Configuration OK表明配置没有问题
修改日志文件的权限否则收集的时候会报错
chmod 644 /var/log/messages
3)正则匹配跟上面一样
[logstash-systemlog]-YYYY.MM.DD
4)结果如下

相关推荐