We can monitor with Zabbix by different methods. Such as Zabbix Agent, SNMP, IPMI and in the case of VMWare ESXI we can use the SDK.

In this scenario we will install Zabbix agent in a Windows environment and a Linux environment more specifically on CentOS 7.

Zabbix Agent on Windows

Go to the download page from zabbix here, and download the agent of your Zabbix Server version.

Run the msi installer

Hit next

Select all items and hit next

  1. IP from your Zabbix Server
  2. Check this option
  3. Check this optiom

And finish the installation.

Zabbix Agent on CentOS 7

Install rpm from Zabbix website

rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-2.el7.noarch.rpm
yum clean

Install Zabbix agent

yum install zabbix-agent

Now edit the Zabbix Agent configuration file in /etc/zabbix/ and insert the IP from Zabbix Server.

##### Passive checks related

### Option: Server
#	List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and Zabbix proxies.
#	Incoming connections will be accepted only from the hosts listed here.
#	If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally
#	and '::/0' will allow any IPv4 or IPv6 address.
#	'0.0.0.0/0' can be used to allow any IPv4 address.
#	Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com
#
# Mandatory: yes, if StartAgents is not explicitly set to 0
# Default:
# Server=

Server= Your Zabbix Server IP

### Option: ListenPort
#	Agent will listen on this port for connections from the server.
#
# Mandatory: no
# Range: 1024-32767
# Default:
# ListenPort=10050

### Option: ListenIP
#	List of comma delimited IP addresses that the agent should listen on.
#	First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.

Now set the Zabbix Agent start on boot and start the agent

yum enable zabbix-agent
yum start zabbiz-agent

It’s important that SELINUX is disabled and for last open Zabbix Agent port on firewall

firewall-cmd — permanent — add-port=10050/tcp
firewall-cmd --reload

Check zabbix agent state

systemctl status zabbix-agent
● zabbix-agent.service - Zabbix Agent
   Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: disabled)
   Active: active (running) since Qua 2019-10-02 10:51:29 WEST; 1 day 1h ago
  Process: 1179 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
 Main PID: 1211 (zabbix_agentd)
   CGroup: /system.slice/zabbix-agent.service
           ├─1211 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
           ├─1233 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
           ├─1234 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
           ├─1235 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
           ├─1236 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
           └─1237 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]

And it´s done!!!