EleasticSearch, LogStash, Kibana
2016-02-22 本文已影响208人
虎耳
EleasticSearch, LogStash, Kibana
ELK Stack
ELK PortsSteps
- First try
× curl -XGET http://localhost:9200/_stats- /opt/logstash/bin/logstash -e 'input { stdin { } } output { elasticsearch { hosts => ["127.0.0.1"] } }'
- curl -XPUT 'http://localhost:9200/_template/filebeat?pretty' -d@/etc/filebeat/filebeat.template.json
- sudo /etc/init.d/filebeat start
- sudo /etc/init.d/filebeat stop
Linking a Docker container to the ELK container
sudo docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -p 5000:5000 -it --name elk sebp/elk
sudo docker run -p 80:80 -it --link elk:elk your/image
Storing log data
- sudo docker run -p 5601:5601 -p 9200:9200 -p 5000:5000 -v /var/lib/elasticsearch --name elk_data sebp/elk
- sudo docker run -p 5601:5601 -p 9200:9200 -p 5000:5000 --volumes-from elk_data --name elk sebp/elk