Zabbix 6.0 allows you to add target monitoring on CentOS 7 using Zabbix Agent 2, an improved version of the monitoring agent that provides more data collection capabilities and improves performance. This simplifies monitoring and facilitates system administration, which allows you to quickly solve problems and improve the operation of the entire system.
CentOS 7
1 2 |
yum -y install http://repo.zabbix.com/zabbix/6.0/rhel/7/x86_64/zabbix-agent2-6.0.2-1.el7.x86_64.rpm yum -y install zabbix-agent2 |
Change server Zabbix
1 2 3 4 5 6 |
sed -i "s/Server=127.0.0.1/Server=127.0.0.1,zabbix.galaxydata.ru/" /etc/zabbix/zabbix_agent2.conf sed -i "s/ServerActive=127.0.0.1/ServerActive=127.0.0.1,zabbix.galaxydata.ru/" /etc/zabbix/zabbix_agent2.conf sed -i "s/# HostMetadataItem=/HostMetadataItem=system.uname/" /etc/zabbix/zabbix_agent2.conf systemctl start zabbix-agent2.service systemctl enable zabbix-agent2.service systemctl status zabbix-agent2.service |
[3] If Firewalld is running allow Zabbix related ports.
CentOS 7
1 2 |
firewall-cmd --add-port=10050/tcp --permanent firewall-cmd --reload |
OR ISPMANAGER
1 |
nano /etc/sysconfig/iptables |
ADD before line
1 |
-A INPUT -p udp -m conntrack --ctstate NEW -m multiport --dports 53 -j ACCEPT |
ADD
CentOS 8
<pre class=”lang:sh decode:true “>dnf -y in http://repo.zabbix.com/zabbix/5.4/rhel/8/x86_64/zabbix-agent2-5.4.9-1.el8.x86_64.rpm
dnf -y in zabbix-agent2</pre>
Change server Zabbix
<pre class=”lang:sh decode:true “>sed -i “s/Server=127.0.0.1/Server=127.0.0.1,zabbix.galaxydata.ru/” /etc/zabbix/zabbix_agent2.conf
sed -i “s/ServerActive=127.0.0.1/Server=127.0.0.1,zabbix.galaxydata.ru/” /etc/zabbix/zabbix_agent2.conf
systemctl start zabbix-agent2.service
systemctl enable zabbix-agent2.service
systemctl status zabbix-agent2.service</pre>
[3] If Firewalld is running allow Zabbix related ports.
CentOS 7
<pre class=”lang:sh decode:true “>firewall-cmd –add-port=10050/tcp –permanent
firewall-cmd –reload</pre>
OR ISPMANAGER
<pre class=”lang:sh decode:true “>nano /etc/sysconfig/iptables</pre>
ADD before line
<pre class=”lang:sh decode:true “>-A INPUT -p udp -m conntrack –ctstate NEW -m multiport –dports 53 -j ACCEPT</pre>
ADD
-A INPUT -s zabbix.galaxydata.ru -p tcp -m tcp –dport 10050 -j ACCEPT
-A OUTPUT -s zabbix.galaxydata.ru -p tcp -m tcp –dport 10051 -j ACCEPT
-A INPUT -s zabbix.galaxydata.ru -p tcp -m tcp –dport 10050 -j ACCEPT
-A OUTPUT -s zabbix.galaxydata.ru -p tcp -m tcp –dport 10051 -j ACCEPT