freedomofpress.beats
Beats 客户端 Ansible 角色
这是用于安装和配置 Elastic Beats 客户端的 Ansible 角色。主要用于将日志和指标发送到 ELK 堆栈。 默认情况下,此角色将使用 filebeat 和 metricbeat 将数据发送到同一服务器上的 logstash。
需求
- 需要有可以发送数据的地方——自 Beats 5.x 系列以来,这包括发送到
file
、kafka
、redis
、console
、elasticsearch
和/或logstash
。
角色变量
您需要一个 SSL 证书来加密传输到 logstash/elasticsearch 的日志。此角色不提供此逻辑,并且默认情况下未启用加密。您需要参考官方 Beats 文档输出指南,通过变量添加这些选项。
示例剧本
- name: 配置 Beats 客户端。
hosts: clients
roles:
- role: freedomofpress.beats
tags: clients
运行测试
此角色使用 Molecule 和 Testinfra 进行测试。使用方法:
pip install -r requirements.txt
molecule test
您还可以运行选择性的命令:
molecule idempotence
molecule verify
要启动 ElasticSearch 界面以进行调试,请运行:
make elastic-ui
有关更多信息,请参阅 Molecule 文档。
贡献
以下资源在创建此角色时非常有用。
许可证
MIT
关于项目
Deploys and configure Elastic beats
安装
ansible-galaxy install freedomofpress.beats
许可证
Unknown
下载
92
拥有者
Defending and supporting cutting-edge transparency journalism in the face of adversity.