Monitoring system, method, electronic device, and storage medium
By combining Prometheus and Thanos, and utilizing the Sidecar component and database storage component to optimize the storage and retrieval of frequently queried data, the efficiency problem of Thanos in high-frequency query scenarios was solved, and the overall performance of the monitoring system was improved.
Patent Information
- Application Number
- CN202111016130.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2041-08-31
AI Technical Summary
Thanos has low query efficiency in high-frequency query scenarios, and existing monitoring systems have failed to effectively improve the performance of high-frequency queries.
By combining Prometheus and Thanos, the Sidecar component stores monitoring data to a storage server, and the database storage component analyzes the data to store frequently queried data to the target database. Query requests are responded to directly from the target database, and distributed locks are used to solve the problem of duplicate data backups across multiple Prometheus instances.
This improves the query performance of the monitoring system in high-frequency query scenarios, eliminating the need for users to relearn how to use the system and thus enhancing overall query performance.
Smart Images

Figure CN115729958B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of surveillance technology, and in particular to a surveillance system, method, electronic device and storage medium. Background Technology
[0002] Prometheus is a mature monitoring solution that provides good support for various application scenarios and has excellent applicability. Thanos is a comprehensive solution based on Prometheus that provides the ability to aggregate queries across multiple Prometheus instances. However, for specific scenarios (such as high-frequency query scenarios), Thanos' query efficiency is relatively low. Summary of the Invention
[0003] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this application provides a monitoring system, method, electronic device and storage medium.
[0004] According to a first aspect of this application, a monitoring system is provided, comprising: a Prometheus instance, a database storage component, and a Thanos component, wherein the Thanos component includes a first query component and a Sidecar component corresponding to the Prometheus instance;
[0005] The Prometheus instance is used to monitor the monitored object and obtain the monitoring results of the data to be monitored related to the monitored object.
[0006] The Sidecar component is used to store the monitoring results of the data to be monitored to a storage server;
[0007] The database storage component is used to store the monitoring results of the data to be monitored in the target database if it is determined that the data to be monitored belongs to a preset dataset; wherein the query frequency of the data in the preset dataset is higher than the preset query frequency;
[0008] The first query component is used to extract the data to be queried from the data query request after receiving the data query request, and if the data to be queried belongs to the preset dataset, send the data query request to the target database to obtain the query result of the data to be queried from the target database.
[0009] Optionally, the number of Prometheus instances is multiple, and each Prometheus instance has a corresponding Sidecar component;
[0010] Multiple Sidecar components are used to store the monitoring results of the monitoring data obtained from multiple Prometheus instances to the storage server using a distributed lock.
[0011] Optionally, the first query component is further configured to, after extracting the data to be queried from the data query request, send the data query request to the storage server if the data to be queried does not belong to the preset dataset, so as to obtain the query result of the data to be queried from the storage server.
[0012] Optionally, the Thanos component further includes a second query component;
[0013] The first query component is used to extract the data to be queried from the data query request, and if the data to be queried does not belong to the preset dataset, send the data query request to the second query component.
[0014] The second query component is used to send the data query request to the server to obtain the query result of the data to be queried from the storage server, and send the query result to the first query component.
[0015] Optionally, the first query component is a query-frontend component.
[0016] Optionally, the query performance of the target database is higher than the preset query performance.
[0017] According to a second aspect of this application, a monitoring method is provided, comprising:
[0018] A Prometheus instance monitors the object being monitored and obtains the monitoring results of the data to be monitored related to the object being monitored.
[0019] The Sidecar component in Thanos stores the monitoring results of the data to be monitored to the storage server.
[0020] When the database storage component determines that the data to be monitored belongs to a preset dataset, it stores the monitoring results of the data to be monitored in the target database; wherein, the query frequency of the data in the preset dataset is higher than the preset query frequency;
[0021] Upon receiving a data query request, the first query component in the Thanos component extracts the data to be queried from the data query request. If the data to be queried belongs to the preset dataset, the data query request is sent to the target database to obtain the query result of the data to be queried from the target database.
[0022] Optionally, the Thanos component includes a Sidecar component if there are multiple Prometheus instances and each Prometheus instance has a corresponding Sidecar component.
[0023] The method further includes:
[0024] Multiple Sidecar components use a distributed lock to store the monitoring results of the monitoring data obtained from multiple Prometheus instances to the storage server.
[0025] Optionally, the method further includes:
[0026] After the first query component extracts the data to be queried from the data query request, if the data to be queried does not belong to the preset dataset, it sends the data query request to the storage server to obtain the query result of the data to be queried from the storage server.
[0027] Optionally, the Thanos component further includes a second query component; the method further includes:
[0028] After the first query component extracts the data to be queried from the data query request, if the data to be queried does not belong to the preset dataset, it sends the data query request to the second query component.
[0029] The second query component sends the data query request to the server to obtain the query result of the data to be queried from the storage server, and sends the query result to the first query component.
[0030] Optionally, the first query component is a query-frontend component.
[0031] Optionally, the query performance of the target database is higher than the preset query performance.
[0032] According to a third aspect of this application, an electronic device is provided, comprising: a processor configured to execute a computer program stored in a memory, wherein the computer program, when executed by the processor, implements the method described in the second aspect.
[0033] According to a fourth aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in the second aspect.
[0034] According to a fifth aspect of this application, a computer program product is provided that, when the computer program product is run on a computer, causes the computer to perform the method described in the second aspect.
[0035] The technical solution provided in this application has the following advantages compared with the prior art:
[0036] This application uses Prometheus and Thanos to jointly build a monitoring system. A Prometheus instance monitors the monitored object, obtaining monitoring results of the data related to the monitored object. The Sidecar component in Thanos stores the monitoring results of the data to a storage server. Based on this, a database storage component is added for analyzing the monitored data. If the monitored data belongs to a preset dataset, it indicates that the monitored data is high-frequency query data, and the monitoring results can be stored in a target database. Thus, when a query request for high-frequency data is received, the query request is directly sent to the target database, allowing direct data retrieval from the target database. This application specifically optimizes high-frequency query scenarios by diverting query requests to the target database, thereby improving the overall query performance of the monitoring system. Furthermore, the above optimization methods are seamless for users, allowing for a smooth transition without requiring them to relearn how to use the monitoring system. Attached Figure Description
[0037] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a schematic diagram of an architecture for a monitoring system applicable to the embodiments of this application;
[0040] Figure 2 This is a schematic diagram of the structure of a monitoring system in an embodiment of this application;
[0041] Figure 3 This is a schematic diagram illustrating data monitoring based on a monitoring system in an embodiment of this application;
[0042] Figure 4 This is a flowchart of a monitoring method in an embodiment of this application;
[0043] Figure 5 This is a schematic diagram of the structure of an electronic device in an embodiment of this application. Detailed Implementation
[0044] To better understand the above-mentioned objectives, features, and advantages of this application, the solution of this application will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0045] Many specific details are set forth in the following description in order to provide a full understanding of this application, but this application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of this application, and not all embodiments.
[0046] Figure 1 This is a schematic diagram of an architecture for a monitoring system applicable to the embodiments of this application, such as... Figure 1 As shown, the system includes multiple different clusters, namely cluster 101, cluster 102, ..., cluster 103, etc., as well as a network 120, a target database 130, and a storage server 140 (e.g., an object storage server). Network 120 serves as the medium for providing communication links between clusters 101, clusters 102, ..., clusters 103, the target database 130, and the storage server 140. Network 120 can include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0047] Each cluster can deploy a monitoring system, on which Prometheus instances and Thanos components can be deployed. Each monitoring system can monitor different objects, obtain monitoring results related to those objects, store the monitoring results on a storage server, and store frequently queried data in a target database. This way, when a query request for frequently queried data is received, the data can be retrieved directly from the target database, improving query efficiency.
[0048] See Figure 2 , Figure 2 This is a schematic diagram of a monitoring system in an embodiment of this application. The monitoring system 200 includes: a Prometheus instance 210, a database storage component 220, and a Thanos component 230. The Thanos component includes a first query component 231 and a Sidecar component 232 corresponding to the Prometheus instance.
[0049] Prometheus instance 210 is used to monitor the monitored object and obtain the monitoring results of the data to be monitored related to the monitored object.
[0050] Prometheus is a well-designed and widely adopted system monitoring solution. A Prometheus instance is a monitoring program deployed on a cluster. By collecting data from monitored objects and providing a query interface, it allows system maintainers to observe multi-dimensional system status. The monitored objects can be one or more different machines, and the monitoring results related to the monitored objects are usually different at different times; that is, the monitoring results are time-series data.
[0051] If the monitored objects are multiple servers, the data to be monitored could be CPU (Central Processing Unit) utilization, memory usage, etc. The monitoring results will be the specific values of CPU utilization and memory usage.
[0052] Prometheus instance 210 can also store the monitoring results of the data to be monitored locally. It should be noted that, due to the limited local storage space, the monitoring results of the data to be monitored usually cannot be stored for a long time.
[0053] Sidecar component 232 is used to store the monitoring results of the data to be monitored to the storage server.
[0054] Sidecar component 232 can run as a separate process on the same cluster as the Prometheus 210 instance, without affecting each other. It can proxy query requests from the upper layer and back up monitoring data to other storage devices. Sidecar component 232 can also store the monitoring results of the data to be monitored on a remote storage server, thus ensuring long-term storage of the monitoring results.
[0055] Database storage component 220 is used to store the monitoring results of the data to be monitored in the target database if it is determined that the data to be monitored belongs to a preset dataset; wherein the query frequency of the data in the preset dataset is higher than the preset query frequency.
[0056] In this embodiment, the database storage component 220 is an additional component added to the existing monitoring system to determine whether the data to be monitored belongs to the category of frequently queried data. If the data to be monitored belongs to the category of frequently queried data, the monitoring results are stored in the target database. Specifically, a preset dataset can be used to determine whether the data to be monitored belongs to the category of frequently queried data. The preset dataset is a data set pre-set by maintenance personnel based on experience, and the query frequency of data in this set is higher than the preset query frequency. If the data to be monitored belongs to the preset dataset, it can be considered that the data to be queried belongs to the category of frequently queried data.
[0057] As mentioned above, monitoring results are typically time-series data; therefore, the target database can be a time-series database. A time-series database is a database specifically designed and optimized for storing and managing time-series data, offering better performance and storage support when processing such data.
[0058] As described above, the Sidecar component 232 stores the monitoring results of all data to be monitored to the storage server, while the database storage component 220 stores the monitoring results of data to be monitored with higher query frequency to the target database. On the one hand, this ensures that the monitoring results of all data to be monitored are stored; on the other hand, by storing some data in the target database, data requests can be routed when received, thereby improving the efficiency of data querying. Optionally, the query performance of the target database can be higher than the preset query performance; that is, the target database can be a high-performance database. Querying data through a high-performance database can provide users with query results more quickly, thereby improving the query performance of the monitoring system.
[0059] In this embodiment, the database storage component 220 can be a standalone component or integrated into the Prometheus instance 210, meaning the above functionality is implemented through the Prometheus instance 210. Alternatively, it can be integrated into the Sidecar component 232, meaning the above functionality is implemented through the Sidecar component 232.
[0060] The first query component 231 is used to extract the data to be queried from the data query request after receiving the data query request. If the data to be queried belongs to a preset dataset, the data query request is sent to the target database to obtain the query result of the data to be queried from the target database.
[0061] Corresponding to the aforementioned database storage component 220, the first query component 231 can also be a component added to the existing monitoring system. Upon receiving a data query request, it extracts the data to be queried from the request and determines whether the data to be queried is frequently queried using a preset dataset. If the data to be queried is frequently queried, the data query request is routed to the target database for execution to obtain the query results from the target database.
[0062] The monitoring system of this application combines Prometheus and Thanos. A Prometheus instance monitors the monitored object, obtaining monitoring results of the data related to the monitored object. The monitoring results of the data are stored in a storage server using the Sidecar component in Thanos. Furthermore, a database storage component is added for analyzing the monitored data. If the monitored data belongs to a preset dataset, it indicates that the data is frequently queried, and the monitoring results can be stored in a target database. Thus, when a query request for frequently queried data is received, the query request is directly sent to the target database, allowing direct data retrieval from the target database. This application specifically optimizes for frequently queried scenarios by diverting query requests to the target database, thereby improving the overall query performance of the monitoring system. Simultaneously, the above optimization method is seamless for users, allowing for a smooth transition without requiring them to relearn how to use the monitoring system.
[0063] While Prometheus is a mature monitoring solution with good applicability, it doesn't inherently offer a high-availability solution. High availability refers to a system's ability to perform its functions without interruption. High availability provides better fault tolerance and more stable service guarantees. While deploying multiple Prometheus instances can typically improve availability, this can lead to the problem of the same data being written multiple times.
[0064] For example, if two Prometheus instances (Prometheus instance one and Prometheus instance two) are deployed within the same cluster, both instances can collect data from the monitored objects and store the monitoring results to a storage server via the Sidecar component. If there is a slight difference in the time when Prometheus instance one and Prometheus instance two collect the data, the data collected will also differ, resulting in the same data being written multiple times.
[0065] In this embodiment of the application, if there are multiple Prometheus instances and each Prometheus instance has a corresponding Sidecar component, then the multiple Sidecar components are used to store the monitoring results of the monitoring data obtained from the monitoring of multiple Prometheus instances to the storage server through a distributed lock.
[0066] Distributed locks are a method for controlling synchronized access to shared resources between distributed systems. In distributed systems, it's often necessary to coordinate their actions. If different systems or different hosts within the same system share a resource or a set of resources, mutual exclusion can be used to prevent interference and ensure consistency when accessing these resources; distributed locks can be used in this case. Multiple Sidecar components can use distributed locks to achieve state synchronization between different Prometheus instances, ensuring correct data synchronization and backup, and solving the problem of duplicate data backups when deploying multiple Prometheus instances.
[0067] In this embodiment, the first query component 231 is further configured to, after extracting the data to be queried from the data query request, if the data to be queried does not belong to the preset dataset, directly send the data query request to the storage server to obtain the query result of the data to be queried from the storage server. In another implementation, the Thanos component further includes a second query component. The first query component is configured to, after extracting the data to be queried from the data query request, send the data query request to the second query component if the data to be queried does not belong to the preset dataset; the second query component is configured to send the data query request to the storage server to obtain the query result of the data to be queried from the storage server, and send the query result to the first query component.
[0068] If the data to be queried does not belong to the preset dataset, it means that the data to be monitored is not frequently queried data, and the monitoring results of the data to be monitored are stored in the storage server, not in the target database. In this case, the first query component can either directly send a data query request to the storage server or continue to distribute data query requests, and finally return the query results to the user.
[0069] The first query component can be a newly added component within the Thanos component, or it can be an existing query-frontend component within the Thanos component. That is, this application can add a data query request routing function to the existing query-frontend component. The existing query-frontend component is used to aggregate and query the monitoring results of the data to be monitored from multiple Prometheus instances. It can be understood that multiple clusters can share a single query-frontend component, which can then aggregate and query the monitoring results of the data to be monitored from each Prometheus instance in multiple clusters. The second query component can be a query component within the Thanos component that is different from the query-frontend component, and it can also be used for data querying.
[0070] See Figure 3 , Figure 3 This is a schematic diagram illustrating data monitoring based on a monitoring system in an embodiment of this application. As shown in the diagram, the monitored objects include: machine 1, machine 2, ..., machine M, i.e., M different machines. Two Prometheus instances are deployed in cluster 1, namely Prometheus instance one and Prometheus instance two. Both Prometheus instance one and Prometheus instance two can monitor machines 1 to M and obtain the monitoring results of the data to be monitored.
[0071] Sidecar component one, corresponding to Prometheus instance one, can store the monitoring results of the data to be monitored obtained by Prometheus instance one to an object storage server. Similarly, Sidecar component two, corresponding to Prometheus instance two, can also store the monitoring results of the data to be monitored obtained by Prometheus instance two to an object storage server. During the data storage process between Sidecar component one and Sidecar component two, distributed locks can be used to achieve state synchronization between Prometheus instance one and Prometheus instance two, ensuring correct data synchronization and backup, and avoiding duplicate data storage.
[0072] Both Prometheus Instance 1 and Prometheus Instance 2 can have corresponding database storage components. Figure 3 (Not shown in the image), Database Storage Component 1 can match the data to be monitored obtained by Prometheus Instance 1. If it is determined that the data to be monitored belongs to high-frequency query data, the monitoring results of the data to be monitored are stored in the target database. Similarly, Database Storage Component 2 can match the data to be monitored obtained by Prometheus Instance 2. If it is determined that the data to be monitored belongs to high-frequency query data, the monitoring results of the data to be monitored are stored in the target database. That is, the monitoring results of the data to be monitored are distributed and stored separately.
[0073] When a user initiates a data query request, the Query-frontend component can extract the data to be queried from the request. If the data is frequently queried, the query request is sent to the target database to retrieve the query results. If the data is not frequently queried, the query request is sent to the storage server to retrieve the results. By routing frequently queried data requests to the target database, the query efficiency for frequently queried data can be improved.
[0074] Corresponding to the monitoring system described above, this application also provides a monitoring method, see below. Figure 4 , Figure 4 This is a flowchart of a monitoring method in an embodiment of this application, which may include the following steps:
[0075] In step S410, the Prometheus instance monitors the monitored object and obtains the monitoring results of the data to be monitored related to the monitored object.
[0076] In step S420, the Sidecar component in the Thanos component stores the monitoring results of the data to be monitored to the storage server.
[0077] In step S430, the database storage component, upon determining that the data to be monitored belongs to a preset dataset, stores the monitoring results of the data to be monitored in the target database; wherein, the query frequency of data in the preset dataset is higher than the preset query frequency.
[0078] In step S440, after receiving a data query request, the first query component in the Thanos component extracts the data to be queried from the data query request. If the data to be queried belongs to a preset dataset, the data query request is sent to the target database to obtain the query results of the data to be queried from the target database.
[0079] Optionally, if there are multiple Prometheus instances, and each Prometheus instance has a corresponding Sidecar component;
[0080] The above monitoring methods also include:
[0081] Multiple Sidecar components use distributed locks to store the monitoring results of monitoring data obtained from multiple Prometheus instances to the storage server.
[0082] Optionally, the above monitoring methods also include:
[0083] After the first query component extracts the data to be queried from the data query request, if the data to be queried does not belong to the preset dataset, it sends the data query request to the storage server to obtain the query results of the data to be queried from the storage server.
[0084] Optionally, the Thanos component also includes a second query component; the above monitoring methods also include:
[0085] After the first query component extracts the data to be queried from the data query request, if the data to be queried does not belong to the preset dataset, it sends the data query request to the second query component.
[0086] The second query component sends a data query request to the server to obtain the query results of the data to be queried from the storage server, and then sends the query results to the first query component.
[0087] Optionally, the first query component is the query-frontend component.
[0088] Optionally, the query performance of the target database is higher than the default query performance.
[0089] The specific details of each step in the above method have been described in detail in the corresponding system, so they will not be repeated here.
[0090] In an exemplary embodiment of this application, an electronic device is also provided, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the monitoring method described in this exemplary embodiment.
[0091] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. It should be noted that... Figure 5 The electronic device 500 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0092] like Figure 5 As shown, the electronic device 500 includes a central processing unit 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage section 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for system operation. The central processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0093] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a local area network (LAN) card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.
[0094] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit 501, it performs various functions defined in the system of this application.
[0095] In this embodiment of the application, a computer-readable storage medium is also provided, on which a computer program is stored, and when the computer program is executed by a processor, it implements the above-described monitoring method.
[0096] It should be noted that the computer-readable storage medium shown in this application can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, radio frequency, etc., or any suitable combination thereof.
[0097] In this embodiment of the application, a computer program product is also provided, which, when run on a computer, causes the computer to execute the above-described monitoring method.
[0098] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0099] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A monitoring system, characterized by The method comprises: a Prometheus instance, a database storage component, and a Thanos component, the Thanos component comprising a first query component and a Sidecar component corresponding to the Prometheus instance; the Prometheus instance is configured to monitor a monitored object and obtain a monitoring result of to-be-monitored data related to the monitored object; the Sidecar component is configured to store the monitoring result of the to-be-monitored data to a storage server; the database storage component is configured to store the monitoring result of the to-be-monitored data to a target database if it is determined that the to-be-monitored data belongs to a preset data set, wherein a query frequency of data in the preset data set is higher than a preset query frequency; the first query component is configured to extract to-be-queried data from a data query request after receiving the data query request, and send the data query request to the target database to obtain a query result of the to-be-queried data from the target database if the to-be-queried data belongs to the preset data set.
2. The monitoring system of claim 1, wherein, The number of the Prometheus instances is multiple, and each Prometheus instance has a corresponding Sidecar component; a plurality of Sidecar components are configured to store monitoring results of monitoring data monitored by a plurality of Prometheus instances to the storage server in a distributed lock manner.
3. The monitoring system of claim 1, wherein, The first query component is further configured to extract to-be-queried data from the data query request, and send the data query request to the storage server to obtain a query result of the to-be-queried data from the storage server if the to-be-queried data does not belong to the preset data set.
4. The monitoring system of claim 1, wherein, The Thanos component further comprises a second query component; the first query component is configured to extract to-be-queried data from the data query request, and send the data query request to the second query component if the to-be-queried data does not belong to the preset data set; the second query component is configured to send the data query request to a server to obtain a query result of the to-be-queried data from the storage server, and send the query result to the first query component.
5. The monitoring system according to claim 3 or 4, characterized in that The first query component is a query-frontend component.
6. The monitoring system of claim 1, wherein, The query performance of the target database is higher than a preset query performance.
7. A monitoring method characterized by, The method comprises: a Prometheus instance monitors a monitored object and obtains a monitoring result of to-be-monitored data related to the monitored object; a Sidecar component in a Thanos component stores the monitoring result of the to-be-monitored data to a storage server; a database storage component stores the monitoring result of the to-be-monitored data to a target database if it is determined that the to-be-monitored data belongs to a preset data set, wherein a query frequency of data in the preset data set is higher than a preset query frequency; The first query component in the Thanos component extracts the data to be queried from the data query request after receiving the data query request, and sends the data query request to the target database if the data to be queried belongs to the preset data set, to obtain the query result of the data to be queried from the target database.
8. The monitoring method according to claim 7, characterized in that, The Thanos component includes a Sidecar component, and if the number of the Prometheus instances is multiple and each of the Prometheus instances has a corresponding Sidecar component. The method further includes: The multiple Sidecar components store the monitoring results of the monitoring data monitored by the multiple Prometheus instances to the storage server in a distributed lock manner.
9. An electronic device, comprising: The method further includes: The processor is configured to execute a computer program stored in the memory, and the computer program is configured to implement the steps of the method of claim 7 or 8 when executed by the processor.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is configured to implement the steps of the method of claim 7 or 8 when executed by the processor.
Citation Information
Patent Citations
Data monitoring control system, method and device, electronic equipment and storage medium
CN112130996A
Monitoring data query method and device, equipment, storage medium and program product
CN112860695A