git clone https://gitlab.com/pt1988/elk-lab1.git
cd elk-lab1/exercise-1
git clone git@10.3.132.179:~/elk-lab1 #password: git
cd elk-lab1/exercise-1
sudo su -
cp access.log /var/log
Using logstash to read logfile(/var/log/access.log) and process and print to screen.
whereis logstash
/usr/share/logstash/bin/logstash -h
/usr/share/logstash/bin/logstash -f logstash-stdout.conf
Using logstash to read logfile(/var/log/access.log) to process and store to Elasticsearch.
mkdir /etc/logstash/conf.d/
cp logstash-elasticsearch.conf /etc/logstash/conf.d/
systemctl restart logstash
systemctl status logstash
tail /var/log/logstash/logstash-plain.log -f