Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The operation process of Zabbix4.0 distributed and automatic registration sending

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article shows you the Zabbix 4.0 distributed and automatic registration process, the content is concise and easy to understand, absolutely can make you shine, through the detailed introduction of this article I hope you can gain something.

1. zabbix proxy compilation installation

distributed architecture

Zabbix Server -> Zabbix Proxy -> Zabbix Agent(Multiple)

Agent Server Whitelist To Configure Proxy

The proxy side requires database storage

mysql database installation

yum install mariadb-server mariadb mariadb-devel -ysystemctl restart mariadbsystemctl enable mariadb

database initialization

root:mysql ##login create database zabbix character set utf8 collect utf8_bin;grant all privileges on zabbix.* to zabbix@'127.0.0.1' identified by 'zabbixpwd';set names utf8;use zabbix;source /usr/local/src/zabbix-4.0.3/database/mysql/schema.sql;

Zabbix Proxy Installation

yum install -y tar gcc make gcc-c++ net-snmp-devel libxml2-devel libcurl-devel pcre-develuseradd -s /sbin/nologin zabbixcd /usr/local/src/wget 'https://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/4.0.3/zabbix-4.0.3.tar.gz'tar -zxvf zabbix-4.0.3.tar.gzcd zabbix-4.0.3./ configure --prefix=/usr/local/zabbix --enable-proxy --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2make && make installchown -R zabbix:zabbix /usr/local/zabbix/

modify the configuration file

vim /usr/local/zabbix/etc/zabbix_proxy.confHostname=bjproxy ##Hostname Server=192.168.237.49 ##zabbx server whitelist LogFile=/usr/local/zabbix/zabbix_proxy.logDBHost=127.0.0.1DBName=zabbixDBUser=zabbixDBPassword=zabbixpwdDBPort=3306ConfigFrequency=60#Start Zabbix _Proxy

Web configuration proxy server

proxy name must be consistent with hostname in the configuration file

active is proxy to request zabbix server and passive is zabbix server to request zabbix server every time

proxy address Fill in proxy address

Monitor hosts via proxy

This place selects proxy devices and customizes them to add monitoring items the same as before

Two: zabbix auto-discovery and registration

automatic discovery

Auto-discovery name, Auto-discovery by proxy, IP segment, Auto-discovery update time, check Auto-discovery key

Check if configuration is successful

Actions after auto-discovery (add host, add host group, associate application template, etc.)

Pay attention to filling in the conditions of discovery

Action after discovery: join server group association template

After completion, you will see relevant host information in hosts. The disadvantage is that the host name setting is more troublesome.

automatic registration

Automatic registration is relatively easier to use than automatic discovery

If automatic registration is used, when adding hosts, the host name uses the Hostname configured by the Agent.

Automatic registration process:

1, zabbix client needs to configure ServerActive

2, zabbix client provides its own metadata to zabbix server or zabbix distributed proxy

3, zabbix server add action, When receiving metadata automatically add host, Link template and so on

agent client configuration

PidFile=/usr/local/zabbix/zabbix_agentd.pidLogFile=/usr/local/zabbix/zabbix_agentd.logHostname=www_001 ##Keep consistent with host name Server=192.168.237.50 ##Proxy address filled No proxy address filled ServerActive=192.168.237.50 ##Proxy address filled No proxy address filled Server address UnsafeUserParameters=1 Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/*.confHostMetadataItem=system.uname ##Metadata

Add metadata source fill in computer name matching as shown in the figure: the computer name at the beginning is www_will automatically register Add

There is a proxy added.

Add post-deployment registered actions

verification

This is how Zabbix 4.0 works with distributed and automatic sign-ups. Have you learned anything? If you want to learn more skills or enrich your knowledge reserves, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report