A node status detection method, device, electronic device and medium

By automatically collecting and visualizing the processing of the node status data of the proxy cluster, the problems of cumbersome node status detection and redundant information in the existing technology are solved, and the effect of real-time monitoring and efficient display is achieved.

CN118316831BActive Publication Date: 2024-12-10PARK DO CREDIT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410509029.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-25
Publication Date
2024-12-10
Estimated Expiration
2044-04-25

AI Technical Summary

Technical Problem

The node status detection technology in the existing proxy cluster requires frequent manual requests, and cannot monitor the node status of multiple back-end services in real time, and the complex detection results are not conducive to analysis.

Method used

By configuring the collector, the node status data in the proxy cluster is automatically collected and converted into visual detection results to achieve real-time monitoring and intuitive display of the node status.

Benefits of technology

No need for manual requests to monitor node status in the proxy cluster in real time, improving efficiency and readability, and simplifying the filtering and sorting of node status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118316831B_ABST
    Figure CN118316831B_ABST
Patent Text Reader

Abstract

The present application provides a node status detection method, device, electronic device and medium. The method configures node address information in a collector based on the IP address of each node in each backend service in a proxy cluster; the collector captures node status data of a target group from the proxy cluster based on the node address information when the target group meets the corresponding target status detection condition; processes the node status data of the target group to obtain at least one node status detection result of the target group, and based on a visualization conversion method corresponding to each node status detection result, converts the node status detection result into a visualization detection result, thereby automatically collecting and proxying the node status data in the cluster, and visually displaying the node status data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a node status detection method, device, electronic device and medium. Background Art

[0002] The proxy cluster can provide relevant interface queries for the backend services of its proxy according to the pre-configured relevant policies, and can observe the node status in the backend services, such as whether the node is healthy, whether the node is online, etc. For example, gx_http_upstream_check_module is a module for active detection of the open source nginx backend proxy. Based on this module, the node status detection of the open source nginx backend proxy can be implemented.

[0003] However, the node status detection technology in the existing proxy cluster is a black screen operation, and frequent manual requests are required to view the node status; and it can only obtain node information in a single machine state. If there are multiple backend services, multiple addresses need to be requested; moreover, the final detection result information is complicated, which is not conducive to the person in charge to view and analyze. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a node status detection method, device, electronic device and medium to automatically collect the node status in the proxy cluster and visually display the node status detection results of the target group.

[0005] An embodiment of the present application provides a node status detection method, the method comprising:

[0006] Based on the IP address of each node in each backend service in the proxy cluster, configure the node address information in the collector; the node address information includes multiple groups, each group corresponds to a backend service, and the group includes the IP address of each node of the corresponding backend service;

[0007] When the target group meets the corresponding target status detection condition, the collector captures the node status data of the target group from the proxy cluster based on the node address information; the node status data includes the status of each node in the target group;

[0008] Processing the node status data of the target group to obtain at least one node status detection result of the target group;

[0009] Based on the visualization conversion method corresponding to each node status detection result, the node status detection result is converted into a visualization detection result, and the visualization detection result of the target group is displayed.

[0010] In some embodiments, in the node status detection method, the status detection condition includes: receiving a status detection request and reaching a preset status detection time;

[0011] When the target group meets the corresponding target status detection condition, the collector captures the node status data of the target group from the proxy cluster based on the node address information, including:

[0012] When the collector receives a status detection request for all groups, or reaches a preset status detection time for all groups, it captures the node status data of all groups from the proxy cluster based on the node address information;

[0013] Correspondingly, the processing of the node status data of the target group to obtain at least one node status detection result of the target group includes:

[0014] The collector processes the node status data of all the groups to obtain at least one node status detection result of all the groups.

[0015] In some embodiments, in the node status detection method, the processing of the node status data of the target group to obtain at least one node status detection result of the target group includes:

[0016] Based on the matching result of the IP address of each node in the target group and the node status data of the target group, determining the status of each node in the target group; the status of each node includes an online status and an offline status;

[0017] At least one node status detection result of the target group is determined based on the status of each node of the target group.

[0018] In some embodiments, in the node status detection method, determining at least one node status detection result of the target group based on the status of each node of the target group includes at least one of the following:

[0019] Based on the status of each node of the target group, determine the status statistics of the target group; the status statistics include the number of online nodes, the number of offline nodes and the total number of nodes in the target group;

[0020] Based on the offline nodes of the target group, node attribute information of the offline nodes is obtained, and a first offline node detection result including the node attribute information of each offline node is generated; the node attribute information of the offline node includes: the IP address of the offline node, the identifier of the backend service to which the offline node belongs, and the source address of the backend service to which the offline node belongs in the proxy cluster;

[0021] Based on the offline nodes of the target group, obtaining the status of the offline nodes in multiple detections, and determining a second offline node detection result including the status of the offline nodes in the multiple detections;

[0022] Based on the status of each node of the target group in previous detections and the time point corresponding to the detection, the offline time period and offline time point of the node are obtained.

[0023] In some embodiments, in the node status detection method, determining the status of each node in the target group based on the matching result of the IP address of each node in the target group and the node status data of the target group includes:

[0024] Based on the matching result of the IP address of each node in the target group and the node status data of the target group, deduplication processing is performed on the status data of the same node to obtain the deduplication node status data of the target group;

[0025] Based on the deduplicated node status data, the status of each node in the target group is determined.

[0026] In some embodiments, in the node status detection method, after determining a second offline node detection result including the status of the offline node in multiple detections, the visualization conversion method based on each node status detection result converts the node status detection result into a visualization detection result, including:

[0027] According to the state of the offline node in each detection process in the second offline node detection result, a first state identifier of the offline node corresponding to each detection process is generated; wherein the first state identifier includes at least part of the attribute information of the offline node, and the first state identifiers corresponding to the online state and the offline state are different.

[0028] The first status identifiers are arranged according to the detection order of the multiple detections, and the second offline node detection results are converted into visual detection results.

[0029] In some embodiments, in the node status detection method, after obtaining the offline time period and offline time point of each node in the target group based on the status of the node in previous detections and the time point corresponding to the detection, the visualization conversion method based on each node status detection result converts the node status detection result into a visualization detection result, including:

[0030] Based on the status of each node of the target group in previous detections and the corresponding time points of the detections, a visualization chart is generated to represent the changes in the status of the node over time; the chart includes the time point corresponding to each detection and the second state identifier of the node at the time point, and the second state identifiers corresponding to the online state and the offline state have different heights in the visualization chart.

[0031] In some embodiments, in the node status detection method, after obtaining at least one node status detection result of the target group, the method further includes:

[0032] Based on at least one node status detection result of the target group, determining whether there is a node with an abnormal status in the target group;

[0033] If so, an alarm message is generated based on the node with abnormal status, and the alarm message is sent to the target terminal device.

[0034] In some embodiments, a node status detection device is also provided, the device comprising:

[0035] A configuration module, configured to configure the node address information in the collector based on the IP address of each node in each backend service in the proxy cluster; the node address information includes a plurality of groups, each group corresponds to a backend service, and the group includes the IP address of each node of the corresponding backend service;

[0036] A capture module, used to enable the collector to capture the node status data of the target group from the proxy cluster based on the node address information when the target group meets the corresponding target status detection condition; the node status data includes the status of each node in the target group;

[0037] A processing module, used for processing the node status data of the target group to obtain at least one node status detection result of the target group;

[0038] The conversion module is used to convert the node status detection result into a visualization detection result based on the visualization conversion method corresponding to each node status detection result, and display the visualization detection result of the target group.

[0039] In some embodiments, an electronic device is also provided, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the node status detection method are performed.

[0040] In an embodiment of the present application, a node status detection method, device, electronic device and medium are provided. The method configures node address information in a collector based on the IP address of each node in each backend service in a proxy cluster; the node address information includes multiple groups, each group corresponds to a backend service, and the group includes the IP address of each node of the corresponding backend service; when the target group meets the corresponding target status detection condition, the collector captures the node status data of the target group from the proxy cluster based on the node address information; the node status data includes the status of each node in the target group; the node status data of the target group is processed to obtain at least one node status detection result of the target group, thereby automatically collecting the node status in the proxy cluster without manual request, realizing real-time monitoring of the node status, and being able to simultaneously collect the node status of all nodes in at least one backend service, which is more efficient; based on the visualization conversion method corresponding to each node status detection result, the node status detection result is converted into a visualization detection result, and the visualization detection result of the target group is displayed, thereby intuitively displaying the status detection result after screening and sorting, greatly improving readability. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 A schematic diagram of node status data of multiple nodes obtained by the prior art is shown;

[0043] Figure 2 A flowchart of the node status detection method according to an embodiment of the present application is shown;

[0044] Figure 3 A schematic diagram showing the principle of the node status detection method described in an embodiment of the present application is shown;

[0045] Figure 4 A flow chart of a method for obtaining at least one node status detection result of a target group according to an embodiment of the present application is shown;

[0046] Figure 5 A schematic diagram of the promethues format formed after encoding according to an embodiment of the present application is shown;

[0047] Figure 6 A schematic diagram of a visual detection result described in an embodiment of the present application is shown;

[0048] Figure 7 A schematic diagram of a Prometheus indicator described in an embodiment of the present application is shown;

[0049] Figure 8 Another schematic diagram of visual detection results described in an embodiment of the present application is shown;

[0050] Fig. 9 A schematic diagram of a Prometheus indicator described in an embodiment of the present application is shown;

[0051] Fig.10 A schematic diagram showing a visualized detection result of the second offline node detection result of the embodiment of the present application is shown;

[0052] Fig.11 A schematic diagram showing a visualized chart of the state of the node changing over time according to an embodiment of the present application;

[0053] Fig.12 A visualization chart showing the change of the status of offline nodes over time generated based on the data of the failure counter according to an embodiment of the present application is shown;

[0054] Fig.13 A schematic diagram of the structure of the node status detection device according to an embodiment of the present application is shown;

[0055] Fig.14 A schematic diagram of the structure of an electronic device described in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0056] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0057] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0058] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0059] The proxy cluster can provide relevant interface queries for the backend services of its proxy according to the pre-configured relevant policies, and can observe the node status in the backend services, such as whether the node is healthy, whether the node is online, etc. For example, gx_http_upstream_check_module is a module for active detection of the open source nginx backend proxy. Based on this module, the node status detection of the open source nginx backend proxy can be implemented.

[0060] However, the node status detection technology in the existing proxy cluster is a black screen operation, and frequent manual requests are required to view the node status. For example, if the node status needs to be checked 100 times a day to determine the node status in a day, manual requests must be made 100 times; and only node information of a single machine can be obtained. If there are multiple backend services, multiple addresses need to be requested each time; moreover, the final detection result information is complicated, which is not conducive to the person in charge to view and analyze.

[0061] Please refer to Figure 1 , Figure 1 A schematic diagram of node status data of multiple nodes obtained by the prior art is shown; the status of nodes 1-22 (status "down" or status "up") and other information are represented; it can be seen that the obtained node status information is raw data, presented in text form, containing a large number of details and data points, and the information is complicated, which requires the person in charge to spend a lot of time screening and arranging information to understand the overall status and key indicators of the node, and the readability is very poor; at the same time, in the complicated raw data, it is difficult for the person in charge to quickly discover the relationship and changes between the node states.

[0062] Based on this, a node status detection method, device, electronic device and medium are provided in an embodiment of the present application. The method configures the node address information in the collector based on the IP address of each node in each backend service in the proxy cluster; the node address information includes multiple groups, each group corresponds to a backend service, and the group includes the IP address of each node of the corresponding backend service; when the target group meets the corresponding target status detection condition, the collector captures the node status data of the target group from the proxy cluster based on the node address information; the node status data includes the status of each node in the target group; the node status data of the target group is processed to obtain at least one node status detection result of the target group, thereby automatically collecting the node status in the proxy cluster without manual request, realizing real-time monitoring of the node status, and being able to simultaneously collect the node status of all nodes in at least one backend service, which is more efficient; based on the visualization conversion method corresponding to each node status detection result, the node status detection result is converted into a visualization detection result, and the visualization detection result of the target group is displayed, thereby intuitively displaying the status detection result after screening and sorting, greatly improving readability.

[0063] Please refer to Figure 2 , Figure 2 A flowchart of the node status detection method according to an embodiment of the present application is shown; Figure 2 As shown, the node status detection method includes the following steps S101-S104:

[0064] S101, based on the IP address of each node in each backend service in the proxy cluster, configure the node address information in the collector; the node address information includes multiple groups, each group corresponds to a backend service, and the group includes the IP address of each node of the corresponding backend service;

[0065] S102, when the target group meets the corresponding target status detection condition, the collector captures the node status data of the target group from the proxy cluster based on the node address information; the node status data includes the status of each node in the target group;

[0066] S103, processing the node status data of the target group to obtain at least one node status detection result of the target group;

[0067] S104: based on the visualization conversion method corresponding to each node status detection result, convert the node status detection result into a visualization detection result, and display the visualization detection result of the target group.

[0068] In step S101, the node address information in the collector is configured based on the IP address of each node in each backend service in the proxy cluster; the node address information includes multiple groups, each group corresponds to a backend service, and the group includes the IP address of each node of the corresponding backend service.

[0069] Please refer to Figure 3 , Figure 3 The schematic diagram of the principle of the node status detection method described in the embodiment of the present application is shown; Figure 3 As shown, the proxy cluster uses nginx, which can proxy multiple backend services, such as backend service A and backend service B; each backend service corresponds to multiple nodes, or in other words, the backend service is a cluster composed of multiple nodes, which work together to provide a certain service. Each node runs the same backend service application and accepts requests from the Nginx proxy server; Nginx distributes the client's request to the appropriate node for processing according to the configured proxy rules. The communication between the Nginx proxy server and these nodes can be carried out through a dedicated line, which improves the security and reliability of data during transmission.

[0070] Please refer to Figure 3 For backend service A, backend service B, etc., each backend service can correspond to one or more specific backend service instances; a backend service usually represents a collection of business functions or logics. In order to meet the load requirements of the system, improve fault tolerance or achieve geographically dispersed deployment, this backend service may be deployed as multiple specific service instances. These instances logically belong to the same backend service, but are physically distributed in different servers or containers.

[0071] For example, for the order processing backend service of the e-commerce system, in order to meet the needs of high concurrent processing, multiple instances of the order processing service are deployed. These instances will process the business logic related to the order, but each instance runs independently and handles a part of the traffic. When a new order request arrives, Nginx or other load balancers will distribute the request to one of these backend service instances according to the configured rules (such as polling, minimum number of connections, etc.).

[0072] Multiple backend service instances can also be used to implement redundant backup of services to improve the fault tolerance of the system. If one instance fails or performance degrades, other instances can continue to process requests to ensure service continuity.

[0073] Each node in the proxy cluster has a unique IP address. The IP address is the node's identifier, enabling the Nginx proxy server to accurately locate and communicate with the node.

[0074] Based on this, in an embodiment of the present application, the IP address of each node in each backend service is obtained, groups are established according to the type of backend service, the IP address of each node in each group is written into url.txt, and a collector is constructed so that the collector automatically collects the status of each node according to the program.

[0075] Exemplarily, the IP address format configured in url.txt is as follows: http: / / 172.16.36.90 / status?format=json; http: / / 172.16.36.92:8090 / status?format=json.

[0076] In the step S102, when the target group meets the corresponding target status detection condition, the collector captures the node status data of the target group from the proxy cluster based on the node address information; the node status data includes the status of each node in the target group.

[0077] The status detection conditions include: receiving a status detection request and reaching a preset status detection time.

[0078] Different target groups can be configured with the same detection time. For example, all backend services are detected once every 1 second, thereby achieving real-time monitoring of the backend service status.

[0079] Alternatively, different target groups can be configured with different detection times. For example, a backend service with a high priority has a high detection frequency, while a backend service with a low priority has a low detection frequency; a backend service with a high concurrency has a high detection frequency, while a backend service with a low concurrency has a low detection frequency; thereby taking into account both meeting user needs and saving computing resources.

[0080] When the target group meets the corresponding target status detection condition, the collector captures the node status data of the target group from the proxy cluster based on the node address information, including:

[0081] When the collector receives a status detection request for all groups, or reaches a preset status detection time for all groups, it captures the node status data of all groups from the proxy cluster based on the node address information;

[0082] Correspondingly, the processing of the node status data of the target group to obtain at least one node status detection result of the target group includes:

[0083] The collector processes the node status data of all the groups to obtain at least one node status detection result of all the groups.

[0084] That is to say, the node status detection method described in the embodiment of the present application can automatically collect and display the status of all nodes in the proxy cluster.

[0085] The collector captures the node status data of the target group from the proxy cluster based on the node address information. Specifically, the collector captures the node status data of the target group from the proxy cluster based on the IP address in the pre-configured url.txt.

[0086] In the embodiment of the present application, the node status is determined to be an online status or an offline status.

[0087] The online state may be referred to as UP, and the offline state may be referred to as DOWN.

[0088] In the step S103, the node status data of the target group is processed to obtain at least one node status detection result of the target group.

[0089] The node status data obtained in step S102 is the original data. Figure 1 .

[0090] In the embodiment of the present application, the original data is further post-processed to obtain node status detection results in multiple dimensions, so as to intuitively display the node status in the cluster from the perspectives of node status change, abnormal node screening, etc.

[0091] For details, please refer to Figure 4 , the processing of the node status data of the target group to obtain at least one node status detection result of the target group comprises the following steps S401-402:

[0092] S401, based on the matching result of the IP address of each node in the target group and the node status data of the target group, determining the status of each node in the target group; the status of each node includes online status and offline status;

[0093] 402. Determine at least one node status detection result of the target group based on the status of each node of the target group.

[0094] In the present application, please refer to Figure 3 Specifically, the original node status data can be processed by Prometheus (time series database) to determine at least one node status detection result of the target group.

[0095] Prometheus is an open source system monitoring and alarm system. Prometheus exporter is a component that collects monitoring data and provides it in the Prometheus monitoring format. The collector of this application collects the nodes provided by nginx and converts them into the prometheus monitoring format.

[0096] In the embodiments of the present application, two types of indicators, Counter and Gauge, are mainly used.

[0097] Counter, purpose: used to accumulate the number of times certain events occur, such as the total number of requests, the number of errors, etc. Gauge, purpose: used to represent values ​​that can change up and down arbitrarily, such as temperature, memory usage, the number of current online users, etc.

[0098] In the embodiment of the present application, based on the status of each node of the target group, at least one node status detection result of the target group is determined, including at least one of the following:

[0099] Based on the status of each node of the target group, determine the status statistics of the target group; the status statistics include the number of online nodes, the number of offline nodes and the total number of nodes in the target group;

[0100] Based on the offline nodes of the target group, node attribute information of the offline nodes is obtained, and a first offline node detection result including the node attribute information of each offline node is generated; the node attribute information of the offline node includes: the IP address of the offline node, the identifier of the backend service to which the offline node belongs, and the source address of the backend service to which the offline node belongs in the proxy cluster;

[0101] Based on the offline nodes of the target group, obtaining the status of the offline nodes in multiple detections, and determining a second offline node detection result including the status of the offline nodes in the multiple detections;

[0102] Based on the status of each node of the target group in previous detections and the time point corresponding to the detection, the offline time period and offline time point of the node are obtained.

[0103] The status statistics result represents the overall status of the nodes of the target group. For example, a target cluster of 100 nodes clearly shows that 90 nodes are in the up state and 10 nodes are in the down state.

[0104] It should be noted that when the target group is all groups, the status statistics of all nodes in the proxy cluster can be displayed.

[0105] Based on the status of each node in the target group, the status statistics of the target group are determined. Specifically, the indicator names representing the status are composed of three components: total, up, and down; up represents online nodes, down represents offline nodes, and total represents the total number of nodes.

[0106] The three indicators defined in the examples of our application are:

[0107] NginxCheckServersTotal, NginxCheckServersUP, NginxCheckServersDown.

[0108] The format of the promethues formed after encoding is as follows Figure 5 shown.

[0109] In the step S104, based on the visualization conversion method corresponding to each node status detection result, the node status detection result is converted into a visualization detection result, and the visualization detection result of the target group is displayed.

[0110] Correspondingly, based on the number of online nodes, offline nodes and total number of nodes in the status statistics, the following is generated: Figure 6 The visualized detection results shown in the figure, in which the number of online nodes, the number of offline nodes and the total number of nodes correspond to different background identifiers, respectively, so as to facilitate the distinction when the responsible person views them.

[0111] In the embodiment of the present application, based on the offline nodes of the target group, the node attribute information of the offline nodes is obtained, and a first offline node detection result including the node attribute information of each offline node is generated.

[0112] The first offline node detection result counts all offline nodes and offline attribute information, and uniformly displays all offline nodes in the target cluster, so that the responsible person can uniformly handle the offline nodes.

[0113] Specifically, in the embodiment of the present application, the IP address of the node, the target address of the backend service, i.e., the proxy address, the node status, and the identifier (upstream) of the backend service to which the node belongs are taken to form a counter type indicator. The Prometheus indicator composition is as follows: Figure 7 shown.

[0114] The identifier of the backend service to which the node belongs may be the backend service name, such as A or B.

[0115] Use Grafana to process the first offline node detection results into visual detection results. Figure 8 The detected anomaly list shown in the figure shows that Figure 8 Includes the IP address of the offline node ( Figure 8 The dedicated line address in the ), the identifier of the backend service to which the offline node belongs ( Figure 8 The source address of the backend service to which the offline node belongs in the proxy cluster ( Figure 8 ), and status.

[0116] based on Figure 8 , the person in charge can intuitively understand that the node (address 1X.XX.XX.7031) of the backend service XXX with the source address 1X.XX.XX.25 is offline.

[0117] Based on the offline nodes of the target group, the status of the offline nodes in multiple detections is obtained, and a second offline node detection result including the status of the offline nodes in multiple detections is determined to display the status change of the offline nodes.

[0118] Please refer to Figure 3 Since there may be multiple backend service instances in a backend service, there may be a situation where a node status is repeatedly detected. Based on this, in an embodiment of the present application, based on the matching result of the IP address of each node in the target group and the node status data of the target group, the status of each node in the target group is determined, including:

[0119] Based on the matching result of the IP address of each node in the target group and the node status data of the target group, deduplication processing is performed on the status data of the same node to obtain the deduplication node status data of the target group;

[0120] Based on the deduplicated node status data, the status of each node in the target group is determined.

[0121] Specifically, in the embodiment of the present application, an indicator is defined to display the deduplication status of nginxstatus. There are only two types of up and down in the original data, but the value of promethus cannot be a string type. Therefore, it is necessary to judge if down is 1 and up is 0, forming an indicator such as Fig. 9 shown.

[0122] Based on the node status data after deduplication, a second offline node detection result including the status of the offline node in multiple detections is determined.

[0123] Specifically, in an embodiment of the present application, after determining a second offline node detection result including the state of the offline node in multiple detections, the visualization conversion method based on each node state detection result converts the node state detection result into a visualization detection result, including:

[0124] According to the state of the offline node in each detection process in the second offline node detection result, a first state identifier of the offline node corresponding to each detection process is generated; wherein the first state identifier includes at least part of the attribute information of the offline node, and the first state identifiers corresponding to the online state and the offline state are different.

[0125] The first status identifiers are arranged according to the detection order of the multiple detections, and the second offline node detection results are converted into visual detection results.

[0126] For details, please refer to Fig.10 , Fig.10 A schematic diagram of the visualization detection result of the second offline node detection result of the embodiment of the present application is shown; wherein the first state identifiers corresponding to the online state and the offline state are different in color, and the first state identifier corresponding to the online state is marked with the character "up", and the first state identifier corresponding to the online state is marked with the character "down". Fig.10 , it is easy to read the status of offline nodes in multiple tests.

[0127] Based on the status of each node in the target group in previous detections and the corresponding time point of the detection, the offline time period and offline time point of the node are obtained. Specifically, this is achieved through a counter. The rise value in the original status detection data represents the success counter. The success counter is +1 for each successful detection. If it fails, it is set to 0 and counts again after recovery. The fall value represents the failure counter. The failure counter is also +1 for each failed detection. Convert the counter to the promethues Gauge type. The kv that makes up the indicator is composed of upstream, source address, and IP address. The rise value and fall value are written into the value of the indicator respectively. If the detection address suddenly has a breakpoint during a certain period of time, it represents the offline time point and offline duration.

[0128] In the implementation of the present application, after obtaining the offline time period and offline time point of the node based on the state of each node of the target group in previous detections and the corresponding time point of the detection, the visualization conversion method based on each node state detection result converts the node state detection result into a visualization detection result, including:

[0129] Based on the status of each node of the target group in previous detections and the corresponding time points of the detections, a visualization chart is generated to represent the changes in the status of the node over time; the chart includes the time point corresponding to each detection and the second state identifier of the node at the time point, and the second state identifiers corresponding to the online state and the offline state have different heights in the visualization chart.

[0130] Based on the status of each node in the target group in previous detections and the corresponding time points of the detections, a visualization chart representing the change of the node's status over time is generated. For details, please refer to Fig.11 , Fig.11 A schematic diagram showing a visualization chart of the state of the node over time described in an embodiment of the present application is shown; specifically, the horizontal axis is the detection time point, the origin corresponding to the detection time point is the second state identifier, a high second state identifier represents an online state, and a low second state identifier represents an offline state; based on Fig.11 The height change and horizontal axis of the second state mark can clearly show how the node state changes over time.

[0131] In some embodiments, a visualization chart showing the change of node status over time can also be displayed based on the statistical results of the failure counter. Fig.12 , Fig.12 A visualization chart showing the change of the status of offline nodes over time, generated based on data of a failure counter, is shown. The failure counter can count the offline time point and offline duration of the node.

[0132] The method described in the embodiment of the present application, after obtaining at least one node status detection result of the target group, the method further includes:

[0133] Based on at least one node status detection result of the target group, determining whether there is a node with an abnormal status in the target group;

[0134] If so, an alarm message is generated based on the node with abnormal status, and the alarm message is sent to the target terminal device.

[0135] In the embodiment of the present application, the node with abnormal status is an offline node.

[0136] Specifically, the target terminal device is a terminal device of a responsible person, and the alarm information is sent to the target terminal device, specifically by email, text message, etc.

[0137] Specifically, in the embodiment of the present application, after the data is captured in the promethues, an alarm can be realized through the open source component altermanag, for example, after a certain node is down, it can be realized through a specific SQL. Exemplarily, it is realized through the above-mentioned fall counter, and fall not being 0 means down.

[0138] A node status detection method is provided in an embodiment of the present application, which automatically collects the node status in the proxy cluster without manual request, realizes real-time monitoring of the node status, and can simultaneously collect the node status of all nodes in at least one back-end service, which is more efficient; and visualizes the node status of the target group from multiple dimensions, thereby intuitively displaying the status detection results after screening and sorting, greatly improving the readability of the node status detection results.

[0139] Based on the same inventive concept, a node status detection device corresponding to the node status detection method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned node status detection method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0140] Please refer to Fig.13 , Fig.13 The schematic diagram of the structure of the node status detection device according to the embodiment of the present application is shown, and the node status detection device comprises:

[0141] Configuration module 1301, configured to configure node address information in the collector based on the IP address of each node in each backend service in the proxy cluster; the node address information includes multiple groups, each group corresponds to a backend service, and the group includes the IP address of each node of the corresponding backend service;

[0142] The capture module 1302 is used to enable the collector to capture the node status data of the target group from the proxy cluster based on the node address information when the target group meets the corresponding target status detection condition; the node status data includes the status of each node in the target group;

[0143] The processing module 1303 is used to process the node status data of the target group to obtain at least one node status detection result of the target group;

[0144] The conversion module 1304 is used to convert the node status detection result into a visualization detection result based on the visualization conversion method corresponding to each node status detection result, and display the visualization detection result of the target group.

[0145] In some embodiments, in the node status detection device, the status detection condition includes: receiving a status detection request, reaching a preset status detection time;

[0146] The capture module, when enabling the collector to capture the node status data of the target group from the proxy cluster based on the node address information when the target group meets the corresponding target status detection condition, is specifically used to:

[0147] When the collector receives a status detection request for all groups, or reaches a preset status detection time for all groups, it captures the node status data of all groups from the proxy cluster based on the node address information;

[0148] Correspondingly, the processing of the node status data of the target group to obtain at least one node status detection result of the target group includes:

[0149] The collector processes the node status data of all the groups to obtain at least one node status detection result of all the groups.

[0150] In some embodiments, the processing module in the node status detection device processes the node status data of the target group to obtain at least one node status detection result of the target group; including:

[0151] Based on the matching result of the IP address of each node in the target group and the node status data of the target group, determining the status of each node in the target group; the status of each node includes an online status and an offline status;

[0152] At least one node status detection result of the target group is determined based on the status of each node of the target group.

[0153] In some embodiments, the processing module in the node status detection device, when determining at least one node status detection result of the target group based on the status of each node of the target group, is specifically used to include at least one of the following:

[0154] Based on the status of each node of the target group, determine the status statistics of the target group; the status statistics include the number of online nodes, the number of offline nodes and the total number of nodes in the target group;

[0155] Based on the offline nodes of the target group, node attribute information of the offline nodes is obtained, and a first offline node detection result including the node attribute information of each offline node is generated; the node attribute information of the offline node includes: the IP address of the offline node, the identifier of the backend service to which the offline node belongs, and the source address of the backend service to which the offline node belongs in the proxy cluster;

[0156] Based on the offline nodes of the target group, obtaining the status of the offline nodes in multiple detections, and determining a second offline node detection result including the status of the offline nodes in the multiple detections;

[0157] Based on the status of each node of the target group in previous detections and the time point corresponding to the detection, the offline time period and offline time point of the node are obtained.

[0158] In some embodiments, the processing module in the node status detection device, when determining the status of each node in the target group based on the matching result of the IP address of each node in the target group and the node status data of the target group, is specifically used to:

[0159] Based on the matching result of the IP address of each node in the target group and the node status data of the target group, deduplication processing is performed on the status data of the same node to obtain the deduplication node status data of the target group;

[0160] Based on the deduplicated node status data, the status of each node in the target group is determined.

[0161] In some embodiments, the processing module in the node status detection device, after determining the second offline node detection result including the status of the offline node in multiple detections, converts the node status detection result into a visualization detection result based on the visualization conversion method corresponding to each node status detection result, is specifically used to:

[0162] According to the state of the offline node in each detection process in the second offline node detection result, a first state identifier of the offline node corresponding to each detection process is generated; wherein the first state identifier includes at least part of the attribute information of the offline node, and the first state identifiers corresponding to the online state and the offline state are different.

[0163] The first status identifiers are arranged according to the detection order of the multiple detections, and the second offline node detection results are converted into visual detection results.

[0164] In some embodiments, the processing module in the node status detection device, after obtaining the offline time period and offline time point of each node in the target group based on the status of the node in previous detections and the time point corresponding to the detection, converts the node status detection result into a visual detection result based on the visualization conversion method corresponding to each node status detection result, is specifically used to:

[0165] Based on the status of each node of the target group in previous detections and the corresponding time points of the detections, a visualization chart is generated to represent the changes in the status of the node over time; the chart includes the time point corresponding to each detection and the second state identifier of the node at the time point, and the second state identifiers corresponding to the online state and the offline state have different heights in the visualization chart.

[0166] In some embodiments, the node status detection device further includes:

[0167] A judgment module, configured to, after obtaining at least one node status detection result of the target group, judge whether there is a node with an abnormal status in the target group based on the at least one node status detection result of the target group;

[0168] If so, an alarm message is generated based on the node with abnormal status, and the alarm message is sent to the target terminal device.

[0169] Based on the same inventive concept, an electronic device corresponding to the node status detection method is also provided in the embodiment of the present application. Since the principle of solving the problem by the electronic device in the embodiment of the present application is similar to the above-mentioned node status detection method in the embodiment of the present application, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0170] Please refer to Fig.14 , Fig.14 A schematic diagram of the structure of the electronic device described in an embodiment of the present application is shown; the electronic device 1400 includes: a processor 1402, a memory 1401 and a bus, the memory 1401 stores machine-readable instructions executable by the processor 1402, when the electronic device 1400 is running, the processor 1402 communicates with the memory 1401 through the bus, and when the machine-readable instructions are executed by the processor 1402, the steps of the node status detection method are executed.

[0171] Based on the same inventive concept, a computer-readable storage medium corresponding to the node status detection method is also provided in the embodiment of the present application. Since the principle of solving the problem by the computer-readable storage medium in the embodiment of the present application is similar to the above-mentioned node status detection method in the embodiment of the present application, the implementation of the computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.

[0172] A computer-readable storage medium stores a computer program, which executes the steps of the node status detection method when executed by a processor.

[0173] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0174] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0175] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0176] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a platform backend server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0177] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A node status detection method, It is characterized in that The method comprises: Based on the IP address of each node in each backend service in the proxy cluster, configure the node address information in the collector; the node address information includes multiple groups, each group corresponds to a backend service, and the group includes the IP address of each node of the corresponding backend service; When the target group meets the corresponding target status detection condition, the collector captures the node status data of the target group from the proxy cluster based on the node address information; the node status data includes the status of each node in the target group; Processing the node status data of the target group to obtain at least one node status detection result of the target group; Based on the visualization conversion method corresponding to each node status detection result, the node status detection result is converted into a visualization detection result, and the visualization detection result of the target group is displayed; The processing of the node status data of the target group to obtain at least one node status detection result of the target group includes: Determine the status of each node in the target group based on the matching result of the IP address of each node in the target group and the node status data of the target group; the status of each node includes an online status and an offline status; Determine at least one node status detection result of the target group based on the status of each node of the target group; Based on the status of each node of the target group, at least one node status detection result of the target group is determined, including: Determine the status statistics of the target group based on the status of each node of the target group; the status statistics include the number of online nodes, the number of offline nodes and the total number of nodes in the target group; Based on the offline nodes of the target group, node attribute information of the offline nodes is obtained, and a first offline node detection result including the node attribute information of each offline node is generated; the node attribute information of the offline node includes: the IP address of the offline node, the identifier of the backend service to which the offline node belongs, and the source address of the backend service to which the offline node belongs in the proxy cluster; Based on the offline nodes of the target group, obtaining the status of the offline nodes in multiple detections, and determining a second offline node detection result including the status of the offline nodes in the multiple detections; Based on the status of each node in the target group in previous detections and the corresponding time point of the detection, the offline time period and offline time point of the node are obtained; After determining the second offline node detection result including the state of the offline node in multiple detections, the visualization conversion method based on each node state detection result corresponding to convert the node state detection result into a visualization detection result includes: Generate a first state identifier of the offline node corresponding to each detection process according to the state of the offline node in each detection process in the second offline node detection result; wherein the first state identifier includes at least part of the attribute information of the offline node, and the first state identifiers corresponding to the online state and the offline state are different; The first status identifiers are arranged according to the detection order of the multiple detections, and the second offline node detection results are converted into visual detection results.

2. The node status detection method according to claim 1, It is characterized in that The state detection conditions include: receiving a state detection request, or reaching a preset state detection time; When the target group meets the corresponding target status detection condition, the collector captures the node status data of the target group from the proxy cluster based on the node address information, including: When the collector receives a status detection request for all groups, or reaches a preset status detection time for all groups, it captures the node status data of all groups from the proxy cluster based on the node address information; Correspondingly, the processing of the node status data of the target group to obtain at least one node status detection result of the target group includes: The collector processes the node status data of all the groups to obtain at least one node status detection result of all the groups.

3. The node status detection method according to claim 1, It is characterized in that Determining the status of each node in the target group based on a matching result between the IP address of each node in the target group and the node status data of the target group includes: Based on the matching result of the IP address of each node in the target group and the node status data of the target group, deduplication processing is performed on the status data of the same node to obtain the deduplication node status data of the target group; Based on the deduplicated node status data, the status of each node in the target group is determined.

4. The node status detection method according to claim 1, It is characterized in that After obtaining the offline time period and offline time point of the node based on the state of each node of the target group in previous detections and the time point corresponding to the detection, the visualization conversion method based on each node state detection result converts the node state detection result into a visualization detection result, including: Based on the status of each node of the target group in previous detections and the corresponding time points of the detections, a visualization chart is generated to represent the changes in the status of the node over time; the chart includes the time point corresponding to each detection and the second state identifier of the node at that time point, and the second state identifiers corresponding to the online state and the offline state have different heights in the visualization chart.

5. The node status detection method according to claim 1, It is characterized in that After obtaining at least one node status detection result of the target group, the method further includes: Based on at least one node status detection result of the target group, determining whether there is a node with an abnormal status in the target group; If so, an alarm message is generated based on the node with abnormal status, and the alarm message is sent to the target terminal device.

6. A node status detection device, It is characterized in that The device comprises: A configuration module, configured to configure the node address information in the collector based on the IP address of each node in each backend service in the proxy cluster; the node address information includes a plurality of groups, each group corresponds to a backend service, and the group includes the IP address of each node of the corresponding backend service; A capture module, used to enable the collector to capture the node status data of the target group from the proxy cluster based on the node address information when the target group meets the corresponding target status detection condition; the node status data includes the status of each node in the target group; A processing module, used for processing the node status data of the target group to obtain at least one node status detection result of the target group; A conversion module, used to convert the node status detection result into a visual detection result based on the visual conversion method corresponding to each node status detection result, and display the visual detection result of the target group; The processing of the node status data of the target group to obtain at least one node status detection result of the target group includes: Determine the status of each node in the target group based on the matching result of the IP address of each node in the target group and the node status data of the target group; the status of each node includes an online status and an offline status; Determine at least one node status detection result of the target group based on the status of each node of the target group; Based on the status of each node of the target group, at least one node status detection result of the target group is determined, including: Based on the status of each node of the target group, determine the status statistics of the target group; the status statistics include the number of online nodes, the number of offline nodes and the total number of nodes in the target group; Based on the offline nodes of the target group, node attribute information of the offline nodes is obtained, and a first offline node detection result including the node attribute information of each offline node is generated; the node attribute information of the offline node includes: the IP address of the offline node, the identifier of the backend service to which the offline node belongs, and the source address of the backend service to which the offline node belongs in the proxy cluster; Based on the offline nodes of the target group, obtaining the status of the offline nodes in multiple detections, and determining a second offline node detection result including the status of the offline nodes in the multiple detections; Based on the status of each node in the target group in previous detections and the corresponding time point of the detection, the offline time period and offline time point of the node are obtained; After determining the second offline node detection result including the state of the offline node in multiple detections, the visualization conversion method based on each node state detection result corresponding to convert the node state detection result into a visualization detection result includes: Generate a first state identifier of the offline node corresponding to each detection process according to the state of the offline node in each detection process in the second offline node detection result; wherein the first state identifier includes at least part of the attribute information of the offline node, and the first state identifiers corresponding to the online state and the offline state are different; The first status identifiers are arranged according to the detection order of the multiple detections, and the second offline node detection results are converted into visual detection results.

7. An electronic device, It is characterized in that include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the node status detection method as described in any one of claims 1 to 5 are performed.