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

How to monitor the system by zabbix

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article will give you a detailed explanation on how to monitor the zabbix system. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Zabbix monitoring system

Zabbix is an enterprise, open source, distributed monitoring suite

Zabbix can monitor the monitoring status of networks and services. Zabbix uses a flexible alarm mechanism to allow users to send Email-based alerts to events. This ensures a quick response to the problem. Zabbix can use stored data to provide excellent reporting and graphical methods. This feature will help users complete capacity planning.

Zabbix supports both polling and trapping. All Zabbix reports can be accessed at the front end of the WEB through configuration parameters. The Web front end will help you quickly get your network and service status in any area. Zabbix can be configured as much as possible to monitor your IT infrastructure, whether you come from a small organization or a large company.

Zabbix is cost-free. Because Zabbix is written and released based on the GPL V2 protocol. It means that the source code is released free of charge.

Zabbix also provides commercial technical support.

Http://www.zabbix.com/

Zabbix component

Zabbix Server: the core component responsible for receiving report information sent by agent, and all configuration, statistics, and operational data are organized by it.

Database Storage: dedicated to storing all configuration information, as well as data collected by zabbix

Web interface (frontend): the GUI interface of zabbix, which usually runs on the same machine as server

Proxy: optional component, often used in distributed monitoring environment. The agent Server collects part of the monitored data and sends it to the server.

Agent: deployed on the monitored host, responsible for collecting local data and sending it to Server or proxy

Abroad:

Zabbix official yum source + Red Hat official epel source (install software)

Domestic:

Aliyum official yum source + aliyum official epel source (installation software)

-deploy-

Step 1: define the hostname and configure the domestic source

[root@node1 ~] # hostname zabbix_server.uplooking.com

Configure domestic sources (aliyum official yum source + aliyum official Epel source)

[root@node1 ~] # cd / etc/yum.repos.d/

[root@node1 yum.repos.d] # find. -name'* .repo'- exec mv {}. Back\

[root@node1 yum.repos.d] # vim zabbix.repo

[base]

Name=this's aliyun source

Baseurl= http://mirrors.aliyun.com/centos/6/os/x86_64

Enabled=1

Gpgcheck=1

Gpgkey= http://mirrors.aliyun.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6

[epel]

Name=this's aliyun epel source

Baseurl= http://mirrors.aliyun.com/epel/6/x86_64

Enabled=1

Gpgcheck=1

Gpgkey= http://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-6

[root@node1 ~] # yum clean all

[root@node1 ~] # yum list

Step 2: install the LAMP schema zabbix based on the php page

[root@zabbix_server ~] # yum-y install httpd php php-mysql mysql-servermysql

[root@zabbix_server ~] # service httpd start

[root@zabbix_server ~] # service mysqld start

[root@zabbix_server ~] # chkconfig mysqld on

[root@zabbix_server ~] # chkconfig httpd on

Step 3: install zabbix server zabbix2.2-> zabbix22-server

[root@zabbix_server ~] # yum-y install zabbix22-server

Step 4: configure zabbix22-server

1) initialize the database and import the database template of zabbix

[root@zabbix_server ~] # rpm-qa | grep zabbix

Zabbix22-server-mysql-2.2.11-1.el6.x86_64-using the mysql database

Zabbix22-server-2.2.11-1.el6.noarch-server

Zabbix22-2.2.11-1.el6.x86_64-client

Zabbix22-dbfiles-mysql-2.2.11-1.el6.noarch-use the dbfiles database

Note the package name of the database

[root@zabbix_server ~] # rpm-ql zabbix22-server-mysql

/ usr/sbin/zabbix_server_mysql

[root@zabbix_server ~] # rpm-ql zabbix22-dbfiles-mysql | grep mysql | grepsql$

/ usr/share/zabbix-mysql

/ usr/share/zabbix-mysql/data.sql

/ usr/share/zabbix-mysql/p_w_picpaths.sql

/ usr/share/zabbix-mysql/schema.sql

[root@zabbix_server ~] # mysql-uroot

Mysql > delete from mysql.user where user=''

Mysql > update mysql.user set password=password ('123') whereuser='root'

Mysql > flush privileges

Mysql > drop database test

-- if you use the Chinese interface, please set the language code to utf8

Mysql > create database zabbix default charset utf8

Mysql > grant all on zabbix.* to 'runzabbix'@'localhost' identified by'admin'

-- Import the library

[root@zabbix_server] # mysql-urunzabbix-padmin zabbix_ ('Chinese (zh_CN)'), 'display' = > true)

-garbled code phenomenon

Lack of Chinese font

Mode 1

[root@zabbix_server ~] # yum-y install wqy-microhei-fonts installation font

[root@zabbix_server ~] # ls / etc/alternatives/zabbix-web-fonts

Ls: unable to access / etc/alternatives/zabbix-web-fonts: there is no such file or directory-recommended method 2 if the file does not exist

Rm-f / etc/alternatives/zabbix-web-fonts

Ln-s / usr/share/fonts/wqy-microhei/wqy-microhei.ttc / etc/alternatives/zabbix-web-font

-not suitable for this version

Method 2 upload fonts from windows system

Download font simkai.ttf

[root@zabbix_server ~] # wget ftp://192.168.0.254/notes/weekend/project/software/zabbix/simkai.ttf

[root@zabbix_server ~] # cp / root/simkai.ttf / usr/share/fonts/dejavu/

[root@zabbix_server ~] # sed-I's Compact DejaVuSansUniple simkaiUniple g'/ usr/share/zabbix/include/defines.inc.php

-installation completed-

+ + deploy the monitored side + +

Install zabbix-agent

[root@node2 ~] # scp 192.168.0.1:/etc/yum.repos.d/zabbix.repo/etc/yum.repos.d/

[root@node2 ~] # yum-y install zabbix-agent

[root@node2 ~] # vim / etc/zabbix/zabbix_agentd.conf

Add the IP address of the zabiix monitor

Server=192.168.0.1

[root@node2 ~] # service zabbix-agent start

[root@node2 ~] # chkconfig zabbix-agent on

# Server testing 192.168.0.1

[root@zabbix] # zabbix_get-s192.168.0.2-k system.cpu.util [, system]

[root@zabbix] # zabbix_get-s192.168.0.2-k system.cpu.util [, nice]

Task

1) complete Linux CPU monitoring

Monitoring process

Create host-create information-trigger-record action---- alter

| | event |

Host-ltem-trigger-action-alter | command

| |

| | event |

2) learn to use templates

Configuration-template-new template-Template_CPU

3) Custom monitoring process

Example: monitoring the performance of nginx

Nginx service status

What content does nginx need to monitor?

Whether the process exists

Whether the port is listening

Is the service normal?

Nginx performance index

Number of connections

How many connections are processed per second

How many requests are processed per second

What are the current read-write connections?

4) user-defined macros

This is the end of the article on "how to monitor the zabbix system". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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

Database

Wechat

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

12
Report