当前位置:网站首页>Step by step monitoring platform ZABBIX
Step by step monitoring platform ZABBIX
2022-07-07 15:58:00 【Oranges are delicious】
List of articles
One 、zabbix brief introduction
1、 What is? zabbix
- zabbix It's based on Web The interface provides enterprise level open source solutions for distributed system monitoring and network monitoring .
- zabbix Can monitor all kinds of network parameters , Ensure the safe operation of the server system ; And provide a flexible notification mechanism to allow system administrators to quickly locate / Solve all kinds of problems .
- zabbix from 2 Part of the form ,zabbix server With optional components zabbix agent. adopt C/S Mode acquisition data , adopt B/S Patterns in Web End display and configuration .
- zabbix server Can pass SNMP,zabbix agent,ping, Port monitoring and other methods are provided for remote servers / Monitoring of network status , Data collection and other functions , It can run in Linux Platforms such as .
- zabbix agent It needs to be installed on the monitored target server , It mainly completes the hardware information or memory related to the operating system ,CPU And so on .
2、zabbix Monitoring principle :
zabbix agent Installed on the monitored host ,zabbix agent Responsible for collecting local data of client regularly , And send it to zabbix server End ,zabbix server After receiving the data , Store data in database , User based Zabbix WEB You can see the data showing the image in the front end . When zabbix Monitor a specific project , The project sets a trigger threshold , When the monitored index exceeds the threshold set by the trigger , Will do some necessary actions , Actions include : Send a message ( mail 、 WeChat 、 SMS )、 dispatch orders (shell command 、reboot、restart、install etc. ).
3、zabbix common 5 Procedures
abbix Monitoring is deployed in the system , Contains five common programs : zabbix_server、zabbix_agent、zabbix_proxy、zabbix_get、zabbix_sender etc. .
- zabbix server:zabbix Server daemons , among zabbix_agent、zabbix_get、zabbix_sender、zabbix_proxy All the data will eventually be submitted to zabbix server;
- zabbix agent: Client daemons , Responsible for collecting client data , for example : collect CPU load 、 Memory 、 Hard disk usage, etc ;
- zabbix proxy:zabbix Distributed agent daemon , Usually greater than 500 Console host , Distributed monitoring architecture deployment is required ;
- zabbix get:zabbix Data receiving tools , Commands used alone , Usually in server perhaps proxy Command to obtain remote client information ;
- zabbix sender:zabbix Data sending tool , Users send data to server or proxy End , Usually, the user takes a long time to check .
Two 、 install zabbix
Experiment preparation
zabbix-server:20.0.0.5
zabbix-agent:20.0.0.6
1.## Turn off firewall , Modify hostname
systemctl disable --now firewalld
setenforce 0
hostnamectl set-hostname zbx-server
su
##2、 obtain zabbix Download source
rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
##3、 Replace zabbix.repo For aliyuan , install zabbix-server-mysql and zabbix-agent
cd /etc/yum.repos.d
sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' zabbix.repo
yum clean all && yum makecache
yum install -y zabbix-server-mysql zabbix-agent
# install SCL(Software Collections), It is convenient for later installation of higher version of php, Default yum Installed php Version is 5.4, Version is too low ,zabbix 5.0 Version pair php The minimum version is 7.2.0 edition .SCL You can use multiple versions of software on the same machine , Without affecting the dependent environment of the whole system . The package will be installed in /etc/opt/rh Under the table of contents .
yum install -y centos-release-scl
##4、 modify zabbix-front Front end source , install zabbix Front end environment to scl In the environment
vim /etc/yum.repos.d/zabbix.repo
......
[zabbix-frontend]
......
enabled=1 # Open the installation source
......
yum install -y zabbix-web-mysql-scl zabbix-apache-conf-scl # install zabbix Front end environment to scl In the environment
##5、 install zabbix The required database
yum install -y mariadb-server mariadb
systemctl enable --now mariadb # Set the database to start automatically , And start immediately
mysql_secure_installation # Initialize database , And set the password , Such as abc123
##6、 Add database users , as well as zabbix Required database information
mysql -u root -pabc123 # Log in to the database
CREATE DATABASE zabbix character set utf8 collate utf8_bin; # Set up utf8 Character set
GRANT all ON zabbix.* TO 'zabbix'@'%' IDENTIFIED BY 'zabbix'; # Create and authorize users , bring zabbix Access to database
flush privileges; # Refresh the permissions
# Query for installed zabbix-server-mysql List of files , find sql.gz The location of the file
rpm -ql zabbix-server-mysql
# Import database information , Use zcat take sql.gz File import database
zcat /usr/share/doc/zabbix-server-mysql-5.0.25/create.sql.gz | mysql -uroot -pabc123 zabbix
##7、 modify zabbix-server The configuration file , Change the password of the database
vim /etc/zabbix/zabbix_server.conf
......
DBPassword=zabbix #124 That's ok , uncomment , Appoint zabbix Database password ,DBPassword The value of is database authorization zabbix User's password .
##8、 modify zabbix Of php The configuration file
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
......
php_value[date.timezone] = Asia/Shanghai #25 That's ok , uncomment , Change the time zone
## start-up zabbix Related services
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
Browser access :http://20.0.0.5/zabbix
Click next , Set the password of the database zabbix
After installation , The default login account and password are :Admin/zabbix
Set the file interface : Click on the menu bar on the left 【User settings】,【Language】 choice Chinese(zh_CN), Click again Update to update .
solve zabbix-server Web Page Chinese garbled problem
yum install -y wqy-microhei-fonts
cp -f /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf
边栏推荐
- 分步式监控平台zabbix
- Use of SVN
- Webcodecs parameter settings -avc1.42e01e meaning
- OpenGL common functions
- webgl_ Enter the three-dimensional world (1)
- AB package details in unity (super detail, features, packaging, loading, manager)
- Do not use memset to clear floating-point numbers
- Numpy -- epidemic data analysis case
- Steps to create P8 certificate and warehousing account
- Monthly observation of internet medical field in May 2022
猜你喜欢
Postman generate timestamp, future timestamp
20th anniversary of agile: a failed uprising
The download button and debug button in keil are grayed out
Three. JS introductory learning notes 00: coordinate system, camera (temporarily understood)
How does geojson data merge the boundaries of regions?
融云斩获 2022 中国信创数字化办公门户卓越产品奖!
10 schemes to ensure interface data security
航運船公司人工智能AI產品成熟化標准化規模應用,全球港航人工智能/集裝箱人工智能領軍者CIMC中集飛瞳,打造國際航運智能化標杆
The unity vector rotates at a point
Async and await
随机推荐
Three. JS introductory learning notes 07: external model import -c4d to JSON file for web pages -fbx import
Shipping companies' AI products are mature, standardized and applied on a large scale. CIMC, the global leader in port and shipping AI / container AI, has built a benchmark for international shipping
Limit of total fields [1000] in index has been exceeded
喜讯!科蓝SUNDB数据库与鸿数科技隐私数据保护管理软件完成兼容性适配
webgl_ Enter the three-dimensional world (2)
航運船公司人工智能AI產品成熟化標准化規模應用,全球港航人工智能/集裝箱人工智能領軍者CIMC中集飛瞳,打造國際航運智能化標杆
Postman generate timestamp, future timestamp
Asynchronous application of generator function
星瑞格数据库入围“2021年度福建省信息技术应用创新典型解决方案”
LeetCode3_ Longest substring without duplicate characters
Zhongang Mining: Fluorite continues to lead the growth of new energy market
Do not use memset to clear floating-point numbers
C Alibaba cloud OSS file upload, download and other operations (unity is available)
Yunxiaoduo software internal test distribution test platform description document
Three. JS introductory learning notes 15: threejs frame animation module
无线传感器网络--ZigBee和6LoWPAN
Use moviepy Editor clips videos and intercepts video clips in batches
Unity的三种单例模式(饿汉,懒汉,MonoBehaviour)
Apache Doris刚“毕业”:为什么应关注这种SQL数据仓库?
Align individual elements to the right under flex layout