stuart.elasticsearch_exporter
elasticsearch_exporter Ansible Role
This role installs the Prometheus ElasticSearch Exporter.
The Prometheus ElasticSearch Exporter collects system metrics that can be retrieved by a Prometheus server.
For more details on the Prometheus ElasticSearch Exporter, visit https://github.com/justwatchcom/elasticsearch_exporter.
For more information about Prometheus Server, check https://prometheus.io.
- name: stuart.elasticsearch_exporter
version: 2.0.0
Then run ansible-galaxy install -p ./roles -r requirements.yml
Variables
Refer to defaults/main.yml and vars/main.yml to see which parameters you can customize.
Note about elasticsearch_exporter_opts
: This dictionary includes the options used to run the elasticsearch_exporter. You can find all configuration parameters in the exporter documentation. If you want to change one parameter, you need to rewrite the entire dictionary or enable variable merging in ansible.cfg
.
Examples
Simply add the role to your playbook.
Default Elasticsearch: localhost:9200
Default exporter port: 9108
- name: Install and configure prometheus_elasticsearch_exporter
hosts: "somehost"
roles:
- role: stuart.elasticsearch_exporter
- name: Install and configure prometheus_elasticsearch_exporter and enable it to start on boot.
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