This collection is meant to help with Zabbix monitoring infrastructure management automation. It is mainly intended for scalable tasks, for example, Zabbix agent deployment and adding hosts to monitoring.
Tested with the Ansible Core 2.15, 2.16 and 2.17. EOL Versions are not supported. For more details, navigate to the collection component description.
You can install this collection with the Ansible Galaxy CLI by entering the following command:
ansible-galaxy collection install zabbix.zabbix
For collection component dependencies and other details, navigate to the component documentation.
Development version
Latest development version. Do not use it in production environment.ansible-galaxy collection install git+https://github.com/zabbix/ansible-collection.git
Roles:
- zabbix.zabbix.agent - the role to deploy, configure and maintain Zabbix agent on a target device.
- zabbix.zabbix.host - this role represents target device on Zabbix server.
Plugins:
- HTTP API - Zabbix API interface for Ansible.
- Inventory - the tool to synchronize Zabbix monitoring instance hosts with Ansible inventory.
Modules:
- zabbix_hostgroup - Ansible module for Zabbix host groups management (uses HTTP API plugin).
- zabbix_host - Ansible module for Zabbix hosts management (uses HTTP API plugin).
Rulebooks:
- zabbix.zabbix.example - Ansible rulebook example for remediation of issues, detected by Zabbix.
Event-Driven Ansible integration is based on webhook usage:
- Zabbix media type pushes events to EDA;
- EDA webhook receives incoming events and passes those to processing via the rulebook.
EDA helps with the automation of issue remediation and debugging tasks. Basically, EDA receives events sent from Zabbix and triggers different playbook execution, according to the conditions set. EDA integration is included in Zabbix out of the box and is available starting with Zabbix 6.0 version. Refer to the EDA media type documentation for more details on setup.
Ansible Zabbix collection is released under the GNU Affero General Public License (AGPL) version 3. The formal terms of the GPL can be found at http://www.fsf.org/licenses/.