winlogbeat的安装与使用

1,936 阅读1分钟

安装步骤

  1. 下载winlogbeat
    www.elastic.co/cn/products…
  2. 解压文件 解压到 C:\Program Files,并更改名称为 winlogbeat
  3. 安装 管理员权限打开powershell,执行如下命令
cd 'C:\Program Files\Winlogbeat'
.\install-service-winlogbeat.ps1

可能会提示没有权限,需要执行如下操作
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

这是powershell执行策略的问题,详情参见 docs.microsoft.com/zh-cn/previ…

  1. 配置winlogbeat
    编辑 winlogbeat.yml,建议使用 notepad++ 编辑 yml 文件 我这里是输出到 logstash ,还未测试输出到 elasticsearch 的效果
  output.logstash:  #取消前面的注释
 # The Logstash hosts
 hosts: ["10.1.1.15:5044"] 
  1. 测试命令
    .\winlogbeat.exe test config -c .\winlogbeat.yml -e
  2. 启动服务
    Start-Service winlogbeat

---------未完待续---------------