# Managing Zabbix Using Ansible?

**URL:** <https://forum.ansible.com/t/managing-zabbix-using-ansible/26014>\
**Category:** Ansible Project\
**Created:** [November 14, 2017, 5:45am UTC](https://forum.ansible.com/t/managing-zabbix-using-ansible/26014 "2017-11-14T05:45:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_Forrest](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@Jon\_Forrest](https://forum.ansible.com/u/Jon_Forrest)\
**Post date:** [November 14, 2017, 5:45am UTC](https://forum.ansible.com/t/managing-zabbix-using-ansible/26014/1 "2017-11-14T05:45:24Z")

</div>

I'm interested if there are any Ansible modules for completely  
(or as closely as possible) managing Zabbix. I'm aware of the  
modules that come with Ansible, but they appear to be quite limited,  
and only cover managing groups, hosts, and screens. I didn't find  
anything that, for example, can configure items or alerts.

What I'm looking for is ideally a way to do all configuration with  
Ansible rather than by the Zabbix GUI. In other words, the complete  
Zabbix configuration would be managed by Ansible so that it would  
be (relatively) trivial to backup and restore a Zabbix configuration.

Cordially,  
Jon Forrest

---

<div class="post-metadata">

**Author:** ![Aivars\_Sterns](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@Aivars\_Sterns](https://forum.ansible.com/u/Aivars_Sterns)\
**Post date:** [November 14, 2017, 2:32pm UTC](https://forum.ansible.com/t/managing-zabbix-using-ansible/26014/2 "2017-11-14T14:32:30Z")

</div>

you can use zabbix template module to manage templates, if you want to automate everything then you should try to not use items without templates, just add those items to templates, make as much templates you need, and then link host to needed templates.

we have much templates, and we have create in defaults/main.yml ansible group mapping to zabbix group mapping (as we have lots ansible groups, we don’t want to add them to zabbix all) also there is defined dict with default templates, and when some group needs to add more templates, you just merge those dict’s and that way you can manage ansible. don’t know what you need more 🙂

there is some work started to more modules, but in quick look it’s abadoned for 1y [https://github.com/pivno/ansible-zabbix-modules](https://github.com/pivno/ansible-zabbix-modules)

in a way you can make your modules if youre interested in extending functionality.

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [November 14, 2017, 2:50pm UTC](https://forum.ansible.com/t/managing-zabbix-using-ansible/26014/3 "2017-11-14T14:50:18Z")

</div>

Have you check out the roles in Galaxy, maybe there are some more complete solutions there  
[https://galaxy.ansible.com/list#/roles](https://galaxy.ansible.com/list#/roles)

---

<div class="post-metadata">

**Author:** ![Jon\_Forrest](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@Jon\_Forrest](https://forum.ansible.com/u/Jon_Forrest)\
**Post date:** [November 15, 2017, 3:10pm UTC](https://forum.ansible.com/t/managing-zabbix-using-ansible/26014/4 "2017-11-15T15:10:28Z")

</div>

Good idea. I checked this, and there certainly are more modules there.  
But I was hoping to learn what people are actually using for this  
purpose rather than trying a bunch of modules of unknown quality.

Jon

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [November 15, 2017, 3:37pm UTC](https://forum.ansible.com/t/managing-zabbix-using-ansible/26014/5 "2017-11-15T15:37:07Z")

</div>

In Galaxy you can download roles not modules.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 15, 2017, 4:15pm UTC](https://forum.ansible.com/t/managing-zabbix-using-ansible/26014/6 "2017-11-15T16:15:30Z")

</div>

You CAN have modules (and other plugins) in the roles though.
