Skip to content

Serge-Rusin/community.zabbix

 
 

Repository files navigation

Zabbix collection for Ansible

plugins

This repo hosts the community.zabbix Ansible Collection.

The collection includes a variety of Ansible content to help automate the management of resources in Zabbix.

Included content

Click on the name of a plugin or module to view that content's documentation:

Installation

Requirements

Each component in this collection requires additional dependencies. Review components you are interested in by visiting links present in the Included content section.

This is especially important for some of the Zabbix roles that require you to install additional standalone roles from Ansible Galaxy.

For the majority of modules, however, you can get away with just:

pip install zabbix-api

Installing the Collection from Ansible Galaxy

Before using the Zabbix collection, you need to install it with the Ansible Galaxy CLI:

ansible-galaxy collection install community.zabbix

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: community.zabbix
    version: v0.2.0

Usage

Please note that these are not working examples. For documentation on how to use content included in this collection, refer to the links in the Included content section.

To use a module or role from this collection, reference them with their Fully Qualified Collection Namespace (FQCN) like so:

---
- name: Using Zabbix collection
  hosts: localhost
  roles:
    - role: community.zabbix.zabbix_agent
      zabbix_agent_server: zabbix.example.com
      ...

  tasks:
    - name: Ensure host is monitored by Zabbix
      community.zabbix.zabbix_host:
        server_url: https://zabbix.example.com
        ...

Or you include collection name community.zabbix in the playbook's collections element, like this:

---
- name: Using Zabbix collection
  hosts: localhost
  collections:
    - community.zabbix

  roles:
    - role: zabbix_agent
      zabbix_agent_server: zabbix.example.com
      ...

  tasks:
    - name: Ensure host is monitored by Zabbix
      zabbix_host:
        server_url: https://zabbix.example.com
        ...

Supported Zabbix versions

As a main priority, this collection aims to cover all of the currently supported Zabbix releases, which are noted on the Zabbix Life Cycle & Release Policy page. Other versions are supported too, but not as strictly (changes would not be actively tested against them).

If you find any inconsistencies with the version of Zabbix you are using, feel free to open a pull request or an issue and we will try to address it as soon as possible. In case of pull requests, please make sure that your changes will not break any existing functionality for currently supported Zabbix releases.

Contributing

See CONTRIBUTING for more information about how to contribute to this repository.

License

GNU General Public License v3.0 or later

See LICENSE to see the full text.

Packages

No packages published

Languages

  • Python 100.0%