Home/Computers & IT/How to Install ZABBIX Agents the Easy Way in Linux

Lately I have been working alot with ZABBIX which is a fantastic open source monitoring system.
Unfortunately it can be an absolute pain to install the agents on all the different Linux Operating systems out there.

So I have created this guide to help you all out.

Whether its Red Hat, CentOS, Ubuntu, Debian or Fedora this method will work & have the Agent installed & running in under 1min of your time.

The first thing you want to do is SSH into the Linux box you need to install the ZABBIX Agent on or open the terminal physically on the box it self.

its important to keep your Linux box upto date so first run this command. (This could take a while depending on how long ago you last updated)

yum update

Once the update process is completed we need to add the RPM for ZABBIX run the below command

rpm -Uv http://repo.zabbixzone.com/centos/zabbixzone-release-0.0-1.noarch.rpm

Now we are ready to install the ZABBIX Agent run the below command

yum install zabbix-agent -y

Now we want to enable the service for the ZABBIX Agent so we can start it when we are ready – run the below command

chkconfig zabbix-agent on

Now lets create the conf file. – run the below command

nano /etc/zabbix/zabbix_agentd.conf

Now all you need to do is edit or add these lines in the file (you can delete every other line in the file by holding down CTRL K)

Server=192.168.xx.xx
Hostname=EXAMPLESERVER

Make sure you enter in the IP Address of the ZABBIX Server & the Host Name of the Linux box you are doing this install on.

Exit the editor & save the file

Now we are ready to start the service – run the below command

service zabbix-agent start

You may need to also add an exception to the firewall on the Linux box for the ZABBIX Server so it can access the Agent if you have a custom firewall configuration
To do this simply run the below command to edit your iptables

nano /etc/sysconfig/iptables

now add the below line to your RH-Firewall rules list & change 192.168.xxx.xxx to your ZABBIX Server IP Address.

-A RH-Firewall-1-INPUT -s 192.168.xxx.xxx -p tcp --dport 10050 -j ACCEPT

Save & close iptables
Now we want to restart the iptables service run the below command

/sbin/service iptables restart

And there you have it.

A simple easy way to install the ZABBIX Agent on Red Hat, CentOS, Ubuntu, Debian or Fedora.

By | 2017-06-27T11:12:36+00:00 October 15th, 2013|Computers & IT|0 Comments

Leave A Comment