CN115827380A - Cloud platform monitoring method and cloud platform monitoring system - Google Patents

Cloud platform monitoring method and cloud platform monitoring system Download PDF

Info

Publication number
CN115827380A
CN115827380A CN202211494107.7A CN202211494107A CN115827380A CN 115827380 A CN115827380 A CN 115827380A CN 202211494107 A CN202211494107 A CN 202211494107A CN 115827380 A CN115827380 A CN 115827380A
Authority
CN
China
Prior art keywords
query
index
database
target
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211494107.7A
Other languages
Chinese (zh)
Inventor
黄玉龙
李东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Aijieyun Technology Co ltd
Original Assignee
Shenzhen Aijieyun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Aijieyun Technology Co ltd filed Critical Shenzhen Aijieyun Technology Co ltd
Priority to CN202211494107.7A priority Critical patent/CN115827380A/en
Publication of CN115827380A publication Critical patent/CN115827380A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a cloud platform monitoring method and a cloud platform monitoring system, wherein an index tree, configuration information of indexes under each leaf node of the index tree, query tags of each level node in the index tree, connection information of each database in a data source and the like are pre-stored in a cache database. And after receiving the first query request, the query node acquires configuration information from the cache database according to the index identification of the target index carried by the first query request, generates a second query request according to the template statement indicated by the configuration information, sends the second query request to the target database, acquires the query result of the target index from the target database, and returns the query result to the user equipment. By adopting the scheme, a unified query interface is provided through the index tree, one interface is butted with various databases, namely cross-database index management is realized, and the purposes of reducing the monitoring cost of the cloud platform and improving the monitoring efficiency are realized.

Description

Cloud platform monitoring method and cloud platform monitoring system
Technical Field
The embodiment of the application relates to the technical field of cloud, in particular to a cloud platform monitoring method and a cloud platform monitoring system.
Background
In order to ensure the stable operation of the cloud platform, the operation state of the cloud platform needs to be continuously monitored in the operation process of the cloud platform, and if abnormity is found, an alarm needs to be given in time.
In a common cloud platform monitoring method, a collection plug-in is installed at each node, and is used to collect various hardware or software indexes in the operation process of the cloud platform, analyze the indexes and discover software and hardware faults in time.
However, different acquisition plug-ins can store acquired data in different databases, and access modes and query modes of different databases are different, so that monitoring of the cloud platform is time-consuming and labor-consuming.
Disclosure of Invention
The embodiment of the application provides a cloud platform monitoring method and a cloud platform monitoring system, an index tree is generated according to the service relation of indexes, a unified query interface is provided through the index tree, one interface is connected with multiple databases in a butt joint mode, the cloud platform monitoring cost is reduced, and the monitoring efficiency is improved.
In a first aspect, an embodiment of the present application provides a cloud platform monitoring method, which is applied to a query node, and the method includes:
receiving a first query request from user equipment, wherein the first query request at least carries an index identifier of a target index, the target index is located under a leaf node of an index tree, and the index tree is a tree structure model generated according to a service relationship of each index in a plurality of indexes;
acquiring configuration information of the target index from a cache database according to the index identifier, wherein the configuration information is at least used for indicating a template statement, and the template statement is used for indicating a mode of acquiring a query result of the target index;
generating a second query request according to the template statement;
sending the second query request to a target database to obtain a query result of the target index;
and sending the query result to the user equipment.
In a second aspect, an embodiment of the present application provides a cloud platform monitoring method, which is applied to a control node, and the method includes:
receiving a creation request mark from operation and maintenance equipment;
a platform monitoring system comprising:
a query cluster, comprising at least one query node, where the query node is configured to execute the obtaining of the target finger from the cache database according to the first aspect or the various possible implementation manners of the first aspect, where the creation request is used to indicate an index tree and configuration information of each index, where the index tree is a tree generated according to a business relationship of each index in multiple indexes
In a third aspect, an embodiment of the present application provides a method for configuring a tree structure with a hierarchical structure, where each leaf node of the index tree has configuration information of at least one index, and the target index is an index corresponding to an index identifier carried in the first query request. The index tree and configuration information of each index are stored in a cache database, so that a query node receives a first query request from user equipment and then monitors a cloud platform, the device is integrated on the query node, and the device comprises:
a receiving module, configured to receive a first query request from a user equipment, where the first query request at least carries an index identifier of a target index, the target index is located below a leaf node of an index tree, and the index tree is a tree-like structure model generated according to a service relationship of each index in multiple indexes;
the processing module is used for acquiring configuration information of the target index from a cache database according to the index identifier, wherein the configuration information is at least used for indicating a template statement, and the template statement is used for indicating a mode of acquiring a query result of the target index; generating a second query request according to the template statement;
and the sending module is used for sending the second query request to a target database to obtain a query result of the target index and sending the query result to the user equipment.
In a fourth aspect, an embodiment of the present application provides a cloud platform monitoring apparatus,
the apparatus is integrated on a control node, the apparatus comprising:
the system comprises a receiving and sending module, a processing module and a processing module, wherein the receiving and sending module is used for receiving a creating request from operation and maintenance equipment, the creating request is used for indicating an index tree and configuration information of each index, the index tree is a tree-shaped structure model generated according to the service relation of each index in a plurality of indexes, and each leaf node of the index tree is provided with at least one index;
and the processing module is used for storing the index tree and the configuration information of each index into a cache database so that the query node acquires the configuration information of a target index from the cache database after receiving a first query request from user equipment, wherein the target index is an index corresponding to an index identifier carried by the first query request.
According to the cloud platform monitoring method and the cloud platform monitoring system provided by the embodiment of the application, the index tree, the configuration information of the indexes under each leaf node of the index tree, the query tags of each level node in the index tree, the connection information of each database in the data source and the like are stored in the cache database in advance. And after receiving the first query request, the query node acquires configuration information from the cache database according to the index identification of the target index carried by the first query request, generates a second query request according to the template statement indicated by the configuration information, sends the second query request to the target database, acquires the query result of the target index from the target database, and returns the query result to the user equipment. By adopting the scheme, the index tree is generated according to the business relation of the indexes, the unified view of the meta-information across the database is established according to the grouping and layering relation of the indexes indicated by the index tree, the unified query interface is provided, each first query request from the user equipment corresponds to the unified query interface, the template statement is determined according to the index identification carried by the first query request, the template statement is packaged to obtain the second query request, the corresponding target database is queried, the unified query interface is provided through the index tree, one interface is in butt joint with multiple databases, namely, the index management across the database is realized, and the purposes of reducing the monitoring cost of the cloud platform and improving the monitoring efficiency are realized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an index tree in a cloud platform monitoring method provided in an embodiment of the present application;
fig. 2 is a schematic network architecture diagram of a cloud platform monitoring system provided in an embodiment of the present application;
fig. 3 is a diagram of a cloud platform monitoring method according to an embodiment of the present application;
FIG. 4 is another flow chart of a cloud platform monitoring method provided in the practice of the present application;
fig. 5 is a further flowchart of a cloud platform monitoring method provided in an embodiment of the present application;
fig. 6 is a schematic diagram of a cloud platform monitoring apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of another cloud platform monitoring apparatus according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Under the promotion of the development of cloud technology, the teams of cloud computing and cloud services are getting bigger and bigger. In order to ensure the stability of the cloud platform, physical hardware such as a machine room, a server, a switch and the like needs to be monitored; meanwhile, software such as a database, a message queue and distributed storage application software also needs to be monitored, software and hardware faults are found in time, and the hardware utilization rate is analyzed so as to reasonably plan the hardware. Monitoring of the cloud platform is an indispensable part of cloud operation and maintenance.
At present, monitoring modes of a cloud platform are various. For example, for mysql databases in cloud platforms, monitoring is typically done on a log basis; for some service servers, data is collected and monitored by running scripts. For another example, a collection plug-in is installed on the monitoring target, and the collection plug-in is used for collecting indexes of various hardware or software in the operation process of the cloud platform.
However, different acquisition plug-ins often store acquired data in different databases, and access modes and query modes of different databases are different. The current monitoring and querying system is usually only connected with one type of back-end database. Indexes inquired are scattered, and an integral unified view cannot be provided.
If different databases need to be queried, the monitoring system needs to be modified to adapt to the different databases, which is time-consuming, labor-consuming and has repeated work.
Therefore, how to uniformly manage and query the monitoring data dispersed in various databases is a problem to be solved urgently.
Based on this, the embodiment of the application provides a cloud platform monitoring method and a cloud platform monitoring system, which generate an index tree according to a service relation of indexes, provide a unified query interface through the index tree, realize that one interface is in butt joint with multiple databases, reduce the cloud platform monitoring cost and improve the monitoring efficiency.
First, terms in the embodiments of the present application will be explained.
Index tree: and generating a tree structure model according to the service relation of the indexes. For example, the index tree may be constructed from a business line, a product, an index group, and the like. The number of layers of the index tree is not limited in the embodiment of the application, and the number of layers is only logically reasonable.
Fig. 1 is a schematic structural diagram of an index tree in a cloud platform monitoring method provided in an embodiment of the present application. Referring to fig. 1, the index bag includes five layers, where the leftmost cloud platform is a root node, the rightmost leaf node is a leaf node, the middle node is a child node, and the root node, the child node and the leaf node are all referred to as hierarchy nodes hereinafter, and from left to right, a 1 st hierarchy node, a 2 nd hierarchy node, a 3 rd hierarchy node, a 4 th hierarchy node and a 5 th hierarchy node are sequentially provided, the 1 st hierarchy node is a root node, the 5 th hierarchy node is a leaf node, and the 2 nd hierarchy node, the 3 rd hierarchy node and the 4 th hierarchy node are child nodes.
In fig. 1, a proprietary cloud, an enterprise cloud, and a container cloud under a cloud platform can all be monitored by using the cloud platform monitoring method according to the embodiment of the present application, and with the development of the technology, other hierarchical nodes can be added under the cloud platform to provide more and more perfect data coverage and provide a richer index unified view.
Referring to fig. 1, although only one node is illustrated in each level of each layer in fig. 1, embodiments of the present application are not limited thereto. Taking the proprietary cloud as an example, there are 3 sub-nodes below the proprietary cloud, which are a cloud resource node, a paas resource node, and a platform resource node. Only one cloud resource node, paas resource node and platform resource node are shown in the figure. In fact, however, a cloud resource node may have multiple instances, each with its own project identification (project id); similarly, the paas resource node has multiple instances, the platform resource node also has multiple instances, each instance of the paas resource node has its own id, and each instance of the platform resource node has its own id. The user may specify which instance of the cloud resource node, which instance of the paas resource node, or the index of the leaf node under which instance of the platform resource node to query.
Indexes are as follows: and the data are used for measuring the running condition of the software or the hardware in the cloud platform. In the embodiment of the present application, one or more indexes are provided below each leaf node, and the indexes include, for example, total connection number, traffic bandwidth, CPU occupancy, memory occupancy, process number, and the like.
Configuration information of the index: and when the operation and maintenance personnel create the index, the index mark, the Chinese and English names, the template sentence, the result unit and other metadata information are filled in aiming at the index. Here, the index identification is also called a unique code (code), and each index has a unique code.
Template sentence: the method is used for indicating a mode of obtaining the query result corresponding to the index, and is used for screening out a first subset from the query tag set, wherein the first subset comprises one or more query tags. The query tag set contains query tags from one index to all level nodes between the root node. That is, when a user wants to query a target index, all query tags in the query tag set can be derived according to the position of the target index in the index tree and the index tree. The template sentence carries some label identifications and the like, and the first subset can be screened out from the query label set according to the label identifications.
And (5) querying the label: and the data filtering mode, the filtering condition and the like are used for indicating the index to be filtered when the index is queried. The operation and maintenance personnel configure query tags for each level node in advance, and one level node can have 0, 1 or more query tags. Indexes under the same level node generally have the same filtering condition when being queried. Referring to fig. 1, for example, the metrics under the cloud resource nodes may be filtered by project identifiers (project ids). As another example, metrics under a container cluster may be filtered by cluster identification (clusterid).
In the embodiment of the application, operation and maintenance personnel configure a filtering mode, a default filtering condition and the like in each level node in advance so as to obtain the query tag. If the filtering mode or the filtering condition of the corresponding query label under a child node is required to be modified, a query label with the same name as the query label of the parent node is created for the child node, and the filtering condition or the filtering mode and the like are configured for the query label. Referring to fig. 1, a parent node and a child node are two adjacent level nodes, for example, a level 2 node is a parent node, and a level 3 node is a child node; the 3 rd level node is a parent node, and the 4 th level node is a child node.
In addition, if a certain index has a dedicated query tag, the dedicated query tag is configured for the index.
Fig. 2 is a schematic network architecture diagram of a cloud platform monitoring system according to an embodiment of the present disclosure. Referring to fig. 2, the cloud platform monitoring system provided in the embodiment of the present application includes a query cluster 21, a control cluster 22, a cache database 23, a persistent database 24, a data source 25, a user device 26, and an operation and maintenance device 27. The query cluster 21 includes at least one query node 211, which is configured to respond to a first query request from the user device 26 to provide an external index query service. The number of query nodes 211 is positively correlated to the number of user devices 26 accessing the query cluster 21, i.e., the query nodes 211 can be horizontally expanded to support large-scale highly concurrent query requirements.
The control cluster 22 includes at least one control node 221, and is responsible for monitoring and managing the data source 25, creating the index tree, modifying the level nodes or indexes of the index tree, adding configuration information to each index, generating query tags for each level node of the index tree, and the like. In the process of taking charge of these operations, firstly, the operation and maintenance personnel add connection information of the data source 25 and the data source 25 supported by the control cluster 22 through the operation and maintenance device 27, and after performing connectivity verification on the data source 25, store the connection information of the data source 25 and the like in the cache database 23 and the persistent database 24. Then, an index tree is newly created on the control node 221, and after the index tree is created, the index tree can be modified, such as adding a level node, deleting a level node, and the like. After the index tree is created or modified, for each level node in the index tree, a query tag is configured for the level node, and one level node may have 0, 1 or more query tags. The operation and maintenance personnel also modify the query tags of the nodes of each level through the operation and maintenance equipment 27.
The cache database 23, also called a distributed cache, for example, redis Cluster, is used for caching connection information of each database in the database 25, configuration information of each index in the index tree, query tags of nodes in each level in the index tree, and the like. That is, the cloud platform monitoring system pushes the entire amount of metadata that may be used by the query index to the cache database 23. In extreme cases, such as when control cluster 22 is down, services may also be provided. In the process of querying the index of the cluster 21, all the required data is obtained from the cache database 23, and no data is stored, so that the query node 211 can be dynamically deployed according to the query scale to meet the requirement. For example, in large-scale query targeting, multiple query nodes 211 can be deployed to support large-scale highly-concurrent query requirements, and the horizontal expansion mode is simple.
The persistent data 24 is, for example, a Maria database or the like, and the contents stored in the cache database 23 are synchronously stored in the persistent database. When the cache database 23 is restarted due to a failure or the like, the latest data is pulled from the persistent database 24, and inconsistency between the data in the cache database 23 and the data in the persistent database 24 is avoided. For example, after the index tree, the configuration information of each index in the index tree, and the query tag of each level node of the index tree are created, these pieces of information are stored in the cache database, and simultaneously, the configuration information of each index in the index tree, and the query tag of each level node of the index tree are stored in the persistent database 24.
In addition, compared with the data retrieval from the persistent database 24, the data retrieval from the cache database 23 by the query node 211 is higher in performance, so that the cache database 23 can bear more first query requests of the query node, and the horizontal expansion of the query cluster is facilitated.
By adopting the scheme, various data required by the query indexes are stored in the persistent database, and the persistent database stores the latest and most correct data, so that the data can be obtained from the persistent database after the cache database is restarted, the inconsistency between the data in the cache database and the data in the persistent database is avoided, and the horizontal expansion capability of the query cluster is improved.
The data source 25 includes a plurality of databases in which data acquired by the acquisition plug-in or the like is stored. The access modes, query modes and the like of the databases are different. For example, data sources 25 include a victoriametrics database, a MYSQL database, a Prometheus database, an Influx database, and the like.
The user device 26, for example, a notebook, a monitoring large screen, a terminal device, and the like, is used to query which nodes in the cloud platform are to alarm, perform industry capacity planning on the cloud platform according to a query result, and the like.
By adopting the cloud platform monitoring method provided by the embodiment of the application to monitor the cloud platform, software and hardware faults and the like in the cloud platform can be found in time, the resource utilization rate and the system load can be monitored and analyzed, the resource planning can be better carried out, the utilization rate is improved, and the cost is saved.
Next, the embodiments of the present application will be described in detail based on the above explanations and the network architecture shown in fig. 2. For example, please refer to fig. 3, where fig. 3 is a diagram of a cloud platform monitoring method according to an embodiment of the present disclosure. This embodiment is described from the perspective of querying a node, and includes:
301. a first query request is received from a user device.
The first query request at least carries an index identifier of a target index, the target index is located under a leaf node of an index tree, and the index tree is a tree structure model generated according to a service relation of each index in a plurality of indexes.
One or more indexes are hung below each leaf node of the index tree, and the indexes are monitoring indexes used for monitoring the state of software of the cloud platform and can also be monitoring indexes used for monitoring the state of hardware of the cloud platform. The software of the cloud platform comprises a database, a message queue, distributed storage application software and the like; the hardware of the cloud platform comprises physical hardware such as a server and a switch.
In the embodiment of the application, a user wants to query a certain index (hereinafter referred to as a target index), and sends a first query request carrying an index identifier of the target index to a query node through user equipment. The index identifier is, for example, a code unique to the target index.
302. And acquiring the configuration information of the target index from a cache database according to the index identification.
The configuration information is at least used for indicating a template statement, and the template statement is used for indicating a mode for acquiring the query result of the target index.
And after receiving the first query request, the query node acquires the configuration information of the target index from the cache database according to the index identifier. The configuration information includes, for example, code of the target index, chinese and english names, template sentence, result unit, and other metadata information, and an associated database.
For example, the configuration information of a target index is shown as the following code:
Figure BDA0003964849200000081
according to the configuration information, the following steps are known:
the Chinese name of the target index is the storage cluster available capacity;
code is platform, ceph _ cluster, availability, capacity;
the english name is: a storage container available capacity;
the template statement is: max (business _ info _ total _ avail { $ region _ name, $ cluster _ type }) without (assets _ id);
the associated database is: databases 1 and 3, such as the databases 1 and 3 in the network architecture data source 25 shown in fig. 2, represent that data is pulled from the databases 1 and 3 to obtain target indexes when the target indexes are queried;
the default database is: a database 1.
In the above code, catalogID represents the leaf node where the target index is located. For example, referring to fig. 1 again, catalogid =4 denotes an ID of a leaf node in the index tree, the leaf node is, for example, a leaf node named as a disk under the 4 th level node, and the target index is an index of the disk.
303. Generating a second query request according to the template statement;
and after determining the template sentence, the query node judges whether the template sentence carries parameters of the query tag or not, and if the template sentence does not carry the parameters of the query tag, determines which database in the query data source 25 is according to a default rule, and filters according to a default filtering mode or filtering conditions, so as to construct a second query request. And if the template statement carries the parameters of the query tag, modifying the template statement according to the parameters of the query tag and the like, so as to construct a second query request. For example, in the query target shown by the above code, there is a portion in the "$ region _ name", "cluster _ type" style, and in the actual query, this portion needs to be replaced according to the configuration of the query tag.
In the embodiment of the application, the query node encapsulates the template statement according to parameters, default parameters and the like carried by a first query request to obtain a second query request, wherein the first query request corresponds to a uniform interface which is provided by a query cluster for providing monitoring service, that is, no matter which database a target index queried by a user relates to, the query node queries through the uniform external interface; the second query request is used for butting databases of different types, so that the back end is butted with the databases of different types, the details of the original index are shielded, the original data are protected, and the query mode of the databases in the interface butting data source is realized.
304. And sending the second query request to a target database to obtain a query result of the target index.
The target database may be a default database or a database identified based on the first query request, etc., and may be any one or more of the schema data sources 25 shown in fig. 2. And after the query node constructs a second query request, sending the second query request to the target database to obtain a query result of the target index.
305. And sending the query result to the user equipment.
Illustratively, the querying node sends a second query request to the target database. And the target database returns the query result to the query node according to the second query request. And after receiving the query result, the query node formats the query result and returns the query result to the user equipment.
According to the cloud platform monitoring method provided by the embodiment of the application, the index tree, the configuration information of the indexes under each leaf node of the index tree, the query tags of each level node in the index tree, the connection information of each database in the data source and the like are stored in the cache database in advance. And after receiving the first query request, the query node acquires configuration information from the cache database according to the index identification of the target index carried by the first query request, generates a second query request according to the template statement indicated by the configuration information, sends the second query request to the target database, acquires the query result of the target index from the target database, and returns the query result to the user equipment. By adopting the scheme, the index tree is generated according to the business relation of the indexes, the unified view of the meta-information across the database is established according to the grouping and layering relation of the indexes indicated by the index tree, the unified query interface is provided, each first query request from the user equipment corresponds to the unified query interface, the template statement is determined according to the index identification carried by the first query request, the template statement is packaged to obtain the second query request, the corresponding target database is queried, the unified query interface is provided through the index tree, one interface is in butt joint with multiple databases, namely, the index management across the database is realized, and the purposes of reducing the monitoring cost of the cloud platform and improving the monitoring efficiency are realized.
Optionally, in the above embodiment, in a process that the query node generates the second query request according to the template statement, the query tag set of the target index is obtained from the cache database, the index tree is stored in the cache database, and the query tag set includes query tags of all level nodes from the target index to the root node. And then generating the second query request according to the template statement and the query tag set.
Referring to fig. 1, the target index is an index under one leaf node. The index tree includes a plurality of hierarchical nodes, each of which may be one or more, for example, a proprietary cloud node includes a cloud resource node, a paas resource node, and a platform resource node, and the cloud resource node, the paas resource node, and the platform resource node each have one or more instances. Similarly, the child nodes of the cloud resource node include a cloud server, a GPU cloud server, a physical server, and the like, and the cloud server, the GPU cloud server, and the physical server each have one or more instances. The child nodes of the cloud server are disks, and the disks have one or more instances. Assuming that the target index is an index of an example of a disk, the query node may obtain a query tag set of the target index, including all query tags of the disk, all query tags of the cloud server, all query tags of the cloud resource, all query tags of the proprietary cloud, and all query tags of the cloud platform.
And after the query tag set is obtained, the query node encapsulates the template statement according to the query tag set so as to obtain a second query request. For example, the query node determines a field following a preset symbol, also called a placeholder, a placeholder field, etc., from the template statement, e.g., $. The field behind the placeholder is called a preset field, the preset field is, for example, a region _ name, a cluster _ type and the like, for each query tag, the query node determines whether the preset field region _ name exists in the code corresponding to the query tag, and if the preset field exists, the template statement is packaged according to the parameters related to the preset field to obtain a second query request. If the default field does not exist, the query tag is discarded.
By adopting the scheme, the query tag set of the target index is obtained according to the index tree, and then the template statement is packaged according to the query tag set to obtain the second query request, so that the purpose of accurately and quickly packaging the second query request is realized.
Optionally, in the above embodiment, in the process that the query node generates the second query request according to the template statement and the query tag set, a first subset is determined from the query tag set according to an identifier field indicated by the template statement, where the first subset includes the query tag corresponding to the identifier field. Then, for each query tag in the first subset, when the first query request also carries parameters of the query tag, modifying the template statement according to the parameters to obtain a replacement statement; and when the first query request does not carry the parameters of the query tag, modifying the target statement according to a default value indicated by the query tag to obtain a replacement statement. And finally, generating the second query request according to the replacement statement.
According to the above, it can be seen that: for example, there may be more than one instance of a cloud resource node, a cloud server is a child node of the cloud resource node, there may be more than one instance of the cloud server, a disk is a child node of the cloud server, and there may be more than one instance of the disk. And if the template statement does not carry any identification field, the query node encapsulates the template statement according to the parameters of all the query tags in the query tag set to obtain a second query request. And if the template statement also carries an identification field related to the query tag, screening the query tag in the query tag set to obtain a first subset. For example, the identification fields are region _ name, project _ id, resource _ id, or the like, the query node determines whether the configuration of the query tag in the query tag set includes these identification fields, and if any one of the identification fields is included, it indicates that the query tag belongs to the first subset.
And after the first subset is determined, for each query tag in the first subset, when the first query request also carries the parameters of the query tag, modifying the template statement according to the parameters to obtain a replacement statement. For example, the query statement is:
ecs_instance_cpu_cpu_util{$region_name,$project_id,$resource_id}
if the first query request carries the parameter a of project _ id, the query node replaces $ project _ id in the template statement with project _ id =: 'a'. Where "= -is an operator function (operator), which is obtained according to the filtering manner in the tag configuration of the query tag. Operator functions in the configuration of query tags include, but are not limited to =, |! -, =! And (= etc.).
And when the first query request does not carry the parameters of the query tag, modifying the target statement according to the default value indicated by the query tag to obtain a replacement statement.
For example, the first query request does not carry parameters of a region _ name and a resource _ id, and the query tag corresponding to the region _ name indicates that the default value is x, and the query tag corresponding to the resource _ id indicates that the default value is y, then the replacement statement is:
ecs_instance_cpu_cpu_util{region_name=~’x’,
project_id=~’a’,resource_id=~’y’}
and after the replacement statement is obtained, the query node continues to encapsulate the replacement statement according to other parameters and the like carried in the first query request, so that a second query request is obtained.
By adopting the scheme, the query node encapsulates the template statement according to the parameters of the query tag carried by the first query statement and the like, so that a second query request is obtained, the requirement for querying the target index according to the user requirement is met, the flexibility is high, and the query mode is simple.
Optionally, in the above embodiment, before the query node generates the second query request according to the template statement and the query tag set, the query tags in the query tag set are further sorted according to the index tree, and the query tags closer to the target index have higher priority. Then, obtaining a second subset according to the sorting, wherein the names of all the query tags contained in the second subset are the same and the priority is from low to high; and deleting the query tags except the query tag with the highest priority from the second subset, so that the name of each query tag contained in the query tag set is unique.
In the embodiment of the present application, each hierarchical node has 0, 1 or more query tags, and when a filtering manner or a filtering condition is desired to be modified for a child node of a parent node, a query tag having the same name as the query tag of the parent node may be created under the child node. For example, referring to fig. 1, for a cloud resource node and a cloud server, a parent node is the cloud resource node, and a child node is the cloud server. The cloud resource node is provided with an inquiry label A, a filtering mode a and a filtering condition b corresponding to the inquiry label A, when the filtering mode and the filtering condition of the child node of the cloud server need to be modified, the inquiry label A is created for the cloud server, but the inquiry table A corresponds to the filtering mode c and the filtering condition d. The cloud server is closer to the target index than the cloud resource node.
After receiving a first query request, the query node determines that a target index is an index under a leaf node disk according to an index identifier carried by the first query request. Therefore, the query label set of the target index can be determined according to the index tree. The query tags in the set of query tags include: the query labels of the cloud platform, the query labels of the proprietary cloud, the query labels of the cloud resource nodes, the query labels of the cloud server, the query labels of the disk and the like. The cloud resource node query tag comprises a query tag A, the query tag of the cloud server comprises a query tag A, and the priority of the query tag is sequentially increased from the cloud platform to the disk.
And after the query nodes sort the query tags in the query tag set from low to high in priority, acquiring a second subset, wherein the second subset comprises a query tag A of the cloud resource node and a query tag A of the cloud server, and the two query tags are homonymous tags. And then, the query node deletes the query tag A of the cloud resource node from the query tag set, and reserves the query tag A of the cloud server and other query tags with different names, so that the query tags in the query tag set have different names, namely the query tag names in the query tag set are unique.
By adopting the scheme, when the filtering mode or the filtering condition of a certain child node under a father node is modified, only one query tag with the same name as the query tag of the father node needs to be configured for the child node, and the modification mode is simple and flexible.
Optionally, in the above embodiment, when the query node generates the second query request according to the replacement statement, and when the first query request further carries an analysis manner supported by the target database, the analysis manner is added to the replacement statement to construct a modification statement. And then generating the second query request according to the modification statement.
Illustratively, the target database supports some special parameters, such as a convergence mode, an interpolation mode, and the like, and the query node constructs a final query statement according to the replacement statement, the parameter of the query tag in the first query request, the time parameter, the analysis mode supported by the target database, and the like, so as to obtain the second query request.
By adopting the scheme, the special analysis mode and the like supported by the target database are added in the replacement statement, so that the query of different types of databases is met, and the mode is simple and flexible.
Fig. 4 is another flowchart of a cloud platform monitoring method provided in this application. The present embodiment is explained from the perspective of a control node, and the present embodiment includes:
401. and receiving a creation request from the operation and maintenance equipment.
The creating request is used for indicating an index tree and configuration information of each index, the index tree is a tree structure model generated according to the business relation of each index in a plurality of indexes, and each leaf node of the index tree has at least one index.
In the embodiment of the application, an index tree, indexes, query tags and the like are created in advance and stored in a cache database. In the process of creating the index tree, the control node provides a creation interface for the operation and maintenance equipment, the operation and maintenance equipment displays the creation interface, and operation and maintenance personnel operate on the creation interface to create the index tree, the index and the like. After the index tree is created, operation and maintenance personnel can create an interface boundary index tree by creating the interface boundary index tree, such as adding hierarchy nodes, deleting hierarchy nodes, adding indexes, deleting indexes, modifying indexes and the like.
402. And storing the index tree and the configuration information of each index into a cache database, so that the query node obtains the configuration information of a target index from the cache database after receiving a first query request from user equipment, wherein the target index is an index corresponding to an index identifier carried by the first query request.
After the index tree and the configuration information of each index are created, the control node pushes the information to a persistent database and stores the information in the persistent database. In addition, the control node also encrypts the information and stores the information in the cache database after encryption. Therefore, when a user queries the target index, the query node acquires the configuration information and the like of the target index from the cache database, and does not locally store any data, so that the purpose of dynamically deploying the query node according to the query scale is achieved.
403. And storing the index tree and the configuration information of each index into a persistent database so as to pull the latest data from the persistent database when the cache database is restarted due to a fault and the like, thereby avoiding the inconsistency between the data in the cache database 23 and the data in the persistent database 24.
According to the cloud platform monitoring method provided by the embodiment of the application, the index tree, the configuration information of the indexes under each leaf node of the index tree and the like are stored in the cache database through the control node in advance. And after receiving the first query request, the query node acquires configuration information from the cache database and the like to construct a second query request, and further acquires a query result from the target data by using the second query request and returns the query result to the user equipment. By adopting the scheme, the control node stores configuration information and the like required by the query target index in the cache database, monitors the database in the data source and the like, so that the query node does not store any data, the cluster is conveniently expanded and queried according to the query scale, meanwhile, the query node is convenient to query different databases in the data source through a uniform query interface, one interface is in butt joint with multiple databases, and the purposes of reducing the monitoring cost of the cloud platform and improving the monitoring efficiency are achieved.
Optionally, in the above embodiment, after the index tree is created, the control node further receives a configuration request from the operation and maintenance device, where the configuration request is used to indicate query tags of nodes at each level in the index tree. And then storing the query tags of the nodes of each level in the index tree in the cache database.
After the control node creates the index tree, operation and maintenance personnel can also configure query labels aiming at the nodes of each level, and the query labels indicate a filtering mode, a filtering rule and the like. And the control node stores the query tags of the nodes of each hierarchy level in a cache database at the same time of storing the query tags in the persistent database.
By adopting the scheme, the query tags of the nodes of each level are stored in the cache database, so that required data can be obtained from the cache database when the query nodes query indexes, and the query nodes do not need to store any data, thereby being convenient for flexible expansion of the query cluster.
Optionally, in the above embodiment, after receiving the creation request from the operation and maintenance device, the control node further receives an editing request from the operation and maintenance device, where the editing request is used to request to modify the index under the leaf node of the index tree or add an index under the leaf node. And then, editing the indexes under the leaf nodes of the index tree according to the editing request.
After the control node creates the index tree and creates the configuration information for the indexes under the leaf nodes of the index tree, if a user wants to edit the indexes under a certain leaf node, the user performs operations such as adding, deleting or modifying on a user interface, and then sends an editing request to the control node through the operation and maintenance equipment, so that the indexes under the leaf nodes are edited.
After the indexes under the leaf nodes are edited, the control node pushes the edited indexes to the cache database so as to replace the indexes before editing in the cache database. Similarly, the control node pushes the edited indexes to the persistent database to replace the indexes before editing in the persistent database.
In addition, if the operation and maintenance personnel want to modify the index tree, such as adding a hierarchy node, deleting a hierarchy node, modifying a hierarchy node, and the like, the operation and maintenance personnel can also modify the index tree through the operation and maintenance equipment. After modification, the control node pushes the modified index tree to the persistent database and the cache database to replace the index tree before modification.
Similarly, the operation and maintenance personnel can call the query tags of the nodes of each level in the index tree through the operation and maintenance equipment, and modify the query tags, such as adding a query tag, deleting a query tag, adding a filtering condition to a certain query tag, modifying a filtering mode, and the like.
By adopting the scheme, operation and maintenance personnel can flexibly modify the index tree, modify the index, modify the query tag and the like, and the method has high flexibility and simple modification mode.
Optionally, in the above embodiment, the control node further obtains connection information of each database in the at least one database, and performs connectivity verification on each database. And then storing the connection information of the database passing the connectivity verification in the cache database.
In the embodiment of the application, before a user queries monitoring data through a uniform query interface by using a query interface, a control node needs to complete some configuration work, such as creating an index tree, creating configuration information of an index, creating a query tag, and the like, and also needs to complete configuration of a database. Referring to fig. 2, the data source 25 includes a plurality of databases, where the databases support the cloud platform monitoring method of the present application, and the control node obtains connection information of the databases in advance, performs connectivity verification on each database according to the connection information, and pushes the connection information of the databases that pass the connectivity verification to the persistent database and the cache database, so that the persistent database and the cache database store the connection information of the databases. Therefore, after the query node receives the first query request and determines the target database from the data source, the connection information of the target database can be obtained from the cache database, and network connection is established with the target database.
By adopting the scheme, the control node checks the connectivity of the database in advance, and stores the connection information of the database which passes the connectivity check in the cache database, so that the query node can establish network connection with the target database quickly in the index query process, and the query efficiency is improved.
Optionally, in this embodiment of the present application, the query of the index mainly relates to two query scenarios, one is a query of instantaneous data, and the other is a query of range data. The only difference between these two queries is: and returning a key value pair to the user equipment by the query node during the instant query, wherein the key is a timestamp, and a time point is transmitted in the first query request. When the range is inquired, the inquiry node returns a group of key value pairs, and correspondingly, a time period and a step length are transmitted in the first inquiry request.
For the above characteristics, in the embodiment of the present application, the first query request at least carries an index identifier of the target index. Optionally, the query tag may also carry parameters, time points or time ranges and step lengths corresponding to the query tag, and an analysis manner supported by the data source, where the analysis manner includes, but is not limited to, a convergence manner, an interpolation manner, and the like. The query result returned by the query node to the user equipment includes a timestamp, a value corresponding to the timestamp (i.e., a query result), and the like.
In the following, the above cloud platform monitoring method is described in detail by taking range data query and a target database as victoria metrics as an example. For example, please refer to fig. 5, fig. 5 is another flowchart of a cloud platform monitoring method according to an embodiment of the present application. The present embodiment is illustrated from the perspective of user equipment, query nodes, cache database, and target database interaction. The embodiment comprises the following steps:
501. the user equipment sends a first query request to a query node.
The first query request at least carries an index identifier of a target index. The first query request is, for example, as follows:
Figure BDA0003964849200000161
the information indicated by the first query request is as follows:
the index mark is: ecs, CPU, util, which represents a CPU utilization index;
the query tag comprises a region _ name, project _ id and resource _ id, parameters of HCI, a and b respectively represent an instance b below an item a in a query data center HCI in the database 1. For example, referring to fig. 1, a proprietary cloud has a plurality of platform resources, one of the platform resources is, for example, a data center HCI. Under the data center HCI, there are a plurality of platform devices, one of which is item a, and under item a, there are a plurality of CPU monitoring items, one of which is instance b. The database 1 is, for example, victoria metrics.
The starting time of the time range is 2022-08-15 00, and the ending time is 2022-09-1500;
the step size is 1 hour, i.e. one point per hour, and the results are averaged over one hour.
According to the above, it can be seen that: the first query request indicates that the CPU utilization rate index of the example b below the data center HCI project a is queried under the database 1, the monitoring time is one month, and the monitoring data is captured once per hour.
502. And the query node sends an acquisition request carrying the index identifier to the cache database.
503. The query node receives the fetch response from the cache database.
In steps 502-503, the query node obtains the configuration information of the target index from the cache database according to the index identifier. The configuration information includes Chinese and English names of the target indexes, template sentences, result units, associated databases, default databases and the like, and the default database is often one of the associated databases. For example, in the configuration information described in the foregoing step 302, the associated databases of one index are database 1 and database 3, and the default database is database 1. That is, when the target index is queried, the database 1 is queried by default. When the first query request indicates a database, if the first query request indicates the database 1, querying the database 1; if the database 3 is indicated, the database 3 is queried. If the databases other than the database 1 and the database 3 are indicated, the databases are not matched, and the query node feeds back feedback information that the databases cannot be matched to the user equipment.
504. And the query node acquires the connection information of the target database.
The first query request in step 501 indicates that the target database is database 1, and since the database indicated by the first query request is database 1 in step 501, the query node obtains the connection information of database 1 from the cache database.
505. The querying node sends a connection request to the target database.
506. The querying node receives the connection response from the target database.
In steps 505 and 506, the query node checks whether the target database exists, whether the target database can be connected, and the like. Step 507 is performed only after successful connection establishment with the target database; and if the target database does not exist, the connection fails and the like, the query node returns feedback information which cannot establish network connection with the target database to the user equipment.
According to the above, it can be seen that: in the embodiment of the application, when the first query request carries the identifier of the target database and the target database is one of the databases indicated by the configuration information, the connection information of the target database is acquired from the cache database, and network connection is established with the target database according to the connection information.
In addition, when the first query request does not carry the identifier of the target database, determining the target database according to the configuration information, acquiring the connection information of the target database from the cache database, and establishing network connection with the target database according to the connection information. For example, if the first query request in step 501 does not indicate the target database, the query node determines a default database according to the configuration information of the target index, uses the default database as the target database, and obtains the connection information of the target database from the cache database.
By adopting the scheme, the query node determines the target database according to the first query request and the configuration information and acquires the connection information from the cache database, so that network connection is established with the target database, and the query efficiency of querying the target index is improved.
507. The querying node constructs a second query request.
Firstly, the query node acquires a template statement according to the configuration information of the target index. Assume that the template statements obtained are as follows:
ecs_instance_cpu_cpu_util{$region_name,$project_id,$resource_id}
and secondly, the query node acquires a query label set of the target index, and de-duplicates the homonymous labels in the query label set, so that the unique name of each query label in the query label set is ensured.
Then, an alternative statement is determined from the template statement and the set of query tags.
In this step, when the first query request further carries the parameters of the query tag, the template statement is modified according to the parameters to obtain a replacement statement. And when the first query request does not carry the parameters of the query tag, modifying the target statement according to the default value indicated by the query tag to obtain a replacement statement.
Exemplarily, a query node replaces a condition formed by a query tag in a template statement, and if a first query request carries a parameter of the query tag, parameter replacement is performed; otherwise, setting the parameters of the query tag to default values.
In step 501, the first query request carries parameters of the query tag, that is, the query tag includes a region _ name, project _ id, and resource _ id, and the parameters are HCI, a, and b, respectively, and the query node performs parameter replacement, so that the obtained replacement statement is as follows:
ecs_instance_cpu_cpu_util{region_name=~’HCI’,project_id=~’a’,resourc eid=~’b’}
it should be noted that the parameter in the configuration of the query tag is the inner field, and the configuration of the query tag further includes an operator function, i.e. a tag matching method, including but not limited to =, |! -, =! And (= etc.).
In the process of generating the replacement statement, the outward field in the template statement needs to be modified into the inward field, as described above, the inward field reakey included in the replacement statement is resource, and the outward field included in the template statement is resource _ id. This is because when the target index is queried, the internal field and the external field of the instance b are not consistent, the reakey of the internal field is resource id, and the external field is resource _ id. Therefore, when generating the replacement statement, the query node further modifies the outward field as resource _ id in the template statement into the inward field as resource. In addition, the template statement is modified by an operator function in the configuration of the query tag.
Next, the replacement statement is modified.
In step 501, the first query request further carries a convergence function, a grouping function, a step length, and the like, so that the query node continues to modify the replacement statement to obtain the convergence statement. The convergence statement is as follows:
avg_over_time(ecs_instance_cpu_cpu_util{region_name=~’HCI’,project_id=~’a’,resourceid=~’b’}[3600])
finally, the convergence statement is modified.
In the process of obtaining the replacement statement, the external field in the template statement is modified into the internal field, and certain conversion is performed. Therefore, the aggregation statement needs to be rewritten, so that the query node modifies the internal field into the external field after acquiring the query result from the target database. The modified convergence statement is as follows:
label_replace(avg_over_time(ecs_instance_cpu_cpu_util{region_name=~’HCI’,project_id=~’a’,resourceid=~’b’}[3600])
,"resource_id","$1","resourceid","(.*)")
508. and the query node sends a second query request to the target database to request to obtain a query result.
509. The query node receives a query result from the target database.
510. And the query node returns a query result to the user equipment.
Illustratively, the query node formats the query structure, constructs a return result with a uniform format, and sends the return result to the user equipment.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Fig. 6 is a schematic view of a cloud platform monitoring apparatus according to an embodiment of the present application. The cloud platform monitoring apparatus 600 is, for example, integrated on any query end node in a query cluster, and the cloud platform monitoring apparatus 600 includes: a receiving module 61, a processing module 62 and a sending module 63.
A receiving module 61, configured to receive a first query request from a user equipment, where the first query request at least carries an index identifier of a target index, the target index is located below a leaf node of an index tree, and the index tree is a tree-like structure model generated according to a service relationship of each index in multiple indexes;
a processing module 62, configured to obtain configuration information of the target indicator from a cache database according to the indicator identifier, where the configuration information is at least used to indicate a template statement, and the template statement is used to indicate a manner of obtaining a query result of the target indicator; generating a second query request according to the template statement;
a sending module 63, configured to send the second query request to a target database to obtain a query result of the target indicator, and send the query result to the user equipment.
In a possible implementation manner, when the processing module 62 generates the second query request according to the template statement, the processing module is configured to obtain a query tag set of the target metric from a cache database, where the metric tree is stored in the cache database, and the query tag set includes query tags of all level nodes between the target metric and a root node; and generating the second query request according to the template statement and the query tag set.
In a possible implementation manner, when the processing module 62 generates the second query request according to the template statement and the query tag set, the processing module is configured to determine a first subset from the query tag set according to an identifier field indicated by the template statement, where the first subset includes the query tag of the identifier field; for each query tag in the first subset, when the first query request further carries a parameter of the query tag, modifying the template statement according to the parameter to obtain a replacement statement; when the first query request does not carry the parameters of the query tag, modifying the target statement according to a default value indicated by the query tag to obtain a replacement statement; and generating the second query request according to the replacement statement.
In a possible implementation manner, before the processing module 62 generates the second query request according to the template statement and the query tag set, the processing module is further configured to rank the query tags in the query tag set according to the index tree, where the query tags closer to the target index have higher priority; obtaining a second subset according to the sorting, wherein the names of all inquiry labels contained in the second subset are the same, and the priority is from low to high; and deleting the query tags except the query tag with the highest priority from the second subset, so that the query tag names contained in the query tag set are unique.
In a possible implementation manner, when the processing module 62 generates the second query request according to the replacement statement, the processing module is configured to add the analysis manner to the replacement statement to construct a modification statement when the first query request further carries an analysis manner supported by the target database; and generating the second query request according to the modification statement.
In a possible implementation manner, before the sending module 63 sends the second query request to a target database to obtain a query result of the target index, the processing module 62 is further configured to obtain connection information of the target database from the cache database when the first query request carries an identifier of the target database and the target database is one of the databases indicated by the configuration information, and establish a network connection with the target database according to the connection information; when the first query request does not carry the identifier of the target database, determining the target database according to the configuration information, acquiring the connection information of the target database from the cache database, and establishing network connection with the target database according to the connection information.
The cloud platform monitoring device provided by the embodiment of the application can execute the action of querying the node in the above embodiments, and the implementation principle and the technical effect are similar, and are not described herein again.
Fig. 7 is a schematic diagram of another cloud platform monitoring apparatus according to an embodiment of the present application. The cloud platform monitoring apparatus 700 is, for example, integrated on a control node in a control cluster, and the cloud platform monitoring apparatus 700 includes: a transceiver module 71 and a processing module 72.
A transceiver module 71, configured to receive a creation request from an operation and maintenance device, where the creation request is used to indicate an index tree and configuration information of each index, the index tree is a tree-like structure model generated according to a service relationship of each index in multiple indexes, and each leaf node of the index tree has at least one index;
the processing module 72 is configured to store the index tree and the configuration information of each index in a cache database, so that the query node obtains the configuration information of a target index from the cache database after receiving a first query request from a user equipment, where the target index is an index corresponding to an index identifier carried in the first query request.
In a possible implementation manner, the transceiver module 71 is further configured to receive a configuration request from the operation and maintenance device, where the configuration request is used to indicate query tags of nodes at different levels in the index tree;
the processing module 72 is further configured to store the query tag of each level node in the index tree in the cache database.
In a possible implementation manner, after receiving the creation request from the operation and maintenance device, the transceiver module 71 is further configured to receive an editing request from the operation and maintenance device, where the editing request is used to request to modify the indexes under the leaf nodes of the index tree or add new indexes under the leaf nodes;
the processing module 72 is further configured to edit the indicator under the leaf node of the indicator tree according to the edit request.
In a possible implementation manner, the processing module 72 is further configured to obtain connection information of each database in at least one database; performing connectivity verification on each database; and storing the connection information of the database passing the connectivity verification in the cache database.
In a possible implementation manner, the processing module 72 is further configured to store the index tree and the configuration information of each index in a persistent database, so that the cache database obtains the configuration information of the index tree and each index from the persistent database after being restarted.
The cloud platform monitoring device provided by the embodiment of the application can execute the actions of the control nodes in the above embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 8, the electronic device 800 is, for example, a query node in the query cluster or a control node in the control cluster, and the electronic device 800 includes:
a processor 81 and a memory 82;
the memory 82 stores computer instructions;
the processor 81 executes the computer instructions stored by the memory 82, so that the processor 81 executes the cloud platform monitoring method implemented by the query node or the control node as described above.
For a specific implementation process of the processor 81, reference may be made to the above method embodiments, which implement the principle and the technical effect similarly, and details of this embodiment are not described herein again.
Optionally, the electronic device 800 further comprises a communication component 83. The processor 81, the memory 82, and the communication section 83 may be connected by a bus 84.
The embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored, and when the computer instructions are executed by a processor, the computer instructions are used to implement the cloud platform monitoring method implemented by the query node or the control node.
Embodiments of the present application further provide a computer program product, where the computer program product includes a computer program, and when executed by a processor, the computer program implements the cloud platform monitoring method implemented by the query node or the control node as described above.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (12)

1. A cloud platform monitoring method is applied to a query node, and comprises the following steps:
receiving a first query request from user equipment, wherein the first query request at least carries an index identifier of a target index, the target index is located under a leaf node of an index tree, and the index tree is a tree structure model generated according to a service relationship of each index in a plurality of indexes;
acquiring configuration information of the target index from a cache database according to the index identifier, wherein the configuration information is at least used for indicating a template statement, and the template statement is used for indicating a mode of acquiring a query result of the target index;
generating a second query request according to the template statement;
sending the second query request to a target database to obtain a query result of the target index;
and sending the query result to the user equipment.
2. The method of claim 1, wherein generating a second query request from the template statement comprises:
acquiring a query tag set of the target index from a cache database, wherein the index tree is stored in the cache database, and the query tag set comprises query tags of all level nodes from the target index to a root node;
and generating the second query request according to the template statement and the query tag set.
3. The method of claim 2, wherein generating the second query request from the template statement and the set of query tags comprises:
determining a first subset from the query tag set according to the identification field indicated by the template statement, wherein the first subset comprises the query tag of the identification field;
for each query tag in the first subset, when the first query request further carries a parameter of the query tag, modifying the template statement according to the parameter to obtain a replacement statement; when the first query request does not carry the parameters of the query tag, modifying the target statement according to a default value indicated by the query tag to obtain a replacement statement;
and generating the second query request according to the replacement statement.
4. The method of claim 2, wherein prior to generating the second query request from the template statement and the set of query tags, further comprising:
sequencing the query tags in the query tag set according to the index tree, wherein the query tags closer to the target index have higher priority;
obtaining a second subset according to the sorting, wherein the names of all inquiry labels contained in the second subset are the same, and the priority is from low to high;
and deleting the query tags except the query tag with the highest priority from the second subset, so that the query tag names contained in the query tag set are unique.
5. The method of claim 3, wherein the generating the second query request according to the replacement statement comprises:
when the first query request also carries an analysis mode supported by the target database, adding the analysis mode to the replacement statement to construct a modification statement;
and generating the second query request according to the modification statement.
6. The method according to any one of claims 1 to 5, wherein before sending the second query request to the target database to obtain the query result of the target index, the method further comprises:
when the first query request carries the identifier of the target database and the target database is one of the databases indicated by the configuration information, acquiring the connection information of the target database from the cache database, and establishing network connection with the target database according to the connection information;
when the first query request does not carry the identifier of the target database, determining the target database according to the configuration information, acquiring the connection information of the target database from the cache database, and establishing network connection with the target database according to the connection information.
7. A cloud platform monitoring method is applied to a control node, and comprises the following steps:
receiving a creation request from operation and maintenance equipment, wherein the creation request is used for indicating an index tree and configuration information of each index, the index tree is a tree-shaped structure model generated according to the business relation of each index in a plurality of indexes, and each leaf node of the index tree has at least one index;
and storing the index tree and the configuration information of each index into a cache database, so that the query node obtains the configuration information of a target index from the cache database after receiving a first query request from user equipment, wherein the target index is an index corresponding to an index identifier carried by the first query request.
8. The method of claim 7, further comprising:
receiving a configuration request from the operation and maintenance equipment, wherein the configuration request is used for indicating query tags of nodes of each level in the index tree;
and storing the query tags of the nodes of each level in the index tree in the cache database.
9. The method of claim 7, wherein after receiving the creation request from the operation and maintenance device, further comprising:
receiving an editing request from the operation and maintenance equipment, wherein the editing request is used for requesting to modify indexes under leaf nodes of the index tree or newly add indexes under the leaf nodes;
and editing the indexes under the leaf nodes of the index tree according to the editing request.
10. The method according to any one of claims 7 to 9, further comprising:
acquiring connection information of each database in at least one database;
performing connectivity verification on each database;
and storing the connection information of the database passing the connectivity verification in the cache database.
11. The method according to any one of claims 7 to 9, further comprising:
and storing the configuration information of the index tree and each index into a persistent database, so that the configuration information of the index tree and each index is obtained from the persistent database after the cache database is restarted.
12. A cloud platform monitoring system, comprising:
a query cluster comprising at least one query node for performing the method of any one of claims 1 to 6;
control cluster comprising at least one control node for performing the method according to any of claims 7 to 11.
CN202211494107.7A 2022-11-25 2022-11-25 Cloud platform monitoring method and cloud platform monitoring system Pending CN115827380A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211494107.7A CN115827380A (en) 2022-11-25 2022-11-25 Cloud platform monitoring method and cloud platform monitoring system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211494107.7A CN115827380A (en) 2022-11-25 2022-11-25 Cloud platform monitoring method and cloud platform monitoring system

Publications (1)

Publication Number Publication Date
CN115827380A true CN115827380A (en) 2023-03-21

Family

ID=85531773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211494107.7A Pending CN115827380A (en) 2022-11-25 2022-11-25 Cloud platform monitoring method and cloud platform monitoring system

Country Status (1)

Country Link
CN (1) CN115827380A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116931529A (en) * 2023-09-14 2023-10-24 深圳市华科科技有限公司 Intelligent monitoring method and system for industrial production equipment
CN117390015A (en) * 2023-09-27 2024-01-12 希维科技(广州)有限公司 Method and device for storing battery passport and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116931529A (en) * 2023-09-14 2023-10-24 深圳市华科科技有限公司 Intelligent monitoring method and system for industrial production equipment
CN117390015A (en) * 2023-09-27 2024-01-12 希维科技(广州)有限公司 Method and device for storing battery passport and storage medium

Similar Documents

Publication Publication Date Title
US12003572B1 (en) Two-way replication of search node configuration files using a mediator node
US11757720B2 (en) Distributed computing dependency management system
US11809405B2 (en) Generating and distributing delta files associated with mutable events in a distributed system
US11799728B2 (en) Multistage device clustering
US10853124B2 (en) Managing user data in a multitenant deployment
US8504733B1 (en) Subtree for an aggregation system
US20210029144A1 (en) Identifying a cyber-attack impacting a particular asset
US8285800B2 (en) Service model creation using monitored data of the performance management tool
CN115827380A (en) Cloud platform monitoring method and cloud platform monitoring system
US8041683B1 (en) Methods and apparatus for locating network logs
US10169434B1 (en) Tokenized HTTP event collector
US11829381B2 (en) Data source metric visualizations
US20190052531A1 (en) Systems and methods for service mapping
US11822433B2 (en) Qualification parameters for captain selection in a search head cluster
US11841834B2 (en) Method and apparatus for efficient synchronization of search heads in a cluster using digests
US7783743B1 (en) Methods and apparatus for processing electronic mail-related data
US20210279251A1 (en) Disaster recovery in a clustered environment using generation identifiers
US20070011299A1 (en) System and method for using machine-readable meta-models for interpreting data models in a computing environment
CN117389908B (en) Dependency analysis method, system and medium for interface automation test case
US20240007876A1 (en) Restoration of a network slice
US20230409568A1 (en) Monitoring metadata synchronization and aggregation
US20240232219A9 (en) Data source visualizations
CN116301952A (en) Software package updating method, device, system, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination