Logstash+Elasticsearch+Kibana日志服务器搭建

官网https://www.elastic.co

软件版本:
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启动(非root用户)

/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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ygqygq2

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值