This role downloads, installs and configures the Zabbix Agent on RHEL, Debian, Ubuntu, SLES and ARM-based distros (Raspbian, Ubuntu-arm64) After installation the zabbix-agent service will be enabled and started. To view the status (or disable/stop):
systemctl status zabbix-agent.service
The role will open the assigned Zabbix agent passive port on hosts running firewalld or ufw.
To confirm firewall status after install use these commands:
#firewalld
sudo firewall-cmd --list-all
#ufw
sudo ufw status verbose
Ansible modules from the collections below are utilized. Ensure there is a requirements file if they are not already available.
# Example /roles/requirements.yml
---
collections:
- community.general
- ansible.posix
The values for default variables are listed below (see defaults/main.yml
). Ensure they are overwritten with the values you require. See here for guidence on variable placement.
zbx_version: 6.2 # Used to configure the Zabbix download repository, at time of writing the latest version is 6.2
zbx_server: 192.168.1.1 # IP Addr or FQDN of your Zabbix server
zbx_passive_port: 10050 # Zabbix server will request agent on this port
zbx_active_port: 10051 # Active agent will request Zabbix server on this port
None
- hosts: all
roles:
- lpwoodhouse.zabbix_agent_linux
Created in 2022 by Lee Woodhouse.