Role name in Ansible Galaxy: William-Yeh.es_cluster_exporter
This Ansible role has the following features for es_cluster_exporter (a Elasticsearch cluster metrics exporter for Prometheus):
- Install specific versions of es_cluster_exporter;
- Handlers for restart/reload/stop events.
NOTE: If you want to install Prometheus itself or other exporters, see williamyeh.prometheus for more info.
None.
Install specific version of Elasticsearch cluster exporter:
# default version
prometheus_es_cluster_exporter_version: 1.1.0
Additional command-line arguments, if any (use es_cluster_exporter --help
to see the full list of arguments):
prometheus_es_cluster_exporter_opts
If the Linux distributions are equipped with systemd, this role will use this mechanism accordingly. You can disable this (i.e., use traditional SysV-style init script) by defining the variable to false: prometheus_es_cluster_exporter_use_systemd: false
.
prometheus_es_cluster_exporter_use_systemd
This section lists all variables common for all Prometheus servers and exporters. You may have seen them in my williamyeh.prometheus role.
User-configurable defaults:
# user and group
prometheus_user: prometheus
prometheus_group: prometheus
# directory for executable files
prometheus_install_path: /opt/prometheus
# directory for logs
prometheus_log_path: /var/log/prometheus
# directory for PID files
prometheus_pid_path: /var/run/prometheus
# version of helper utility "gosu"
gosu_version: 1.9
-
restart es_cluster_exporter
-
reload es_cluster_exporter
-
stop es_cluster_exporter
Add role name William-Yeh.es_cluster_exporter
to your playbook file.
Set vars in your playbook file, if necessary.
Simple example:
---
# file: simple-playbook.yml
- hosts: all
become: True
roles:
- William-Yeh.es_cluster_exporter
vars:
prometheus_es_cluster_exporter_opts: "-es.timeout=20s -web.listen-address=':9114' "
None.
MIT License. See the LICENSE file for details.