Configuration management database verification method, device and readable storage medium
By obtaining the target process identification information on the server and using cloud product process deployment rules to verify the corresponding relationship, the problem of accuracy and comprehensiveness of CMDB information verification is solved, and an automated and efficient verification process is realized.
Patent Information
- Application Number
- CN202010468298.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-28
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2040-05-28
AI Technical Summary
In the existing technology, the verification of information recorded in the configuration management database (CMDB) relies on manual operations, which cannot guarantee the accuracy and comprehensiveness of the information.
By obtaining the identification information of the target process running on the server, the corresponding relationship with the server is determined from the preset cloud product process deployment rule library, and the process deployment rules are used to verify and filter out the unestablished corresponding relationships to generate an accurate correspondence list. Verify the relationships recorded in the CMDB.
It improves the accuracy and comprehensiveness of verification of information recorded in CMDB, reduces manual errors, and improves verification efficiency.
Smart Images

Figure CN111625528B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a verification method, device and readable storage medium for a configuration management database. Background Art
[0002] Cloud products are various cloud service subsystems divided by cloud platforms or cloud service providers according to functional differences, such as cloud servers CVM (Cloud Virtual Machine), cloud hard disks CBS (Cloud Block Storage), virtual networks VPC (Virtual Private Cloud), etc. During the operation of cloud products, the operation and maintenance system needs to record the servers used by them. It is generally said that there is a corresponding relationship between cloud products and the servers used.
[0003] At present, a configuration management database (CMDB) is often used to record the correspondence between cloud products and servers. The information recorded by the CMDB system is generally configured by the operation and maintenance personnel in the operation and maintenance workflow. Therefore, the information recorded by the CMDB system often needs to be verified and corrected. In the prior art, the verification of information recorded in the CMDB system is also manually processed regularly by the operation and maintenance personnel. However, the above manual verification method cannot guarantee the accuracy and comprehensiveness of the verification of the information recorded in the CMDB. Summary of the invention
[0004] The purpose of this application is to solve at least one of the above technical defects. The technical solutions provided by the embodiments of this application are as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for verifying a configuration management database, comprising:
[0006] Obtain identification information of at least one target process running on each server managed by a configuration management database CMDB;
[0007] Based on the identification information of each target process running on each server, determine the cloud product corresponding to the server and the process deployment rule of the cloud product corresponding to the server from a preset cloud product process deployment rule base, wherein the preset cloud product process deployment rule base stores the identification information and process deployment rules of the processes included in each cloud product;
[0008] Based on the correspondence between each server and each cloud product, a first correspondence list of the server is obtained, and the first correspondence list is verified using the process deployment rules of the cloud product that has a correspondence with the server, and the correspondences that are not established in the first correspondence list are filtered out to obtain a second correspondence list of the server;
[0009] Based on the second correspondence list of each server, the correspondence between each cloud product and server recorded in the CMDB is verified.
[0010] In an optional embodiment of the present application, obtaining identification information of at least one target process running on each server managed by a configuration management database CMDB includes:
[0011] The identification information of all processes running on each server reported by an agent set on the server is obtained, and the identification information of the processes belonging to the preset process blacklist is filtered out to obtain the identification information of at least one target process running on the server.
[0012] In an optional embodiment of the present application, based on the identification information of each target process running on each server, determining a cloud product corresponding to the server from a preset cloud product process deployment rule library includes:
[0013] For each server, compare the identification information of each target process running on the server with the identification information of the processes included in each cloud product in the preset cloud product process deployment rule library;
[0014] A cloud product including at least one process having the same identification information as the target process is determined as a cloud product having a corresponding relationship with the server.
[0015] In an optional embodiment of the present application, the first correspondence list is verified using the process deployment rules of the cloud product corresponding to each server, including:
[0016] If the process deployment rule of the cloud product corresponding to each server is that all processes included in the cloud product run on the same server, determine whether the target process running on the server includes all processes included in the cloud product. If so, the corresponding relationship between the server and the cloud product is established; if not, the corresponding relationship between the server and the cloud product is not established;
[0017] If the process deployment rule of the cloud product that has a corresponding relationship with each server is that the cloud product is not deployed together with other cloud products on the same server, then the number of corresponding relationships in the first corresponding relationship list of the server is determined. If it is a preset number, the corresponding relationship between the server and the cloud product is established; if it is not a preset number, the corresponding relationship between the server and the cloud product is not established.
[0018] In an optional embodiment of the present application, based on the second correspondence list of each server, the correspondence between each cloud product and the server recorded in the CMDB is verified, including:
[0019] Aggregating the correspondences in the second relationship lists of the servers by cloud product to obtain a third correspondence list, wherein each cloud product in the third correspondence list has at least one server that has a correspondence with the cloud product;
[0020] Based on the third correspondence list, the correspondence between each cloud product and server recorded in the CMDB is verified.
[0021] In an optional embodiment of the present application, based on the third correspondence list, the correspondence between each cloud product and the server recorded in the CMDB is verified, including:
[0022] The correspondence between each cloud product and server recorded in the CMDB is compared with the correspondence between each cloud product and server in the third correspondence list. If the comparison results of the correspondence between the same cloud product and the server are the same, the correspondence between the cloud product and the server recorded in the CMDB is established; otherwise, the correspondence between the cloud product and the server recorded in the CMDB is not established.
[0023] In an optional embodiment of the present application, based on the second correspondence list of each server, the correspondence between each cloud product and the server recorded in the CMDB is verified, including:
[0024] The correspondence between each cloud product and the server recorded in the CMDB is verified based on the second correspondence list of each server at each preset time interval, and a corresponding verification log is generated based on the invalid correspondence.
[0025] In a second aspect, an embodiment of the present application provides a verification device for a configuration management database, including:
[0026] A target process acquisition module is used to acquire identification information of at least one target process running on each server managed by the configuration management database CMDB;
[0027] A process deployment rule acquisition module, used to determine, based on the identification information of each target process running on each server, a cloud product corresponding to the server and a process deployment rule of the cloud product corresponding to the server from a preset cloud product process deployment rule library, wherein the preset cloud product process deployment rule library stores identification information and process deployment rules of processes included in each cloud product;
[0028] A first verification module is used to obtain a first correspondence list of the server based on the correspondence between each server and each cloud product, and verify the first correspondence list using the process deployment rules of the cloud product that has a correspondence with the server, filter out the correspondence in the first correspondence list that is not established, and obtain a second correspondence list of the server;
[0029] The second verification module is used to verify the correspondence between each cloud product and the server recorded in the CMDB based on the second correspondence list of each server.
[0030] In an optional embodiment of the present application, the target process acquisition module is specifically used to:
[0031] The identification information of all processes running on each server reported by an agent set on the server is obtained, and the identification information of the processes belonging to the preset process blacklist is filtered out to obtain the identification information of at least one target process running on the server.
[0032] In an optional embodiment of the present application, the process deployment rule acquisition module is specifically used to:
[0033] For each server, compare the identification information of each target process running on the server with the identification information of the processes included in each cloud product in the preset cloud product process deployment rule library;
[0034] A cloud product including at least one process having the same identification information as the target process is determined as a cloud product having a corresponding relationship with the server.
[0035] In an optional embodiment of the present application, the first verification module is specifically used to:
[0036] If the process deployment rule of the cloud product corresponding to each server is that all processes included in the cloud product run on the same server, determine whether the target process running on the server includes all processes included in the cloud product. If so, the corresponding relationship between the server and the cloud product is established; if not, the corresponding relationship between the server and the cloud product is not established;
[0037] If the process deployment rule of the cloud product that has a corresponding relationship with each server is that the cloud product is not deployed together with other cloud products on the same server, then the number of corresponding relationships in the first corresponding relationship list of the server is determined. If it is a preset number, the corresponding relationship between the server and the cloud product is established; if it is not a preset number, the corresponding relationship between the server and the cloud product is not established.
[0038] In an optional embodiment of the present application, the second verification module is specifically used to:
[0039] Aggregating the correspondences in the second relationship lists of the servers by cloud product to obtain a third correspondence list, wherein each cloud product in the third correspondence list has at least one server that has a correspondence with the cloud product;
[0040] Based on the third correspondence list, the correspondence between each cloud product and server recorded in the CMDB is verified.
[0041] In an optional embodiment of the present application, the second verification module is further used to:
[0042] The correspondence between each cloud product and server recorded in the CMDB is compared with the correspondence between each cloud product and server in the third correspondence list. If the comparison results of the correspondence between the same cloud product and the server are the same, the correspondence between the cloud product and the server recorded in the CMDB is established; otherwise, the correspondence between the cloud product and the server recorded in the CMDB is not established.
[0043] In an optional embodiment of the present application, the second verification module is further used to:
[0044] The correspondence between each cloud product and the server recorded in the CMDB is verified based on the second correspondence list of each server at each preset time interval, and a corresponding verification log is generated based on the invalid correspondence.
[0045] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor;
[0046] A computer program is stored in the memory;
[0047] A processor is used to execute a computer program to implement the method provided in the embodiment of the first aspect or any optional embodiment of the first aspect.
[0048] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method provided in the embodiment of the first aspect or any optional embodiment of the first aspect is implemented.
[0049] The beneficial effects of the technical solution provided by this application are:
[0050] The first correspondence list of each server is determined based on the identification information of the target process running on the server. The accuracy of the correspondence in the first correspondence list is guaranteed. Then, the process deployment rules of the cloud product corresponding to the server are used to verify the first correspondence list, and the invalid correspondence is filtered out to obtain a second correspondence with higher accuracy. Then, the correspondence between each cloud product and the server determined according to the second correspondence list is used to verify the correspondence between each cloud product and the server recorded in the CMDB in turn, ensuring the accuracy and comprehensiveness of the verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in describing the embodiments of the present application.
[0052] Figure 1 A flowchart of a configuration management database verification method provided in an embodiment of the present application;
[0053] Figure 2 A schematic diagram of a configuration management database verification system provided in an embodiment of the present application;
[0054] Figure 3 A structural block diagram of a verification device for a configuration management database provided in an embodiment of the present application;
[0055] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.
[0057] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0058] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0059] Figure 1 A flowchart of a configuration management database verification method provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the method may include:
[0060] Step S101: obtaining identification information of at least one target process running on each server managed by a configuration management database CMDB.
[0061] Among them, CMDB as an operation and maintenance system generally manages multiple corresponding servers. Specifically, CMDB records the status of these servers used by each cloud product through the configuration of the operation and maintenance personnel. Cloud products have a corresponding relationship with the servers they use. Each cloud product can use one or more servers, so each cloud product can also have one or more corresponding relationships with the server. In other words, CMDB records the status of these servers used by each cloud product, that is, it records the corresponding relationship between each cloud product and the server. For example, cloud product A uses server 1, server 2 and server 3 during operation, then CMDB records that cloud product A corresponds to server 1, server 2 and server 3 respectively, that is, CMDB records three corresponding relationships of cloud product A, namely, cloud product A corresponds to server 1, cloud product A corresponds to server 2, and cloud product A corresponds to server 3.
[0062] Specifically, since the correspondence between each cloud product and server recorded in the CMDB needs to be verified, in this step, the identification information of the target process running on each server is obtained for subsequent determination of the correspondence between each server and the cloud product, and then the determined correspondence between each server and the cloud product is used to verify the correspondence recorded in the CMDB.
[0063] Step S102, based on the identification information of each target process running on each server, determine the cloud product corresponding to the server and the process deployment rules of the cloud product corresponding to the server from the preset cloud product process deployment rule library, wherein the preset cloud product process deployment rule library stores the identification information and process deployment rules of the processes included in each cloud product.
[0064] Among them, the preset cloud product process deployment rule library stores the identification information of the processes included in each cloud product. Therefore, for each server, after obtaining the identification information of the target process running on it, the identification information of the target process can be compared with the identification information of the processes of each cloud product to determine which cloud product processes are running on the server, that is, to determine which cloud products use the server during operation, and then determine which cloud products have a corresponding relationship with the server.
[0065] The preset cloud product process deployment rule base stores the process deployment rules of each cloud product. The process deployment rules of each cloud product stipulate the running rules of its processes on the server. For example, the process deployment rule of a certain cloud product can be that all processes of the cloud product must run on the same server, or that the cloud product cannot run on the same server with other cloud products, etc. The corresponding relationship between the above servers and cloud services can be verified through the process deployment rules of each cloud product.
[0066] Step S103, based on the correspondence between each server and each cloud product, obtain the first correspondence list of the server, and use the process deployment rules of the cloud product that has a corresponding relationship with the server to verify the first correspondence list, filter out the invalid correspondence in the first correspondence list, and obtain the second correspondence list of the server.
[0067] Specifically, as described in the previous step, for each server, after obtaining the identification information of the target process running on it, it is possible to determine which cloud products have a corresponding relationship with the server from the preset cloud product process rule library, and then store the corresponding relationship between the server and the cloud product to obtain the first corresponding relationship list of the server. For example, it is determined from the preset cloud product process rule library that the cloud products that have a corresponding relationship with server 1 are cloud product A, cloud product B, and cloud product C, then the first relationship list of server 1 stores the corresponding relationship between server 1 and cloud product A, the corresponding relationship between server 1 and cloud product B, and the corresponding relationship between server 1 and cloud product C.
[0068] However, since there may be invalid correspondences in the first correspondence list of each server, in order to filter out the invalid correspondences in the first correspondence list of the server, the correspondences in the first correspondence list can be verified according to the process deployment rules of each cloud product, and the invalid correspondences obtained by the verification can be filtered out to obtain the second correspondence list of the server. It can be understood that the second correspondence list of the server is more accurate.
[0069] Step S104: Based on the second correspondence list of each server, the correspondence between each cloud product and the server recorded in the CMDB is verified.
[0070] Specifically, based on the second correspondence list of each server managed by the CMDB, the correspondence between each cloud product and the server can be determined. Then, based on the determined correspondence between each cloud product and the server, the correspondence between each cloud product and the server recorded in the CMDB can be verified. Specifically, the correspondence between each cloud product and the server is determined based on each second relationship list, and each correspondence between a cloud product and the server recorded in the CMDB is verified in turn to see if it holds. If the correspondence between a cloud product and the server recorded in the CMDB is consistent with the correspondence between the cloud product and the server determined based on each second relationship list, then the correspondence recorded in the CMDB is considered to be invalid. If the correspondence between a cloud product and the server recorded in the CMDB is consistent with the correspondence between the cloud product and the server determined based on each second relationship list, then the correspondence recorded in the CMDB is considered to be valid.
[0071] In the solution provided by the present application, the first correspondence list of each server is determined based on the identification information of the target process running on the server, and the accuracy of the correspondence in the first correspondence list is guaranteed. Then, the process deployment rules of the cloud product corresponding to the server are used to verify the first correspondence list, and invalid correspondences are filtered out to obtain a second correspondence with higher accuracy. Then, the correspondence between each cloud product and the server determined according to the second correspondence list is used to verify the correspondence between each cloud product and the server recorded in the CMDB in turn, thereby ensuring the accuracy and comprehensiveness of the verification.
[0072] In an optional embodiment of the present application, obtaining identification information of at least one target process running on each server managed by a configuration management database CMDB includes:
[0073] The identification information of all processes running on each server reported by an agent set on the server is obtained, and the identification information of the processes belonging to the preset process blacklist is filtered out to obtain the identification information of at least one target process running on the server.
[0074] A corresponding agent is set on each server managed by the CMDB. Each agent reports the identification information of the process running on the corresponding server. The reporting cycle of each agent can be set according to actual needs.
[0075] Among them, the preset process blacklist stores identification information of processes that are irrelevant to or unnecessary for CMDB verification. It can be understood that the identification information of the processes stored in the preset process blacklist can also be set according to actual needs.
[0076] Specifically, for each server, the identification information of all processes reported by the corresponding agent is obtained, that is, the identification information of all processes running on the server is learned, and then the identification information of the processes that are irrelevant or unnecessary to the CMDB verification is filtered out according to the preset process blacklist. The remaining processes are the target processes, and the identification information of the target processes running on the server is obtained.
[0077] In an optional embodiment of the present application, based on the identification information of each target process running on each server, determining a cloud product corresponding to the server from a preset cloud product process deployment rule library includes:
[0078] For each server, compare the identification information of each target process running on the server with the identification information of the processes included in each cloud product in the preset cloud product process deployment rule library;
[0079] A cloud product including at least one process having the same identification information as the target process is determined as a cloud product having a corresponding relationship with the server.
[0080] Specifically, the identification information of each target process running on each server is compared with the identification information of the process included in each cloud product in the preset cloud product process deployment rule base. This step is to determine which cloud products contain the target process, that is, to determine which cloud product processes are running on the server, and then determine which cloud products have a corresponding relationship with the server. Specifically, if the identification information of the process included in a cloud product is the same as the identification information of at least one target process, it means that the cloud product has at least one process running on the server, that is, the cloud product is adapted to the server, and then the cloud product is determined to be a cloud product with a corresponding relationship with the server.
[0081] For example, three target processes on a server are obtained, and the identification information of each target process is "ABC", "DEF" and "HIJ" respectively. In the preset process deployment database, cloud product M includes process 1, and the identification information of process 1 is "ABC", which means that cloud product M includes a target process, that is, cloud product M uses the server; in the preset process deployment database, cloud product N includes process 2 and process 3, and the identification information of process 2 and process 3 is "DEF" and "HIJ" respectively, which means that cloud product N includes two target processes, that is, cloud product N uses the server. Therefore, based on the inclusion relationship between the processes and target processes of the above cloud products, it can be determined that cloud product M and cloud product N are both cloud products that have a corresponding relationship with the server.
[0082] In an optional embodiment of the present application, the first correspondence list is verified using the process deployment rules of the cloud product corresponding to each server, including:
[0083] If the process deployment rule of the cloud product corresponding to each server is that all processes included in the cloud product run on the same server, determine whether the target process running on the server includes all processes included in the cloud product. If so, the corresponding relationship between the server and the cloud product is established; if not, the corresponding relationship between the server and the cloud product is not established;
[0084] If the process deployment rule of the cloud product that has a corresponding relationship with each server is that the cloud product is not deployed together with other cloud products on the same server, then the number of corresponding relationships in the first corresponding relationship list of the server is determined. If it is a preset number, the corresponding relationship between the server and the cloud product is established; if it is not a preset number, the corresponding relationship between the server and the cloud product is not established.
[0085] The process deployment rules of cloud products can be regulated from two aspects, namely, whether all processes of cloud products should be deployed on the same server, and whether a certain cloud product can be mixed with other cloud products, that is, whether the process of the cloud product can be deployed on a server where other cloud product processes are already running. It is understandable that the process deployment rules of cloud products can also be pre-set according to actual needs.
[0086] Specifically, after obtaining the process deployment rules of the cloud products that have a corresponding relationship with each server, each correspondence in the first correspondence list is verified according to the process deployment rules. Specifically, it is necessary to verify the deployment status of the process on the server of each cloud product that has a corresponding relationship with the server to determine whether the process deployment status of each cloud product on the server complies with its process deployment rules. If it does, the correspondence between the server and the cloud product is established; if it does not, the correspondence between the server and the cloud product is not established.
[0087] If the process deployment rule of the cloud product corresponding to each server is that all processes included in the cloud product run on the same server, then determining whether all processes of the cloud product are running on the server can verify whether the correspondence between the two is established. If the process deployment rule of the cloud product corresponding to each server is that the cloud product is not mixed with other cloud products and deployed on the same server, then determining whether the number of correspondences in the first correspondence list of the server is a preset number can verify whether the correspondence between the two is established, and the preset number is set to 1 here.
[0088] For example, Table 1 shows the identification information (i.e., the process names in the table) of the processes corresponding to cloud products A and B in the preset process deployment rule library, as well as the process deployment rules. All processes of cloud products A and B run on server 1, and both cloud products A and B are cloud products that have a corresponding relationship with server 1, that is, the first corresponding relationship list of server 1 stores the corresponding relationship between server 1 and cloud product A, and the corresponding relationship between server 1 and cloud product B.
[0089] As shown in Table 1, there are two processes corresponding to cloud product A, named "ABC" and "DEF". Its process deployment rule is that it cannot be mixed with other cloud products on the same server, and all its processes do not need to be deployed on the same server. Then use the process deployment rule of cloud product A to verify the correspondence between server 1 and cloud product A in the first correspondence list. Since cloud product B is also running on server 1, cloud product A and cloud product B are mixed and deployed on server 1, which does not meet the "cannot be mixed" rule in the process deployment rule of cloud product A. Therefore, the correspondence between server 1 and cloud product A in the first list of server 1 is not established.
[0090] As shown in Table 1, there are two processes corresponding to cloud product B, named "HIJ" and "XYZ" respectively. Its process deployment rule is that it can be mixed with other cloud products on the same server, and all its processes need to be deployed on the same server. Since cloud product B can be mixed, and all its processes run on server 1, the deployment of cloud product B on server 1 meets the process deployment rule of cloud product B, so the correspondence between server 1 and cloud product B in the first list of server 1 is established.
[0091] Table 1
[0092]
[0093] It should be noted that the process information in the above table also includes an execution command, which can be used to distinguish two processes with the same process name by using their respective corresponding execution commands. In other words, the identification information of the process can further include a combination of the process name and the execution command.
[0094] In an optional embodiment of the present application, the verifying the correspondence between each cloud product and the server recorded in the CMDB based on the second correspondence list of each server includes:
[0095] Aggregating the correspondences in the second relationship lists of the servers by cloud product to obtain a third correspondence list, wherein each cloud product in the third correspondence list has at least one server that has a correspondence with the cloud product;
[0096] Based on the third correspondence list, the correspondence between each cloud product and server recorded in the CMDB is verified.
[0097] Among them, the correspondence between each cloud product and server recorded in the CMDB is indexed by cloud products, and if the second correspondence list of each server is directly stored as a correspondence list, the index of the obtained correspondence list is the server. In order to facilitate the comparison operation of verification, the second correspondence list of each server is aggregated by cloud product to obtain a third correspondence list. It can be understood that there is essentially no difference between the information in the third correspondence list and the correspondence list obtained by directly storing the second correspondence list corresponding to each server, indicating that the third correspondence list can be considered to be indexed by cloud products, which is more convenient for subsequent comparison operations of the teaching and research department.
[0098] Specifically, the correspondence between each cloud product and server recorded in the CMDB is compared with the correspondence between the cloud product and the server in the third correspondence list. It should be noted that since each cloud product can correspond to multiple servers, multiple correspondences of the cloud product need to be compared.
[0099] In an optional embodiment of the present application, based on the third correspondence list, the correspondence between each cloud product and the server recorded in the CMDB is verified, including:
[0100] The correspondence between each cloud product and server recorded in the CMDB is compared with the correspondence between each cloud product and server in the third correspondence list. If the comparison results of the correspondence between the same cloud product and the server are the same, the correspondence between the cloud product and the server recorded in the CMDB is established; otherwise, the correspondence between the cloud product and the server recorded in the CMDB is not established.
[0101] Specifically, since each cloud product can correspond to one or more servers, the cloud product has one or more corresponding relationships. If the cloud product has only one corresponding relationship, the comparison result of this one corresponding relationship with the corresponding relationship of the cloud product in the third corresponding relationship list only needs to be the same, and then the corresponding relationship of the cloud product recorded in the CMDB is established, otherwise it is not established. If the product has multiple corresponding relationships, the comparison result of each corresponding relationship of the cloud product with the corresponding relationship of the product in the third corresponding relationship list needs to be the same, and then the corresponding relationship of the cloud product recorded in the CMDB is established. Otherwise, if the comparison result of any corresponding relationship of the cloud product with the corresponding relationship of the product in the third corresponding relationship list is different, then the corresponding relationship of the cloud product recorded in the CMDB is not established.
[0102] For example, the servers recorded in the CMDB that have a corresponding relationship with cloud product A include server 1, server 2, and server 3, while the servers stored in the third corresponding relationship list that have a corresponding relationship with cloud product A are server 1, server 2, and server 4. Therefore, the corresponding relationship between cloud product A and server 3 recorded in the CMDB is not established. It can be concluded that the corresponding relationship between cloud product A and the server recorded in the CMDB is not established, and the corresponding relationship between cloud product A and the server recorded in the CMDB needs to be corrected.
[0103] In an optional embodiment of the present application, based on the second correspondence list of each server, the correspondence between each cloud product and the server recorded in the CMDB is verified, including:
[0104] The correspondence between each cloud product and the server recorded in the CMDB is verified based on the second correspondence list of each server at each preset time interval, and a corresponding verification log is generated based on the invalid correspondence.
[0105] Specifically, the correspondence between each cloud product and server recorded in the CMDB can be verified at each preset time, and the preset time can be set according to actual needs. After verification, the invalid correspondence between cloud products and servers is recorded, and the reason for the invalidity is recorded, for example, the specific correspondence between the cloud product and which server is invalid, and the corresponding verification log is generated. After viewing the log, the operation and maintenance personnel can correct the invalid correspondence or ignore it.
[0106] like Figure 2 As shown, it is a structural diagram of a configuration database verification system provided by an embodiment of the present application, and the system may include servers 201 managed by CMDB, agents 202 correspondingly arranged on each server, verification servers 203, and CMDB 206. Among them, the verification server 203 may include a storage module 204 and a screening module, and the storage module 204 stores a preset cloud product process deployment rule library.
[0107] The operation process of the system is generally as follows: the agent 202 set on each server 201 uploads the identification information of the target process collected therefrom to the screening module 205 of the verification server 203. The screening module 205 first obtains the first correspondence list between each server 201 and the cloud product according to the identification information of the target process reported by each agent 202, and then obtains the corresponding process deployment rule from the preset cloud product process deployment rule stored in the storage module 204, verifies the first correspondence list of each server 201, and obtains the second correspondence list of each server 201. The verification server 203 sends the second correspondence list of each server 201 to the CMDB 206, and the CMDB 206 verifies the correspondence between each cloud product and the server recorded in the CMDB 206 using the second correspondence list of each server 201, and corrects the invalid correspondence according to the verification result.
[0108] In the embodiments of the present application, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal may be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0109] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.
[0110] In short, a database can be seen as an electronic filing cabinet - a place where electronic files are stored, and users can add, query, update, delete, and other operations on the data in the files. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of the application.
[0111] A database management system (DBMS) is a computer software system designed for managing databases. It generally has basic functions such as storage, retrieval, security, and backup. Database management systems can be classified according to the database model they support, such as relational, XML (Extensible Markup Language); or according to the type of computer they support, such as server clusters, mobile phones; or according to the query language used, such as SQL (Structured Query Language), XQuery; or according to performance focus, such as maximum scale, maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMS can cross categories, for example, supporting multiple query languages at the same time.
[0112] Figure 3 The structural block diagram of a verification device for a configuration management database provided in an embodiment of the present application, the device 300 may include: a target process acquisition module 301, a process deployment rule acquisition module 302, a first verification module 303 and a second verification module 304, wherein:
[0113] The target process acquisition module 301 is used to acquire identification information of at least one target process running on each server managed by the configuration management database CMDB;
[0114] The process deployment rule acquisition module 302 is used to determine the cloud product corresponding to the server and the process deployment rule of the cloud product corresponding to the server from the preset cloud product process deployment rule library based on the identification information of each target process running on each server, wherein the preset cloud product process deployment rule library stores the identification information and process deployment rules of the processes included in each cloud product;
[0115] The first verification module 303 is used to obtain a first correspondence list of the server based on the correspondence between each server and each cloud product, and verify the first correspondence list using the process deployment rules of the cloud product that has a correspondence with the server, filter out the correspondence in the first correspondence list that is not established, and obtain a second correspondence list of the server;
[0116] The second verification module 304 is used to verify the correspondence between each cloud product and the server recorded in the CMDB based on the second correspondence list of each server.
[0117] In the solution provided by the present application, the first correspondence list of each server is determined based on the identification information of the target process running on the server, and the accuracy of the correspondence in the first correspondence list is guaranteed. Then, the process deployment rules of the cloud product corresponding to the server are used to verify the first correspondence list, and invalid correspondences are filtered out to obtain a second correspondence with higher accuracy. Then, the correspondence between each cloud product and the server determined according to the second correspondence list is used to verify the correspondence between each cloud product and the server recorded in the CMDB in turn, thereby ensuring the accuracy and comprehensiveness of the verification.
[0118] In an optional embodiment of the present application, the target process acquisition module is specifically used to:
[0119] The identification information of all processes running on each server reported by an agent set on the server is obtained, and the identification information of the processes belonging to the preset process blacklist is filtered out to obtain the identification information of at least one target process running on the server.
[0120] In an optional embodiment of the present application, the process deployment rule acquisition module is specifically used to:
[0121] For each server, compare the identification information of each target process running on the server with the identification information of the processes included in each cloud product in the preset cloud product process deployment rule library;
[0122] A cloud product including at least one process having the same identification information as the target process is determined as a cloud product having a corresponding relationship with the server.
[0123] In an optional embodiment of the present application, the first verification module is specifically used to:
[0124] If the process deployment rule of the cloud product corresponding to each server is that all processes included in the cloud product run on the same server, determine whether the target process running on the server includes all processes included in the cloud product. If so, the corresponding relationship between the server and the cloud product is established; if not, the corresponding relationship between the server and the cloud product is not established;
[0125] If the process deployment rule of the cloud product that has a corresponding relationship with each server is that the cloud product is not deployed together with other cloud products on the same server, then the number of corresponding relationships in the first corresponding relationship list of the server is determined. If it is a preset number, the corresponding relationship between the server and the cloud product is established; if it is not a preset number, the corresponding relationship between the server and the cloud product is not established.
[0126] In an optional embodiment of the present application, the second verification module is specifically used to:
[0127] Aggregating the correspondences in the second relationship lists of the servers by cloud product to obtain a third correspondence list, wherein each cloud product in the third correspondence list has at least one server that has a correspondence with the cloud product;
[0128] Based on the third correspondence list, the correspondence between each cloud product and server recorded in the CMDB is verified.
[0129] In an optional embodiment of the present application, the second verification module is further used to:
[0130] The correspondence between each cloud product and server recorded in the CMDB is compared with the correspondence between each cloud product and server in the third correspondence list. If the comparison results of the correspondence between the same cloud product and the server are the same, the correspondence between the cloud product and the server recorded in the CMDB is established; otherwise, the correspondence between the cloud product and the server recorded in the CMDB is not established.
[0131] In an optional embodiment of the present application, the second verification module is further used to:
[0132] The correspondence between each cloud product and the server recorded in the CMDB is verified based on the second correspondence list of each server at each preset time interval, and a corresponding verification log is generated based on the invalid correspondence.
[0133] Based on the same principle, an embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method provided in any optional embodiment of the present application is implemented, and specifically the following situations can be implemented:
[0134] Obtain identification information of at least one target process running on each server managed by the configuration management database CMDB; based on the identification information of each target process running on each server, determine the cloud product corresponding to the server and the process deployment rules of the cloud product corresponding to the server from a preset cloud product process deployment rule library, wherein the preset cloud product process deployment rule library stores identification information and process deployment rules of processes included in each cloud product; based on the correspondence between each server and each cloud product, obtain a first correspondence list of the server, and use the process deployment rules of the cloud product corresponding to the server to verify the first correspondence list, filter out invalid correspondences in the first correspondence list, and obtain a second correspondence list of the server; based on the second correspondence list of each server, verify the correspondence between each cloud product and the server recorded in the CMDB.
[0135] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method shown in any embodiment of the present application is implemented.
[0136] It is understandable that what is stored in the medium may be a computer program corresponding to the verification method of the configuration management database.
[0137] Figure 4 A schematic diagram of the structure of an electronic device applicable to an embodiment of the present application is shown in FIG. Figure 4 As shown, Figure 4 The electronic device 400 shown includes: a processor 401 and a memory 403. The processor 401 and the memory 403 are connected, such as through a bus 402. Further, the electronic device 400 may also include a transceiver 404, and the electronic device 400 may interact with other electronic devices through the transceiver 404. It should be noted that in actual applications, the transceiver 404 is not limited to one, and the structure of the electronic device 400 does not constitute a limitation on the embodiments of the present application.
[0138] The processor 401 is used in the embodiment of the present application to implement Figure 3 The function of the verification device of the configuration management database is shown.
[0139] Processor 401 may be a CPU, a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 401 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0140] The bus 402 may include a path to transmit information between the above components. The bus 402 may be a PCI bus or an EISA bus, etc. The bus 402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0141] The memory 403 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including a compressed optical disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0142] The memory 403 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 401. The processor 401 is used to execute the application code stored in the memory 403 to implement Figure 3 The illustrated embodiment provides actions of the verification device for the configuration management database.
[0143] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0144] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A verification method for a configuration management database, characterized in that: include: Obtain identification information of at least one target process running on each server managed by a configuration management database CMDB; Based on the identification information of each target process running on each server, determine the cloud product corresponding to the server and the process deployment rule of the cloud product corresponding to the server from a preset cloud product process deployment rule base, wherein the preset cloud product process deployment rule base stores the identification information and process deployment rules of the processes included in each cloud product; Based on the correspondence between each server and each cloud product, a first correspondence list of the server is obtained, and the first correspondence list is verified by using the process deployment rules of the cloud product having a correspondence with the server, and the correspondences that are not established in the first correspondence list are filtered out to obtain a second correspondence list of the server; Based on the second correspondence list of each server, the correspondence between each cloud product and the server recorded in the CMDB is verified.
2. The method according to claim 1, characterized in that The step of obtaining identification information of at least one target process running on each server managed by the configuration management database CMDB includes: The identification information of all processes running on each server reported by an agent set on the server is obtained, and the identification information of the processes belonging to the preset process blacklist is filtered out to obtain the identification information of at least one target process running on the server.
3. The method according to claim 1, characterized in that The determining, based on the identification information of each target process running on each server, a cloud product having a corresponding relationship with the server from a preset cloud product process deployment rule library includes: For each server, comparing the identification information of each target process running on the server with the identification information of the processes included in each cloud product in the preset cloud product process deployment rule library; A cloud product including at least one process having the same identification information as the target process is determined as a cloud product having a corresponding relationship with the server.
4. The method according to claim 1, characterized in that: Verifying the first correspondence list using the process deployment rules of the cloud product corresponding to each server includes: If the process deployment rule of the cloud product corresponding to each server is that all processes included in the cloud product run on the same server, determine whether the target process running on the server includes all processes included in the cloud product. If so, the corresponding relationship between the server and the cloud product is established; if not, the corresponding relationship between the server and the cloud product is not established; If the process deployment rule of the cloud product that has a corresponding relationship with each server is that the cloud product is not deployed together with other cloud products on the same server, then the number of corresponding relationships in the first corresponding relationship list of the server is determined. If it is a preset number, the corresponding relationship between the server and the cloud product is established; if it is not a preset number, the corresponding relationship between the server and the cloud product is not established.
5. The method according to claim 1, characterized in that: The verifying the correspondence between each cloud product and the server recorded in the CMDB based on the second correspondence list of each server includes: Aggregating the correspondences in the second relationship lists of the servers by cloud product to obtain a third correspondence list, wherein each cloud product in the third correspondence list has at least one server that has a correspondence with the cloud product; Based on the third correspondence list, the correspondence between each cloud product and server recorded in the CMDB is verified.
6. The method according to claim 5, characterized in that The verifying the correspondence between each cloud product and the server recorded in the CMDB based on the third correspondence list includes: The correspondence between each cloud product and the server recorded in the CMDB is compared with the correspondence between each cloud product and the server in the third correspondence list. If the comparison results of the correspondence between the same cloud product and the server are the same, the correspondence between the cloud product and the server recorded in the CMDB is established; otherwise, the correspondence between the cloud product and the server recorded in the CMDB is not established.
7. The method according to claim 6, characterized in that The verifying the correspondence between each cloud product and the server recorded in the CMDB based on the second correspondence list of each server includes: The correspondence between each cloud product and the server recorded in the CMDB is verified based on the second correspondence list of each server at each preset time interval, and a corresponding verification log is generated based on an invalid correspondence.
8. A verification device for a configuration management database, characterized in that: include: A target process acquisition module is used to acquire identification information of at least one target process running on each server managed by the configuration management database CMDB; A process deployment rule acquisition module, configured to determine, based on the identification information of each target process running on each server, a cloud product corresponding to the server and a process deployment rule of the cloud product corresponding to the server from a preset cloud product process deployment rule library, wherein the preset cloud product process deployment rule library stores the identification information and process deployment rules of the processes included in each cloud product; A first verification module is used to obtain a first correspondence list of the server based on the correspondence between each server and each cloud product, and verify the first correspondence list using the process deployment rules of the cloud product that has a correspondence with the server, filter out the correspondence in the first correspondence list that is not established, and obtain a second correspondence list of the server; The second verification module is used to verify the correspondence between each cloud product and the server recorded in the CMDB based on the second correspondence list of each server.
9. An electronic device, characterized in that: including memory and processor; The memory stores a computer program; The processor is configured to execute the computer program to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
