下載鏈接
https://www.elastic.co/cn/downloads/past-releases/winlogbeat-7-16-2
配置文件
# ---------------------------- Elasticsearch Output ----------------------------
output.elasticsearch:# Array of hosts to connect to.hosts: ["192.168.227.160:9200"]# Protocol - either `http` (default) or `https`.#protocol: "https"# Authentication credentials - either API key or username/password.#api_key: "id:api_key"#username: "elastic"#password: "changeme"
啟動服務
初始化、裝載模板到kibana
在主機上以管理員身份打開 PowerShell 窗口。 我們想要將必要的 Winlogbeat 模板上載到 Elastic 棧中,以進行正確的解析。
在此窗口中,導航到Winlogbeat 文件夾并運行以下命令:
# 切換到下載目錄
d:
cd D:\dba_tools\software\winlogbeat-7.5.1-windows-x86_64
.\winlogbeat.exe setup -e
這個會測試與es、與kibana的連通性與配置是否成功,仔細查看相關信息有沒有 error 等字樣
正式啟動
.\winlogbeat.exe -e -c winlogbeat.yml
服務后臺啟動
C:\軟件安裝包\winlogbeat-7.16.2-windows-x86_64>.\install-service-winlogbeat.ps1
C:\軟件安裝包\winlogbeat-7.16.2-windows-x86_64>net start winlogbeat
winlogbeat 服務正在啟動 .
winlogbeat 服務已經啟動成功。