天天看點

filebeat使用總結--(windows多執行個體運作)

filebeat簡述     

   Filebeat是一個輕量級的采集工作,在伺服器上安裝後,Filebeat可以監控日志目錄或者指定的日志檔案,然後将這些資訊到發送給logstarsh或直接發送給elasticsearch。

filebeat使用

   1、解壓安裝包,不需要安裝,直接可以使用

   2、修改filebeat.yml檔案

#=========================== Filebeat 輸入 =============================

filebeat.inputs:

    - input_type: log

    enabled: true

    paths: D:/Program Files/apache-tomcat-7.0.35/logs/manager.*.log

#=========================== elasticsearch 輸出=============================

output.elasticsearch:

   hosts: ["localhost:9200"]

   index: "filebeat-test-1"     #自定義

3、啟動 filebeat -e -c filebeat.yml

總結:

1、我的日志都是通過syslog推送到同一台伺服器,

filebeat使用總結--(windows多執行個體運作)

           2、11、12、13推過來的日志例如分别是應用的日志、主機的日志、其他裝置日志,每個ip的日志格式都不一樣

           3、我的想法開啟三個filebeat,分别定義自己的index,然後根據不同的index提供接口通路

filebeat使用總結--(windows多執行個體運作)

分别啟動:filebeat -e -c filebeat.yml   

                 filebeat -e -c filebeat1.yml

                 filebeat -e -c filebeat2.yml

注:也可以輸入到logstash,根據不同的index,清洗出不同的資料,然後根據不同的index輸出

繼續閱讀