Logstash+Elasticsearch+Kibana日志服务器搭建
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Logstash+Elasticsearch+Kibana日志服务器搭建相关的知识,希望对你有一定的参考价值。
软件版本:
Logstash 2.2.0 All Plugins
Elasticsearch 2.2.0
Kibana 4.4.0
说明:此环境变Centos6.5 64位,单机做测试,具体配置从简。
1.Logstash安装配置
解压到/usr/local/logstash-2.2.0/
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.2.0/bin/logstash -f /usr/local/logstash-2.2.0/etc/agent.conf &
2.Elasticsearch安装配置
解压到/usr/local/elasticsearch-2.2.0/
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 –d
3.Kibana安装配置
解压到/usr/local/kibana-4.4.0-linux-x64/
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
以上是关于Logstash+Elasticsearch+Kibana日志服务器搭建的主要内容,如果未能解决你的问题,请参考以下文章
详解三款日志采集工具--Logstash,Fluentd, Logtail比较
elasticsearch+logstash+kibana部署
CentOS7??????Elasticsearch+ Logstash+kibana??????????????????????????????