Table of Contents
Zabbix_agent deployment
Reference documents:
1. Environment
2. Software acquisition
3. Preparation
1. iptables settings
2. selinux
4. Install zabbix_agent
1. Dependency packages
2. Add user
3. Add service port
has been added in the default services document. 4. Install zabbix_agent
5. Configuration
Modify zabbix_agnet configuration file
Add boot script
6. Startup verification
5. Add linux host monitoring
1. Create a host
2. Host information
3. Select the monitoring template
4. Status Observation
Home Backend Development PHP Tutorial Zabbix_agent deployment_PHP tutorial

Zabbix_agent deployment_PHP tutorial

Jul 12, 2016 am 08:51 AM
android

Zabbix_agent deployment

Reference documents:

1. zabbix monitors linux host: http://www.osyunwei.com/archives /8035.html

1. Environment

Server: Based on CentOS-7-x86_64-1511, zabbix-3.0.1 server has been deployed

ServerIP: 192.168.11.252

Agent: CentOS-6.4- x86_64

AgentIP: 192.168.21.252, the route is reachable server

2. Software acquisition

Zabbix official website download address: http://www.zabbix.com/download.php

The current latest LTS version download address: http://jaist.dl.sourceforge.net /project/zabbix/ZABBIX Latest Stable/3.0.1/zabbix-3.0.1.tar.gz

3. Preparation

1. iptables settings

[root@localhost ~]# vim /etc/sysconfig/iptables

-A INPUT -s 192.168.11.252 -p tcp -m state --state NEW -m tcp--dport 10050 -j ACCEPT

-A OUTPUT -d 192.168.11.252 -p tcp -m state --state NEW -m tcp--dport 10051 -j ACCEPT

#zabbix_agent port 10050, the agent adopts passive mode, and the server actively connects to the agent; the agent also has an active mode, which can be configured in the agent's configuration file

# zabbix_trapper port 10051, agent active or trapper Method to connect to the server

# The server ip is specified here for security, which can be ignored

2. selinux

[root@localhost~]# getenforce

# Check whether selinux is closed. If it is running, it needs to be closed

[root@localhost~]# vim /etc/selinux/config

#SELINUX=enforcing

SELINUX=disabled

[root@localhost~]# setenforce 0

# Make the configuration take effect immediately

4. Install zabbix_agent

1. Dependency packages

Description: zabbix_agent requires relatively few dependency packages, but basic compilation dependency packages are still needed, such as gcc, gcc-c, etc. The initial centos system here is installed according to the compilation environment. The compilation and installation went smoothly. It is not certain which dependent packages are needed in addition to the basic compilation environment. Readers can try compilation and installation first, and deal with any errors if they occur.

2. Add user

groupaddzabbix

useradd-g zabbix -s /sbin/nologin zabbix

#Create user zabbix and add user zabbix Go to user group zabbix

3. Add service port

vim/etc/services

# Zabbix

zabbix-agent 10050/tcp # Zabbix Agent

zabbix-agent 10050/udp # Zabbix Agent

zabbix-trapper 10051/tcp # Zabbix Trapper

zabbix-trapper 10051/udp # Zabbix Trapper

#Add the port corresponding to the zabbix service.

has been added in the default services document. 4. Install zabbix_agent

ln -s/usr/local/lib/libiconv.so .2 /usr/lib/libiconv.so.2

/sbin/ldconfig

#Make the configuration take effect immediately

#It is possible that libiconv.so.2 cannot be found file, no impact has been found yet

tar -zxvf/usr/local/src/zabbix-3.0.1.tar.gz

cd/usr/local /src/zabbix-3.0.1

./configure--prefix=/usr/local/zabbix --enable-agent

#Only install zabbix_agent

make

makeinstall

ln -s/usr/local/zabbix/sbin/* /usr/local/sbin/

ln -s/usr/ local/zabbix/bin/* /usr/local/bin/

#Add soft links to zabbix_agent related execution files

5. Configuration

Modify zabbix_agnet configuration file

vim /usr/local/zabbix/etc/zabbix_agentd.conf

Server=192.168.11.252

Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d /

UnsafeUserParameters=1

#Enable custom key

Add boot script

cp/usr/local/src/zabbix-3.0.1 /misc/init.d/fedora/core/zabbix_agentd/etc/rc.d/init.d/zabbix_agentd

#Client

chownzabbix:zabbix /etc /rc.d/init.d/zabbix_agentd

chmod x/etc/rc.d/init.d/zabbix_agentd

#Add script execution permissions

vim/etc/rc.d/init. d/zabbix_agentd

BASEDIR=/usr/local/zabbix/

#Edit the installation directory of zabbix in the client startup script

chkconfig-- level 35 zabbix_agentd on

#Add boot startup

6. Startup verification

service zabbix_agentdstart

ps aux |grep zabbix_agentd

netstat-tunlp | grep zabbix

# Check whether the Zabbix client is running normally

Test whether the communication between the Zabbix client and the Zabbix server is normal, as follows The command is executed on the zabbix server:

zabbix_get-s 192.168.21.252 -p 10050 -k "system.uptime"

2533194

#If there is data echo, the communication is normal , 192.168.21.252 is the zabbix client IP address; if the echo is abnormal, you can check the agent log. According to the file configuration, the default is /tmp/zabbix_agentd.log

5. Add linux host monitoring

1. Create a host

Open the zabbix server in the browser:

http://192.168.11.252/zabbix

ConfigurationàHostsàCreate host

2. Host information

under the Host tag:

Customize "Host name";

Select "Groups", if not, create a new "Newgroup";

Select "Agentinterfaces" for monitoring mode, fill in "IP ADDRESS", the default is Connect to port 10050 in IP mode, do not make any changes, and leave the rest as default.

3. Select the monitoring template

Under the Templates tab:

"Link new templates", Selectà selected Template OSLinux Template àAdd confirms adding the template, and the added template will be displayed in "Linked Templates";

Click the "Add" button at the bottom of the page, and the host is added successfully.

4. Status Observation

The host is added successfully and automatically returns to the Hosts page. For the created host, mainly observe the status of "STATUS" and "AVAILABILITY", as follows:

If the status is abnormal, you can check the server-side log, according to the configuration file , the default is /tmp/zabbix_server.log.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1128023.htmlTechArticleZabbix_agent deployment reference document: 1. zabbix monitors linux host: http://www.osyunwei.com/archives/ 8035.html 1. Environment Server: Based on CentOS-7-x86_64-1511, zabbix-3.0.1 service has been deployed...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

New report delivers damning assessment of rumoured Samsung Galaxy S25, Galaxy S25 Plus and Galaxy S25 Ultra camera upgrades New report delivers damning assessment of rumoured Samsung Galaxy S25, Galaxy S25 Plus and Galaxy S25 Ultra camera upgrades Sep 12, 2024 pm 12:23 PM

In recent days, Ice Universe has been steadily revealing details about the Galaxy S25 Ultra, which is widely believed to be Samsung's next flagship smartphone. Among other things, the leaker claimed that Samsung only plans to bring one camera upgrade

Samsung Galaxy S25 Ultra leaks in first render images with rumoured design changes revealed Samsung Galaxy S25 Ultra leaks in first render images with rumoured design changes revealed Sep 11, 2024 am 06:37 AM

OnLeaks has now partnered with Android Headlines to provide a first look at the Galaxy S25 Ultra, a few days after a failed attempt to generate upwards of $4,000 from his X (formerly Twitter) followers. For context, the render images embedded below h

IFA 2024 | TCL\'s NXTPAPER 14 won\'t match the Galaxy Tab S10 Ultra in performance, but it nearly matches it in size IFA 2024 | TCL\'s NXTPAPER 14 won\'t match the Galaxy Tab S10 Ultra in performance, but it nearly matches it in size Sep 07, 2024 am 06:35 AM

Alongside announcing two new smartphones, TCL has also announced a new Android tablet called the NXTPAPER 14, and its massive screen size is one of its selling points. The NXTPAPER 14 features version 3.0 of TCL's signature brand of matte LCD panels

Vivo Y300 Pro packs 6,500 mAh battery in a slim 7.69 mm body Vivo Y300 Pro packs 6,500 mAh battery in a slim 7.69 mm body Sep 07, 2024 am 06:39 AM

The Vivo Y300 Pro just got fully revealed, and it's one of the slimmest mid-range Android phones with a large battery. To be exact, the smartphone is only 7.69 mm thick but features a 6,500 mAh battery. This is the same capacity as the recently launc

New report delivers damning assessment of rumoured Samsung Galaxy S25, Galaxy S25 Plus and Galaxy S25 Ultra camera upgrades New report delivers damning assessment of rumoured Samsung Galaxy S25, Galaxy S25 Plus and Galaxy S25 Ultra camera upgrades Sep 12, 2024 pm 12:22 PM

In recent days, Ice Universe has been steadily revealing details about the Galaxy S25 Ultra, which is widely believed to be Samsung's next flagship smartphone. Among other things, the leaker claimed that Samsung only plans to bring one camera upgrade

Samsung Galaxy S24 FE billed to launch for less than expected in four colours and two memory options Samsung Galaxy S24 FE billed to launch for less than expected in four colours and two memory options Sep 12, 2024 pm 09:21 PM

Samsung has not offered any hints yet about when it will update its Fan Edition (FE) smartphone series. As it stands, the Galaxy S23 FE remains the company's most recent edition, having been presented at the start of October 2023. However, plenty of

Motorola Razr 50s shows itself as possible new budget foldable in early leak Motorola Razr 50s shows itself as possible new budget foldable in early leak Sep 07, 2024 am 09:35 AM

Motorola has released countless devices this year, although only two of them are foldables. For context, while most of the world has received the pair as the Razr 50 and Razr 50 Ultra, Motorola offers them in North America as the Razr 2024 and Razr 2

Xiaomi Redmi Note 14 Pro Plus arrives as first Qualcomm Snapdragon 7s Gen 3 smartphone with Light Hunter 800 camera Xiaomi Redmi Note 14 Pro Plus arrives as first Qualcomm Snapdragon 7s Gen 3 smartphone with Light Hunter 800 camera Sep 27, 2024 am 06:23 AM

The Redmi Note 14 Pro Plus is now official as a direct successor to last year'sRedmi Note 13 Pro Plus(curr. $375 on Amazon). As expected, the Redmi Note 14 Pro Plus heads up the Redmi Note 14 series alongside theRedmi Note 14and Redmi Note 14 Pro. Li

See all articles