https://github.com/memo1918/zabbix-agent-ansible-automation
Ansible playbooks and Python script to quickly set up Zabbix agents and add them to your Zabbix server.
https://github.com/memo1918/zabbix-agent-ansible-automation
ansible automation devops infrastructure-as-code monitoring zabbix zabbix-agent zabbix-agent2 zabbix-server
Last synced: about 2 months ago
JSON representation
Ansible playbooks and Python script to quickly set up Zabbix agents and add them to your Zabbix server.
- Host: GitHub
- URL: https://github.com/memo1918/zabbix-agent-ansible-automation
- Owner: memo1918
- License: mit
- Created: 2024-11-11T08:08:20.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-15T10:18:38.000Z (5 months ago)
- Last Synced: 2025-01-25T20:41:31.096Z (3 months ago)
- Topics: ansible, automation, devops, infrastructure-as-code, monitoring, zabbix, zabbix-agent, zabbix-agent2, zabbix-server
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zabbix Agent2 Ansible Automation
This repo contains ansible playbooks to install and configure zabbix agent on host servers and a python script to add the new host to the zabbix server using zabbix API.Currently set for Zabbix 6.4, this can be changed by updating urls in the ansible playbook.
Ansible playbooks can be run for Debian and Red Hat based systems.### Prerequisites
- Ansible installed on your control machine.
- Python and necessary dependencies listed in `ServerScript/requirements.txt`.### Installation
1. Clone the repository:
```sh
git clone https://github.com/memo1918/zabbix-agent-ansible-automation.git
cd zabbix-agent-ansible-automation
```2. Install Python dependencies:
```sh
pip install -r ServerScript/requirements.txt
```### Usage
1. Update the inventory file with your hosts and update sv_ip with the Zabbix server ips in host_conf_zabbix.yaml.
2. Run the Ansible playbooks as needed:
```sh
ansible-playbook install_zabbix_allSys.yaml -K
ansible-playbook host_conf_zabbix.yaml -K
ansible-playbook conf_docker_permission.yaml -K
```3. Update configIps.txt with server ip and host names and ips.
4. Update the python script to add Zabbix AUTH token or user and password.
5. Execute the Python script to manage Zabbix hosts:
```sh
python ServerScript/zabbixPythonReq.py
```## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Acknowledgements
- [Zabbix](https://www.zabbix.com/)
- [Ansible](https://www.ansible.com/)---