Enterprise-class distributed Monitoring System Zabbix series (Zabbix-agent installation and configuration)

Source: Internet
Author: User
Tags aliyun egrep

This article takes the CentOS 6.7 x86_64 system as an example, the environment is the new system which just completes.


Zabbix-agent End Environmental Inspection

[[email protected] ~]# cat /etc/redhat-releasecentos  release 6.7  (Final) [[email protected] ~]# uname -r2.6.32-573.8.1.el6.x86_ 64[[email protected] ~]# uname -mx86_64[[email protected] ~]#  hostnamelinux-node2.example.com[[email protected] ~]# ifconfig | awk -f  ' [ inet addr:| ]+ '   ' nr==2{print $2} ' 10.19.1.20[[email protected] ~]# yum  Repolist Loaded plugin: fastestmirror, securityloading mirror speeds from cached hostfile  * base: mirrors.aliyun.com * epel: mirrors.aliyun.com * extras:  Mirrors.aliyun.com * updates: mirrors.aliyun.com 

Specifies the yum source for the Zabbix.

[Email protected] ~]# RPM-IVH http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm

Specifies the Epel source for the Zabbix.

[Email protected] ~]# RPM-IVH http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Yum installs the agent side of the Zabbix.

Yum install-y Zabbix zabbix-agent

View Zabbix-agent's configuration file

[Email protected] ~]# egrep-v "(^#|^$)"/etc/zabbix/zabbix_agentd.confpidfile=/var/run/zabbix/zabbix_ Agentd.pidlogfile=/var/log/zabbix/zabbix_agentd.loglogfilesize=0server=127.0.0.1serveractive=127.0.0.1hostname =zabbix serverinclude=/etc/zabbix/zabbix_agentd.d/

There are 3 phases in the configuration file that need to be changed.

The address of the server is the passive mode in which the agent allows access to data;

Serveractive the corresponding address is the active mode of the agent to whom to send data;

If you need to use active mode, the hostname corresponding content must be modified to the agent side of the real hostname, and this hostname to remain unique.

[Email protected] ~]# egrep-v "(^#|^$)"/etc/zabbix/zabbix_agentd.confpidfile=/var/run/zabbix/zabbix_ Agentd.pidlogfile=/var/log/zabbix/zabbix_agentd.loglogfilesize=0server=10.19.1.19serveractive= 10.19.1.19hostname=linux-node2.example.cominclude=/etc/zabbix/zabbix_agentd.d/

After you modify the configuration, you need to restart the service for the configuration file to take effect.

[Email protected] ~]#/etc/init.d/zabbix-agent restart

Shutting down Zabbix agent: [Failed]starting Zabbix agent: Determine

Next, you can use the Zabbix-server side to test whether this zabbix-agent is working properly.

On the zabbix-server side, use the Zabbix_get command,-s to the destination address,-K to receive the content corresponding to the key.

[Email protected] ~]# zabbix_get-s 10.19.1.20-k agent.version2.4.7

The zabbix-agent version that can be obtained from linux-node1 to Linux-node2 is 2.4.7, which proves that Linux-node2 Zabbix-agent is already working properly.










This article is from "rookie East" blog, please be sure to keep this source http://radish.blog.51cto.com/5944322/1722952

Enterprise-class distributed Monitoring System Zabbix series (Zabbix-agent installation and configuration)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.