Configuration monitoring method and device

Through historical comparison and mutual exclusion detection of the configuration information of objects to be detected in the cluster, the problem of abnormal operation caused by duplicate configuration items is solved, rapid identification and diagnosis are achieved, and it is suitable for clusters or application scenarios, and improves the efficiency of problem handling.

CN114726756BActive Publication Date: 2025-01-21LENOVO (BEIJING) LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210329166.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2025-01-21
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

In cluster management or cloud computing environments, configuration items or parameters in the configuration file may be duplicated, resulting in abnormal operation problems, and existing monitoring technologies cannot effectively manage these mutually exclusive information.

Method used

By obtaining the configuration information of the object to be detected and comparing it with its historical configuration information, it is determined whether the configuration information has changed. Perform mutual exclusion detection on the changed configuration information, compare it with the configuration information of other objects in the cluster, and perform set operations if an abnormality is found, such as sending alarm information or pausing automated orchestration jobs.

Benefits of technology

It achieves rapid identification and diagnosis of configuration information, timely discovers mutually exclusive exceptions and takes measures. It is suitable for clusters or application scenarios, improves the speed of problem identification and diagnosis, reduces system computing power requirements, and saves computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114726756B_ABST
    Figure CN114726756B_ABST
Patent Text Reader

Abstract

The present application discloses a configuration monitoring method and device, which obtains the configuration information of an object to be detected, and determines that the configuration information of the object to be detected has changed based on the configuration information and the historical configuration information of the object to be detected; performs mutual exclusion detection on the configuration information; determines that the result of the mutual exclusion detection shows that the configuration information is abnormal, and executes a setting operation. Thus, when the configuration information of the object to be detected changes, mutual exclusion detection is performed on the cluster or multiple objects of automatic arrangement, and the situation of mutual exclusion abnormality can be discovered in time and corresponding measures can be taken in time. It has good adaptability to scenarios such as clusters or applications, and the speed of problem identification and diagnosis is fast. The system computing power requirement of configuration monitoring is low, which effectively saves computing resources and improves computing efficiency. It can be expanded to larger cluster scales and applications to perform mutual exclusion detection and configuration checks on clusters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a configuration monitoring method and device. Background Art

[0002] In cluster management or cloud computing environments, some configuration items or configuration parameters of configuration files are not allowed to be repeated. If repeated, abnormal operation may occur. For example: IP, network card Mac address and UUID (Universally Unique Identifier) ​​of different physical or virtual machines in the same network segment. Configuration of synchronizing data or communication with other servers in an application or database cluster. Such configuration information changes are difficult to identify through the historical data of a single machine, but require comparison of the information of the cluster, network segment or application to which it belongs. Existing monitoring technologies cannot effectively manage mutually exclusive information.

[0003] For automated systems, along with the distribution of configuration data, the configuration will soon take effect by restarting the service or entering instructions. If there are mutually exclusive exceptions in the configuration item parameters or configuration parameters, the effective configuration will cause the server node to run abnormally. Therefore, it is necessary to quickly identify and diagnose the server. The current inspection mode has a long inspection cycle and slow data analysis and parsing speed, which cannot meet business scenarios such as automated systems. Summary of the invention

[0004] The embodiments of the present application provide a configuration monitoring method and device.

[0005] According to the first aspect of the present application, a configuration monitoring method is provided, the method comprising: obtaining configuration information of an object to be detected; determining, based on the configuration information and historical configuration information of the object to be detected, that the configuration information of the object to be detected has changed; performing mutual exclusion detection on the configuration information; determining that a result of the mutual exclusion detection shows that the configuration information is abnormal, and executing a setting operation.

[0006] According to an embodiment of the present application, determining that the configuration information of the object to be detected has changed based on the configuration information and the historical configuration information of the object to be detected includes: obtaining a device identification of the object to be detected; based on the device identification, obtaining the configuration information of the object to be detected according to a set time interval, and caching it in a local cache of the object to be detected to form the historical configuration information of the object to be detected; comparing the configuration information of the object to be detected at the current moment with the configuration information of the previous adjacent moment of the current moment in the historical configuration information in the local cache, and if there is a difference between the configuration information at the current moment and the configuration information of the previous adjacent moment, determining that the configuration information has changed; wherein the previous adjacent moment is a moment in the historical configuration information that is separated from the current moment by a set time interval and is located before the current moment.

[0007] According to one embodiment of the present application, the configuration information includes multiple configuration items of the object to be detected; comparing the configuration information of the object to be detected at the current moment with the configuration information of the previous adjacent moment of the current moment in the historical configuration information includes: comparing the current summary value of the configuration information of the object to be detected at the current moment with the adjacent summary value of the configuration information of the previous adjacent moment of the current moment.

[0008] According to an implementation manner of the present application, the performing mutually exclusive detection on the configuration information includes: comparing the current configuration information of the object to be detected with the current configuration information of any object in the other objects in the cluster.

[0009] According to an implementation manner of the present application, determining that the result of the mutual exclusion detection shows that the configuration information is abnormal includes: determining that current configuration information of the object to be detected is the same as current configuration information of any other object in the cluster.

[0010] According to one embodiment of the present application, comparing the current configuration information of the object to be detected with the current configuration information of any other object in the cluster includes: parsing the current configuration information of the object to be detected to obtain current parsed information, wherein the current parsed information can show the configuration items of the object to be detected and the corresponding configuration item information; based on the current parsed information, comparing the configuration item information of the object to be detected with the corresponding configuration item information of other objects in the cluster.

[0011] According to an embodiment of the present application, the execution of the setting operation includes at least one of the following: sending an alarm message for indicating a configuration abnormality; suspending the automatic orchestration job of the server configuration item; and saving the configuration file to the change database according to the setting format.

[0012] According to an implementation manner of the present application, the configuration information includes multiple configuration items of the object to be detected; accordingly, the mutually exclusive detection of the configuration information includes: determining a target cluster; determining, based on the configuration information, the configuration items to be tested that require mutually exclusive detection in the target cluster; determining the configuration items in the configuration information corresponding to the configuration items to be tested as target configuration items; and performing mutually exclusive detection on the target configuration items in the target cluster.

[0013] According to one implementation of the present application, determining the target configuration items that require mutually exclusive detection in the target cluster based on the configuration information includes: determining a first node corresponding to a first configuration item from the target cluster, the first configuration item being one of multiple configuration items of the object to be detected, and there being a configuration item in the first node that has the same content as the first configuration item; determining that the proportion of the first node in the target cluster is less than a first threshold; and determining the first configuration item as the configuration item to be tested.

[0014] According to the second aspect of the present application, a device is provided, which includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; and the processor is used to call program instructions in the memory to execute the above-mentioned configuration monitoring method.

[0015] The configuration monitoring method and device of the embodiment of the present application obtains the configuration information of the object to be detected, and determines that the configuration information of the object to be detected has changed based on the configuration information and the historical configuration information of the object to be detected; performs mutual exclusion detection on the configuration information; determines that the result of the mutual exclusion detection shows that the configuration information is abnormal, and executes the setting operation. Thus, when the configuration information of the object to be detected changes, mutual exclusion detection is performed on the cluster or multiple objects of automatic arrangement, and the situation of mutual exclusion abnormality can be discovered in time and corresponding measures can be taken in time. It has good adaptability to scenarios such as clusters or applications, and the speed of problem identification and diagnosis is fast. The system computing power requirement of configuration monitoring is low, which effectively saves computing resources and improves computing efficiency. It can be expanded to larger cluster scales and applications to perform mutual exclusion detection and configuration checks on clusters.

[0016] It should be understood that the teachings of the present application are not required to achieve all of the beneficial effects described above, but specific technical solutions can achieve specific technical effects, and other embodiments of the present application can also achieve beneficial effects not mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become readily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, wherein:

[0018] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0019] Figure 1 The following is a flowchart of the configuration monitoring method according to an embodiment of the present application;

[0020] Figure 2 The following is a flowchart showing an example of implementing the configuration monitoring method of the present application embodiment;

[0021] Figure 3 A schematic diagram showing the composition structure of a device for monitoring configuration according to an embodiment of the present application is shown;

[0022] Figure 4 A schematic diagram of the composition structure of the device in the embodiment of the present application is shown. DETAILED DESCRIPTION

[0023] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.

[0024] The technical solution of the present application is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0025] Figure 1 A flow chart for implementing the configuration monitoring method according to an embodiment of the present application is shown.

[0026] refer to Figure 1 The configuration monitoring method of the embodiment of the present application includes at least the following operation procedures: operation 101, obtaining the configuration information of the object to be detected; operation 102, determining that the configuration information of the object to be detected has changed according to the configuration information and the historical configuration information of the object to be detected; operation 103, performing a mutual exclusion test on the configuration information; operation 104, determining that the result of the mutual exclusion test shows that the configuration information is abnormal, and executing a setting operation.

[0027] In operation 101, configuration information of an object to be detected is obtained.

[0028] In this embodiment of the present application, the configuration monitoring method can be applied to the server migration scenario of the cluster. The object to be detected can be any server host in the cluster. During the server migration process, the central server can obtain the configuration file of the object to be detected through periodic polling and other methods, thereby obtaining the configuration information of the object to be detected.

[0029] For example, the polling program is placed in a local Agent server or a unified configuration management service to fetch Agent files through polling.

[0030] In another embodiment of the present application, the configuration monitoring method can be applied to the automatic orchestration operation scenario of the cluster, the object to be detected can be any target server among multiple target servers that need to be orchestrated, and the execution subject of the configuration monitoring method is the orchestration server. In the process of automated orchestration operation, the orchestration server can identify the configuration change file through the orchestration filter and obtain the configuration information of the object to be detected.

[0031] For example, an Orchestration filter can be integrated into the orchestration automation system to identify and filter key change files.

[0032] In this implementation of the present application, the configuration information may include the IP address of the network segment and the Mac address of the network card, etc.

[0033] For example, here, taking the object to be detected as a server as an example, the basic information of the current server can be obtained first, such as the UUID (Universally Unique Identifier) ​​of the current server host, the SN (Serial Number) of the physical machine where the server is located, the MAC address of the network card, the network card function, the device manufacturer and model, etc. The acquisition scope of the configuration information can be set according to the business scenario and the device type of the server, and the configuration information is not limited to the above configuration information. Among them, the physical machine or virtual machine of some servers may not have an SN, and the network card function may include the network card connecting to the data network, the management network, and the control network. Some servers may not have a UUID or have a duplicate UUID. Therefore, here in the server migration scenario of the cluster, a globally unique UUID can be generated for all servers managed by all servers in the cluster that belong to the central server. Similarly, in the automatic orchestration operation scenario of the cluster, a globally unique UUID can be generated for all servers managed by the orchestration server.

[0034] In operation 102, it is determined whether the configuration information of the object to be detected has changed according to the configuration information and the historical configuration information of the object to be detected.

[0035] In this embodiment of the present application, according to the configuration information and the historical configuration information of the object to be detected, it is determined that the configuration information of the object to be detected has changed, which can be achieved by the following operations: obtaining the device identification of the object to be detected, based on the device identification, obtaining the configuration information of the object to be detected according to the set time interval, and caching it in the local cache of the object to be detected to form the historical configuration information of the object to be detected. In the local cache, the configuration information of the object to be detected at the current moment is compared with the configuration information of the previous adjacent moment of the current moment in the historical configuration information. If there is a difference between the configuration information at the current moment and the configuration information of the previous adjacent moment, it is determined that the configuration information has changed. Wherein, the previous adjacent moment is a moment that is separated from the current moment by a set time interval in the historical configuration information and is located before the current moment.

[0036] For example, referring back to the description of the configuration information in reference operation 101, the basic information of the server and the globally unique UUID can be combined into a resource tag object according to the set structure, and the basic information of the server and the globally unique UUID can be integrated with the MD5 algorithm to generate the unique identification information of the server. The unique identification information of the server can be generated once at a set interval, and the unique identification information of the server generated each time can be cached in real time in the local cache of the server. Thus, the unique identification information can be used to compare the differences after the server configuration information changes, and further, the changes can be quickly identified when the main components of the physical machine where the server is located or other configurations of the server change.

[0037] In this embodiment of the present application, the configuration information may include multiple configuration items of the object to be detected. Here, the current summary value of the configuration information of the object to be detected at the current moment can be compared with the adjacent summary value of the configuration information at the previous adjacent moment of the current moment, thereby realizing the comparison of the configuration information of the object to be detected at the current moment with the configuration information at the previous adjacent moment of the current moment in the historical configuration information.

[0038] Specifically, in the process of comparing the current digest value of the configuration information of the object to be detected at the current moment with the adjacent digest value of the configuration information at the previous adjacent moment, as long as the digest value changes, it indicates that the corresponding configuration information has changed. Therefore, when the current digest value of the configuration information of the object to be detected at the current moment changes with the adjacent digest value of the configuration information at the previous adjacent moment, it is determined that the configuration information of the object to be detected has changed.

[0039] For example, the configuration file of the object to be detected obtained in operation 101 can be parsed first to obtain the configuration information of the object to be detected, and the parsed configuration information is cached locally in the Agent server, and the configuration information captured at adjacent moments is compared. If the configuration information at the current moment is consistent with the configuration information at the previous adjacent moment, there is no need to compare the configuration information of the object to be detected with the configuration information of other servers in the cluster stored in the central database of the central server. If the configuration information at the current moment is inconsistent with the configuration information at the previous adjacent moment, it is necessary to send the configuration information of the object to be detected at the current moment to the central database of the central server, and perform a mutually exclusive check on the configuration information of other servers in the cluster stored in the central database of the central server. In this way, the comparison for machine information change does not need to be compared in the central database of the entire cluster every time. In the case where the configuration information stored in the local cache of the object to be detected has not changed, the monitoring of the configuration information can be completed locally, effectively improving the inspection efficiency of configuration monitoring.

[0040] In operation 103, a mutual exclusion check is performed on the configuration information.

[0041] In this embodiment of the present application, when the configuration information of the object to be detected changes, it is determined that the configuration information needs to be mutually exclusive detected. The current configuration information of the object to be detected can be compared with the current configuration information of any other object in the cluster to implement mutually exclusive detection of the configuration information.

[0042] In this embodiment of the present application, the current configuration information of the object to be detected is compared with the current configuration information of any other object in the cluster, which can be achieved by the following operations: the current configuration information of the object to be detected is parsed to obtain current parsed information, which can show the configuration items of the object to be detected and the corresponding configuration item information, and based on the current parsed information, the configuration item information of the object to be detected is compared with the corresponding configuration item information of other objects in the cluster.

[0043] In this embodiment of the present application, the process of comparing the configuration item information of the object to be detected with the corresponding configuration item information of other objects in the cluster is based on the central database of the central server or the orchestration server. In the case that the configuration information of the object to be detected changes, the configuration data of the object to be detected is compared for consistency in different clusters or data center environments based on the central database. If any two data are consistent, the mutual exclusion rule is violated and an exception is recorded.

[0044] Specifically, the central database maintains the following data: 1. Service, application or node information under clusters and certain grouping rules to control the scope of mutual exclusion checks; 2. Each configuration under different clusters or groups is hashed and saved in two modes, including: 1) Mode 1: Use nodes and applications as keys to record relevant information;

[0045] 2) Mode 2: Use cluster, application, and number as keys to record relevant information and mark the number of different values ​​for mutual exclusion checking.

[0046] After the configuration information of mode 1 is updated, mode 2 will be updated synchronously. The typical processing flow of the central database is as follows:

[0047] 1. Mode 1 ensures that the node of the object to be detected is unique, and the detailed information of the node is recorded in the value. For example, the Mac address of the network card and the UUID of different physical machines or virtual machines are used as a group of data, and the group number is hashed, and the processed hash data is used as a value in mode 1. The array is another type of value in mode 1. When any parameter configuration in the machine changes, the hash value will change. For example, if the current node changes the Mac address of the network card, you only need to compare the hash value each time. When the hash value changes, check which value in the value has changed. In this way, the inspection efficiency is effectively improved.

[0048] 2. In mode 2, cluster, application and number are used as keys, and the corresponding value is the configuration information of the current node. For the key and value pairs in the configuration information, the configuration information can be formatted into a key-value pair form of (key, value), hashed, and a key-value pair list is generated.

[0049] 3. When the node configuration information changes, the hash value in the hash list corresponding to the configuration information will also change. When the configuration items of some servers are the same, two hash values ​​in the hash list in the same group must be the same. In this way, mutually exclusive configuration items can be quickly detected.

[0050] In this embodiment of the present application, the configuration information includes multiple configuration items of the object to be detected. First, a target cluster can be determined, and the configuration items to be tested that need to be mutually exclusive detected in the target cluster can be determined according to the configuration information. Further, the configuration items corresponding to the configuration items to be tested in the configuration information can be determined as target configuration items, so that mutually exclusive detection is performed on the target configuration items in the target cluster to achieve mutual exclusive detection of the configuration information.

[0051] In this embodiment of the present application, a first node corresponding to a first configuration item can be determined from the target cluster, the first configuration item is one of multiple configuration items of the object to be detected, there is a configuration item with the same content as the first configuration item in the first node, and it is determined that the proportion of the first node in the target cluster is less than a first threshold, and the first configuration item is determined as the configuration item to be tested. In this way, the target configuration item that needs to be mutually exclusive detected in the target cluster is determined according to the configuration information.

[0052] Specifically, different resource groups G1 may be constructed first according to different granularities such as subnets, applications, and clusters, and the required inspection environment configuration parameters or configuration file parameters may be extracted from the resource groups.

[0053] Secondly, for the parameters in different groups, possible mutually exclusive rules are identified, and a configuration anomaly detection algorithm is introduced to identify mutually exclusive items. For example, if the parameter configurations of nodes outside a certain proportion of nodes r1 are consistent, it is considered that the parameter does not need to be configured mutually exclusive. For example: Assume that the proportion of r1 is 60%. If a certain configuration is consistent in 60% of the nodes, it can be determined that this configuration parameter or configuration item does not need to perform a mutually exclusive check. On the contrary, if the parameter configurations of nodes outside a certain proportion of nodes r1 are inconsistent, it is considered that the parameter needs to be configured mutually exclusive. Here, it is further determined whether the parameter of the nodes within a certain proportion of nodes r2 is mutually exclusive. If the parameter of the nodes within a certain proportion of nodes r2 is mutually exclusive, it is marked as a suspected mutually exclusive set M1. For example: Assume that the proportion of r2 is 95%, that is, more than 95% of the nodes have different parameters, such as the network MAC addresses of each node are different, then a mutually exclusive check needs to be performed. Although the standard deviation can also be converted into a half-point ratio.

[0054] Afterwards, the target configuration items for mutual exclusion detection are set according to the mutual exclusion set M1, resource group G1, and configuration items or configuration files, such as configuration file path, configuration file related applications, etc. And according to the set mutual exclusion detection target configuration items, mutual exclusion detection of the object to be detected is performed.

[0055] In operation 104 , it is determined that the result of the mutual exclusion detection shows that the configuration information is abnormal, and a setting operation is performed.

[0056] In this embodiment of the present application, when it is determined that the current configuration information of the object to be detected is the same as the current configuration information of any other object in the cluster, it is determined that the result of the mutual exclusion detection shows that the configuration information is abnormal.

[0057] In this embodiment of the present application, executing the setting operation may include at least one of the following: sending an alarm message for indicating a configuration abnormality; suspending the automatic orchestration job of the server configuration item; and saving the configuration file to the change database according to the setting format.

[0058] For example, at least one of the above set operations can be executed according to user definition, and other applicable operations can also be executed according to user definition. For example: an alarm message can be sent to the central server of the cluster or the orchestration server that executes the automated orchestration, and an alarm message can also be sent to the object to be detected. For the central server in the server migration scenario, it can be set to suspend the server migration operation, and without modifying the original file of the configuration information, the new configuration file can be saved in the set copy format, saved to the central database of the central server, etc. For the orchestration server of automated orchestration, it can be set to suspend the automated operation, and without modifying the original file of the configuration information, the new configuration file can be saved in the set copy format, saved to the inspection database of the orchestration server, etc. The relevant external systems also connect to different business processes according to the analysis results of the configuration information monitoring as needed.

[0059] Figure 2 A flowchart of an implementation example of the configuration monitoring method application according to an embodiment of the present application is shown.

[0060] refer to Figure 2 The configuration monitoring method application example of the embodiment of the present application at least includes the following operation process:

[0061] Operation 201, fetching files.

[0062] Specifically, the polling program is configured in a local Agent server or a unified configuration management service, and Agent files are captured by polling.

[0063] Orchestration filters can also be integrated into the orchestration automation system to identify and filter key change files.

[0064] Here, in addition to configuring the configuration file information, the captured file also includes machine information to obtain the basic information of the current server, such as the UUID (Universally Unique Identifier) ​​of the current server host, the SN (Serial Number) of the physical machine where the server is located, the MAC address of the network card, the network card function, the device manufacturer and model, etc. The scope of obtaining configuration information can be set according to the business scenario and the device type of the server, and the configuration information is not limited to the above configuration information. Among them, the physical machine or virtual machine of some servers may not have an SN, and the network card function may include the network card connecting to the data network, management network, and control network, etc.

[0065] Operation 202, using the integrated MD5 algorithm to generate a unique machine identifier.

[0066] Since some servers may not have UUIDs or have duplicate UUIDs, in the server migration scenario of the cluster, a globally unique UUID can be generated for all servers managed by the central server in the cluster. Similarly, in the automatic orchestration job scenario of the cluster, a globally unique UUID can be generated for all servers managed by the orchestration server.

[0067] Operation 203: parsing the parameters and configuration information.

[0068] Operation 204: construct a parameter data structure.

[0069] In this embodiment of the present application, the parameter data structure may include multiple configuration items of the object to be detected and configuration item information of each configuration item, for example, the configuration item includes: the IP and network card MAC address in the network segment. The configuration item information is the corresponding IP value and MAC value.

[0070] Operation 205: Agent caches information.

[0071] In this embodiment of the present application, the device identification of the object to be detected is obtained, and based on the device identification, the configuration information of the object to be detected is obtained according to the set time interval, and is cached in the local cache of the object to be detected to form the historical configuration information of the object to be detected. In the local cache, the configuration information of the object to be detected at the current moment is compared with the configuration information of the previous adjacent moment of the current moment in the historical configuration information. If there is a difference between the configuration information at the current moment and the configuration information of the previous adjacent moment, it is determined that the configuration information has changed. Among them, the previous adjacent moment is a moment that is separated from the current moment by a set time interval in the historical configuration information and is located before the current moment.

[0072] Operation 206 : Check the central database mutual exclusion status.

[0073] In this embodiment of the present application, when the configuration information of the object to be detected changes, it is determined that the configuration information needs to be mutually exclusive detected. Specifically, the configuration item information of the object to be detected can be compared with the corresponding configuration item information of other objects in the cluster based on the central database of the central server or the orchestration server. When the configuration information of the object to be detected changes, the configuration data of the object to be detected is compared for consistency in different clusters or data center environments based on the central database. If any two data are consistent, the mutual exclusion rule is violated and an exception is recorded.

[0074] The change data in the central database is equivalent to the log of the configuration information of multiple objects managed by the central server in the cluster, recording the process of changes in the configuration information of multiple objects. The benchmark database is used to record the original data of the configuration information of multiple objects managed by the central server.

[0075] Operation 207: Detecting an abnormality. If a mutual exclusion abnormality is detected in operation 206, it is determined that an abnormality is detected.

[0076] Operation 208: Send warning information.

[0077] Here, you can also perform other operations set by the user, such as pausing the automated orchestration job.

[0078] in, Figure 2 The specific implementation process and application example of the configuration monitoring method of the embodiment of the present application are shown. Figure 1 The specific implementation process of operations 101 to 104 in the illustrated embodiment is similar and will not be described in detail here.

[0079] The configuration monitoring method and device of the embodiment of the present application obtains the configuration information of the object to be detected, and determines that the configuration information of the object to be detected has changed based on the configuration information and the historical configuration information of the object to be detected; performs mutual exclusion detection on the configuration information; determines that the result of the mutual exclusion detection shows that the configuration information is abnormal, and executes the setting operation. Thus, when the configuration information of the object to be detected changes, mutual exclusion detection is performed on the cluster or multiple objects of automatic arrangement, and the situation of mutual exclusion abnormality can be discovered in time and corresponding measures can be taken in time. It has good adaptability to scenarios such as clusters or applications, and the problem identification and diagnosis speed is fast. The system computing power requirement of configuration monitoring is low, which effectively saves computing resources and improves computing efficiency. It can be expanded to larger cluster scales and applications to perform mutual exclusion detection and configuration checks on clusters.

[0080] Similarly, based on the above configuration monitoring method, an embodiment of the present application also provides a computer-readable storage medium, which stores a program. When the program is executed by a processor, the processor performs at least the following operation steps: operation 101, obtaining configuration information of the object to be detected; operation 102, determining that the configuration information of the object to be detected has changed based on the configuration information and the historical configuration information of the object to be detected; operation 103, performing mutual exclusion detection on the configuration information; operation 104, determining that the result of the mutual exclusion detection shows that the configuration information is abnormal, and executing a setting operation.

[0081] Further, based on the configuration monitoring method as described above, the present application embodiment also provides a configuration monitoring device, such as Figure 3The device 30 includes: an acquisition module 301, used to acquire the configuration information of the object to be detected; a change determination module 302, used to determine whether the configuration information of the object to be detected has changed according to the configuration information and the historical configuration information of the object to be detected; a mutual exclusion module 303, used to perform mutual exclusion detection on the configuration information; and an execution module 304, used to determine that the result of the mutual exclusion detection shows that the configuration information is abnormal, and execute a setting operation.

[0082] In this embodiment of the present application, the change determination module 302 includes: an identification acquisition submodule, which is used to obtain the device identification of the object to be detected; a configuration cache submodule, which is used to obtain the configuration information of the object to be detected according to a set time interval based on the device identification, and cache it in the local cache of the object to be detected to form the historical configuration information of the object to be detected; a configuration comparison submodule, which is used to compare the configuration information of the object to be detected at the current moment with the configuration information of the previous adjacent moment of the current moment in the historical configuration information in the local cache, and if there is a difference between the configuration information at the current moment and the configuration information of the previous adjacent moment, it is determined that the configuration information has changed; wherein the previous adjacent moment is a moment that is separated from the current moment by a set time interval in the historical configuration information and is located before the current moment.

[0083] In this embodiment of the present application, the configuration information includes multiple configuration items of the object to be detected; the configuration comparison submodule compares the configuration information of the object to be detected at the current moment with the configuration information of the previous adjacent moment of the current moment in the historical configuration information, including: the configuration comparison submodule compares the current summary value of the configuration information of the object to be detected at the current moment with the adjacent summary values ​​of the configuration information of the previous adjacent moment of the current moment.

[0084] In this embodiment of the present application, the configuration comparison submodule compares the current configuration information of the object to be detected with the current configuration information of any other object in the cluster, including: the configuration comparison submodule compares the current configuration information of the object to be detected with the current configuration information of any other object in the cluster.

[0085] In this embodiment of the present application, the mutual exclusion module 303 includes: a first mutual exclusion submodule, which is used to determine whether the current configuration information of the object to be detected is the same as the current configuration information of any other object in the cluster.

[0086] In this embodiment of the present application, the mutual exclusion module 303 includes: a parsing submodule, which is used to parse the current configuration information of the object to be detected to obtain the current parsing information, and the current parsing information can show the configuration items of the object to be detected and the corresponding configuration item information; a second submodule, which is used to compare the configuration item information of the object to be detected with the corresponding configuration item information of other objects in the cluster based on the current parsing information.

[0087] In this embodiment of the present application, the execution module 304 includes at least one of the following: a reminder sub-module, used to send an alarm message indicating a configuration abnormality; a stop sub-module, used to suspend the automatic orchestration job of the server configuration item; and a save sub-module, used to save the configuration file to the change database according to the set format.

[0088] In this embodiment of the present application, the configuration information includes multiple configuration items of the object to be detected; accordingly, the mutual exclusion module 303 includes: a cluster determination submodule, used to determine the target cluster; a mutual exclusion configuration item determination submodule, used to determine the configuration items to be tested that need to be mutually exclusive detected in the target cluster according to the configuration information; a target configuration item submodule, used to determine the configuration item corresponding to the configuration item to be tested in the configuration information as the target configuration item; a second mutual exclusion submodule, used to perform mutual exclusion detection on the target configuration item in the target cluster.

[0089] In this embodiment of the present application, the mutually exclusive configuration item determination submodule determines the target configuration items that need to be mutually exclusive detected in the target cluster based on the configuration information, including: the mutually exclusive configuration item determination submodule determines a first node corresponding to a first configuration item from the target cluster, the first configuration item is one of multiple configuration items of the object to be detected, and there is a configuration item in the first node that has the same content as the first configuration item; determines that the proportion of the first node in the target cluster is less than a first threshold; and determines the first configuration item as the configuration item to be tested.

[0090] Furthermore, based on the above configuration monitoring method, the present application embodiment also provides a device, such as Figure 4 As shown, the device 40 includes at least one processor 401, and at least one memory 402 and a bus 403 connected to the processor 401; wherein the processor 401 and the memory 402 communicate with each other through the bus 403; the processor 401 is used to call the program instructions in the memory 402 to execute the above-mentioned configuration monitoring method.

[0091] It should be noted that: the above description of the configuration monitoring device and equipment embodiment is different from the above description of the configuration monitoring device and equipment embodiment. Figures 1 to 2 The description of the method embodiment shown is similar, with the same Figures 1 to 2 The method embodiment shown has similar beneficial effects, so it will not be repeated. For technical details not disclosed in the embodiment of the configuration monitoring device and equipment of this application, please refer to the aforementioned Figures 1 to 2 The method embodiment shown in the figure can be understood by referring to the description, and will not be described in detail for the sake of saving space.

[0092] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0093] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0094] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0095] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately configured as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0096] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0097] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

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

Claims

1. A configuration monitoring method, the method comprising: Obtain configuration information of the object to be detected; Determining, according to the configuration information and the historical configuration information of the object to be detected, that the configuration information of the object to be detected has changed; Performing mutual exclusion detection on the configuration information; Determining that the result of the mutual exclusion detection shows that the configuration information is abnormal, and performing a setting operation; The determining, based on the configuration information and the historical configuration information of the object to be detected, that the configuration information of the object to be detected has changed includes: Obtaining a device identification of the object to be detected; Based on the device identifier, the configuration information of the object to be detected is obtained according to a set time interval, and cached in a local cache of the object to be detected to form historical configuration information of the object to be detected; Comparing the configuration information of the object to be detected at the current moment with the configuration information of the previous adjacent moment in the historical configuration information in the local cache, and if there is a difference between the configuration information at the current moment and the configuration information at the previous adjacent moment, determining that the configuration information has changed; The previous adjacent moment is a moment in the historical configuration information that is separated from the current moment by a set time interval and is located before the current moment.

2. The method according to claim 1, wherein the configuration information includes multiple configuration items of the object to be detected; The comparing the configuration information of the object to be detected at the current moment with the configuration information of the previous adjacent moment of the current moment in the historical configuration information includes: The current summary value of the configuration information of the object to be detected at the current moment is compared with the adjacent summary value of the configuration information at an adjacent moment before the current moment.

3. According to the method of claim 1, the performing mutual exclusion detection on the configuration information comprises: The current configuration information of the object to be detected is compared with the current configuration information of any object in the cluster.

4. The method according to claim 3, wherein determining that the result of the mutual exclusion detection shows that the configuration information is abnormal comprises: It is determined that the current configuration information of the object to be detected is the same as the current configuration information of any object in the cluster.

5. The method according to claim 3, wherein comparing the current configuration information of the object to be detected with the current configuration information of any other object in the cluster comprises: Parsing the current configuration information of the object to be detected to obtain current parsed information, wherein the current parsed information can show the configuration items of the object to be detected and the corresponding configuration item information; Based on the current parsed information, the configuration item information of the object to be detected is compared with corresponding configuration item information of other objects in the cluster.

6. The method according to claim 1, wherein the performing of the setting operation comprises at least one of the following: Sending warning information indicating configuration anomalies; Suspend the automatic orchestration of server configuration items; Save the configuration file to the change database according to the setting format.

7. The method according to claim 1, wherein the configuration information includes a plurality of configuration items of the object to be detected; correspondingly, The performing mutual exclusion detection on the configuration information includes: Identify the target cluster; Determine, according to the configuration information, configuration items to be tested that require mutually exclusive detection in the target cluster; Determine the configuration item corresponding to the configuration item to be tested in the configuration information as the target configuration item; Performing a mutual exclusion check on the target configuration item in the target cluster.

8. According to the method of claim 7, determining the target configuration items in the target cluster that require mutually exclusive detection according to the configuration information comprises: Determine a first node corresponding to a first configuration item from the target cluster, where the first configuration item is one of multiple configuration items of the object to be detected, and a configuration item having the same content as the first configuration item exists in the first node; Determining that a proportion of the first node in the target cluster is less than a first threshold; The first configuration item is determined as the configuration item to be tested.

9. A device comprising at least one processor, and at least one memory and bus connected to the processor; wherein: The processor and the memory communicate with each other via the bus; The processor is used to call the program instructions in the memory to execute the configuration monitoring method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Conflict avoiding method, first routing device and storage medium

    CN110190978A

  • Organization-level network equipment connection management method and device and computer equipment

    CN112260863A