Zabbix adding monitoring of Linux servers (zabbix-agent)

Source: Internet
Author: User
Tags exception handling

Zabbix Monitoring System provides two ways to monitor the Linux host, one is to enable the SNMP protocol on the host, the other is to install the Zabbix Agent service on the host, this article describes the Linux system Zabbix agent installation and use.

Environment: Zabbix 3.2.10,zabbix Server uses the CentOS7

The same as CentOS7 used by the monitored server


1: Install Zabbix-agent

The advantage of RPM installation is that the configuration file is zabbix_agentd.conf by default, and the Zabbix agent has been added to the system service.

This allows you to edit/etc/zabbix/zabbix_agentd.conf directly

1.1: Online RPM installation

Warehouse Address: http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/

>> RPM-IVH http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-agent-3.2.10-1.el7.x86_64.rpm

1.2: Local Installation

Download the RPM installation package using wget first

>>wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-agent-3.2.10-1.el7.x86_64.rpm

>>RPM-IVH zabbix-agent-3.2.10-1.el7.x86_64.rpm

2: Edit configuration file

2.1:zabbix-agent Configuration

>> vi/etc/zabbix/zabbix_agentd.conf

Modify the following items in the configuration file:

S Erver=zabbix Server ip//zabbixserver-IP

Serveractive=zabbix Server ip//zabbixserver-IP

hostname= native IP or hostname do not use 127.0.0.1

2.2: Firewall configuration:

CentOS 7.0 defaults to using firewall as the firewall, and CentOS 6 uses the iptables command to be different

Turn on TCP and UDP ports 10050, 10051

>>firewall-cmd--zone=public--add-port=10050/tcp--permanent

Success//Operation success will output success

>>firewall-cmd--zone=public--add-port=10051/tcp--permanent

Success

>>firewall-cmd--zone=public--add-port=10051/udp--permanent

Success

>>firewall-cmd--zone=public--add-port=10050/udp--permanent

Success

2.3: Add boot Boot

>>chkconfig zabbix-agent on

And then execute

>>service zabbix-agent Start

We can start the Zabbix agent.

2.4: Exception Handling

If you start or restart Zabbix-agent, the following prompt appears:



Indicates that SELinux needs to be turned off (there are two methods, one is permanently closed, the other is temporarily closed, restart is disabled)

Permanently closed:

>>cd/etc/selinux

>>vi config

Selinux=enforcing Change to Disabled

Temporary shutdown:

>>setenforce 0

To view the SELinux status:

>>getenforce //Status is enforceing on, off status is permissive

2.5: View Zabbix-agent service Run status

>>service zabbix-agent Status

Active (running) indicates normal operation


3:zabbix Server Add Monitoring

Configuration-host-Create host

Enter the appropriate server information

Template page link presets for template OS Linux templates

Once you have finished adding two times, a Linux host will be able to see the relevant monitoring items within the monitoring host, even if it is added.




---END---

Zabbix adding monitoring of Linux servers (zabbix-agent)

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.