Managing Zabbix Using Ansible?

58 views
Skip to first unread message

Jon Forrest

unread,
Nov 14, 2017, 12:45:50 AM11/14/17
to ansible...@googlegroups.com
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

Kai Stian Olstad

unread,
Nov 14, 2017, 9:50:59 AM11/14/17
to ansible...@googlegroups.com
Have you check out the roles in Galaxy, maybe there are some more complete solutions there
https://galaxy.ansible.com/list#/roles


--
Kai Stian Olstad

Jon Forrest

unread,
Nov 15, 2017, 10:10:59 AM11/15/17
to ansible...@googlegroups.com
On 11/14/2017 6:50 AM, Kai Stian Olstad wrote:

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

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



Kai Stian Olstad

unread,
Nov 15, 2017, 10:37:43 AM11/15/17
to ansible...@googlegroups.com
On Wednesday, 15 November 2017 16.10.28 CET Jon Forrest wrote:
>
> Good idea. I checked this, and there certainly are more modules there.

In Galaxy you can download roles not modules.


--
Kai Stian Olstad

Brian Coca

unread,
Nov 15, 2017, 11:15:40 AM11/15/17
to Ansible Project
You CAN have modules (and other plugins) in the roles though.

--
----------
Brian Coca

Aivars Šterns

unread,
Nov 15, 2017, 7:29:25 PM11/15/17
to Ansible Project
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

in a way you can make your modules if youre interested in extending functionality. 
Reply all
Reply to author
Forward
0 new messages