Logstash+Elasticsearch+Kibanaログサーバ構築
1914 ワード
公式サイトhttps://www.elastic.co
説明:この環境Centos 6.5 64ビット、単機でテストを行い、具体的な構成は簡単です.
1.Logstashインストール構成
ソフトウェアのバージョン:
Logstash 2.2.0 All Plugins
Elasticsearch 2.2.0
Kibana 4.4.0
説明:この環境Centos 6.5 64ビット、単機でテストを行い、具体的な構成は簡単です.
1.Logstashインストール構成
/usr/local/logstash-2.200/に解凍
Logstashプロファイル:
vim/usr/local/logstash-2.2.0/etc/agent.conf input {
file {
path => "/usr/local/nginx/logs/access.log"
start_position => beginning
}
}
output {
elasticsearch {}
stdout {}
}
logstash nohup/usr/local/logstash-2.20/bin/logstash-f/usr/local/logstash-2.20/etc/agentを起動します.conf &
2.Elasticsearchインストール構成
/usr/local/elasticsearch-2.20/に解凍
Elasticsearchプロファイル
vim/usr/local/elasticsearch-2.2.0/config/elasticsearch.yml # Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
http.port: 9200
Elasticsearch起動
/usr/local/elasticsearch-2.2.0/bin/elasticsearch �Cd
3.Kibanaインストール構成
/usr/local/kibana-4.4.0-linux-x 64/
Kibanaプロファイル
vim/usr/local/kibana-4.4.0-linux-x64/config/kibana.yml # Kibana is served by a back end server. This controls which port to use.
server.port: 5601
# The host to bind the server to.
server.host: "0.0.0.0"
# If you are running kibana behind a proxy, and want to mount it at a path,
# specify that path here. The basePath can't end in a slash.
# server.basePath: ""
# The maximum payload size in bytes on incoming server requests.
# server.maxPayloadBytes: 1048576
# The Elasticsearch instance to use for all your queries.
elasticsearch.url: "http://localhost:9200"
Kibana起動
nohup/usr/local/kibana-4.4.0-linux-x64/bin/kibana &
ブラウザアクセス
http://yourhost.com:5601
input {
file {
path => "/usr/local/nginx/logs/access.log"
start_position => beginning
}
}
output {
elasticsearch {}
stdout {}
}
/usr/local/elasticsearch-2.20/に解凍
Elasticsearchプロファイル
vim/usr/local/elasticsearch-2.2.0/config/elasticsearch.yml
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
http.port: 9200
Elasticsearch起動
/usr/local/elasticsearch-2.2.0/bin/elasticsearch �Cd
3.Kibanaインストール構成
/usr/local/kibana-4.4.0-linux-x 64/
Kibanaプロファイル
vim/usr/local/kibana-4.4.0-linux-x64/config/kibana.yml # Kibana is served by a back end server. This controls which port to use.
server.port: 5601
# The host to bind the server to.
server.host: "0.0.0.0"
# If you are running kibana behind a proxy, and want to mount it at a path,
# specify that path here. The basePath can't end in a slash.
# server.basePath: ""
# The maximum payload size in bytes on incoming server requests.
# server.maxPayloadBytes: 1048576
# The Elasticsearch instance to use for all your queries.
elasticsearch.url: "http://localhost:9200"
Kibana起動
nohup/usr/local/kibana-4.4.0-linux-x64/bin/kibana &
ブラウザアクセス
http://yourhost.com:5601
# Kibana is served by a back end server. This controls which port to use.
server.port: 5601
# The host to bind the server to.
server.host: "0.0.0.0"
# If you are running kibana behind a proxy, and want to mount it at a path,
# specify that path here. The basePath can't end in a slash.
# server.basePath: ""
# The maximum payload size in bytes on incoming server requests.
# server.maxPayloadBytes: 1048576
# The Elasticsearch instance to use for all your queries.
elasticsearch.url: "http://localhost:9200"