buluma.metricbeat

Ansible 角色 metricbeat

安装和配置 Metricbeat,管理 Metricbeat 模块。

GitHub 版本 问题 合并请求 下载
github Version Issues PullRequests Ansible Role

示例剧本

这个示例来自 molecule/default/converge.yml,在每次推送、合并请求和发布时进行测试。

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true

  roles:
    - role: buluma.metricbeat
      metricbeat_elasticsearch_password: "My-P@s5w0rd."
      metricbeat_modules:
        - name: system
          state: enabled

机器需要预先准备。在 CI 中使用 molecule/default/prepare.yml 来完成:

---
- name: Prepare
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: buluma.bootstrap
    - role: buluma.core_dependencies
    - role: buluma.elastic_repo

有关如何使用这些角色的 完整说明和示例

角色变量

变量的默认值在 defaults/main.yml 中设置:

---
# metricbeat 的默认文件

# 要安装的 metricbeat 版本。
metricbeat_version: "7.17.6"

# 要启用的模块列表。
metricbeat_modules: []

# Elasticsearch 主机列表。
metricbeat_elasticsearch_hosts:
  - "http://localhost:9200"

# Elasticsearch 的用户名。
metricbeat_elasticsearch_username: elastic

# Elasticsearch 的密码。
metricbeat_elasticsearch_password: ""

# Kibana 的 URL。
metricbeat_kibana_host: "http://localhost:5601"

要求

已使用角色的状态

以下角色用于准备系统。您可以以其他方式准备您的系统。

要求 GitHub 版本
buluma.bootstrap Ansible Molecule Version
buluma.core_dependencies Ansible Molecule Version
buluma.elastic_repo Ansible Molecule Version

上下文

该角色是许多兼容角色的一部分。有关更多信息,请查看 这些角色的文档

以下是相关角色的概述:

dependencies

兼容性

该角色已在以下 容器镜像 上进行测试:

容器 标签
Amazon 所有
Debian 所有
EL 所有
Fedora 所有
Ubuntu focal, bionic
Kali 所有

所需的最低 Ansible 版本为 2.12,已对以下版本进行了测试:

  • 以前的版本。
  • 当前版本。
  • 开发版本。

如果发现问题,请在 GitHub 上登记。

变更日志

角色历史

许可证

Apache-2.0

作者信息

Shadow Walker

关于项目

Install and configure Metricbeat, manage Metricbeat modules.

安装
ansible-galaxy install buluma.metricbeat
许可证
apache-2.0
下载
7.5k
拥有者
DevOps Engineer