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

Zabbix 4.4.4 Monitoring windows

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Brief introduction

Zabbix is an enterprise-level open source solution based on WEB interface that provides distributed system monitoring and network monitoring capabilities. It can monitor various network parameters to ensure the safe operation of the server system, and provides a flexible notification mechanism to enable system administrators to quickly locate / solve various problems.

1. Installation of Zabbix 1. Installation of Zabbix server

Installation environment: CentOS Linux release 7.5 IP:192.168.1.100

Install Ali's yum source # wget https://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm# rpm-ivh zabbix-release-4.4-1.el7.noarch.rpm to install the packages required for Zabbix-server

Install Zabbix server and use MySQL database: # yum-y install zabbix-server-mysql install Zabbix front end and use MySQL database: # yum-y install zabbix-web-mysql install Zabbix agent client, native monitor: # yum-y install zabbix-agent install zabbix-get tool

# yum-y install zabbix-get install mariadb database # yum-y install mariadb-server

Start the database-add boot # systemctl start mariadb# systemctl enable mariadb to create the corresponding database for Zabbix and the database for user-created Zabbix is called zabbix. Note that the character set selection MariaDB [(none)] > CREATE DATABASE zabbix CHARSET utf8 COLLATE utf8_bin; creates Zabbix. The user name is zabbixadmin and the password is 123456MariaDB [(none)] > GRANT ALL ON zabbix.* TO zabbixadmin@localhost IDENTIFIED BY '123456database. Import the SQL statement that comes with Zabbix.

View the directory of the SQL statement # rpm-ql zabbix-server-mysql.../usr/share/doc/zabbix-server-mysql-4.4.3/create.sql.gz... Import SQL statements into the zabbix database you just created # zcat / usr/share/doc/zabbix-server-mysql-4.4.3/create.sql.gz | mysql- uzabbixadmin-p123456 zabbix

Modify the relevant parameters of the configuration file / etc/zabbix_server.conf on the Zabbix server

# vim / etc/zabbix/zabbix_server.conf...DBHost=localhostDBName=zabbixDBUser=zabbixadminDBPassword=123456...

Start Zabbix service & join boot self-boot # systemctl start zabbix-server# systemctl enable zabbix-server modify httpd configuration file / etc/httpd/conf.d/zabbix.conf modify time zone # vim / etc/httpd/conf.d/zabbix.confphp_value date.timezone Asia/Shanghai start httpd service & join boot self-startup # systemctl start httpd# systemctl enable httpd2, Zabbix client install Linux

Installation environment: CentOS release 6.9 (Final) IP:192.168.1.200

Install Ali yum source

Note: the client chooses CentOS6, and the yum source of CentOS6 needs to be installed. If you want to install another version, you need to find it in Ali's mirrors.

# wget-- no-check-certificate https://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/6/x86_64/zabbix-release-4.4-1.el6.noarch.rpm# rpm-ivh zabbix-release-4.4-1.el6.noarch.rpm packages required to install Zabbix-agent # yum install zabbix-agent modifies the agent configuration file / etc/zabbix/zabbix_agentd.conf

# vim / etc/zabbix/zabbix_agentd.conf...Server=192.168.1.100 # ip address ServerActive=192.168.1.100Hostname=web01... of Zabbix Server

Start the agent service & join the boot self-startup # service zabbix-agent start# chkconfig-- add zabbix-agent# chkconfig zabbix-agent on3, Zabbix client installation Windows download zabbix windows client

Official address: https://www.zabbix.com/cn/download_agents

Create the installation directory and extract the installation package

Edit client profile

Modify the following fields:

LogFile=c:\ zabbix\ zabbix_agentd.log

Server=192.168.1.100

ServerActive=192.168.1.100

Hostname=windows-web

Run cmd as an administrator

Run the command in the cmd window

C:Windows\ system32 > cd c:\ zabbix

C:\ zabbix > bin\ zabbix_agentd-I-c conf\ zabbix_agentd.conf # install the zabbix client

C:\ zabbix > bin\ zabbix_agentd-s-c conf\ zabbix_agentd.conf # start the zabbix service

2. Basic configuration on the web side 1. Log in to Zabbix by browser

Http://192.168.1.100/zabbix

2. Check the basic settings

3. Enter configuration information

4. Enter the server name

5. Log in to Zabbix

System default user name: Admin

System default password: zabbix

6. Change the language to Chinese

7. Modify the garbled code phenomenon

Original garbled phenomenon

Modify method:

Server-side installation font # yum install wqy-microhei-fonts-y modify font link to the newly installed font # rm / usr/share/zabbix/assets/fonts/graphfont.ttf # ln-sv / usr/share/fonts/wqy-microhei/wqy-microhei.ttc / usr/share/zabbix/assets/fonts/graphfont.ttf

You can refresh the page after modification.

3. Zabbix monitoring deployment 1. Add monitoring host and create host

Fill in the host information

Add a default monitoring item template

Status after addition

2. Custom monitoring item description

In addition to the template monitoring items given by Zabbix, we can customize the monitoring content

Port 80 will be opened when httpd starts the service.

# ss-tnlState Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128:: 10050 : * LISTEN 0 128 *: 10050 *: * LISTEN 0 128 : 80: * LISTEN 0 128:: 22: * LISTEN 0 128 *: 22 *: *

You can get the value from the command: ss-tnl | awk'{print $4}'| grep': 80 $'

# ss-tnl | awk'{print $4}'| grep-o'80 $'80

If the httpd service is shut down, port 80 will also be closed. This command cannot get a value.

Configure monitoring items

The directory of custom monitoring items is / etc/zabbix/zabbix_agentd.d, in which you can create files ending in .conf # vim / etc/zabbix/zabbix_agentd.d/port80.confUserParameter=httpd.port80, ss-tnl | awk'{print $4}'| grep-o '80'

Restart service # service zabbix-agent restarthttpd.port80 is the name given to the monitoring item ss-tnl | awk'{print $4}'| grep-o '80' is a custom command for the value of the monitoring item.

Add this monitoring item to the WEB interface

Configure trigger

Turn off the httpd service test monitoring effect of the client

4. Mail alarm 1. Define the sender

2. Define the recipient

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