A CDN equipment monitoring system, method and terminal based on API

Through the API-based CDN device monitoring system, the problems of insufficient data sharing capabilities, inability to dynamically adjust the statistical frequency and waste of resources in the prior art are solved, and the sharing of CDN device status information and efficient utilization of resources are realized.

CN116232946BActive Publication Date: 2025-04-29SICHUAN ENRISING INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310166614.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2025-04-29
Estimated Expiration
2043-02-24

AI Technical Summary

Technical Problem

The existing CDN equipment monitoring methods have problems such as insufficient data sharing capabilities, inability to dynamically adjust the statistical frequency of monitoring indicators, and frequent execution of monitoring tasks, resulting in waste of resources.

Method used

Using the API-based CDN device monitoring system, the API routing scheduling module, API monitoring module and data storage module are used to realize the sharing and dynamic adjustment of monitoring indicator data, reducing resource consumption.

Benefits of technology

It realizes the sharing of CDN device status information, reduces resource consumption, dynamically adjusts the statistical frequency of monitoring indicators, and avoids resource waste and the emergence of DDOS attack scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116232946B_ABST
    Figure CN116232946B_ABST
Patent Text Reader

Abstract

The present invention discloses an API-based CDN device monitoring system, method and terminal, which relates to the technical field of CDN device monitoring, and solves the problems of repeated use and waste of CDN device computing resources and inability to dynamically adjust the statistical frequency of monitoring indicators in the existing monitoring methods of content distribution network (CDN) devices. The key points of its technical solution are: including: API routing scheduling module, API monitoring module and data storage module. The access requests are uniformly allocated and scheduled to enter the subsequent monitoring indicator acquisition process, so as to realize the sharing and automation of the whole process of CDN device monitoring indicator data. The monitoring indicator data is collected according to the collection cycle to avoid the client frequently executing monitoring tasks, resulting in the waste of CDN system processes, memory and other resources, and the occurrence of problems similar to DDOS attack scenarios. At the same time, the purpose of dynamically adjusting the statistical frequency of monitoring indicators according to changes in business needs is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of CDN equipment monitoring, and more specifically, to an API-based CDN equipment monitoring system, method and terminal. Background Art

[0002] Content distribution network (CDN) equipment is diverse, mainly including streaming equipment, management equipment, monitoring equipment, etc., and its distributed architecture deployment topology is conducive to accelerating the distribution of text, pictures, videos, network requests and other content. Once a problem occurs with the CDN equipment, it will cause problems such as slow user content downloads, video playback jams, and fuzzy image viewing. The user experience of the corresponding business will also be greatly reduced. Therefore, it is very important to monitor the status of CDN equipment and ensure operational stability.

[0003] At present, there are two main monitoring methods used by similar technologies: one is that the local client runs periodically and reports indicator data; the other is to wait for the server to issue instructions, execute the corresponding monitoring tasks, and obtain monitoring data. In these two monitoring methods, there are the following problems and shortcomings:

[0004] 1. The indicator data obtained by the local monitoring client can only be delivered to the monitoring server, and there is no open sharing capability for the monitoring data. For example, the CDN device monitoring client obtains the basic hardware information and CPU status of the server. At the same time, the CDN program also needs this type of information. The current monitoring method cannot share data for synchronous use, resulting in the need to obtain additional device status data when running the CDN software on the device, resulting in repeated use and waste of CDN device computing resources.

[0005] 2. Problems in the monitoring data generation process: First, the active generation method can only be managed by a timer, and the data is regularly generated and reported at the minute or second level. This cannot be met when the monitoring indicator statistics frequency needs to be dynamically adjusted according to changes in business needs. Secondly, after the device monitoring program receives a data request, the local client of the CDN device will execute a monitoring data acquisition. Therefore, if the monitoring request is used maliciously and data acquisition instructions are continuously sent, the client will frequently execute monitoring tasks, resulting in a waste of CDN system processes, memory and other resources, and the emergence of scenarios similar to DDOS attacks. Summary of the invention

[0006] The purpose of the present invention is to provide an API-based CDN device monitoring system, method and terminal, which solves the problems and shortcomings existing in the existing monitoring methods of content distribution network (CDN) devices.

[0007] The above technical objectives of the present invention are achieved through the following technical solutions:

[0008] A CDN device monitoring system based on an API comprises: an API routing scheduling module, wherein the API routing scheduling module is provided with an API interface corresponding to each monitoring indicator, and the API routing scheduling module is used to identify a monitoring indicator access request monitored via the API interface; an API monitoring module, wherein the API monitoring module comprises a task control unit and a monitoring task unit; the monitoring task unit is used to collect monitoring indicator data required for CDN device monitoring according to a preset collection period; the task control unit is used to obtain the collection time of the monitoring indicator data collected by the monitoring task unit last time, the access time of the monitoring indicator access request successfully identified by the API routing scheduling module, and the time difference between the collection time and the access time; a data storage module, wherein the data storage module is used to store the monitoring indicator data collected by the monitoring task unit last time; the task control unit is also used to judge the size of the time difference and the collection period; if the time difference is not greater than the collection period, the task control unit retrieves the monitoring indicator data corresponding to the successfully identified monitoring indicator access request from the data storage module, and feeds it back to the API routing scheduling module; otherwise, the task control unit controls the monitoring task unit to immediately collect the monitoring indicator data required for CDN device monitoring once, and sends the monitoring indicator data corresponding to the successfully identified monitoring indicator access request to the API routing scheduling module.

[0009] Optionally, it also includes an API configuration module, which includes a parameter setting unit and a parameter loading unit; the parameter setting unit is used to manage the configuration file for the CDN device monitoring system; the API router module is also used to obtain the CDN device monitoring system configuration parameter update request from the API interface; the task control unit is also used to control the parameter loading unit to load the configuration parameters corresponding to the update request from the parameter setting unit after the API router module obtains the CDN device monitoring system configuration parameter update request, so as to initialize the CDN device monitoring system, and store the configuration parameters of the CDN device monitoring system after initialization in the storage module.

[0010] Optionally, the storage module includes a monitoring indicator data storage unit and a configuration parameter storage unit; the monitoring indicator data storage unit is used to store monitoring indicator data, collection time and CDN device monitoring system initialization time; the configuration parameter storage unit is used to store the configuration parameters of the CDN device monitoring system after initialization.

[0011] Optionally, the configuration file includes the port, debugging mode, log size, log retention time, number of databases, number of management platform interfaces, number of network cards, and alarm thresholds of the CPU, memory, and disk of the CDN device monitoring system.

[0012] A CDN device monitoring method based on an API includes the following operations: monitoring a monitoring indicator access request from an access terminal and identifying the acquired monitoring indicator access request; acquiring the access time of the successfully identified monitoring indicator access request and the collection time of the most recent collection of monitoring indicator data according to the collection cycle; calculating the collection time and the access time to obtain the time difference between the collection time and the access time; performing a size judgment on the time difference and the collection cycle to obtain a judgment result; if the judgment result is that the time difference is not greater than the collection cycle, the monitoring indicator data corresponding to the successfully identified monitoring indicator access request in the most recent collection of monitoring indicator data required for CDN device monitoring is fed back to the access terminal; otherwise, the monitoring indicator data required for CDN device monitoring is immediately collected once, and the monitoring indicator data corresponding to the successfully identified monitoring indicator access request is fed back to the access terminal.

[0013] Optionally, before listening to the monitoring indicator access request of the access end, it also includes initializing the CDN device monitoring system: the initialization process includes parsing the configuration file, initializing the log process, and after the log process is successfully initialized, initializing the database connection pool and the API inventory data storage list.

[0014] Optionally, the configuration file parsing process includes: receiving a CDN device monitoring system configuration parameter update request; loading a CDN device monitoring system related dependency library, parsing CDN device monitoring system configuration file parameters, and writing them into the CDN device monitoring system and storing them as a Configure_All dictionary.

[0015] Optionally, the process of initializing the log process includes: obtaining log-related parameters from the Configure_All dictionary; and configuring the obtained log-related parameters in the CDN device monitoring system.

[0016] Optionally, within a collection cycle, characteristic indicator data in the monitoring indicator data is collected multiple times; the characteristic indicator data collected multiple times is averaged to obtain the characteristic indicator data in the monitoring indicator data required for CDN device monitoring collected most recently.

[0017] An electronic terminal comprises: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the API-based CDN device monitoring method.

[0018] Compared with the prior art, the present invention has the following beneficial effects:

[0019] 1. The API routing scheduling module is equipped with API interfaces corresponding to various monitoring indicators. There is only one corresponding monitoring indicator for the API interface itself. Whether it is system monitoring or CDN business monitoring, when the access end obtains the monitoring indicator, it can directly access the corresponding API interface. There is no need to worry about how to obtain the monitoring indicator data of the management backend, and you can directly obtain the desired data, thereby reducing the resource consumption of the monitoring function and achieving the purpose of sharing CDN device status information.

[0020] 2. The monitoring indicator data required for CDN equipment monitoring is collected once. The acquired data can meet the generation of multiple monitoring indicators. For example, the database status table STATUS, a SQL (show global status) can acquire more than 300 indicators, such as the number of connections, successes, failures, slow queries, etc. Therefore, the acquisition of similar monitoring indicators no longer needs to be executed multiple times separately like traditional monitoring, so as to achieve the purpose of sharing monitoring tasks and reducing CDN equipment resource consumption.

[0021] 3. Save the latest monitoring indicator data and record the time of the check. After the API receives the data access request, it actively obtains the time difference between the access time of the access request and the collection time of the latest monitoring indicator data. If the time difference is not greater than the default collection cycle, it means that data has been obtained once within a certain period of time. At this time, directly return the data of the monitoring item in the memory, and there is no need to use system resources again to collect and calculate related indicators, so as to solve the problem that the client frequently executes monitoring tasks, resulting in waste of CDN system processes, memory and other resources, and the occurrence of similar DDOS attack scenarios. If it is greater than the default collection cycle, the monitoring indicator data is collected immediately to achieve the purpose of dynamically adjusting the statistical frequency of monitoring indicators according to changes in business needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0023] Figure 1 This is a schematic diagram of the structure of an API-based CDN device monitoring system in Example 1;

[0024] Figure 2 This is a schematic diagram of the structure of a monitoring task unit for an API-based CDN device monitoring system in Example 1;

[0025] Figure 3 This is a flow chart of a CDN device monitoring method based on an API in Example 2;

[0026] Figure 4This is a schematic diagram of a CDN device monitoring system initialization process for an API-based CDN device monitoring method in Example 2;

[0027] Figure 5 This is a schematic diagram of the identification process of a monitoring indicator access request for an API-based CDN device monitoring method in Example 2;

[0028] Figure 6 This is a diagram of a dictionary format for an API-based CDN device monitoring method in Example 2. DETAILED DESCRIPTION

[0029] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0030] In the description of the present invention, “plurality” means two or more than two, unless otherwise clearly and specifically defined.

[0031] Example 1

[0032] An API-based CDN device monitoring system, such as Figure 1 As shown, it includes: API routing scheduling module, API monitoring module and data storage module.

[0033] The API routing scheduling module is provided with an API interface corresponding to each monitoring indicator, and the API routing scheduling module is used to identify the monitoring indicator access request monitored through the API interface. The API-based CDN device monitoring system provides a unified API interface to the outside world. Whether it is a POST or GET request, it uniformly allocates and schedules to enter the subsequent monitoring indicator acquisition process. There is no need to pay attention to how the indicator data is generated, so as to achieve the sharing and automation of the CDN device monitoring indicator data. The full process controllable. The API routing scheduling module is responsible for monitoring the local port of the monitoring program. After receiving the request, it performs interface data judgment and subsequent business scheduling. It reduces the resource consumption of the monitoring function and achieves the purpose of sharing CDN device status information.

[0034] The API monitoring module includes a task control unit and a monitoring task unit; the monitoring task unit is used to collect the monitoring indicator data required for CDN device monitoring according to the preset collection period, and also supports user-defined monitoring items, such as Figure 2 The task control unit is used to obtain the collection time of the monitoring indicator data collected by the monitoring task unit the most recently, the access time of the monitoring indicator access request successfully identified by the API routing scheduling module, and the time difference between the collection time and the access time.

[0035] The data storage module is used to store the monitoring indicator data most recently collected by the monitoring task unit; the task control unit is also used to judge the size of the time difference and the collection period; if the time difference is not greater than the collection period, the task control unit retrieves the monitoring indicator data corresponding to the successfully identified monitoring indicator access request from the data storage module, and feeds it back to the API routing scheduling module; otherwise, the task control unit controls the monitoring task unit to immediately collect the monitoring indicator data required for CDN device monitoring, and sends the monitoring indicator data corresponding to the successfully identified monitoring indicator access request to the API routing scheduling module. This solves the problem that the client frequently executes monitoring tasks, resulting in waste of CDN system processes, memory and other resources, as well as the occurrence of similar DDOS attack scenarios. At the same time, it achieves the purpose of dynamically adjusting the statistical frequency of monitoring indicators according to changes in business needs. Moreover, the acquisition of similar monitoring indicators no longer needs to be executed multiple times separately like traditional monitoring, and the monitoring tasks are shared to achieve the purpose of further reducing CDN equipment resource consumption.

[0036] In this embodiment, if Figure 1 As shown, the API-based CDN device monitoring system also includes an API configuration module, which includes a parameter setting unit and a parameter loading unit; the parameter setting unit is used to manage configuration files for the CDN device monitoring system; the API router module is also used to obtain a CDN device monitoring system configuration parameter update request from the API interface; the task control unit is also used to control the parameter loading unit to load the configuration parameters corresponding to the update request from the parameter setting unit after the API router module obtains the CDN device monitoring system configuration parameter update request, so as to initialize the CDN device monitoring system, and store the initialized configuration parameters of the CDN device monitoring system in the storage module.

[0037] Specifically, the parameter setting unit is used to manage the configuration files for the CDN equipment monitoring system, including but not limited to the monitoring system's own port, debugging mode, log size, log retention time, alarm thresholds of system parameters such as CPU, memory, disk, and business parameters such as database, management platform interface, and number of network cards. The parameter loading unit is used to load, update, and reset the configuration parameters of the monitoring system. When the program is initialized, the unit is called to read the relevant configuration files and write the configuration parameters into the memory of the monitoring program to facilitate subsequent program retrieval and use; at the same time, in order to reduce the impact of the configuration parameter update on the local monitoring program, when the configuration parameters of the monitoring program need to be updated or reset, the relevant interface can be called to reload the initialization configuration or the latest configuration parameters. And during the operation of the monitoring system, if the monitoring parameters need to be changed due to business needs, after the system receives the parameter update API interface request, the data in the parameter configuration storage unit will be updated according to the actual situation, thereby realizing real-time parameter updates, but the monitoring business will not be shut down.

[0038] In this embodiment, if Figure 1 As shown, the storage module includes a monitoring indicator data storage unit and a configuration parameter storage unit; the monitoring indicator data storage unit is used to store monitoring indicator data, collection time, and the time when the CDN device monitoring system is initialized. Specifically, the monitoring indicator data storage unit mainly stores the monitoring data and update time of each monitoring indicator, and its storage format is a dictionary (key-value) format, the corresponding key is the monitoring name of the monitoring item, and the value is the actual acquisition status data and monitoring data update time of the monitoring item.

[0039] The configuration parameter storage unit is used to store the configuration parameters of the CDN device monitoring system after initialization. Specifically, the data stored in the configuration parameter storage unit includes but is not limited to the monitoring system's own port, debugging mode, log size, log retention time, alarm thresholds of system parameters such as CPU, memory, disk, and database, management platform interface, number of network cards, and other business parameters.

[0040] An API-based CDN device monitoring method, such as Figure 3 As shown, the following operations are included:

[0041] S1. Listen to the monitoring indicator access request of the access end and identify the obtained monitoring indicator access request;

[0042] Specifically, Figure 5 As shown, the server API listening port receives the request, determines the requested API interface type, and distinguishes between GET and POST request types;

[0043] If it is a GET request, then the access time now_time of the request is compared with the collection time (update time) of the latest monitoring data of the API in the monitoring indicator storage unit. If the time difference is less than the configured default time interval Dt (collection period), the data in the monitoring indicator storage unit is directly returned, that is, there is no need to call subsequent monitoring tasks to perform corresponding actions, thus reducing repeated execution of actions for the same monitoring item. Example: There is a monitoring item API called system_cpu, the current time is 16:25:00, and the time field (the most recent collection time) in the monitoring indicator storage unit is 16:24:58. If the indicator monitoring period is 1 minute, the monitoring program can directly return the most recent data in the memory without calling the subsequent monitoring task for a second time; if the time difference is greater than the configured default time interval Dt, that is, in the previous example, the time field (the most recent collection time) in the monitoring indicator storage module is 16:23:58, then the GET request API interface distinction module process is entered, and the monitoring task is called to obtain indicators;

[0044] If it is a POST request, the API interface and the received data are synchronously transmitted to the API routing scheduling module for identification. The biggest difference between POST and GET requests is that the POST data contains the parameter attributes of the corresponding interface. For example, for the status monitoring of the database DB1, its status values ​​include the number of connections, the number of successes, the number of failures, etc. These monitoring indicators can actually obtain most of the status data by executing them once during the database monitoring indicator query process, but the external monitoring indicator acquisition party may only need part of the status value. Therefore, in the actual implementation process, the corresponding attributes of the POST interface support one or several monitoring indicators of the same monitoring type, and this form does not require the background monitoring task to be executed multiple times.

[0045] S2. Obtain the access time of the successfully identified monitoring indicator access request, and the collection time of the most recent collection of monitoring indicator data according to the collection cycle;

[0046] S3. Calculate the acquisition time and access time to obtain the time difference between the acquisition time and the access time;

[0047] S4. Perform a size determination process on the time difference and the acquisition cycle to obtain a determination result;

[0048] S5. If the judgment result is that the time difference is not greater than the collection period, the monitoring indicator data corresponding to the successfully identified monitoring indicator access request among the monitoring indicator data required for CDN device monitoring collected most recently is fed back to the access end; otherwise, the monitoring indicator data required for CDN device monitoring is collected immediately, and the monitoring indicator data corresponding to the successfully identified monitoring indicator access request is fed back to the access end.

[0049] Specifically, after distinguishing the monitoring indicator parameters transmitted by POST, the request interval is judged whether it is less than the collection period configured by the monitoring system according to the monitoring item corresponding to the API and its most recent update time. If it is less than, the data in the memory is directly returned. If it is greater, the subsequent monitoring indicator tasks are executed, which is consistent with the GET request time judgment logic, so it will not be repeated here.

[0050] In this embodiment, if Figure 4 As shown, before listening to the access request for monitoring indicators from the access end, it also includes initializing the CDN device monitoring system: the initialization process includes parsing the configuration file, initializing the log process, and initializing the database connection pool and the API list data storage list after the log process is successfully initialized. Among them, the parsing process of the configuration file includes: receiving a CDN device monitoring system configuration parameter update request; loading the CDN device monitoring system related dependency library, parsing the CDN device monitoring system configuration file parameters, and writing them into the CDN device monitoring system and saving them as the Configure_All dictionary. The process of initializing the log process includes: obtaining log-related parameters from the Configure_All dictionary; configuring the obtained log-related parameters in the CDN device monitoring system.

[0051] Specifically, the parameter list:

[0052] Listen_IP: Listening IP, default is 127.0.0.1;

[0053] Listen_Port: Listening port, cannot be empty;

[0054] Debug_Model: program running mode, the default value is false, that is, the debug mode is not enabled, ensuring that the online version is in application mode, reducing the impact of debug information on actual offline applications and performance;

[0055] Log_Size: log size, default is 10MB;

[0056] Log_Num: number of logs, the default value is 10;

[0057] DB_Info_dict: database-related configuration information, including database IP address, port, database name, table name, user, and password, used for initializing the database connection pool;

[0058] Configure_All: The configuration parameter storage dictionary of the entire monitoring system, including CDN service monitoring parameters, such as video dialing test string information, video hotlink protection, special service whitelist, traffic monitoring source, number of network connections, system basic performance monitoring thresholds, and other data.

[0059] The implementation process is as follows:

[0060] 1. Load the monitoring system-related dependency library, call the API configuration module, parse the system configuration file parameters, write them into the system, and save them as the Configure_All dictionary;

[0061] 2. Initialize the system log process. Obtain log-related parameters such as log size and log quantity through the Configure_All dictionary and configure them in the system to initialize the log process.

[0062] 3. Initialize the monitoring indicator result storage dictionary Check_Result_Dict, and initialize the relevant storage dictionary according to the API interface list to ensure that the data of subsequent monitoring tasks can have memory space to use. The dictionary format is as follows Figure 6 As shown, the request_status field is the request status code, which saves the result of the current monitoring task completion, indicating whether the task execution result is successful or not. 100 means that the inspection task is completed and the task execution is normal; 200 means that the inspection task is not completed and the task execution is abnormal;

[0063] The request_result field is the task execution result. The type and range of the value vary according to different monitoring indicators. For example, if the value of the abnormal process monitoring indicator is 0, it means the system is normal; if the value is 1, it means the system is abnormal; the value can also be in the form of a string, list, etc.

[0064] The time field stores the time when the monitoring indicator was last updated. The default time format is year, month, day, hour, minute, and second, with an accuracy of microseconds (10 -6 );

[0065] 4. Initialize the database connection pool and establish a database connection based on the basic database information set in the Configure_All dictionary for subsequent monitoring data acquisition and database status monitoring services;

[0066] 5. If the above embodiment is completed normally, the initialization work of the CDN device monitoring system is completed, and the entire device monitoring system performs local monitoring and waits for the monitoring indicator access request to arrive.

[0067] In this embodiment, the characteristic indicator data in the monitoring indicator data is collected multiple times within the collection cycle; the characteristic indicator data collected multiple times is averaged to obtain the characteristic indicator data in the monitoring indicator data required for CDN device monitoring collected the most recently.

[0068] Specifically, for implementation embodiments that require calling monitoring tasks, whether it is a GET or POST request, the task control unit will perform related task scheduling. Different monitoring indicators have different accuracy requirements. For example, characteristic indicators such as CPU will have instantaneous peaks. In order to reduce the peak situation when acquiring monitoring data, characteristic monitoring indicators are added with a repeated verification function when the monitoring task is implemented according to business needs. That is, within a certain period of time, if N (≥2) verifications exceed the configured threshold, a monitoring warning will be issued.

[0069] After a series of monitoring indicators are collected, the data of the request_status and request_result fields are returned according to the actual results. On the one hand, the monitoring program will update the monitoring indicator result storage dictionary Check_Result_Dict, and the updated content includes: request_status, request_result, and time fields; on the other hand, the latest data obtained by this monitoring task will be returned to the corresponding request connection to achieve the timeliness, authenticity, and effectiveness of the monitoring indicators.

[0070] An electronic terminal comprises: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the API-based CDN device monitoring method.

[0071] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An API-based CDN device monitoring system, characterized in that: include: An API routing scheduling module, wherein the API routing scheduling module is provided with an API interface corresponding to each monitoring indicator, and the API routing scheduling module is used to identify monitoring indicator access requests monitored via the API interface; The API monitoring module includes a task control unit and a monitoring task unit; the monitoring task unit is used to collect monitoring indicator data required for CDN device monitoring according to a preset collection period; the task control unit is used to obtain the collection time of the monitoring indicator data collected by the monitoring task unit last time, the access time of the monitoring indicator access request successfully identified by the API routing scheduling module, and the time difference between the collection time and the access time; A data storage module, wherein the data storage module is used to store the monitoring indicator data most recently collected by the monitoring task unit; The task control unit is also used to judge the size of the time difference and the collection period; if the time difference is not greater than the collection period, the task control unit retrieves the monitoring indicator data corresponding to the successfully identified monitoring indicator access request from the data storage module, and feeds it back to the API routing scheduling module; otherwise, the task control unit controls the monitoring task unit to immediately collect the monitoring indicator data required for CDN device monitoring once, and sends the monitoring indicator data corresponding to the successfully identified monitoring indicator access request to the API routing scheduling module.

2. The API-based CDN device monitoring system according to claim 1, characterized in that: Also includes an API configuration module, the API configuration module includes a parameter setting unit and a parameter loading unit; The parameter setting unit is used to manage the configuration file for the CDN device monitoring system; The API routing scheduling module is also used to obtain a CDN device monitoring system configuration parameter update request from the API interface; The task control unit is also used to control the parameter loading unit to load the configuration parameters corresponding to the update request from the parameter setting unit after the API routing scheduling module obtains the CDN device monitoring system configuration parameter update request, so as to initialize the CDN device monitoring system, and store the initialized configuration parameters of the CDN device monitoring system in the storage module.

3. The API-based CDN device monitoring system according to claim 2, characterized in that: The storage module includes a monitoring indicator data storage unit and a configuration parameter storage unit; The monitoring indicator data storage unit is used to store monitoring indicator data, collection time and CDN equipment monitoring system initialization time; The configuration parameter storage unit is used to store the configuration parameters of the CDN device monitoring system after initialization.

4. The API-based CDN device monitoring system according to claim 2, characterized in that: The configuration file includes the port, debugging mode, log size, log retention time, number of databases, number of management platform interfaces, number of network cards, and alarm thresholds of the CPU, memory, and disk of the CDN device monitoring system.

5. A CDN device monitoring method based on API, characterized in that: The following operations are included: Monitor the monitoring indicator access request of the access end and identify the obtained monitoring indicator access request; Obtain the access time of the successfully identified monitoring indicator access request, as well as the collection time of the most recent collection of monitoring indicator data according to the collection cycle; Calculate the collection time and the access time to obtain the time difference between the collection time and the access time; The time difference and the collection period are judged to obtain a judgment result; if the judgment result is that the time difference is not greater than the collection period, the monitoring indicator data corresponding to the successfully identified monitoring indicator access request in the most recent collection of the monitoring indicator data required for CDN device monitoring is fed back to the access end; otherwise, the monitoring indicator data required for CDN device monitoring is collected immediately, and the monitoring indicator data corresponding to the successfully identified monitoring indicator access request is fed back to the access end.

6. The method for monitoring CDN equipment based on API according to claim 5, characterized in that: Before monitoring the access request of the monitoring index of the access end, the CDN device monitoring system is initialized: The initialization process includes parsing the configuration file, initializing the log process, and after the log process is successfully initialized, initializing the database connection pool and the API list data storage list.

7. The method for monitoring CDN equipment based on API according to claim 6, characterized in that: The parsing process of the configuration file includes: Receive a CDN device monitoring system configuration parameter update request; Load the CDN device monitoring system related dependency library, parse the CDN device monitoring system configuration file parameters, write them into the CDN device monitoring system, and save them as the Configure_All dictionary.

8. The method for monitoring CDN equipment based on API according to claim 7, characterized in that: The process of initializing the log process includes: Log related parameters obtained from the Configure_All dictionary; Configure the obtained log-related parameters in the CDN device monitoring system.

9. The method for monitoring CDN equipment based on API according to claim 5, characterized in that: During the collection cycle, the characteristic indicator data in the monitoring indicator data is collected multiple times; The characteristic indicator data collected multiple times are averaged to obtain the characteristic indicator data in the most recent collection of monitoring indicator data required for CDN device monitoring.

10. An electronic terminal, characterized in that: include: processor; A memory, configured to store instructions executable by the processor; Wherein, the processor is configured to execute instructions to implement the API-based CDN device monitoring method described in any one of claims 5-9.

Citation Information

Patent Citations

  • Monitoring method and device

    CN113688149A

  • Service slice performance index acquisition monitoring method and device

    CN114726755A