Please enable Javascript to view the contents

Windows 如何安裝 Filebeat

· ☕ 1 分钟 · 🐔 Redd Tsai

版本

  • Filebeat 6
    環境
  • Windows 10

1. 下載 Filebeat

Download Filebeat for Windows


2. 安裝 Filebeat

解壓縮至 C:\Program Files\Filebeat,以 admin 角色開啟 PowerShell

1
2
    cd 'C:\Program Files\Filebeat'
    .\install-service-filebeat.ps1

3. 設定 Filebeat

編輯 filebeat.yml,設定 elasticsearch 和 kibana 的位置

1
2
3
4
    output.elasticsearch:
        hosts: ["localhost:9200"]
    setup.kibana:
        host: "localhost:5601"

4. 設定 Filebeat 模組

收集 IIS Log
編輯 filebeat\module\iis\access\manifest.yml

1
2
3
    default.paths:
        default:
            - C:/inetpub/logs/LogFiles/*/*.log

啟用 iis 模組

1
    .\filebeat.exe modules enable iis

5. 啟動 Filebeat 服務

1
2
    .\filebeat.exe setup
    Start-Service filebeat

Alt text

分享

蔡文杰
作者
Redd Tsai
Backend Developer