Hi All...
This update is a major rewrite of the original post... The individual files can be found at
https://gitlab.wellston.biz/dafyre/zabbix-utils
The script is still located https://gitlab.wellston.biz/dafyre/zabbix-utils/raw/master/zabbix-agent-installer
zabbix-agent-installer
This assumes that you have the basic development tools installed on your system, as we will be building the Zabbix agent from source.
Ubuntu:
sudo apt-get install build-essential
RHEL / RPM based Distros:
sudo yum groupinstall Development
SuSE / openSuSE / Tumbleweed
sudo zypper install -t pattern devel_C_C++
Should dake care of the necessary dependencies.
There are several variables in this script that should be set for your environment.
Any of the HTTP based URLs can be left as is to pull the most recent versions, or they can be changed to be hosted on your own servers.
AGENT_URL is the URL of the Zabbix source code that is running the same version of Zabbix that is running on your server. This can be left as is to pull Zabbix 3.0.3 sources.
AGENT_CONFIG is the zabbix_agentd configuration template that will be used (the default pulls form the git repo).
AGENT_SERVICE is the web url to the systemd service file for the zabbix_agentd.
ZABBIX_SERVER is the IP address or hostname of your Zabbix server.
Windows Agents
The windows agents come pre-compiled, and I have included both 32 bit and 64 bit agents as .zip files.
32 Bit Agent: https://gitlab.wellston.biz/dafyre/zabbix-utils/raw/master/zabbix_win_agent32.zip
64 Bit Agent: https://gitlab.wellston.biz/dafyre/zabbix-utils/raw/master/zabbix_win_agent64.zip
-
Extract the files into C:\zabbix_agent
-
Edit the zabbix_agentd.conf file and make sure to set Server= and ServerActive= to be the IP address of your Zabbix server. (this file is best edited with Notepad++)
-
The win-service-setup.bat file needs to be run as administrator.
original post follows
Hi All...
NOTE This only installs the Zabbix AGENT. It does not install the Zabbix Server. A separate script for that will be coming soon.
I've got a Zabbix Agent install script that will install the agent from source (I tend to install the Zabbix server bits from source as well, to keep with the most recent versions).
It assumes that you have all of the necessary dependencies to build the Zabbix Agent on the target system.
https://gitlab.wellston.biz/dafyre/zabbix-utils/blob/master/zabbix-agent-installer
I have more comments in the code. If you have any questions or recommendations on it, please let me know!
I have tested this with Ubuntu 16.04. Plannting to test with others later.
Edit: The installer works on Ubuntu 16.04 and CentOS assuming you have done apt-get install build-essential on Ubuntu or yum groupinstall Development on CentOS
Edit 2: Direct download is here: https://gitlab.wellston.biz/dafyre/zabbix-utils/raw/master/zabbix-agent-installer
Edit 3: This script is meant to be run as root or via sudo!