Steps to Install Zabbix-Agent on your server

Introduction

Zabbix is an open-source monitoring software tool for diverse IT components, including networks, servers, virtual machines and cloud services. Zabbix provides monitoring metrics, among others network utilization, CPU load and disk space consumption. Zabbix server get fetch their data from zabbix-agent. In E2E cloud node, Zabbix-agent is Installed by default on all the node.

In this tutorial, We will go through the steps to install zabbix-agent on your nodes.We will be using example of Centos 8 and Ubuntu 20 for zabbix-agent version 4.4

Incase if you have uninstalled this application or you are importing your custom image on e2enetworks portal, You can refer mentioned steps on this tutorial to install zabbix-agent.

Zabbix Installation on CentOS/RHEL/Fedora

Step 1: Download the Repository

You can download the required repository for zabbix-agent installation here

Dowloading the repository

rpm -ivh https://repo.zabbix.com/zabbix/4.4/rhel/8/x86_64/zabbix-agent-4.4.1-1.el8.x86_64.rpm

Updating the package

dpkg -i zabbix-agent-4.4.1-1.el8.x86_64.rpm

Step 2: Installing the Zabbix-agent

To install zabbix-agent on your server, Please use below command

yum install zabbix-agent

Enable Zabbix-agent on boot

systemctl enable zabbix-agent

Once the zabbix-agent is installed verify the status of zabbix-agent using below command

systemctl status zabbix-agent

Step 3: Connect zabbix agent to cloudone monitoring portal

After installing and verifying the status of zabbix-agent, We need to connect it with cloudone monitoring portal where you will be able to monitor your server.

Please use below command to edit the zabbix conf file (/etc/zabbix/zabbix_agentd.conf) with required details

grep -rl '127.0.0.1' /etc/zabbix/zabbix_agentd.conf | xargs sed -i 's/127.0.0.1/172.16.103.23/g'
host_name=`hostname`; grep -rl 'Hostname=Zabbix server' /etc/zabbix/zabbix_agentd.conf | xargs sed -i "s|Hostname=Zabbixserver|Hostname=$host_name|g";
sed -i '/Timeout=3/s/^#//g' /etc/zabbix/zabbix_agentd.conf

Restart zabbix agent once to make the changes reflected

systemctl restart zabbix-agent

Zabbix Installation on Debian/Ubuntu

Step 1: Download the Repository

You can download the required repository for zabbix-agent installation here

Dowloading the repository

wget http://repo.zabbix.com/zabbix/4.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.4-1%2Btrusty_all.deb

Updating the package

dpkg -i zabbix-release_4.2-1+trusty_all.deb

Step 2: Installing the Zabbix-agent

To install zabbix-agent on your server, Please use below command

apt-get update
apt-get install zabbix-agent -y

Enable Zabbix-agent on boot

update-rc.d zabbix-agent defaults

Once the zabbix-agent is installed verify the status of zabbix-agent using below command

service zabbix-agent status

Step 3: Connect zabbix agent to cloudone monitoring portal

After installing and verifying the status of zabbix-agent, We need to connect it with cloudone monitoring portal where you will be able to monitor your server.

Please use below command to edit the zabbix conf file (/etc/zabbix/zabbix_agentd.conf) with required details

grep -rl '127.0.0.1' /etc/zabbix/zabbix_agentd.conf | xargs sed -i 's/127.0.0.1/172.16.103.23/g'
host_name=`hostname`; grep -rl 'Hostname=Zabbix server' /etc/zabbix/zabbix_agentd.conf | xargs sed -i "s|Hostname=Zabbixserver|Hostname=$host_name|g";
sed -i '/Timeout=3/s/^#//g' /etc/zabbix/zabbix_agentd.conf

Restart zabbix agent once to make the changes reflected

service zabbix-agent status

Monitor your server.

-You will now be able to Monitor your server on Cloudone Monitoring portal

-To login to E2E’s Zabbix Portal , Click on this link

-The username and Password are shared to your registered email-id while signing up for Myaccount Portal.

Note

Make sure You have port 10050 Opened in your server for the Server IP:172.16.103.23 (E2E Cloudone Monitoring server IP) since Zabbix uses the port 10050 to fetch your server data.

If you are observing any issue in the Monitoring portal, Please reach out to us on cloud-platform@e2enetworks.com