**
ELK安裝部署
**
1 第一台:上傳并安裝elasticsearch,jdk,kibana包
這裡我用的是 jdk-8u131-linux-x64_.rpm elasticsearch-7.3.2-x86_64.rpm kibana-7.3.2-x86_64.rpm 這3個包
1.開始安裝
rpm -ivh jdk-8u131-linux-x64_.rpm elasticsearch-7.3.2-x86_64.rpm kibana-7.3.2-x86_64.rpm
2.修改配置檔案
elasticsearch的配置檔案
vim /etc/elasticsearch/elasticsearch.yml
啟動elasticsearch
systemctl start elasticsearch
kibana配置檔案
vim /etc/kibana/kibana.yml
啟動kibana
systemctl start kibana
浏覽器通路192.168.111.128:5601
2 第二台:上傳安裝logstash和jdk
這裡我用的是 jdk-8u131-linux-x64_.rpm logstash-7.3.2.rpm 這2個包
開始安裝
rpm -ivh logstash-7.3.2.rpm jdk-8u131-linux-x64_.rpm
切換目錄并寫檔案
cd /etc/logstash/conf.d/
vim system,conf
input {
file {
path => "/var/log/messages"
type => "system-log"
start_position => "beginning"
}
}
output {
elasticsearch{
hosts => "192.168.111.128:9200"
index => "system-log_%{+YYYY.MM.dd}"
}
}
給權限
chmod +r /var/log/messages
啟動logstash
systemctl start logstash
以下浏覽器上操作