stuart.elasticsearch_exporter

elasticsearch_exporter Ansible 角色

此角色安装 Prometheus ElasticSearch 导出程序。

Prometheus ElasticSearch 导出程序使系统指标可以被 Prometheus 服务器收集。

有关 Prometheus ElasticSearch 导出程序的更多信息,请访问 https://github.com/justwatchcom/elasticsearch_exporter

有关 Prometheus 服务器的更多信息,请访问 https://prometheus.io

- name: stuart.elasticsearch_exporter
  version: 2.0.0

并运行 ansible-galaxy install -p ./roles -r requirements.yml

变量

请查看 defaults/main.ymlvars/main.yml,以了解您可以自定义的参数。

关于 elasticsearch_exporter_opts 的特别说明。这个字典包含了用于运行 elasticsearch_exporter 的选项, 您可以在导出程序文档中找到 所有配置参数。 请记住,由于这是一个字典,如果您想自定义一个参数,您需要完全重写它, 或者您应该在 ansible.cfg 中启用变量合并。

示例

简单地在您的剧本中包含角色。

默认的 elasticsearch:localhost:9200
默认的导出程序端口:9108

- name: 安装并配置 prometheus_elasticsearch_exporter
  hosts: "somehost"

  roles:
    - role: stuart.elasticsearch_exporter
- name: 安装并配置 prometheus_elasticsearch_exporter 并启用开机启动。
  hosts: "somehost"

  roles:
    - role: stuart.elasticsearch_exporter
      elasticsearch_exporter_start_on_boot: yes
关于项目

Install and manage Prometheus ElasticSearch Exporter (justwatchcom/elasticsearch_exporter)

安装
ansible-galaxy install stuart.elasticsearch_exporter
许可证
mit
下载
2.1k
拥有者