部署Winlogbeat
1.概述
Winlogbeat将Windows事件日志发送到Elasticsearch或Logstash。可以将其安装为Windows服务。
Winlogbeat使用Windows API从一个或多个事件日志中读取,根据用户配置的条件过滤事件,然后将事件数据发送到配置的输出(Elasticsearch或Logstash)。Winlogbeat监视事件日志,以便及时发送新的事件数据。每个事件日志的读取位置都保留在磁盘上,以允许Winlogbeat在重新启动后恢复。
Winlogbeat可以从系统上运行的任何事件日志中捕获事件数据。例如,可以捕获以下事件:
application events/应用事件
hardware events/硬件事件
security events/安全事件
system events/系统事件
2.安装
安装包下载地址:https://www.elastic.co/cn/downloads/beats/winlogbeat
解压安装包到C:Program FilesWinlogbeat,右键,选择使用PowerShell运行;如此便注册成系统服务;
3.修改配置
在winlogbeat.yml中加入
setup.kibana:
host: "192.168.1.224:5601"
output.elasticsearch:
hosts: ["192.168.1.223:9200","192.168.1.224:9200","192.168.1.225:9200"]
如果接入kafka 如下:
output.kafka:
# initial brokers for reading cluster metadata
hosts: ["192.168.1.223:9092", "192.168.1.224:9092", "192.168.1.225:9092"]
# message topic selection + partitioning
topic: 'idc-infosec'
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
max_message_bytes: 1000000
4.验证配置文件及启动
打开cmd,
#cd C:Program FilesWinlogbeat
#winlogbeat.exe test config -c winlogbeat.yml -e
出现ok,表示正常;
在系统服务里点启动
参考文档:http://t.zoukankan.com/llwxhn-p-12943415.html