Equipment monitoring method and device, computer equipment, readable storage medium and program product

By using preset configuration information and data collectors for equipment monitoring in complex software systems, the system complexity and resource occupation problems in the prior art are solved, and efficient and accurate equipment monitoring is achieved.

CN119473763APending Publication Date: 2025-02-18KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411440798.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The prior art increases system complexity and occupies a large amount of computer resources when monitoring the component status of complex software systems.

Method used

A device monitoring method is provided, by responding to a device monitoring request, determining the target device and the component to be monitored based on preset configuration information, generating monitoring instructions and sending them to a pre-installed data collector in the target device, collecting and performing abnormal monitoring.

Benefits of technology

It improves the efficiency of equipment monitoring data collection, ensures the accuracy of equipment monitoring results, and saves computer resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473763A_ABST
    Figure CN119473763A_ABST
Patent Text Reader

Abstract

The invention relates to an equipment monitoring method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: in response to an equipment monitoring request, determining target equipment and to-be-monitored components of the target equipment based on preset configuration information; generating a monitoring instruction based on each to-be-monitored component, sending the monitoring instruction to a data acquisition unit pre-installed in the target equipment, determining a monitoring index item corresponding to each to-be-monitored component and a data acquisition command corresponding to the monitoring index item based on preset index template information by the data acquisition unit in response to the monitoring instruction, and sending the data acquisition command to the target equipment; executing the data acquisition command to obtain monitoring data of each to-be-monitored component on the corresponding monitoring index item; and acquiring monitoring data returned by the data acquisition unit, and performing anomaly monitoring on the monitoring data based on the preset index monitoring parameters to obtain an equipment monitoring result corresponding to the target equipment. By adopting the method, computer resources can be saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a device monitoring method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] Modern software systems are becoming more and more complex, including not only operating systems, but also applications, various middleware, databases and other components. In order to ensure the normal operation of the software system, it is necessary to monitor the status of each component in the software system, generally collecting the operating data of each component for analysis and processing to ensure the normal operation of each component.

[0003] The traditional processing method is to use an open source collector for each component to collect data, and then analyze and process the collected data. However, the traditional processing method increases the complexity of the system and also occupies more computer resources to run each collector. Summary of the invention

[0004] Based on this, it is necessary to provide a device monitoring method, apparatus, computer equipment, computer-readable storage medium and computer program product that can save computer resources in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a device monitoring method, comprising:

[0006] In response to a device monitoring request, determining a target device and each component to be monitored of the target device based on preset configuration information;

[0007] Generate monitoring instructions based on each component to be monitored, send the monitoring instructions to a data collector pre-installed in the target device, the data collector responds to the monitoring instructions, determines the monitoring indicator items corresponding to each component to be monitored and the data collection commands corresponding to the monitoring indicator items based on the preset indicator template information, and executes the data collection commands to obtain the monitoring data of each component to be monitored on the corresponding monitoring indicator items;

[0008] Obtain the monitoring data returned by the data collector, perform abnormal monitoring on the monitoring data based on the preset indicator monitoring parameters, and obtain the device monitoring results corresponding to the target device.

[0009] In a second aspect, the present application also provides an equipment monitoring device, comprising:

[0010] A request response module, used to respond to a device monitoring request and determine a target device and each component to be monitored of the target device based on preset configuration information;

[0011] An instruction sending module is used to generate monitoring instructions based on each component to be monitored, and send the monitoring instructions to a data collector pre-installed in the target device. The data collector responds to the monitoring instructions, determines the monitoring indicator items corresponding to each component to be monitored and the data collection commands corresponding to the monitoring indicator items based on the preset indicator template information, and executes the data collection commands to obtain the monitoring data of each component to be monitored on the corresponding monitoring indicator items;

[0012] The monitoring module is used to obtain the monitoring data returned by the data collector, perform abnormal monitoring on the monitoring data based on preset indicator monitoring parameters, and obtain the device monitoring results corresponding to the target device.

[0013] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0014] In response to a device monitoring request, determining a target device and each component to be monitored of the target device based on preset configuration information;

[0015] Generate monitoring instructions based on each component to be monitored, send the monitoring instructions to a data collector pre-installed in the target device, the data collector responds to the monitoring instructions, determines the monitoring indicator items corresponding to each component to be monitored and the data collection commands corresponding to the monitoring indicator items based on the preset indicator template information, and executes the data collection commands to obtain the monitoring data of each component to be monitored on the corresponding monitoring indicator items;

[0016] Obtain the monitoring data returned by the data collector, perform abnormal monitoring on the monitoring data based on the preset indicator monitoring parameters, and obtain the device monitoring results corresponding to the target device.

[0017] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0018] In response to a device monitoring request, determining a target device and each component to be monitored of the target device based on preset configuration information;

[0019] Generate monitoring instructions based on each component to be monitored, send the monitoring instructions to a data collector pre-installed in the target device, the data collector responds to the monitoring instructions, determines the monitoring indicator items corresponding to each component to be monitored and the data collection commands corresponding to the monitoring indicator items based on the preset indicator template information, and executes the data collection commands to obtain the monitoring data of each component to be monitored on the corresponding monitoring indicator items;

[0020] Obtain the monitoring data returned by the data collector, perform abnormal monitoring on the monitoring data based on the preset indicator monitoring parameters, and obtain the device monitoring results corresponding to the target device.

[0021] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0022] In response to a device monitoring request, determining a target device and each component to be monitored of the target device based on preset configuration information;

[0023] Generate monitoring instructions based on each component to be monitored, send the monitoring instructions to a data collector pre-installed in the target device, the data collector responds to the monitoring instructions, determines the monitoring indicator items corresponding to each component to be monitored and the data collection commands corresponding to the monitoring indicator items based on the preset indicator template information, and executes the data collection commands to obtain the monitoring data of each component to be monitored on the corresponding monitoring indicator items;

[0024] Obtain the monitoring data returned by the data collector, perform abnormal monitoring on the monitoring data based on the preset indicator monitoring parameters, and obtain the device monitoring results corresponding to the target device.

[0025] The above-mentioned equipment monitoring method, device, computer equipment, computer-readable storage medium and computer program product determine the various components to be monitored of the target equipment according to the preset configuration information, and generate monitoring instructions to send to the data collector pre-installed in the target equipment. The data collector collects the monitoring data of each component to be monitored on the corresponding monitoring indicator items according to the preset indicator template information, thereby improving the collection efficiency of the detection data, and then performs abnormal monitoring on the monitoring data to ensure the accuracy of the equipment monitoring results of the target equipment. Furthermore, the use of the data collector can uniformly collect the monitoring data of each component to be monitored, which can improve the utilization rate of the data collector, without the need to configure a separate data collector for each monitoring component, thereby saving computer resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0027] FIG1 is a diagram of an application environment of a device monitoring method in one embodiment;

[0028] FIG2 is a schematic diagram of a flow chart of a device monitoring method in one embodiment;

[0029] FIG3 is a schematic diagram of a data processing flow of a data collector in one embodiment;

[0030] FIG4 is a schematic diagram of a device monitoring system in one embodiment;

[0031] FIG5 is a block diagram of a device monitoring apparatus in one embodiment;

[0032] FIG6 is a diagram showing the internal structure of a computer device in one embodiment;

[0033] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0035] The device monitoring method provided in the embodiment of the present application can be applied in the application environment shown in Figure 1. Among them, the monitoring terminal 102 communicates with the target device 104. The target device can be a terminal or a server, and the target device can be one or more. In one embodiment, the monitoring terminal 102 responds to the device monitoring request and determines the target device and each component to be monitored of the target device based on the preset configuration information; the monitoring terminal 102 generates a monitoring instruction based on each component to be monitored, and sends the monitoring instruction to the data collector pre-installed in the target device 104. The data collector responds to the monitoring instruction, determines the monitoring indicator items corresponding to each component to be monitored and the data collection command corresponding to the monitoring indicator item based on the preset indicator template information, and executes the data collection command to obtain the monitoring data of each component to be monitored on the corresponding monitoring indicator item; the monitoring terminal 102 obtains the monitoring data returned by the data collector, performs abnormal monitoring on the monitoring data based on the preset indicator monitoring parameters, and obtains the device monitoring result corresponding to the target device. Among them, the terminal can be but not limited to various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0036] In one embodiment, as shown in FIG2 , a device monitoring method is provided, which is described by taking the method applied to the monitoring terminal in FIG1 as an example, and includes the following steps 202 to 206. Among them:

[0037] Step 202: In response to a device monitoring request, determine a target device and components to be monitored of the target device based on preset configuration information.

[0038] Among them, the device monitoring request refers to a request to monitor the operating status of each component to be monitored in the target device. The target device refers to the computer device that needs to be monitored, which can be a terminal or a server, or a system composed of a terminal and a server. The component to be monitored refers to the component unit of the computer system in the target device, including hardware components and software components, such as a central processing unit, application program, database, etc., which are used to execute various functions of the target device. The preset configuration information is the pre-configured demand information for monitoring the device, including the device configuration information for accessing the target device to collect data, and the monitoring requirement information for verifying whether the monitoring data is normal.

[0039] Specifically, the monitoring terminal is used to monitor the monitoring data of each component to be monitored in the target device. The user inputs the configuration information corresponding to the target device through the monitoring terminal in advance. The monitoring terminal encrypts the configuration information input by the user to obtain encrypted configuration information.

[0040] The user sends a device monitoring instruction to the monitoring terminal. The monitoring terminal obtains the encrypted configuration information in response to the device monitoring instruction, and decrypts the encrypted configuration information to obtain the configuration information. The monitoring terminal obtains the device configuration information corresponding to the target device from the configuration information. The device configuration information includes the access information and identity information of the target device and the access information and identity information of each component to be monitored in the target device. The monitoring terminal determines the target device and each component to be monitored corresponding to the target device based on the device configuration information. Among them, the access information and identity information of the target device are used for the monitoring terminal to communicate with the target device and deploy the data collector.

[0041] Step 204: Generate monitoring instructions based on each component to be monitored, and send the monitoring instructions to a data collector pre-installed in the target device. The data collector responds to the monitoring instructions, determines the monitoring indicator items corresponding to each component to be monitored and the data collection commands corresponding to the monitoring indicator items based on the preset indicator template information, and executes the data collection commands to obtain the monitoring data of each component to be monitored on the corresponding monitoring indicator items.

[0042] The data collector refers to a software tool pre-deployed in the target device for collecting monitoring data. The preset indicator template information refers to the pre-set indicator items that indicate the data collector needs to collect data for the monitored component. The indicator items refer to the operating properties of the monitored component, such as the utilization item of the central processing unit (CPU) component. The monitoring data refers to the data collected by the data collector from the monitored component.

[0043] Specifically, the monitoring terminal generates a monitoring instruction according to the access information and identity information of each component to be monitored in the target device, and sends the monitoring instruction to the data collector pre-installed in the target device. The data collector obtains the preset indicator template information in response to the monitoring instruction, and determines the monitoring indicator items corresponding to each component to be monitored and the data collection commands corresponding to the monitoring indicator items in the preset indicator template information. Then the data collector establishes a communication connection with each component to be monitored according to the access information of each component to be monitored, and uses the access information of each component to be monitored to authenticate the identity of each component to be monitored. After the verification is passed, the corresponding data collection command is called according to the component type of each component to be monitored, and the data collection command is executed to obtain the monitoring data of each component to be monitored on the corresponding monitoring indicator item.

[0044] Step 206, acquiring the monitoring data returned by the data collector, performing abnormal monitoring on the monitoring data based on preset indicator monitoring parameters, and obtaining the device monitoring result corresponding to the target device.

[0045] The preset indicator monitoring parameters refer to the monitoring parameters that are preset to determine whether the monitoring data is abnormal. The equipment monitoring results refer to the operating status results of each component to be monitored in the target equipment.

[0046] Specifically, the monitoring terminal obtains the monitoring data of each monitored component of the target device on the corresponding monitoring indicator items from the data collector. Then, the monitoring requirement information is obtained from the preset configuration information, and the preset indicator monitoring parameters corresponding to each monitored component are determined according to the monitoring requirement information. The monitoring data is calculated using the preset indicator monitoring parameters according to the preset monitoring logic to obtain the project monitoring results corresponding to the monitoring indicator items. The monitoring terminal counts the project monitoring results corresponding to each monitoring indicator item, for example, calculating the abnormality degree corresponding to each monitoring indicator item, and then counting the abnormality degree of each monitoring indicator item to generate the device monitoring result corresponding to the target device.

[0047] In one embodiment, the monitoring terminal receives a configuration update request, and uses the updated configuration information carried in the configuration update request to update the historical configuration information stored locally, including updating the historical device configuration information and / or historical monitoring requirement information in the historical configuration information, such as updating the access information and identity information of the target device in the historical device configuration information, the access information and identity information of each component to be monitored, etc., to obtain updated device configuration information, and / or updating any item of information in the preset indicator monitoring parameters of the historical monitoring requirement information to obtain updated monitoring requirement information. Then, when the monitoring terminal responds to the next device monitoring request for the device to be monitored, it generates a monitoring instruction according to the updated configuration information and sends it to the data collector. Generally, the monitoring instruction is generated according to the updated device configuration information in the updated configuration information and sent to the data collector.

[0048] In the above-mentioned device monitoring method, each component to be monitored of the target device is determined according to the preset configuration information, and a monitoring instruction is generated and sent to the data collector pre-installed in the target device. The data collector collects the monitoring data of each component to be monitored on the corresponding monitoring indicator items according to the preset indicator template information, thereby improving the collection efficiency of the detection data, and then the monitoring data is monitored for abnormalities to ensure the accuracy of the device monitoring results of the target device. Furthermore, the use of the data collector can uniformly collect the monitoring data of each component to be monitored, which can improve the utilization rate of the data collector, without the need to configure a separate data collector for each monitoring component, thereby saving computer resources.

[0049] In one embodiment, before responding to the device monitoring request, the device monitoring method further includes:

[0050] Obtaining device configuration information input for the target device and each component to be monitored in the target device, encrypting the device configuration information to obtain encrypted configuration information; the encrypted configuration information is used to communicate with the target device based on the decrypted device configuration information to deploy the data collector, and the data collector communicates with each component to be monitored to collect monitoring data;

[0051] Obtaining preset monitoring requirement information, and obtaining preset indicator monitoring parameters corresponding to each component to be monitored in the target device from the preset monitoring requirement information;

[0052] Based on the encrypted configuration information and preset indicator monitoring parameters, the preset configuration information corresponding to the target device is obtained.

[0053] Among them, device configuration information refers to the basic information of the target device, which is used to access the target device and the components to be monitored in the target device. Preset monitoring requirement information is pre-set verification information for verifying monitoring data. Preset indicator monitoring parameters refer to the verification information of monitoring data corresponding to each monitoring indicator in the predicted monitoring requirement information.

[0054] Specifically, the monitoring terminal obtains the device configuration information input by the user for the target device and each component to be monitored in the target device. The device configuration information may include the identity information, access information, etc. of the target device, the component information and access information of the component to be monitored, etc. Among them, the identity information of the target device and the component to be monitored is used by the target device and the component to be monitored to verify the identity of the visiting object; the access information of the target device and the component to be monitored is used to establish a communication connection with the visiting object. The monitoring terminal can access the target device according to the identity information and access information of the target device, and deploy a data collector in the target device, and the data collector can access the component to be monitored according to the identity information and access information of the component to be monitored, and collect monitoring data in the component to be monitored.

[0055] In order to ensure the data security of the device configuration information, the monitoring terminal encrypts the device configuration information. The monitoring terminal may encrypt the identity information of the target device in the device configuration information to obtain the encrypted configuration information. The monitoring terminal then obtains the monitoring requirement information pre-set by the user, which may include the monitoring parameters of the user for each monitored component of each device on the corresponding monitoring indicator items, that is, the preset indicator monitoring parameters. The monitoring terminal can obtain the preset indicator monitoring parameters corresponding to each monitored component of the target device from the monitoring requirement information. The monitoring terminal then merges the encrypted configuration information and the preset indicator monitoring parameters to obtain the preset configuration information corresponding to the target device. The monitoring terminal may store the preset configuration information to refer to a configuration device that is pre-used to store configuration information, so as to obtain the required configuration information from the configuration device in the subsequent monitoring process of the target device.

[0056] In a specific embodiment, the monitoring terminal includes a configuration device for storing preset configuration information. The preset configuration information includes device configuration information input by the user and pre-built-in monitoring requirement information. The device configuration information is represented by the input_config.yml file, including the access information, IP, identity information (user name and password) of the target device and the access information, IP, identity information (user name and password) of each component to be monitored. The device configuration information is shown in Table 1 below:

[0057] Table 1

[0058]

[0059] The monitoring terminal deploys the data collector to the target device according to the access information and identity information of the target device in the device configuration information, and the installation package of the data collector can be distributed and deployed to each target device through SSH connection. After the data collector is started, it responds to the monitoring instructions sent by the monitoring terminal, communicates with the component to be monitored according to the IP and port connection information of the component to be monitored in the device configuration information, and performs identity authentication according to the user name, password and other information of the component to be monitored in the device configuration information. After the identity authentication is passed, the monitoring data is collected from the component to be monitored.

[0060] In this embodiment, by acquiring encrypted configuration information and preset indicator monitoring parameters and obtaining preset configuration information corresponding to the target device, the accuracy of the preset configuration information is ensured; and the preset configuration information is stored in the configuration device without the need for repeated input, thereby improving the efficiency of obtaining the configuration information.

[0061] In one embodiment, the target device includes at least two; in step 202, before responding to the device monitoring request, the method further includes:

[0062] Obtaining identity information corresponding to each target device from preset configuration information;

[0063] Authentication is performed on each target device based on the identity information, and communication connections are established with each target device after the authentication is passed;

[0064] Obtaining deployment information corresponding to the data collector, and distributing the deployment information to each target device through a communication connection, so that each target device obtains the data collector installed in each target device based on the deployment information;

[0065] Start the data collector on each target device.

[0066] The identity information is information used for identity authentication when accessing a target device, including identity information.

[0067] Specifically, when there are multiple target devices, the monitoring terminal deploys data collectors in each target device in advance to realize unified collection of monitoring data of each target device. The monitoring terminal obtains the access information and identity information of each target device according to the preset configuration information. The access information is such as the IP address and communication port, and the identity information is such as the user name and password. The monitoring terminal connects to each target device according to the access information, for example, remotely connects to each target device through the SSH (Secure Shell, a protocol for remote login and command execution) port, and then the monitoring terminal uses the identity information of each target device to perform identity authentication. After the identity authentication is passed, the monitoring terminal establishes a communication connection with each target device.

[0068] Then the monitoring terminal obtains the deployment information of the data collector, which may refer to the installation package of the data collector. The installation package may be a binary installation program. The monitoring terminal compresses the installation package to obtain the deployment information of the data collector, and sends the compressed deployment information to each target device through a communication connection. For example, the monitoring terminal uploads the compressed deployment information to the corresponding installation directory of each target device according to the sftp (Secure File Transfer Protocol) protocol, such as / opt / OpsInsp-exporter / workdir / . Then the monitoring terminal triggers the installation script on the target device, obtains the compressed deployment information from the installation directory, decompresses it to obtain the installation package, runs the installation package, obtains the data collector installed in each target device, and starts the data collector in each target device.

[0069] In a specific embodiment, when there is a historically installed historical data collector in the target device, the historical data collector has a corresponding historical version, and the target device receives the installation package currently sent by the monitoring terminal, which carries the current version. The target device compares the historical version with the current version. If they are consistent, no processing is performed and the historical version of the historical data collector continues to be used; if they are inconsistent, the current version of the installation package is used to update and start the historical data collector.

[0070] In this embodiment, data collectors are distributed and deployed to each target device, and the preset indicator template information built into each data collector is the same, which is compatible with the data collection method of each component to be monitored on each monitoring indicator item. The monitoring data of each component to be monitored in the target device is uniformly collected through the data collector, thereby improving the monitoring data collection efficiency of each target device.

[0071] In one embodiment, step 204 generates a monitoring instruction based on each component to be monitored, sends the monitoring instruction to a data collector pre-installed in the target device, and the data collector responds to the monitoring instruction, determines the monitoring indicator items corresponding to each component to be monitored and the data collection commands corresponding to the monitoring indicator items based on the preset indicator template information, and executes the data collection commands to obtain the monitoring data of each component to be monitored on the corresponding monitoring indicator items, including:

[0072] Generate component confirmation information based on component types corresponding to each component to be monitored, and generate monitoring instructions based on the component confirmation information;

[0073] The monitoring instruction is sent to the data collector pre-installed in the target device. The data collector responds to the monitoring instruction, obtains the component process list in the target device, confirms the component in the component process list based on the component confirmation information, obtains each target component to be monitored, determines the target monitoring indicator items corresponding to each target component to be monitored and the target data collection commands corresponding to the target monitoring indicator items based on the preset indicator template information, and executes the target data collection commands to obtain the monitoring data of each target component to be monitored on the corresponding target monitoring indicator items.

[0074] The component confirmation information is confirmation information used to confirm whether the component to be monitored exists in the target device. The component process list is the process information of the executable components recorded in the target device. The target data collection command refers to the execution command used by the data collector to collect monitoring data.

[0075] Specifically, the monitoring terminal determines the component type of each component to be monitored according to the device configuration information, for example, the corresponding component type is determined according to the component name of each component to be monitored, and the component type is, for example, application, middleware, database, etc., and then the monitoring terminal generates a monitoring instruction according to the component type of each component to be monitored. In order to ensure that the data collector successfully accesses each component to be monitored, the monitoring terminal can also generate a monitoring instruction according to the component type of each component to be monitored and the user name, password, etc. of each component to be monitored, and send the monitoring instruction to the data collector pre-installed in the target device. The data collector obtains the component process list in the target device in response to the monitoring instruction, and searches for each target component to be monitored in the component process list according to the component confirmation information. The monitoring terminal can match the component according to the component type in the component confirmation information and the component process list, and use the matched component in the component process list as the target component to be monitored. For example, by using the shell command: ps -ef |grep nginx, it can be identified whether the nginx (lightweight Web server) component is deployed on the target device.

[0076] The data collector stores the preset indicator template information corresponding to each component. The preset indicator template information includes the monitoring indicator items that each component needs to collect data, such as the CPU utilization of the host, the maximum number of file handles, the health status of the k8s cluster, etc. The preset indicator template information also includes the data collection commands corresponding to the monitoring indicator items. Examples of monitoring indicator items and corresponding data collection commands are shown in Table 2. For example, the monitoring indicator item of the host component type is CPU utilization, and its data collection method is executed through the cmd command. The specific data collection command executed is "top -b -d1 -n 10|grep "Cpu(s)"|awk '{print $2+$4}'|awk '{sum+=$1} END {print sum / NR}'" and so on.

[0077] Table 2

[0078]

[0079] After determining the target monitoring index items corresponding to each target component to be monitored, the data collector obtains the data collection command corresponding to the target monitoring index item according to the preset index template information, and then generates the target data collection command corresponding to the target monitoring index item according to the access information and identity information of each target component to be monitored and the corresponding data collection command. The data collector accesses each target component to be monitored and performs identity authentication by executing the target data collection command, and obtains the monitoring data of each target component to be monitored on the corresponding target monitoring index item after the identity authentication is passed.

[0080] In a specific embodiment, the monitoring terminal can trigger the data collector to collect data by calling the API (application programming interface) of the data collector. When the target device has multiple monitoring indicator items corresponding to each component to be monitored and needs to collect monitoring data, the data collector concurrently calls and executes the data collection commands corresponding to each monitoring indicator item, collects the monitoring data corresponding to each monitoring indicator item, and obtains the monitoring data corresponding to the target device. For example, the local CMD command or the client tool of the middleware is concurrently called to collect the monitoring data of the corresponding component on each monitoring indicator item.

[0081] In this embodiment, component confirmation is performed through the component process list on the target device, thereby ensuring the accuracy of the components to be monitored and the accuracy of the collection of monitoring data.

[0082] In one embodiment, the target monitoring indicator item includes a configuration file indicator item, and the monitoring data includes configuration file monitoring data on the configuration file indicator item; the configuration file monitoring data is obtained by the data collector by executing the target data collection command corresponding to the configuration file indicator item, obtaining the target process information of the corresponding target component to be monitored in the component process list, determining the configuration file address of the corresponding target component to be monitored based on the target process information, and collecting data in the configuration file obtained based on the configuration file address according to the configuration file indicator item.

[0083] The configuration file indicator item refers to the indicator item for which monitoring data needs to be collected from the configuration information of the component to be monitored. The configuration file monitoring data refers to the monitoring data collected from the configuration information of the component to be monitored according to the configuration file indicator item.

[0084] Specifically, after the data collector determines each target component to be monitored in the component process list according to the component confirmation information, it determines the target monitoring indicator items corresponding to each target component to be monitored according to the preset indicator template information. When there is a configuration file indicator item in the target monitoring indicator item, the data collector obtains the target process information corresponding to the target component to be monitored to which the configuration file indicator item belongs in the component process list according to the target data collection command corresponding to the configuration file indicator item, and searches for the configuration file address corresponding to the target component to be monitored to which the configuration file indicator item belongs according to the target process information. The data collector obtains the configuration file corresponding to the corresponding target component to be monitored according to the configuration file address, and obtains the configuration file monitoring data corresponding to the target monitoring indicator item in the configuration file. For example, in the configuration file of the nginx component, obtain the data compression switch configuration (gzip) in the nginx.conf file, obtain the configuration file monitoring data, and convert the configuration file monitoring data into the standard prometheus metrics data format.

[0085] In this embodiment, by determining the configuration file address of the corresponding target component to be detected from the component process list according to the configuration file indicator item, the configuration file of the target component to be detected can be quickly located, thereby improving the collection efficiency of the configuration file monitoring data.

[0086] In one embodiment, step 204, obtaining the monitoring data returned by the data collector, includes:

[0087] Obtain the service addresses corresponding to the components to be monitored respectively;

[0088] Sending a data acquisition request of the corresponding component to be monitored to the data collector based on the service address;

[0089] Receive the monitoring data returned by the data collector based on the data acquisition request, wherein the monitoring data is the monitoring data stored in the storage space corresponding to the corresponding service address after the data collector uniformly converts the monitoring data of each component to be monitored on the corresponding monitoring indicator item in accordance with a preset data return format.

[0090] The data acquisition request refers to the request from the monitoring terminal for the data collector to return the corresponding monitoring data. The service address refers to the service address provided by the data collector to the monitoring terminal for obtaining the monitoring data.

[0091] Specifically, the data return format of the monitoring data is predefined in the data collector, which represents the data format of the monitoring data returned by the data collector in response to the data acquisition request of the monitoring terminal. After the data collector collects the monitoring data of each component to be monitored on the corresponding monitoring index items, the collected monitoring data can be merged, and the format of the merged monitoring data can be converted according to the data return format to obtain the monitoring data in a unified data return format, and the monitoring data is stored in the storage space corresponding to the service address of the corresponding component to be monitored. The data collector pre-generates the service addresses corresponding to each component to be monitored, which are used to allocate the storage space of the monitoring data of each component to be monitored through the service address and respond to the data acquisition request of the monitoring terminal, and then the data collector pre-provides the service addresses corresponding to each component to be monitored to the monitoring terminal.

[0092] Then the monitoring terminal obtains the service address corresponding to each component to be monitored, such as an http service address, and sends a data acquisition request of the corresponding component to be monitored to the data collector according to the service address, such as an http service request. After receiving the data acquisition request through the service address, the data collector obtains the monitoring data from the storage space corresponding to the service address, and returns the monitoring data of the corresponding component to be monitored on each monitoring indicator item to the monitoring terminal.

[0093] In a specific embodiment, the data return format of the monitoring data is predefined in the data collector. The data return format is used by the data collector to convert the format of the collected monitoring data according to the data return format to obtain the monitoring data that can be used by the monitoring terminal. The data return format is generally in the format of Prometheus metrics (open source monitoring system). The data collector can use the open source client tool of Prometheus to convert the data format. The converted data format is exemplified as follows:

[0094] # HELP disable_memory_swap

[0095] # TYPE disable_memory_swap gauge

[0096] disable_memory_swap{error="",result="",target="172.17.8.123"} 0

[0097] # HELP fs_aio_max_nr

[0098] # TYPE fs_aio_max_nr gauge

[0099] fs_aio_max_nr{error="",result="",target="172.17.8.123"} 65536

[0100] # HELP fs_file_max

[0101] #TYPE fs_file_max gauge fs_file_max{error="",result="",target="172.17.8.123"} 6.55356e+06;

[0102] Among them, "# TYPE fs_aio_max_nr gauge" indicates that the monitoring indicator item collected by the data collector is the monitoring data of "fs_aio_max_nr", and the data type corresponding to this monitoring indicator item is gauge type (a data type in the prometheusmetrics data format).

[0103] “{error="",result="",target="172.17.8.123"} 65536” indicates the label information of the monitoring data of the monitoring indicator item, which may include multiple labels. For example, the label target="172.17.8.123" for target indicates that the label name is target, the label value is 172.17.8.123, and the label indicates the IP address of the target device; 65536 indicates the value of the monitoring data corresponding to the monitoring indicator item.

[0104] The service address can refer to the data request path, which is used for the monitoring terminal to request the data collector to obtain the monitoring data after format conversion. The data request path can be a REST API (an application programming interface that complies with the REST architecture specification), where the monitoring data of different components to be monitored correspond to different REST APIs. The data collector can generate the service address corresponding to each component to be monitored in advance based on the access information and identity information of each component to be monitored, such as generating an http service address based on the host's ip address and port information. Examples of http service addresses for hosts, middleware, and databases are as follows:

[0105] Host data request path: http: / / ip:port / host / metrics

[0106] Middleware data request path: http: / / ip:port / zookeeper / metrics

[0107] Database data request path: http: / / ip:port / postgresql / metrics

[0108] In a specific embodiment, as shown in Figure 3, a data processing flow diagram of a data collector is provided. The data collector receives a service request sent by a monitoring terminal, such as an API request of the middleware zookeeper of http: / / ip:port / zookeeper / metrics. The data collector executes the local CMD command to collect monitoring data according to the monitoring indicator project of the middleware zookeeper, and then converts the collected monitoring data into the Prometheus metrics format, and returns the monitoring data after the data format conversion to the monitoring terminal. The monitoring terminal can obtain the latest monitoring data collected by the data collector by accessing http: / / ip:port / zookeeper / metrics.

[0109] In this embodiment, the data collector predefines a data return path with a unified data format, thereby improving the efficiency of the monitoring terminal in acquiring monitoring data and improving the efficiency of processing the monitoring data in a unified data format.

[0110] In one embodiment, step 206, performing abnormal monitoring on the monitoring data based on preset indicator monitoring parameters to obtain device monitoring results corresponding to the target device includes:

[0111] Based on the component type of each component to be monitored, determine the preset indicator monitoring parameters of the monitoring indicator items corresponding to each component to be monitored;

[0112] Obtain the monitoring logic corresponding to the monitoring indicator project, calculate the monitoring data corresponding to the monitoring indicator project and the preset indicator monitoring parameters according to the monitoring logic, and obtain the project monitoring result corresponding to the monitoring indicator project;

[0113] Based on the project monitoring results corresponding to the monitoring indicator items, the device monitoring results corresponding to the target device are generated.

[0114] Among them, monitoring logic refers to the operation logic for checking whether the monitoring data is abnormal.

[0115] Specifically, the preset configuration information also includes monitoring rule files corresponding to each component to be monitored, and the monitoring rule files include preset indicator monitoring parameters and monitoring logic of each component to be monitored on the corresponding monitoring indicator items. After the monitoring terminal collects the monitoring data of each component to be monitored on the corresponding monitoring indicator items through the data request path provided by the data collector, it obtains the monitoring rule files corresponding to each component to be monitored from the preset configuration information according to the component type of each component to be monitored. Monitoring rule files include host monitoring rule files (host-rule.yml), mysql monitoring rule files (mysql-rule.yml), redis monitoring rule files (redis-rule.yml), etc. For example, the data structure of the host monitoring rule file (host-rule.yml) is shown in Table 3 below:

[0116] Table 3

[0117]

[0118] The recommended value is the indicator monitoring parameter, and the calculation expression is the monitoring logic. For example, node_cpu_usage >=75% indicates whether the CPU utilization is greater than or equal to 75%.

[0119] The description of the abnormal level is shown in Table 4 below:

[0120] Table 4

[0121]

[0122] The monitoring terminal then obtains the monitoring logic corresponding to the monitoring indicator item, calculates the monitoring data and preset indicator monitoring parameters corresponding to the monitoring indicator item according to the monitoring logic, and obtains the project monitoring result corresponding to the monitoring indicator item. The project monitoring result can be an abnormality level that characterizes the degree of abnormality of the monitoring indicator item, such as severe, error, warning, normal, etc.

[0123] Specifically, the monitoring terminal reads the monitoring rule files corresponding to each component to be monitored, such as host-rule.yml, mysql-rule.yml, redis-rule.yml, etc., and then cyclically reads the contents of each monitoring rule file, such as the data structure content shown in Table 3. The host monitoring rule file is taken as an example as follows:

[0124] groups:

[0125] - name: host

[0126] name_cn: "Host Server"

[0127] rules:

[0128] - name: node_cpu_usage

[0129] name_cn: Server CPU utilization

[0130] check_type: operating system

[0131] suggestion: "last 10s[0,25%]"

[0132] levels:

[0133] - severity: severe

[0134] expr: 75 <= node_cpu_usage

[0135] handle: "1. Manual intervention to analyze the cause 2. Collect slow SQL (slow.log)"

[0136] - Severity: Error

[0137] expr: 50 <= node_cpu_usage && node_cpu_usage < 75

[0138] handle: "Collect slow SQL (error.log)"

[0139] - severity: Warning

[0140] expr: 20 <= node_cpu_usage && node_cpu_usage < 50

[0141] handle: "Prompt continuous observation"

[0142] The monitoring terminal recycles and reads the verification level, preset indicator monitoring parameters and calculation expressions in the monitoring rule file, as shown below:

[0143] levels:

[0144] - severity: severe

[0145] expr: 75 <= node_cpu_usage

[0146] handle: "1. Manual intervention to analyze the cause 2. Collect slow SQL (slow.log)"

[0147] - Severity: Error

[0148] expr: 50 <= node_cpu_usage && node_cpu_usage < 75

[0149] handle: "Collect slow SQL (error.log)"

[0150] - severity: Warning

[0151] expr: 20 <= node_cpu_usage && node_cpu_usage < 50

[0152] handle: "Prompt continuous observation"

[0153] The monitoring terminal uses the govaluate open source tool to calculate the result of each expression (expr) based on the collected monitoring data. For example, if the indicator value (monitoring data) of the monitoring indicator item server CPU utilization (node_cpu_usage) is 70, then after calculation, it matches the expression in 50 <= node_cpu_usage && node_cpu_usage < 75, and the monitoring result of the item corresponding to the monitoring indicator item is an error level.

[0154] The monitoring terminal counts the project monitoring results of each monitoring indicator project corresponding to each component to be monitored, and generates the device monitoring results corresponding to the target device, such as generating a monitoring result report in Excel format or PDF format corresponding to the target device, including the abnormal level of each monitoring indicator project corresponding to each component to be monitored in the target device, as shown in Table 5 below:

[0155] Table 5

[0156]

[0157] Among them, the inspection category is the component type, the inspection item is the monitoring indicator item, the monitoring object is the physical address of the monitoring indicator item, the monitoring value is the monitoring data, and the recommended value is the monitoring indicator parameter.

[0158] In this embodiment, the monitoring data and preset indicator monitoring parameters corresponding to the monitoring indicator items are calculated according to the monitoring logic to obtain the project monitoring results corresponding to the monitoring indicator items, thereby achieving flexibility in processing the monitoring data and ensuring the accuracy of the user's use of the equipment monitoring results.

[0159] In a specific embodiment, the monitoring terminal executes the shell command to distribute the data collector, encrypt, monitor and update the configuration information. The specific format of the shell command is shown in Table 6 below:

[0160] Table 6

[0161]

[0162] The monitoring terminal can collect monitoring data through inspection operations, which include obtaining monitoring data of target devices, verifying monitoring rules, and generating reports. The monitoring data can be metrics data, which is time series data collected by each component to be monitored.

[0163] When there are multiple target devices, the monitoring terminal obtains the IP and port information of each target device according to the preset configuration information (such as the input_config.yml configuration file). The port information is the port of the http service exposed by the data collector. Then, by calling the upload interface of the data collector, the input_config.yml configuration file is uploaded to the corresponding directory of each target device, so that each target device can obtain the input_config.yml configuration file in the corresponding directory. The monitoring terminal concurrently creates a collection process for the metrics data of each target device for each target device and loads the corresponding monitoring rule file. Then, for the metrics data of each target device, the monitoring terminal concurrently calls the metrics API interface exposed by the data collector on each target device according to different component types to obtain the collected data, such as the metrics addresses on the same target device are http: / / ip:port / host / metrics, http: / / ip:port / zookeepers / metrics, etc.

[0164] Then read the monitoring rule files corresponding to each component to be monitored, loop through the contents of each monitoring rule file, and then loop through the verification level, preset indicator monitoring parameters and calculation expressions in the monitoring rule file. The monitoring terminal uses the govaluate open source tool to calculate the result of each expression based on the collected monitoring data to obtain the project monitoring results corresponding to each monitoring indicator item.

[0165] The monitoring terminal generates a monitoring result report in Excel or PDF format corresponding to the target device based on the project monitoring results corresponding to each monitoring indicator item.

[0166] In a specific embodiment, a schematic diagram of a device monitoring system is provided as shown in Figure 4. The device monitoring method can be applied to the device monitoring system, which includes a configuration device, a collector device, an inspection device, a cache and an output device.

[0167] The configuration device is used to store the configuration information and monitoring rule files entered by the user;

[0168] The collector device is used to collect monitoring data of each component to be monitored in the target device on the corresponding monitoring index items;

[0169] The inspection device is used to execute distribution collector, encryption, inspection and configuration information update;

[0170] Cache refers to the memory used to read the configuration information in the configuration device and temporarily store the metrics data obtained from the collector device in the memory so that the inspection device can obtain the required data from the memory for processing;

[0171] The output device is used to generate a report of the monitoring results.

[0172] In one of the embodiments, the inspection device distributes and deploys data collectors to each target device in advance to obtain a collector device that communicates with the inspection device; the inspection device receives the configuration information and monitoring rule files entered by the user and stores them in the configuration device; the inspection device responds to the device monitoring request sent by the user, reads the configuration information and monitoring rule files corresponding to each target device from the configuration device, and temporarily stores them in the cache; the inspection device generates monitoring instructions corresponding to each target device according to each component to be detected corresponding to each target device recorded in the configuration information in the cache, and sends each monitoring instruction to the collector device pre-installed in the corresponding target device; the inspection device obtains the monitoring data corresponding to each component to be monitored corresponding to each target device through the data acquisition path provided by the collector device, and temporarily stores it in the cache; the inspection device uses the monitoring rule files in the cache to perform abnormal monitoring on the monitoring data to obtain abnormal monitoring results corresponding to each target device; the inspection device sends the abnormal monitoring results corresponding to each target device to the output device, and generates a monitoring result report corresponding to each target device through the output device.

[0173] In this embodiment, by determining each component to be monitored of the target device according to the preset configuration information, and generating a monitoring instruction to send to the data collector pre-installed in the target device, the data collector collects the monitoring data of each component to be monitored on the corresponding monitoring indicator items according to the preset indicator template information, thereby improving the collection efficiency of the detection data, and then performing abnormal monitoring on the monitoring data to ensure the accuracy of the equipment monitoring results of the target device. Furthermore, the use of the data collector can uniformly collect the monitoring data of each component to be monitored, which can improve the utilization rate of the data collector, without the need to configure a separate data collector for each monitoring component, thereby saving computer resources.

[0174] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0175] Based on the same inventive concept, the embodiment of the present application also provides a device monitoring apparatus for implementing the device monitoring method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more device monitoring apparatus embodiments provided below can refer to the limitations on the device monitoring method above, and will not be repeated here.

[0176] In an exemplary embodiment, as shown in FIG5 , a device monitoring apparatus 500 is provided, comprising: a request response module 502 , an instruction sending module 504 and a monitoring module 506 , wherein:

[0177] A request response module 502, configured to respond to a device monitoring request and determine a target device and each component to be monitored of the target device based on preset configuration information;

[0178] The instruction sending module 504 is used to generate a monitoring instruction based on each component to be monitored, and send the monitoring instruction to a data collector pre-installed in the target device. The data collector responds to the monitoring instruction, determines the monitoring indicator items corresponding to each component to be monitored and the data collection commands corresponding to the monitoring indicator items based on the preset indicator template information, and executes the data collection commands to obtain the monitoring data of each component to be monitored on the corresponding monitoring indicator items;

[0179] The monitoring module 506 is used to obtain the monitoring data returned by the data collector, perform abnormal monitoring on the monitoring data based on preset indicator monitoring parameters, and obtain the device monitoring result corresponding to the target device.

[0180] In one embodiment, the equipment monitoring device 500 is also used to obtain equipment configuration information input for the target equipment and each component to be monitored in the target equipment, encrypt the equipment configuration information to obtain encrypted configuration information; the encrypted configuration information is used to communicate with the target equipment based on the decrypted equipment configuration information to deploy a data collector, and the data collector communicates with each component to be monitored to collect monitoring data; obtain preset monitoring requirement information, and obtain preset indicator monitoring parameters corresponding to each component to be monitored in the target equipment from the preset monitoring requirement information; based on the encrypted configuration information and the preset indicator monitoring parameters, obtain the preset configuration information corresponding to the target equipment.

[0181] In one embodiment, the target device includes at least two; the device monitoring device 500 is also used to obtain the identity information corresponding to each target device from the preset configuration information; authenticate each target device based on the identity information, and establish a communication connection with each target device after the authentication is passed; obtain the deployment information corresponding to the data collector, and distribute the deployment information to each target device through the communication connection, so that each target device can obtain the data collector installed in each target device based on the deployment information; and start the data collector in each target device.

[0182] In one embodiment, the instruction sending module 504 is also used to generate component confirmation information based on the component types corresponding to each component to be monitored, and generate monitoring instructions based on the component confirmation information; the monitoring instructions are sent to a data collector pre-installed in the target device, and the data collector responds to the monitoring instructions, obtains a component process list in the target device, performs component confirmation in the component process list based on the component confirmation information, obtains each target component to be monitored, determines the target monitoring indicator items corresponding to each target component to be monitored and the target data collection commands corresponding to the target monitoring indicator items based on the preset indicator template information, and executes the target data collection commands to obtain the monitoring data of each target component to be monitored on the corresponding target monitoring indicator items.

[0183] In one embodiment, the target monitoring indicator item includes a configuration file indicator item, and the monitoring data includes configuration file monitoring data on the configuration file indicator item; the configuration file monitoring data is obtained by the data collector by executing the target data collection command corresponding to the configuration file indicator item, obtaining the target process information of the corresponding target component to be monitored in the component process list, determining the configuration file address of the corresponding target component to be monitored based on the target process information, and collecting data in the configuration file obtained based on the configuration file address according to the configuration file indicator item.

[0184] In one embodiment, the monitoring module 506 is also used to obtain the service addresses corresponding to each component to be monitored; send a data acquisition request for the corresponding component to be monitored to the data collector based on the service address; receive monitoring data returned by the data collector based on the data acquisition request, the monitoring data being the monitoring data of each component to be monitored on the corresponding monitoring indicator item uniformly formatted according to a preset data return format and stored in the storage space corresponding to the corresponding service address.

[0185] In one embodiment, the monitoring module 506 is also used to determine the preset indicator monitoring parameters of the monitoring indicator items corresponding to each component to be monitored based on the component type of each component to be monitored; obtain the monitoring logic corresponding to the monitoring indicator item, calculate the monitoring data and preset indicator monitoring parameters corresponding to the monitoring indicator item according to the monitoring logic, and obtain the project monitoring results corresponding to the monitoring indicator item; generate the device monitoring results corresponding to the target device based on the project monitoring results corresponding to the monitoring indicator item.

[0186] Each module in the above-mentioned equipment monitoring device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module above.

[0187] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store monitoring data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a device monitoring method is implemented.

[0188] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a device monitoring method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0189] Those skilled in the art will understand that the structures shown in FIGS. 6-7 are merely block diagrams of partial structures related to the scheme of the present application, and do not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.

[0190] In an exemplary embodiment, in one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0191] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0192] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0193] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0194] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0195] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0196] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A device monitoring method, characterized in that: The method comprises: In response to a device monitoring request, determining a target device and each component to be monitored of the target device based on preset configuration information; Generate a monitoring instruction based on each component to be monitored, send the monitoring instruction to a data collector pre-installed in the target device, the data collector responds to the monitoring instruction, determines the monitoring indicator items corresponding to each component to be monitored and the data collection commands corresponding to the monitoring indicator items based on the preset indicator template information, and executes the data collection commands to obtain the monitoring data of each component to be monitored on the corresponding monitoring indicator items; The monitoring data returned by the data collector is acquired, and abnormal monitoring is performed on the monitoring data based on preset indicator monitoring parameters to obtain a device monitoring result corresponding to the target device.

2. The method according to claim 1, characterized in that Before responding to the device monitoring request, the method further includes: Obtaining device configuration information input for the target device and each component to be monitored in the target device, encrypting the device configuration information to obtain encrypted configuration information; the encrypted configuration information is used to communicate with the target device based on the decrypted device configuration information to deploy a data collector, and the data collector communicates with each component to be monitored to collect monitoring data; Acquire preset monitoring requirement information, and acquire preset indicator monitoring parameters corresponding to each to-be-monitored component in the target device from the preset monitoring requirement information; Based on the encrypted configuration information and the preset indicator monitoring parameters, the preset configuration information corresponding to the target device is obtained.

3. The method according to claim 1, characterized in that The target devices include at least two; before responding to the device monitoring request, the method further includes: Obtaining identity information corresponding to each target device from the preset configuration information; Performing identity authentication on each of the target devices based on the identity information, and establishing communication connections with each of the target devices after the authentication is passed; Acquire deployment information corresponding to the data collector, and distribute the deployment information to each target device through the communication connection, so that each target device obtains the data collector installed in each target device based on the deployment information; The data collector is started in each target device.

4. The method according to claim 1, characterized in that: The generating of monitoring instructions based on the components to be monitored, sending the monitoring instructions to a data collector pre-installed in the target device, the data collector responding to the monitoring instructions, determining the monitoring indicator items corresponding to the components to be monitored and the data collection commands corresponding to the monitoring indicator items based on preset indicator template information, and executing the data collection commands to obtain the monitoring data of the components to be monitored on the corresponding monitoring indicator items, including: Generate component confirmation information based on the component types corresponding to the components to be monitored, and generate a monitoring instruction based on the component confirmation information; The monitoring instruction is sent to a data collector pre-installed in the target device. The data collector responds to the monitoring instruction, obtains a component process list in the target device, performs component confirmation in the component process list based on the component confirmation information, obtains each target component to be monitored, determines the target monitoring indicator items corresponding to each target component to be monitored and the target data collection commands corresponding to the target monitoring indicator items based on the preset indicator template information, and executes the target data collection commands to obtain the monitoring data of each target component to be monitored on the corresponding target monitoring indicator items.

5. The method according to claim 4, characterized in that The target monitoring indicator item includes a configuration file indicator item, and the monitoring data includes configuration file monitoring data on the configuration file indicator item; The configuration file monitoring data is the data collector executing the target data collection command corresponding to the configuration file indicator item, obtaining the target process information of the corresponding target component to be monitored in the component process list, determining the configuration file address of the corresponding target component to be monitored based on the target process information, and collecting data in the configuration file obtained based on the configuration file address according to the configuration file indicator item.

6. The method according to claim 1, characterized in that The obtaining of the monitoring data returned by the data collector comprises: Obtain the service addresses corresponding to the components to be monitored respectively; Sending a data acquisition request of the corresponding component to be monitored to the data collector based on the service address; Receive the monitoring data returned by the data collector based on the data acquisition request, wherein the monitoring data is the monitoring data stored in the storage space corresponding to the corresponding service address after the data collector uniformly converts the monitoring data of each component to be monitored on the corresponding monitoring indicator item in accordance with a preset data return format.

7. An equipment monitoring device, characterized in that: The device comprises: A request response module, used to respond to a device monitoring request and determine a target device and each component to be monitored of the target device based on preset configuration information; An instruction sending module, used for generating a monitoring instruction based on each component to be monitored, and sending the monitoring instruction to a data collector pre-installed in the target device, wherein the data collector responds to the monitoring instruction, determines the monitoring indicator items corresponding to each component to be monitored and the data collection commands corresponding to the monitoring indicator items based on the preset indicator template information, and executes the data collection commands to obtain the monitoring data of each component to be monitored on the corresponding monitoring indicator items; The monitoring module is used to obtain the monitoring data returned by the data collector, perform abnormal monitoring on the monitoring data based on preset indicator monitoring parameters, and obtain the device monitoring result corresponding to the target device.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.