Skip to content

ezlage/ZAD

Repository files navigation

Zabbix Agent Deployer (ZAD)

A set of scripts developed with the aim of facilitating the deployment and updating of Zabbix Agents in large environments.

Requirements and Dependencies

For licensing reasons, it was not possible to include PsExec in this repository. Therefore, at least once, before the first use, you must run Update-ZadDeps.ps1 or Update-ZadDeps.bat. When running one of these scripts, PsExec will be downloaded and/or updated, as well as other dependencies.

Start-PsRemoZad.ps1 uses PSRemoting and runs asynchronously, while Start-PsExecZad.bat uses PsExec and runs synchronously. The executor credential must have appropriate privileges on the ZAD base directory and on all target servers. Additionally, all devices and credentials involved must be part of mutually trusted forests or domains of a directory service.

Usage Instructions

  • On Windows (the only supported operating system for now)
  1. Run Update-ZadDeps.ps1 or Update-ZadDeps.bat at least once to satisfy the requirements and dependencies
  2. Get the desired 32-bit and 64-bit packages of Zabbix Agent or Zabbix Agent 2, save them in the pkg folder, replacing the old ones and reusing their names
  3. The default settings target LTS releases of Zabbix Agent 2, so edit lines 4 to 9 and/or 42 to 46 of the cfg\callback.bat to reflect your monitoring environment
  4. Edit the cfg\servers.txt file to reference the servers that will receive the agent, one per line, without blank lines, tabulations or spaces
  5. Choose the script and run it! Start-PsRemoZad.ps1 is expected to be faster than Start-PsExecZad.bat, so prefer to run the first one and, in cases where it fails, try the second one; Remember to remove successful servers from cfg\servers.txt before the next attempt
  6. Track progress through your monitoring or inventory system; In case of failure, please send us the logs zad-install.log, zad-uninstall.log and zad-control.log, present in C:\Windows\Temp of each failed server

Roadmap and Changelog

This repository is based on and inspired by - but not limited to - Keep a Changelog, Semantic Versioning and the ezGTR template. Therefore, any changes made, expected or intended will be documented in the Roadmap and Changelog file.

Credits, Sponsorship and Licensing

Developed by Ezequiel Lage, Sponsored by Lageteck and Published under the MIT License.

Credits to Igor Pavlov for developing the 7-Zip1, to Tarma Software for the Uninstall2 tool, to Sysinternals for the PsTools3 toolkit, to cURL Project for the cURL4 utility, as well as to Zabbix LLC for Zabbix5 itself.

All suggestions, criticisms and contributions are welcome!

Support this initiative!

BTC: 1Nw2fzDgtXM5X219Q9VtJ7WaSTDPua3oe8
ERC20*: 0x089499f57ee20fd2c19f57612d9af69d645dff0d
* Any ERC20 token supported by Binance (ETH, USDC, USDT, etc)