lpwoodhouse.zabbix_agent_linux
Ansible Role: Zabbix Agent (Linux)
Description
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
Requirements
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
Role Variables
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
Dependencies
None
Example Playbook
- hosts: all
roles:
- lpwoodhouse.zabbix_agent_linux
Author Information
Created in 2022 by Lee Woodhouse.
About
Download, install and configure the Zabbix Agent on RHEL, Debian, Ubuntu, SLES and ARM-based distributions (Raspbian, Ubuntu-arm64)
Install
ansible-galaxy install lpwoodhouse.zabbix_agent_linuxLicense
mit
Downloads
53
Owner
Principal Systems Engineer from 🇬🇧 now based in 🌴 Hawaii. Passionate about 🖥️ homelab builds, 🏠 self-hosting, and 🤖 automation.
