CyVerse-Ansible.beats
ansible-beats
安装和配置指定的 Beat 实例。
https://www.elastic.co/guide/en/beats/filebeat/current/index.html
要求
- Ansible 2.x
角色变量
变量名 | 必需 | 默认值 | 备注 |
---|---|---|---|
BEAT_TYPE | 否 | "metricbeat" | 要安装的 beat 名称。受支持的 supported_beats 列表在角色变量中定义。 |
beat_install | 否 | true | 用于控制角色是否执行安装步骤的标志。 |
beat_config | 否 | 如果定义,则使用子 yaml 文件填充 beat 的配置文件。如果未定义,则配置文件保持不变。* |
|
beat_svc_state | 否 | 如果定义,表示 Ansible 的 服务模块 的期望 state 参数。 |
|
beat_svc_enabled | 否 | 如果定义,表示 Ansible 的 服务模块 的期望 enabled 参数。 |
|
beat_cfg_file | 否 | {{BEAT_TYPE}}.yml | 如果定义,则设置配置文件的名称。 |
beat_version | 否 | 如果定义,将安装指定版本。 |
*
:在定义 beat_config
变量时,可以使用 配置文件命名空间,但不建议使用。
依赖关系
无
示例剧本
安装带有默认配置的 metricbeat
:
- hosts: myhosts
vars:
roles:
- role: cyverse.beats
使用指定配置安装 metricbeat
:
- hosts: myhosts
vars:
beat_config:
metricbeat.modules:
- module: system
metricsets:
- cpu
- filesystem
- memory
- network
- process
enabled: true
period: 10s
processes: ['.*']
cpu_ticks: false
- module: apache
metricsets: ["status"]
enabled: true
period: 1s
hosts: ["http://127.0.0.1"]
output.elasticsearch:
hosts: ["127.0.0.1:9200"]
roles:
- role: cyverse.beats
使用指定配置安装 filebeat
:
- hosts: myhosts
vars:
BEAT_TYPE: filebeat
beat_config:
...
roles:
- role: cyverse.beats
许可
请参见 LICENSE.txt
作者信息
关于项目
A role to install and configure Elasticsearch Beats.
安装
ansible-galaxy install CyVerse-Ansible.beats
许可证
other
下载
418