Here is a brief summary of the installation and configuration of Zabbix Agent on the Linux platform. The Zabbix version tested in the experiment is relatively old (Zabbix 3.0.9). Although the version is a bit old, the installation steps and processes of the new and old versions are basically the same. The summary here is just an operation manual, and some content will be updated or added later. There are many Linux versions, and the following document has only been tested on RHEL and CentOS versions. Different versions may have different installation procedures, which will be supplemented and improved later. 1: First check the version of zabbix_server # zabbix_server --version zabbix_server (Zabbix) 3.0.9 Revision 67444 19 April 2017, compilation time: Apr 23 2017 18:05:43 Copyright (C) 2017 Zabbix SIA License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it according to the license. There is NO WARRANTY, to the extent permitted by law 2: Check the Linux distribution version of the monitored server
3: Choose to download the corresponding Zabbix Agent installation package according to the Zabbix Server version and Linux distribution version For this test environment, we choose to download the RMP package zabbix-agent-3.0.9-1.el5.x86_64.rpm. The download address is http://repo.zabbix.com/zabbix/3.0/rhel/5/x86_64/ # rpm -ivh zabbix-agent-3.0.9-1.el5.x86_64.rpm warning: zabbix-agent-3.0.9-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 79ea5ed4 Preparing... ############################################# [100%] 1:zabbix-agent ############################################## [100%] Of course, if the server can access the external network, you can also use the following command to install it directly.
Or if you configure the yum source, it will be easier and more convenient.
We know that by default, Zabbix Server generally actively obtains data from the client. Of course, the client can also actively push data to the server. The client uses the zabbix_sender instruction to actively push data to the server. The installation and configuration of zabbix_sender are not introduced here. I plan to introduce it separately later. 4: Modify the configuration file of Zabbix-Agent First find the location of zabbix_agentd.conf. You can use rpm -ql zabbix-agent or rpm -ql zabbix-agent | grep zabbix_agentd.conf # rpm -ql zabbix-agent /etc/init.d/zabbix-agent /etc/logrotate.d/zabbix-agent /etc/zabbix/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.d /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf /usr/sbin/zabbix_agentd /usr/share/doc/zabbix-agent-3.0.9 /usr/share/doc/zabbix-agent-3.0.9/AUTHORS /usr/share/doc/zabbix-agent-3.0.9/COPYING /usr/share/doc/zabbix-agent-3.0.9/ChangeLog /usr/share/doc/zabbix-agent-3.0.9/NEWS /usr/share/doc/zabbix-agent-3.0.9/README /usr/share/man/man8/zabbix_agentd.8.gz /var/log/zabbix /var/run/zabbix # rpm -ql zabbix-agent | grep zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf Edit the parameter file zabbix_agentd.conf
Hostname=Zabbix server #Zabbix client host name replaces Zabbix server 5: Start Zabbix-agent service There are several ways to start Zabbix-Agent. Pay attention to the actual environment. Some Linux versions do not support some of the following methods. Method 1: # service zabbix-agent start Starting Zabbix agent: [ OK ] # service zabbix-agent stop Shutting down Zabbix agent: [ OK ] # service zabbix-agent status zabbix_agentd (pid 8120) is running... Method 2: systemctl start zabbix-agent.service systemctl stop zabbix-agent.service Method 3: /etc/init.d/zabbix-agent start /etc/init.d/zabbix-agent stop /etc/init.d/zabbix-agent status 6: Set the zabbix-agent service to start automatically at boot # chkconfig --add zabbix-agent # chkconfig --list | grep zabbix-agent zabbix-agent 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7: Check whether the monitored Linux server firewall has TCP port 10050 open This is very simple and I won’t elaborate on it in detail. But it must be checked and confirmed, otherwise Zabbix Server will not be able to obtain data. If you use iptables to manage your firewall, for example (CentOS 5,6) Modify the configuration file, firewall configuration file /etc/sysconfig/iptables, add the following configuration
Restart the firewall service iptables restart If you use firewalld to manage your firewall (for example, CentOS 7.x)
Version issue: Note: Regarding the issue of whether the versions of Zabbix Server and Zabbix Agent should be consistent, try to keep them consistent. Consistent versions can avoid various problems. The official documentation also states: Zabbix Server is backward compatible with Zabbix Agent. But please note that some parameters need to be modified. Please note that Zabbix agent higher than 3.0 cannot be used with Zabbix server 3.0. The details are as follows: 12 Version compatibility
Although the official documentation suggests that Zabbix agents higher than 3.0 cannot be used with Zabbix server 3.0, it is unclear whether it refers to major or minor versions. For example, the Zabbix Server in my test environment is 3.0.9, and the client can also install the zabbix-agent-3.0.28 version. No problems have been found in the test. Summarize This is the end of this article about the installation and configuration methods of Zabbix Agent on Linux platform. For more relevant Zabbix Agent installation and configuration content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Detailed explanation of the knowledge points of using TEXT/BLOB types in MySQL
>>: js uses the reduce method to make your code more elegant
The previous article introduced how to achieve a ...
I have seen many relevant tutorials on the Intern...
Linux change hostname command 1. If you only need...
Does color influence website visitors? A few year...
This article shares the specific code for impleme...
This article shares the specific code for JavaScr...
This article example shares the specific code of ...
RULES can be used to control the style of the int...
1. Introduction I wrote an article before: The pr...
The following code introduces Chrome's monito...
2.1、msi installation package 2.1.1、Installation I...
Find the problem Recently, when I connected to th...
When using apt-get to install, it will be very sl...
Table of contents question 1. Install webpack web...
The value of the background property in CSS backg...