Install Zabbix Agent from Source on Linux

In our previous post we have installed Zabbix Server on Ubuntu from source.

Let’s add and monitor another linux server with Zabbix Agent.

Login to server as root and Create a new user and group

groupadd zabbix
useradd -g zabbix zabbix

Download and install latest version of zabbix from source.

cd /usr/local/src
wget http://freefr.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.3/zabbix-3.0.3.tar.gz
tar -zxvf zabbix-3.0.3.tar.gz
cd zabbix-3.0.3
./configure --enable-agent
make install

Edit Zabbix agent configuration file at

vi /usr/local/etc/zabbix_agentd.conf

Add Zabbix server IP address to the file.

Server = 127.0.0.1, ZABBIX_SERVER_IP

Start zabbix_agentd

[root@server ~]# zabbix_agentd

Verify Zabbix agent log for errors.

tail /tmp/zabbix_agentd.log

Then login to Zabbix Dashboard on zabbix server and add a new host by entering the following details.

Host name: client host name
Groups: Linux Servers
IP address: client host IP

Enable Zabbix Agent to start on Boot CentOS

[root@server ~]# cd /usr/local/src/zabbix-*/
[root@server zabbix-3.0.3]# cp misc/init.d/fedora/core5/zabbix_agentd /etc/init.d/zabbix_agentd
[root@server zabbix-3.0.3]# chkconfig --add zabbix_agentd
[root@server zabbix-3.0.3]# chkconfig zabbix_agentd on

If everything is alright, you should see 3:on like below when running the following command.

[root@server ~]# chkconfig | grep zabbix
zabbix_agentd   0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@server ~]#

Enable Zabbix Agent to start on Boot (Ubuntu/Debian)

cd ~/zabbix-source/zabbix-*/
cp misc/init.d/debian/zabbix-agent /etc/init.d
chmod 755 /etc/init.d/zabbix-agent
update-rc.d zabbix-agent defaults

You may receive some LSB tags missing warnings.

It just mean that the special new tags have not yet been added to the boot scripts. The script still work fine.

You can fix that warning by adding the LSB tags to the init scrips like mentioned in zabbix server install post.


Posted in Linux