https://github.com/ansibleguy/sw_zabbix_server
Ansible Role to provision dockerized Zabbix-Server
https://github.com/ansibleguy/sw_zabbix_server
ansible ansible-role automation dockerized iac infrastructure-as-code monitoring zabbix zabbix-server
Last synced: 3 months ago
JSON representation
Ansible Role to provision dockerized Zabbix-Server
- Host: GitHub
- URL: https://github.com/ansibleguy/sw_zabbix_server
- Owner: ansibleguy
- License: other
- Created: 2024-08-17T20:42:30.000Z (11 months ago)
- Default Branch: latest
- Last Pushed: 2025-02-15T14:01:36.000Z (5 months ago)
- Last Synced: 2025-04-05T14:07:18.375Z (3 months ago)
- Topics: ansible, ansible-role, automation, dockerized, iac, infrastructure-as-code, monitoring, zabbix, zabbix-server
- Language: Jinja
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
# Ansible Role - Zabbix Server Dockerized
Role to deploy dockerized Zabbix Server on a Linux Server.
[](https://github.com/ansibleguy/sw_zabbix_server/actions/workflows/lint.yml)
[](https://galaxy.ansible.com/ui/standalone/roles/ansibleguy/sw_zabbix_server)**Molecule Integration-Tests**:
* Status: [](https://github.com/ansibleguy/_meta_cicd/blob/latest/templates/usr/local/bin/cicd/molecule.sh.j2) |
[](https://github.com/ansibleguy/sw_zabbix_server/actions/workflows/integration_test_result.yml)
* Logs: [API](https://ci.ansibleguy.net/api/job/ansible-test-molecule-sw_zabbix_server/logs?token=2b7bba30-9a37-4b57-be8a-99e23016ce70&lines=1000) | [Short](https://badges.ansibleguy.net/log/molecule_sw_zabbix_server_test_short.log) | [Full](https://badges.ansibleguy.net/log/molecule_sw_zabbix_server_test.log)Internal CI: [Tester Role](https://github.com/ansibleguy/_meta_cicd) | [Jobs API](https://github.com/O-X-L/github-self-hosted-jobs-systemd)
**Tested:**
* Debian 12----
## Install
```bash
# latest
ansible-galaxy role install git+https://github.com/ansibleguy/sw_zabbix_server# from galaxy
ansible-galaxy install ansibleguy.sw_zabbix_server# or to custom role-path
ansible-galaxy install ansibleguy.sw_zabbix_server --roles-path ./roles# install dependencies
ansible-galaxy install -r requirements.yml
```----
## Advertisement
* Need **professional support** using Ansible or Zabbix? Contact us:
E-Mail: [[email protected]](mailto:[email protected])
Tel: [+43 3115 40 900 0](tel:+433115409000)
Web: [EN](https://www.o-x-l.com) | [DE](https://www.oxl.at)
Language: German or English
* You want a simple **Ansible GUI**?
Check-out this [Ansible WebUI](https://github.com/ansibleguy/webui)
----
## Usage
### Config
Minimal example:
```yaml
zabbix_server:
domain: 'mon.template.ansibleguy.net'db:
root_pwd: !vault |
...
app_pwd: !vault |
...
```Define the config as needed:
```yaml
zabbix_server:
version: '7.0' # see docker image tags
domain: 'mon.template.ansibleguy.net'
aliases:
- 'monitoring.template.ansibleguy.net'# provide settings as environmental variables
settings:
# see: https://hub.docker.com/r/zabbix/zabbix-web-nginx-mysql
frontend:
ZBX_SERVER_NAME: 'AnsibleGuy Monitoring'
ZBX_SERVER_PORT: 10151# see: https://hub.docker.com/r/zabbix/zabbix-server-mysql
backend:
ZBX_LISTENPORT: 10151db:
root_pwd: !vault |
...
app_pwd: !vault |
...
```You might want to use 'ansible-vault' to encrypt your passwords:
```bash
ansible-vault encrypt_string
```### Execution
Run the playbook:
```bash
ansible-playbook -K -D -i inventory/hosts.yml playbook.yml
```There are also some useful **tags** available:
* docker
* config
* backup
* updateTo debug errors - you can set the 'debug' variable at runtime:
```bash
ansible-playbook -K -D -i inventory/hosts.yml playbook.yml -e debug=yes
```----
## Functionality
* **Package installation**
* Ansible dependencies (_minimal_)
* Docker server + client
* Nginx Webserver
* MariaDB client* **Configuration**
* MariaDB database container
* **Default opt-ins**:
* Auto-Update
* Installing and Configuring Nginx Webserver----
## Info
* **Note:** this role currently only supports debian-based systems
* **Note:** Most of the role's functionality can be opted in or out.
For all available options - see the default-config located in [the main defaults-file](https://github.com/ansibleguy/sw_zabbix_server/blob/latest/defaults/main/1_main.yml)!
* **Warning:** Not every setting/variable you provide will be checked for validity. Bad config might break the role!
* **Info:** The default Zabbix Server Login is:
User: **Admin**
Password: **zabbix**