kafka_exporter
Kafka Exporter Ansible Role
Installs and configures kafka-exporter on Redhat/Debian based hosts.
If you need also Kafka, please refer to bilalcaliskan.kafka.
Requirements
This role has below requirements:
- Python 3.x
- Ansible (min 2.4, suggested 2.9.16)
You can install suggested version with pip3:
$ pip3 install "ansible==2.9.16"
Note that this role requires root access, so either run it in a playbook with a global become: true
, or invoke the role in your playbook.
Role Variables
See the default values in defaults/main.yml. You can overwrite them in vars/main.yml if neccessary or you can set them while running playbook.
Please note that this role can ensure that
firewalld
systemd service on your servers are started and enabled by default. If you want to start and enablefirewalld
service, please modify below variable as true while running playbook:firewalld_enabled: true
Dependencies
None
Examples
Inventory
[all]
broker01.example.com
broker02.example.com
broker03.example.com
Installation
- hosts: all
become: true
roles:
- role: bilalcaliskan.kafka_exporter
vars:
kafka_port: 9092
exporter_port: 9308
install_kafka_exporter: true
kafka_version: 123.123
version: 1.2.0
Uninstallation
- hosts: all
become: true
roles:
- role: bilalcaliskan.kafka_exporter
vars:
install_kafka_exporter: false
Development
This project requires below tools for development:
- Python 3.x
- Ansible - (min 2.4, suggested 2.9.16)
- pre-commit
- ansible-lint - required by pre-commit
- Bash shell - required by pre-commit
After you install all the tools above, you can simply configure pre-commit by typing:
$ pre-commit install
License
Apache License 2.0
Kafka exporter setup role to provide monitoring over Prometheus
ansible-galaxy install bilalcaliskan/kafka_exporter-ansible-role