Getting ready with EFK stack
-
Setup the main EFK Stack on a linux server using the shell script.
sudo chmod +x EFK.sh ./EFK.sh
-
Visit your kibana dashboard and create
api.log-*
index pattern in Management->Stack Management->Index Patterns. -
Collect your log from your applicatiion. eg. for Node.js app you can use this package.
-
You can see the logs on kibana dashboard now.
To protect the kibana dashboard you can use the htpasswd
in nginx.
Use authentication while communicating through fluentd.
Reset elasticsearch user's password
bin/elasticsearch-reset-password -u elastic -i
Delete indices from Elasticsearch
curl -XDELETE 'http://localhost:9200/logstash-*'
Check the space usage in Elasticsearch
curl -XGET 'http://localhost:9200/_cat/indices?v'
curl -XGET 'http://localhost:9200/_cat/allocation?v'