Ставим все необходимые пакеты:
# apt install -y openjdk-9-jre apt-transport-https
# wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
# echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-6.x.list
# apt update && apt install elasticsearch kibana logstash packetbeat metricbeat filebeat heartbeat -y
Запускаем elasticsearch на локалхосте:
# vim /etc/elasticsearch/elasticsearch.yml
network.host: 127.0.0.1
Прописываем конфиг logstash:
# vim /etc/logstash/conf.d/10-syslog.conf
input {
file {
type => "syslog"
path => [ "/var/log/messages", "/var/log/*.log" ]
}
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
hosts => "localhost"
}
}
Запускаем сервисы:
# systemctl enable elasticsearch kibana logstash filebeat packetbeat metricbeat heartbeat
# systemctl start elasticsearch kibana logstash filebeat packetbeat metricbeat heartbeat
Идем по адресу: http://localhost:5601
# apt install -y openjdk-9-jre apt-transport-https
# wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
# echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-6.x.list
# apt update && apt install elasticsearch kibana logstash packetbeat metricbeat filebeat heartbeat -y
Запускаем elasticsearch на локалхосте:
# vim /etc/elasticsearch/elasticsearch.yml
network.host: 127.0.0.1
Прописываем конфиг logstash:
# vim /etc/logstash/conf.d/10-syslog.conf
input {
file {
type => "syslog"
path => [ "/var/log/messages", "/var/log/*.log" ]
}
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
hosts => "localhost"
}
}
Запускаем сервисы:
# systemctl enable elasticsearch kibana logstash filebeat packetbeat metricbeat heartbeat
# systemctl start elasticsearch kibana logstash filebeat packetbeat metricbeat heartbeat
Идем по адресу: http://localhost:5601
Комментариев нет:
Отправить комментарий