bilalcaliskan.kafka_exporter
Kafka Exporter Ansible Role
This role installs and sets up the kafka-exporter on systems running Red Hat or Debian.
If you also need Kafka, check out bilalcaliskan.kafka.
Requirements
To use this role, you need:
- Python 3.x
- Ansible (at least version 2.4, but 2.9.16 is recommended)
You can install the recommended version using pip3:
$ pip3 install "ansible==2.9.16"
This role needs root access, so make sure to either run it with become: true
in your playbook or call the role with that option.
Role Variables
Check the default settings in defaults/main.yml. You can change these settings in vars/main.yml if needed, or set them when you run your playbook.
Keep in mind that this role enables and starts the
firewalld
systemd service on your servers by default. To enablefirewalld
, set the following variable to true while running your playbook:
firewalld_enabled: true
Dependencies
None
Examples
Inventory
Use this format for your inventory:
[all]
broker01.example.com
broker02.example.com
broker03.example.com
Installation
To install Kafka Exporter:
- 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
To uninstall Kafka Exporter:
- hosts: all
become: true
roles:
- role: bilalcaliskan.kafka_exporter
vars:
install_kafka_exporter: false
Development
For developing this project, you need the following tools:
- Python 3.x
- Ansible (at least version 2.4, but 2.9.16 is recommended)
- pre-commit
- ansible-lint (needed for pre-commit)
- Bash shell (needed for pre-commit)
After installing the above tools, set up pre-commit by running:
$ pre-commit install
License
Apache License 2.0
Kafka exporter setup role to provide monitoring over Prometheus
ansible-galaxy install bilalcaliskan.kafka_exporter