wesupport

Need help?

Our experts have had an average response time of 13.14 minutes in February 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Configure Zabbix Agents on Remote Linux

by | Dec 14, 2021

Wondering how to configure Zabbix Agents on Remote Linux? We can help you.

As part of our Server Management Services, we assist our customers with similar queries.

Today, let us see how our Support techs assist with this process.

How to Configure Zabbix Agents on Remote Linux?

Today, let us see the steps followed by our Support Techs for installation.

Step 1: Install Zabbix Agents in Linux Systems

Depending on the Linux distribution you are running, go to the Zabbix download page.

Then, grab the latest version of the available agent’s binary packages using a tool such as wget or curl.

For Debian/Ubuntu use the following steps to download and install Zabbix Agent:

Install Zabbix Agent in Debian

----------------- On Debian 11 -----------------
$ wget https://repo.zabbix.com/zabbix/5.4/debian/pool/main/z/zabbix/zabbix-agent2_5.4.6-1+debian11_amd64.deb
$ sudo dpkg -i zabbix-agent2_5.4.6-1+debian11_amd64.deb
----------------- On Debian 10 -----------------
$ wget https://repo.zabbix.com/zabbix/5.4/debian/pool/main/z/zabbix/zabbix-agent2_5.4.6-1+debian10_amd64.deb
$ sudo dpkg -i zabbix-agent2_5.4.6-1+debian10_amd64.deb

Then, install Zabbix Agent in Ubuntu

----------------- On Ubuntu 20.04 -----------------
$ wget https://repo.zabbix.com/zabbix/5.4/ubuntu/pool/main/z/zabbix/zabbix-agent_5.4.7-1+ubuntu20.04_amd64.deb
$ sudo dpkg -i zabbix-agent_5.4.7-1+ubuntu20.04_amd64.deb
----------------- On Ubuntu 18.04 -----------------
$ wget https://repo.zabbix.com/zabbix/5.4/ubuntu/pool/main/z/zabbix/zabbix-agent_5.4.7-1+ubuntu18.04_amd64.deb
$ sudo dpkg -i zabbix-agent_5.4.7-1+ubuntu18.04_amd64.

Install Zabbix On RHEL-based Systems

For RHEL alike systems, download the .rpm packaged for the distribution-specific release number, and install it using rpm package manager.

In order to automatically manage missing dependency issues and install the agent using one-shot use the yum command below:

----------------- On RHEL 8 -----------------
# rpm -Uvh https://repo.zabbix.com/zabbix/5.4/rhel/8/x86_64/zabbix-agent-5.4.6-1.el8.x86_64.rpm
----------------- On RHEL 7 -----------------
# rpm -Uvh https://repo.zabbix.com/zabbix/5.4/rhel/7/x86_64/zabbix-agent-5.4.6-1.el7.x86_64.rpm

Step 2: Configure and Test Zabbix Agent in Linux

Next, open the Zabbix agent configuration file located in /etc/zabbix/ system path on both major distributions.

Then, instruct the program to send all the collected information to the Zabbix server in order to analyze and process.

Therefore, open the zabbix_agentd.conf file with your favorite text editor.

Find the below lines (use the screenshots as a guide), uncomment them and make the following changes:

# nano /etc/zabbix/zabbix_agentd.conf

add Zabbix server IP address and hostname as shown below.

Configure Zabbix Agent – zabbix_agentd.conf
Server=IP of Zabbix Server
ServerActive=IP of Zabbix Server
Hostname=use the FQDN of the node where the agent runs

Then, restart the daemon using the following command.

Then use the netstat command to verify if the daemon has been started and operates on the specific port – 10050/tcp:

$ sudo systemctl restart zabbix-agent
$ sudo netstat -tulpn|grep zabbix

For older distributions use the service command to manage Zabbix agent daemon:

$ sudo service zabbix-agent restart
$ sudo netstat -tulpn|grep zabbix

If your system is behind a firewall then you need to open 10050/tcp port on the system in order to reach through the Zabbix server.

For Debian based systems, including Ubuntu, you can use the ufw tool to open the port and on RHEL-based.

You can use Firewalld utility to manage the firewall rules as the below examples:

$ sudo ufw allow 10050/tcp [On Debian based systems]
$ sudo firewall-cmd --add-port=10050/tcp --permanent [On RHEL based systems]

For older distributions such as RHEL/CentOS 6 or unmanaged firewalls through specific utilities use the powerful iptables command to open ports:

# iptables -A INPUT -p tcp -m tcp --dport 10050 -j ACCEPT

Finally,  test if you can reach Zabbix Agent from Zabbix Server, use Telnet command from Zabbix server machine to the IP addresses of the machines that run the agents.

# telnet zabbix_agent_IP 10050

Step 3: Add Zabbix Agent Monitored Host to Zabbix Server

On the next step it’s time to move to the Zabbix server web console and start adding the hosts which run zabbix agent in order to be monitored by the server.

Go to Configuration -> Hosts -> Create Host -> Host tab and fill the Hostname field with the FQDN of the monitored Zabbix agent machine, use the same value as above for the Visible name field.

Next, add this host to a group of monitored servers and use the IP Address of the monitored machine at the Agent interfaces field – alternatively you can also use DNS resolution if it’s the case.

Next, move to the Templates tab and hit Select. A new window with templates should open.

Choose Template OS Linux then scroll down and hit on Select button to add it and automatically close the window.

Once the template appears to Link the new template box, hit on Add text to link it to Zabbix server.

Then hit on the lower Add button to finish the process and completely add the monitored host.

The visible name of the monitored host should now appear hosts window.

Just assure that the host Status is set to Enabled and wait a few minutes in order for the Zabbix server to contact the agent, process the received data.

Inform or eventually alert you if something goes bad on the monitored target.

[Stuck in between? We’d be glad to assist you]

Conclusion

In short, today we saw steps followed by our Support Techs to configure Zabbix Agents on Remote Linux.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags