zabbix by agent monitoring linux host

Preface:

  Several blog before were introduced to monitor windows and linux host host through snmp, this introduction agent client to be monitored by the system.

surroundings:

  server:192.168.249.142

  client:192.168.249.145

Basic Configuration: Turn off selinux, turn off the firewall or open port 10050.

A, client-side configuration:

1. Install the yum zabbix source, and the installation program zabbix-agent:

[root@cinder ~]# wget https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm
[root@cinder ~]# rpm -ivh zabbix-release-4.2-1.el7.noarch.rpm
[root@cinder ~]# yum install zabbix-agent -y

2. Modify the profile agent program:

PidFile=/var/run/zabbix/zabbix_agentd.pid
The LogFile = / var / log / ZABBIX / zabbix_agentd.log error log #
The LogFileSize = 0 
ListenPort = 10050   # start listening port
StartAgents = . 3 Choice # passive mode, the active mode or 0
ListenIP = 0.0 . 0.0 # to listen to all IP
Server = 192.168 . 249.142 Required # passive mode, the zabbix- Server-side fill ip
#ServerActive = 192.168 . 249.142 under active mode to fill #
Hostname = the Test # hostname of the machine, this value must be created on the web zabbix host name can be the same
Include=/etc/zabbix/zabbix_agentd.d/

3. Start zabbix-agent:

 

Two, server-side web add linux host:

1. Create a host (host name entries must be configured with the same hostname zabbix_agent.conf file):

 

 2. Add template:

 

 3. Add:

 

   稍等一两分钟,ZBX的图标将会由灰变绿,表示server与client已经建立了连接,并接收了数据,添加主机就完成了,如果没有变绿,那么需要检查配置项,并重启客户端的zabbix-agent服务。

Guess you like

Origin www.cnblogs.com/xiaoyuxixi/p/11549740.html