Logstash Configuration Installation

logstash Configuration

http.host:

 

xpack.monitoring.enabled: true

xpack.monitoring.elasticsearch.username:

xpack.monitoring.elasticsearch.password:

xpack.monitoring.elasticsearch.url: 

 

 In the bin file under a new 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 installation

 Official website: https: //www.elastic.co/cn/downloads/logstash

bin directory 
to create a run.bat follows
logstash -f logstash.conf or logstash -f config \ logstash.conf

md run nssm install logstash 
in the pop-up interface settings Path to run.bat, Details tab to set the display name, Dependencies tab settings depend on the service elasticsearch-service-x64 
finally click install service installation was successful 

Guess you like

Origin www.cnblogs.com/wudequn/p/11184883.html