Zabbix Agent is required to install on all remote systems needs to be monitor through Zabbix server. The Zabbix Agent collects resource utilization data and applications data on the client system and provides such information to the Zabbix server on their requests.
There are two types of checks between Zabbix Server and Client.
- Passive Check – Zabbix Agent sent data to server on their request.
- Active Check – Zabbix Agent sends data periodically to server.
After installing zabbix server on your server, Now we are moving to install agent on remote system’s. This article will help you to install zabbix agent on CentOS/RHEL 7/6/5 systems. After completing this step go to next article add Host in Zabbix Server.
Step 1 – Add Required Repository
Before installing Zabbix Agent first configure Zabbix yum repository using following commands as per your required version and operating system.
CentOS/RHEL 7: rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm CentOS/RHEL 6: rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/6/x86_64/zabbix-release-4.0-2.el6.noarch.rpm
Step 2 – Install Zabbix Agent
After installing yum repository packages in our system. Use the following command to install Zabbix agent on your CentOS and Red Hat systems using the yum package manager.
yum install zabbix zabbix-agent
Step 3 – Zabbix Agent Configuration
As Zabbix agent has been successfully installed on our remote system. Now we just need to configure Zabbix agent by adding Zabbix server IP to the configuration file
#Server=[zabbix server ip] #Hostname=[ Hostname of client system ] Server=192.168.1.100 Hostname=Server1
Step 4 – Open Port
Zabbix agent uses 10050/tcp port. You are required to open this port to allow the Zabbix server with the agent. Execute command to open port in iptables firewall where 192.168.1.100 is IP of Zabbix server.
iptables -A INPUT -p tcp -s 192.168.1.100 --dport 10050 -m state --state NEW,ESTABLISHED -j ACCEPT
Step 5 – Restarting Zabbix Agent
After adding Zabbix server IP to the configuration file, now restart agent service to reload the new settings, using the following command.
service zabbix-agent restart
To start and stop zabbix-agent service anytime use following commands.
service zabbix-agent start service zabbix-agent stop
23 Comments
Bonjour,
Merci pour cet article, j’ai réussi à installé l’agent Zabbix.
En revanche, je rencontre une difficulté pour rendre persistent l’ouverture du port dans Iptable.
Est-ce qu’il y a une manière éviter la suppression de cette ligne ?
Merci pour votre retour
Hello, When i start zabbix server, im getting Failed to start zabbix-server.service: Unit not found..
I have installed everything, but its not coming up.
I faced the same problem. Just use
service zabbix-agent2 start
and
systemclt enable zabbix-agent2
to start it automatically
(Note: this post is for newcomers to this blog post, like me)
Hello Sir, I am new to linux and I tried installing zabbix for my server by following the tutorial on this site. I was able to install it however I am having problems installing zabbix-agent for my client. I ran the command to add the repository and install zabbix and zabbix-agent but I got the results below. I can see that there was a conflict between zabbix and zabbix-agent but not sure how to resolve.
Dependencies Resolved
======================================================================================
Package Arch Version Repository Size
======================================================================================
Installing:
zabbix-agent x86_64 4.0.12-1.el7 zabbix 412 k
zabbix40 x86_64 4.0.11-1.el7 epel 348 k
Transaction Summary
======================================================================================
Install 2 Packages
Total size: 760 k
Total download size: 412 k
Installed size: 3.0 M
Downloading packages:
zabbix-agent-4.0.12-1.el7.x86_64.rpm | 412 kB 00:00:01
Running transaction check
Running transaction test
Transaction check error:
file /etc/zabbix/zabbix_agentd.conf conflicts between attempted installs of zabbix40-4.0.11-1.el7.x86_64 and zabbix-agent-4.0.12-1.el7.x86_64
Error Summary
————-
Merci d’avoir écrit cet article. Cela a beaucoup aidé
Hi, very good and simple explanation on how to install and setup zabbix agent on CentOS/RHEL, but, here I’m trying to install the agent on my CentOS 7.2, but it isn’t going as simple as you describe.
See:
I run:
# rpm -Uvh http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
Retrieving http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
warning: /var/tmp/rpm-tmp.llfFqY: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY
Preparing… ################################# [100%]
Updating / installing…
1:zabbix-release-3.5-1.el7 ################################# [100%]
Everything ok, but:
# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: http://ftp.unicamp.br
* epel: mirror.uta.edu.ec
* extras: http://ftp.unicamp.br
* updates: http://ftp.unicamp.br
repo id repo name status
base/7/x86_64 CentOS-7 – Base 0+9,591
epel/x86_64 Extra Packages for Enterprise Linux 7 – x86_64 0+12,507
extras/7/x86_64 CentOS-7 – Extras 0+448
updates/7/x86_64 CentOS-7 – Updates 0+2,416
zabbix/x86_64 Zabbix Official Repository – x86_64 0+248
zabbix-non-supported/x86_64 Zabbix Official Repository non-supported – x86_64 0+4
repolist: 0
And,:
# yum install zabbix-agent
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: http://ftp.unicamp.br
* epel: mirror.uta.edu.ec
* extras: http://ftp.unicamp.br
* updates: http://ftp.unicamp.br
No package zabbix-agent available.
Error: Nothing to do
What I’m doing wrong?
Firstly thanks for the great and simple steps to configure the zabbix.
my issues zabbix agent is running but i am not able to use it i tried to access it using
127.0.0.1:10050/zabbix
localhost:/10050/zabbix
getting this page is not
Please help.
At REHL 7/CentOS 7, /etc/init.d/zabbix-agent start is old dated and not available anymore
use
systemctl restart zabbix-agent
and to auto-start it after a reboot
systemctl enable zabbix-agent
If you use incoming connections open the firewall…
hi guys can you help with my agent. i cant edit my config file for “agent” (access denied for super user)
Thanks! Great Job!
Thanks, very nice !!!
Hi,
I want to install zabbix agent without opening the port 10050.please help
Hi,
I want to install Zabbix agent without opening the port 10050.Is it possible to install if it so please help me to install the zabbix agent.And also please give me a tutorials on this
You can use zabbix agent in active mode so you do not need open the port. You have to give the zabbix server ip on filed ServerActive=
On that case, you have to make sure that on zabbix server side, you have to open the 10051 port.
Hope that help.
Hi,
Is it possible to install Zabbix Agent as non root user?
e.g. install as zabbix.
I don’t have access to root on many of my servers and it would be hard to get the SA to approve that.
Thanks,
Alex
Nope! It is not possible install as standard user.
This is a great article. I have a Ubuntu 14.04 server and using your tutorial and combining with another I managed to successfully install Zabbix and configure a Zabbix agent.
Kudos to you and many thanks.
Thanks, very much.
How to Uninstall zabbix completely from Centos?
Hi, can you update your post? URL are changed and I am getting the error as below once i ran command.
# rpm -Uvh zabbix-agent-2.2.0-1.el6.x86_64.rpm
error: Failed dependencies:
zabbix = 2.2.0-1.el6 is needed by zabbix-agent-2.2.0-1.el6.x86_64
I am new to linux and zabbix. Please help me. Thank you.
Thanks Ryan. We will update articles soon.
You need to install first new zabbix yum repositories package then install zabbix agent
# rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
# yum install zabbix-agent
I hope this will help you
Hi,
Thanks for this article and its very useful ……And I had implemented this in my machine and installed successfully…..But the problem is Mysql related applications and triggers are not working………..I had checked my version of server and agent….both are same zabbix-xxxxx-xxxxx-2.2.1-1
…
…
If you know the solution please update it as a link or reply to this………
Hm…
Sometimes it happens that mysql write/read speed is just not fast enough so it can’t be writen inside mysql db. This can cause slow response time of zabbix! You can try to tune mysql ,tune i/o operations on server or add more hardware resourses!