zabbix monitoring platform under Linux system (stand-alone installation service)


Table of contents

1. Basic overview of zabbix

Two, zabbix composition

1.server

2. Web pages

3. Database

4.proxy

5.Agent

3. Monitoring objects

Fourth, the daily terminology of zabbix

1. Host

2. Host group (host group)

3. Monitoring items (item)

4. Trigger (trigger)

5. Events

6. Action

7. Alarm escalation (escalation)

8. Media

9. Notification

10. Remote command (remote command)

11. Template

12. Application

13. web scene (web scenario)

14. Front end (fontend)

Five, zabbix workflow

1. Active mode

2. Passive mode

6. Detailed explanation of zabbix process

1、zabbix_agentd

2、zabbix_server

3、zabbix_proxy

4、zabbix_get

5、zabbix_center

6、zabbix_java_gateway

Seven, zabbix monitoring framework

server client architecture

master node cient architecture

server_proxy client architecture

Eight, stand-alone zabbix source code installation and deployment

1. Server installation

1.1 Install zabbix5.0 repository (binary installation method)

1.2 Install the zabbix package

1.3 Install zabbix front-end software package—zabbix-web

1.4 Install the database

1.5 Database configuration

Create a library for storing data and support Chinese

Authorize users to connect to the database and set a password

database authorization

view all libraries

Enter the zabbix library and view

1.6 Import the initial framework and data on the zabbix server host

1.7zabbix server configuration database

1.8 Set the correct time zone for zabbix

1.9 Start the service and view the port

2. Start the server and check

 3. Client configuration

1. Configuration source

2. Install zabbix-agent

3. Configure the client

4. Add a monitoring host to the web page


1. Basic overview of zabbix

                Zabbix is ​​a monitoring software that can monitor various network parameters to ensure the safe operation of the enterprise service architecture. At the same time, it supports a flexible alarm mechanism, allowing operation and maintenance personnel to quickly locate faults and solve problems. Zabbix supports distributed functions, supports monitoring solutions under complex architectures, and also supports web pages, providing a good and intuitive display for host monitoring.

Two, zabbix composition

1.server

                The zabbix server is the core component of zabbix. The server stores all configuration information, statistical information, and operational information. The zabbix agent reports availability, integrity, and other statistical information to the zabbix server.

2. Web pages

                The web page is also part of zabbix. It is usually located on the same physical device as the zabbix server, but it can also be configured separately in special cases. The web page mainly provides intuitive monitoring information to facilitate the monitoring and management of operation and maintenance personnel

3. Database

                The zabbix database stores zabbix-related content such as configuration information and statistical information.        

4.proxy

                Zabbix proxy can be adopted or abandoned according to the specific production environment. If zabbix proxy is used, it will replace zabbix server to collect data information, which can well share the load of zabbix server. Zabbix proxy is usually used in scenarios where the structure is too large, the load of the zabbix server is too heavy, or the enterprise equipment crosses computer rooms and network segments, and the zabbix server cannot communicate directly with the zabbix agent.

5.Agent

                The zabbix agent is usually deployed on the monitored target to actively monitor local resources and applications, and send the monitored data to the zabbix server.

3. Monitoring objects

                Zabbix supports monitoring various system platforms, including mainstream operating systems such as Linux and Windows, and can also monitor routing and switching devices with the help of SNMP or SSH protocols.

                If zabbix is ​​deployed on a server, it can monitor its CPU, memory, network performance and other hardware parameters, and can also monitor specific services or applications, service operation and performance.

Hardware monitoring : Zabbix IPMIInterface monitors through the IPMI interface. We can monitor the physical characteristics of the monitored object through the standard IPMI hardware interface, such as voltage, temperature, fan status, power status, etc.

System monitoring : Zabbix Agent Interface monitors through a dedicated agent program, which is similar to the common master/agent model. If the monitored object supports the corresponding agent, this method is recommended.

Java monitoring: ZabbixJMXInterface, monitoring through JMX, JMX (iava management extensions, that is, java management extensions), when monitoring JVM virtual machines, using this method is a very good choice.

Network device monitoring: Zabbix SNMP Interface communicates with the monitored object through the SNMP protocol. The full name of the SNMP protocol is simple network management protocol, which is translated into a simple network management protocol. Generally speaking, we cannot use it on hardware such as routers and switches. Install agent, but these hardware supports SNMP protocol.

Application service monitoring : Zabbix Agent UserParameter

Fourth, the daily terminology of zabbix

1. Host

        The device to be monitored can be specified by IP or hostname (must be resolvable)

2. Host group (host group)

        The logical container of the host, including hosts and templates, host groups are usually used when assigning monitoring permissions to users or user groups

3. Monitoring items (item)

        Data related to a specific monitoring indicator, such as the size of memory, CPU usage, and even the running status of services. The monitoring item data comes from the monitored object, and each monitoring item is identified by a key.

4. Trigger (trigger)

        An expression used to evaluate whether the value of the monitoring item is within a reasonable range. When the value received exceeds the specification of the trigger, it is considered a failure, and if it meets again after exceeding, it is considered normal.

5. Events

        A specific event triggered by a trigger, or an event defined by zabbix to automatically register a host online.

6. Action

        Refers to the specific measures that zabbix handles specific events triggered by triggers according to the configuration, such as executing a script, or sending emails to the administrator's mailbox, and so on.

7. Alarm escalation (escalation)

        Send an alert or a custom scheme to execute remote commands.

8. Media

        Means of sending notifications (alarms), such as WeChat, email, DingTalk, etc.

9. Notification

        Information about an event sent to a user through a specified medium.

10. Remote command (remote command)

        Refers to the commands written in advance by the operation and maintenance personnel, which can be executed by the monitored host after an event is triggered.

11. Template

        A collection of preset items used to quickly define monitored hosts, usually including monitoring items, triggers, applications, etc. Templates can be directly linked to a host.

12. Application

        A collection of monitoring items.

13. web scene (web scenario)

        One or more HTTP requests used to detect the availability of a web site.

14. Front end (fontend)

        The web interface of zabbix.

Five, zabbix workflow

                When Zabbix is ​​monitoring, the zabbix client should be installed on the monitored device, responsible for collecting data regularly and sending it to the zabbix server: the zabbix server should be installed on the monitoring device, which stores the data sent by the zabbix client In the database, zabbix web displays and draws on the front end according to the data.

1. Active mode

        The zabbix client actively requests the list of monitoring items from the zabbix server, and actively submits the required data in the monitoring items to the zabbix service

2. Passive mode

        The zabbix server requests the agent to obtain the data of the monitoring item, and the zabbix agent returns the data.

6. Detailed explanation of zabbix process

1、zabbix_agentd

        zabbix-agentd is the zabbix client daemon process, which is mainly responsible for collecting client monitoring item data

2、zabbix_server

        zabbix scrver is the zabbix server daemon process, which is mainly responsible for collecting zabbix client data. (port is 10051)

3、zabbix_proxy

        zabbix_proxy is a proxy program of zabbix. Its function is similar to that of a server, and its function is similar to a transfer station. It will eventually submit the collected data to the zabbix server again.

4、zabbix_get

        As a zabbix tool, zabbix_get usually runs on zabbix server or zabbix_proxy to obtain client information remotely, usually for troubleshooting.

5、zabbix_center

        zabbix_sender is also a tool of zabbix. It usually runs on the client side of zabbix and is used for time-consuming checks. Its role is to actively send data.

6、zabbix_java_gateway

        zabbix_java_gateway is a new function introduced after zabbix2.0, which can be used for JAVA devices; but it can only acquire data actively, not passively.

Seven, zabbix monitoring framework

server client architecture

        The simplest architecture of zabbix, the monitoring device and the monitored device are directly connected, and the data interaction between the zabbix server and the zabbix client is directly performed.

master node cient architecture

        The proxy is a bridge connecting the server and the client. It does not store data itself, but temporarily stores the data sent by the zabbix_agent terminal, and then submits it to the server. This architecture is generally used in medium-sized network architectures that span computer rooms and span networks. In the server_proxy_client frame, the downtime of the server device will cause the entire system to fail and fail to work normally.

server_proxy client architecture

        The master_node_client architecture is the most complex architecture of zabbix. It is generally used in large-scale network architectures that span computer rooms, span networks, and have many monitoring devices. Compared with the server_proxy_client architecture, the main difference between the master node cient architecture is node and proxy

Eight, stand-alone zabbix source code installation and deployment

1. Server installation

1.1 Install zabbix5.0 repository (binary installation method)

rpm -Uvh https: //repo,zabbix,com/zabbix/5,0/rhel/7/x86 64/zabbix- release-5,0-1,el7.noarch,rpm

1.2 Install the zabbix package

                yum install - y zabbix- server-mysql zabbix- agent

1.3 Install zabbix front-end software package—zabbix-web

        vim zabbix.repo  

        Open zabbix-frontend in the /etc/yum.repos.d/zabbix.repo file

        [zabbix-frontend]
        enabled=1

        Install dependent sources: yum install -y epel-release centos-release-scl

        Installation: yum install -y zabbix-web-mysql-scl zabbix-apache-conf-scl service

1.4 Install the database

                yum install -y mariadb-server mariadb

1.5 Database configuration

Create a library for storing data and support Chinese

Authorize users to connect to the database and set a password

database authorization

view all libraries

Enter the zabbix library and view

1.6 Import the initial framework and data on the zabbix server host

        zcat /usr/share/doc/zabbix- server-mysql-5,0.37 /create,sql.gz mysql

1.7zabbix server configuration database

        vim  /etc/zabbix/zabbix_server.conf

The name of the library that stores the monitoring data

user connected to the database

Set the password for the zabbix user

1.8 Set the correct time zone for zabbix

        vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf

1.9 Start the service and view the port

2. Start the server and check

 

 Click on the lower left corner

 

 3. Client configuration

1. Configuration source

rpm -ivh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-agent-5.0.24-1.el7.x86_64.rpm

rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm

2. Install zabbix-agent

        yum install zabbix-agent -y

3. Configure the client

Point to the server address

start service

4. Add a monitoring host to the web page

Configuration - host - add information

add template

Check

Home view


Guess you like

Origin blog.csdn.net/lsqaa/article/details/132648828