Skip to content

This role downloads, installs and configures the Zabbix Agent (or Zabbix Agent 2) on Windows.

License

Notifications You must be signed in to change notification settings

lpwoodhouse/zabbix-agent-windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: Zabbix Agent (Windows)

Ansible Role GitHub tag License

Description

This role downloads, installs and configures the Zabbix Agent (or Zabbix Agent 2) on Windows.
After installation the Zabbix Agent (or Zabbix Agent 2) service will be enabled and started.
A Windows Firewall rule (zabbix_inbound) will be created to allow traffic on the assigned passive port.
The Ansible role will also remove an existing Zabbix agent before installing. This is useful for changing between Zabbix Agent and Zabbix Agent 2.

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.windows

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_agent2: false         # Zabbix agent 2 is a new generation of Zabbix agent and may be used in place of Zabbix agent
zbx_agent_release: 6.2.3  # See https://www.zabbix.com/download_agents for valid/latest release versions
zbx_server: 192.168.1.1   # IP addr or FQDN of the 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
download_dest: '%USERPROFILE%\Downloads'     # Direcotry for the downloaded Zabbix agent .zip archive
install_dest: 'C:\zabbix'                    # Directory for the Zabbix agent executables and .conf files

Dependencies

None

Example Playbook

- hosts: all
  roles:
    - lpwoodhouse.zabbix_agent_windows

Author Information

Created in 2022 by Lee Woodhouse.

Linkedin Badge Reddit Badge Twitter Follow