Skip to content

Install Zabbix Agent on CentOS on a different Cloud Provider

Video Lecture

Install Zabbix Agent on Centos on a different Cloud Provider Install Zabbix Agent on Centos on a different Cloud Provider

Description

In this video I install CentOS 9 Stream on a Hetzner Server.

I first configure the new CentOS host using the Linux by Zabbix agent active template and then change to the passive Linux by Zabbix agent template.

This example reiterates the considerations of setting up an active template versus a passive template and firewall issues.

You can use this Hetzner Cloud coupon link where new users can receive €20 in FREE credits.

I also demonstrate installing Zabbix Agent2, and using Nano as the text editor in Centos9 Stream.

If nano is not installed on Centos,

#
yum install -y nano

Note that commands for Zabbix Agent2 differ from the traditional Zabbix Agent.

Zabbix Agent

#
#
#
#
#
#
#
#
# check status
service zabbix-agent status
# start
service zabbix-agent start
# stop
service zabbix-agent stop
# restart
service zabbix-agent restart

Zabbix Agent2

#
#
#
#
#
#
#
#
# check status
service zabbix-agent2 status
# start
service zabbix-agent2 start
# stop
service zabbix-agent2 stop
# restart
service zabbix-agent2 restart

Troubleshooting Agent Configuration

Ensure your hostname in the Zabbix UI matches the Hostname in the agents' configuration file.

For passive checks, the Zabbix server (or Zabbix Proxy, if configured to use a proxy), should be able to ping the agent by the IP address or domain name you set up in the host configuration interface fields. Ping will respond if ICMP is enabled on the server that you are pinging, and if there is no network rule blocking it somewhere.

You can also telnet, from the Zabbix server (or Zabbix Proxy, if configured to use a proxy), to the port (default 10050), that the agent process is listening on.

For active checks, the server with the agent running, should be able to ping the IP address, or domain name you've set in the ServerActive parameter in the agents' configuration file. This address will be the Zabbix Server, and/or the Zabbix Proxy. It should also be able to telnet to the Zabbix Server/Proxy port (default 10051).

To read the Zabbix Server logs, on the Zabbix Server type,

#
tail -f /var/log/zabbix/zabbix_server.log

To read the Zabbix Agent log files on the host,

#
#
#
#
# Zabbix Agent
tail -f /var/log/zabbix/zabbix_agentd.log
# Zabbix Agent 2
tail -f /var/log/zabbix/zabbix_agent2.log

Telnet test doesn't connect to server across the network.

See Troubleshooting Telnet

Comments