码迷,mamicode.com
首页 > 其他好文 > 详细

Logstash配置安装

时间:2019-07-14 18:01:20      阅读:106      评论:0      收藏:0      [点我收藏+]

标签:NPU   https   word   成功   rabbit   界面   doc   search   12px   

logstash配置

http.host:

 

xpack.monitoring.enabled: true

xpack.monitoring.elasticsearch.username:

xpack.monitoring.elasticsearch.password:

xpack.monitoring.elasticsearch.url: 

 

 在bin文件下面新建logstash.conf

input {
   rabbitmq {
    host => "rabbitmqip地址"
    subscription_retry_interval_seconds => "5"
    exchange => "log.msg.direct"
    queue => "log.queue.direct"
    durable => "true"
    key => "rk.msg.direct"
    user => "mqname"
    password => "mqpassword"
    }
}
output {
    elasticsearch {
        hosts => "es ip:port" 
        #flush_size=> 10  
        #workers => 5  
        #document_id => "%{jobid}" 
        #document_type => "BaseSysLog"
        index => "logstashsyslog"
        user => "elastic"
        password => "password"
    }
    #stdout {
    #codec => rubydebug {}
    #}
}

 

logstash安装

 官网:https://www.elastic.co/cn/downloads/logstash

bin目录 
创建一个run.bat 内容如下
logstash -f logstash.conf  或者 logstash -f  config\logstash.conf

md 运行 nssm install logstash 
在弹出的界面设置 Path为run.bat,Details选项卡设置显示名,Dependencies选项卡设置依赖服务 elasticsearch-service-x64 
最后点击install service 安装成功 

Logstash配置安装

标签:NPU   https   word   成功   rabbit   界面   doc   search   12px   

原文地址:https://www.cnblogs.com/wudequn/p/11184883.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!