Install and Configure an EFK stack on centos6

Hello, I’m Takeken.
I feel like scrambled egg, it’s a humidity day and a rainy day and a hot day.

this time is I introduce how to install EFK stack(Elasticsearch, Fluentd, kibana) on Centos6.
I have already finished to making on Debian8, but this time, I was challenged other environment.

What is can us do? It will also show you how to configure it to visualize the access log of Elasticsearch server.
By visualizing log, We could know the state of the server.


How to install Elasticsearch

install package JAVA, it might be better “yum install”.

sudo rpm --import

sudoedit /etc/yum.repos.d/elasticsearch.repo

name=Elasticsearch repository for 1.2.x packages

sudo yum install elasticsearch

sudo service elasticsearch restart
sudo chkconfig elasticsearch on                                                         
sudo chkconfig --list elasticsearch
elasticsearch  	0:off	1:off	2:on	3:on	4:on	5:on	6:off


$ curl -s http://localhost:9200  | head -3                                                [~]
  "status" : 200,
  "name" : "Silverclaw",


How to install kibana

cd ~/

sudo wget
sudo tar zxvf kibana-3.1.2.tar.gz
cd kibana-3.1.2

sudo mkdir /var/www/html/kibana3/
sudo cp -R /usr/local/src/kibana-3.1.2/* /var/www/html/kibana3/


To see the graph from the browser, apparently there is a need that can be accessed from the outside to the 9200 port.
In short, if you could admit access to 9200 from the client’s IP addr so that you can see.


How to install td-agent(fluentd)
curl -L | sh


libxml2 2.9.2... ERROR
# yum -y install libxml2 libxslt libxml2-devel libxslt-devel
# gem install nokogiri -- --use-system-libraries

I prepared two pattern, both main and ltsv at a access log,
and ltsv pattern is send to Elasticsearch Server by td-agent.

Example, like this.


We can know information by issued various query.
Example, from the Google search? Scan? Attack?
We can know these.

Related Posts

投稿者: Takeken

インターネット利用者のITリテラシーを向上したいという設定の2次元キャラです。 サーバー弄りからプログラミングまで手を付けた自称エッセイストなたけけんの物語。


メールアドレスが公開されることはありません。 が付いている欄は必須項目です