天天看點

Logstash 日志搜集處理架構 安裝配置0. 介紹1.下載下傳和安裝2.配置3.啟動和停止4.進階配置5.插件x.報錯

logstash是一款輕量級的日志搜集處理架構,可以友善的把分散的、多樣化的日志搜集起來,并進行自定義的處理,然後傳輸到指定的位置,比如某個伺服器或者檔案。

<a href="http://kibana.logstash.es/content/logstash/">http://kibana.logstash.es/content/logstash/</a>

風來了.fox

下載下傳位址

<a href="https://www.elastic.co/downloads/logstash">https://www.elastic.co/downloads/logstash</a>

目前最新版 2.4.0

這裡使用 tar.gz 源碼安裝,即方式一

方式一:tar

方式二:deb

方式三:rpm

這裡是方式一後續操作

建立配置目錄

先進入 logstash 根目錄

etc/test.conf 檔案内容

配置說明

<a href="http://kibana.logstash.es/content/logstash/plugins/input/file.html">http://kibana.logstash.es/content/logstash/plugins/input/file.html</a>

測試logstash

然後你會發現終端在等待你的輸入。沒問題,敲入 hello world,回車,然後看看會傳回什麼結果!

加載 etc檔案夾下所有 *.conf 的文本檔案,然後在自己記憶體裡拼接成一個完整的大配置檔案

背景運作

查找程序 id

kill 他

<a href="http://kibana.logstash.es/content/logstash/get_start/full_config.html">http://kibana.logstash.es/content/logstash/get_start/full_config.html</a>

<a href="http://kibana.logstash.es/content/logstash/plugins/output/elasticsearch.html">http://kibana.logstash.es/content/logstash/plugins/output/elasticsearch.html</a>

插件安裝

<a href="http://www.jianshu.com/p/4fe495639a9a">http://www.jianshu.com/p/4fe495639a9a</a>

使用方式

原因:這類錯誤都是 參數不存在或參數寫的不對造成,

例如 elasticsearch 新版host已改為hosts,port 已删除

繼續閱讀