logstash windows
生活随笔
收集整理的這篇文章主要介紹了
logstash windows
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
最新在研究elastic stack (elk)? :
logstash 安裝,下載最新版本的logstash:?點擊打開鏈接
解壓到磁盤根目錄下:在logstash>bin?
1、目錄下創(chuàng)建:logstash.conf
2、輸入內(nèi)容:
?
# Sample Logstash configuration for creating a simple # Beats -> Logstash -> Elasticsearch pipeline.input {kafka {bootstrap_servers => "localhost:9092"topics => ["test"]group_id => "test"} }filter { mutate {split => { "message" => " |" }}if [message][0] {mutate { add_field => {"apiname" => "%{[message][0]}"}}}if [message][1] {mutate { add_field => {"current_time" => "%{[message][1]}"}}} if [message][2] {mutate { add_field => {"current_level" => "%{[message][2]}"}}} if [message][3] {mutate { add_field => {"traceid" => "%{[message][3]}"}}}}output {elasticsearch {hosts => ["http://localhost:9200"]#index => "local-purchase-order | %{+YYYY-MM-dd}"index => "logstash-%{+YYYY-MM-dd}"#template_name => "logstash"#template_overwrite => true#index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"#user => "elastic"#password => "changeme"}stdout{codec => rubydebug} } ?3、
?
?
ok 了,啟動成功
總結
以上是生活随笔為你收集整理的logstash windows的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Feign接口 多线程问题
- 下一篇: zookeeper+kafka+logs