A configuration information processing method, system, storage medium and electronic device

CN115469938BActive Publication Date: 2026-09-18CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211150808.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2026-09-18
Estimated Expiration
2042-09-21

Smart Images

  • Figure CN115469938B_ABST
    Figure CN115469938B_ABST
Patent Text Reader

Abstract

The application discloses a processing method and system of configuration information, a storage medium and an electronic device. If a current server belongs to a distributed database cluster, a configuration file of the distributed database cluster is acquired and loaded to obtain a loading result. A component type to which the current server belongs is determined. Through the component type to which the current server belongs and a loading result corresponding to the component type to which the current server belongs, configuration information corresponding to the current server is collected. The configuration information is integrated and output in a preset output form. Through the above scheme, it is not necessary to manually determine a server component type and adopt a corresponding information collection mode. Only the cluster component configuration information which needs to be manually implemented is collected and packaged in batches, automation and batch collection are realized, the configuration information of each server in the database cluster is collected in a fixed mode and aggregated and output in a fixed format, the manual cost for acquiring the configuration information is reduced, and the acquisition efficiency and query efficiency of the configuration information are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and more specifically, to a method, system, storage medium, and electronic device for processing configuration information. Background Technology

[0002] OceanBase is a fully self-developed, domestically produced distributed database software that achieves financial-grade high availability on ordinary hardware. During operation and maintenance, it is frequently necessary to obtain various basic configuration information of the OceanBase database cluster so that operations and maintenance personnel can understand the basic status of the database.

[0003] However, the OceanBase database cluster is composed of various components, and the methods for obtaining configuration information for different components are not consistent. In addition, there are a large number of distributed database servers. Collecting configuration information requires technical personnel to determine the type of server component and adopt the corresponding information collection method. Due to the high manual cost of obtaining configuration information and the insufficient integration of information, as well as the time-sensitivity of configuration information, a lot of repetitive work is required every time the configuration information of the database cluster is obtained.

[0004] Therefore, existing methods for obtaining configuration information for OceanBase database clusters are costly and inefficient.

[0005] Application content

[0006] In view of this, this application discloses a method, system, storage medium and electronic device for processing configuration information, aiming to reduce the manual cost of obtaining configuration information and improve the efficiency of obtaining and querying configuration information.

[0007] To achieve the above objectives, the disclosed technical solution is as follows:

[0008] The first aspect of this application discloses a method for processing configuration information, the method comprising:

[0009] Determine whether the current server containing the data collection script belongs to a distributed database cluster, and obtain the determination result;

[0010] If the judgment result is that the current server belongs to a distributed database cluster, then the configuration file of the distributed database cluster is obtained and loaded to obtain the loading result; the configuration file is used to characterize the configuration items that should be collected for different types of components;

[0011] Determine the component type to which the current server belongs; the component type includes at least a database management platform type, a database server type, or other application component types;

[0012] Based on the component type of the current server and the loading result corresponding to the component type of the current server, collect the configuration information corresponding to the current server.

[0013] The collected configuration information is integrated and output in a preset output format.

[0014] Preferably, the determination of whether the current server containing the collection script belongs to a distributed database cluster, and the resulting determination, includes:

[0015] Determine whether the operating system of the current server containing the data collection script has a super administrator account, and whether a distributed database directory exists in the current server's directory.

[0016] If the operating system of the current server has a super administrator account and the directory of the distributed database exists in the directory of the current server, then the current server is determined to belong to the distributed database cluster.

[0017] If the operating system of the current server does not have a super administrator account, or if the directory of the distributed database does not exist in the directory of the current server, then the current server is determined not to belong to the distributed database cluster.

[0018] Preferred options also include:

[0019] If the judgment result is that the current server does not belong to the distributed database cluster, then the global flag bit is updated; the global flag bit is used to disable all collection items to end the collection of configuration information.

[0020] Preferably, determining the component type to which the current server belongs includes:

[0021] Determine whether the current server has a preset file directory and / or whether a preset application container engine is installed;

[0022] If the current server has the preset file directory and the preset application container engine is installed, then the component type of the current server is determined to be a database management platform type.

[0023] If the preset file directory exists on the current server, then the component type of the current server is determined to be a database server type;

[0024] If the current server has the preset application container engine installed, then the component type of the current server is determined to be other application component type; the other application component type includes at least middleware and data interaction components of distributed database.

[0025] Preferably, the step of collecting the configuration information corresponding to the current server based on the component type of the current server and the loading result corresponding to the component type of the current server includes:

[0026] If the component type of the current server is a database management platform, obtain the database cluster name according to the path name under the preset file directory, and log in to the database management platform through the database cluster name and the pre-obtained local IP address;

[0027] Collect status monitoring information from the database management platform; the status monitoring information includes at least the performance monitoring status information of all tenants within the database management platform and the performance monitoring status information of all tenants within the database server.

[0028] If the component type of the current server is a database server, log in to the database server to query the database server tenant list; the database server tenant list includes at least system tenants, business tenants and application component tenants;

[0029] System tenants logging into the database server collect cluster deployment structure and business cluster configuration parameters; the cluster deployment structure includes at least cluster host status information, availability zone status information, and database version;

[0030] Application component tenants who log into the database server collect cluster configuration parameters of the application components;

[0031] Business tenants who log into the database server collect configuration parameters for the database-specific service agent cluster.

[0032] If the component type of the current server is another application component type, then the local configuration information of the application component is collected from the application component's configuration file.

[0033] A second aspect of this application discloses a configuration information processing system, the system comprising:

[0034] The judgment unit is used to determine whether the current server containing the collection script belongs to the distributed database cluster and obtain the judgment result.

[0035] The acquisition unit is used to acquire and load the configuration file of the distributed database cluster if the judgment result is that the current server belongs to the distributed database cluster, and obtain the loading result; the configuration file is used to represent the configuration items that should be collected for different types of components.

[0036] The determining unit is used to determine the component type to which the current server belongs; the component type includes at least a database management platform type, a database server type, or other application component types;

[0037] The acquisition unit is used to acquire the configuration information corresponding to the current server by using the component type to which the current server belongs and the loading result corresponding to the component type to which the current server belongs;

[0038] The integrated output unit is used to integrate the collected configuration information and output it in a preset output format.

[0039] Preferably, the determining unit includes:

[0040] The first judgment module is used to determine whether the operating system of the current server containing the collection script has a super administrator account and whether a distributed database directory exists in the current server's directory.

[0041] The first determining module is used to determine the judgment result that the current server belongs to a distributed database cluster if the current server's operating system has a super administrator account and the current server's directory contains a distributed database directory.

[0042] The second determining module is used to determine the judgment result that the current server does not belong to the distributed database cluster if the operating system of the current server does not have a super administrator account or the distributed database directory does not exist in the directory of the current server.

[0043] Preferred options also include:

[0044] The update unit is used to update the global flag bit if the judgment result is that the current server does not belong to the distributed database cluster; the global flag bit is used to disable all collection items to end the collection of configuration information.

[0045] A third aspect of this application discloses a storage medium comprising stored instructions, wherein, when the instructions are executed, the device in which the storage medium resides executes a configuration information processing method as described in any one of the first aspects.

[0046] The fourth aspect of this application discloses an electronic device, including a memory and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors using a method for processing configuration information as described in any of the first aspects.

[0047] As can be seen from the above technical solution, this application discloses a method, system, storage medium, and electronic device for processing configuration information. It determines whether the current server with a collection script belongs to a distributed database cluster, obtains a judgment result, and if the judgment result indicates that the current server belongs to a distributed database cluster, it obtains and loads the configuration file of the distributed database cluster, obtaining a loading result. The configuration file is used to characterize the configuration items that should be collected for different types of components, determining the component type to which the current server belongs. The component type includes at least a database management platform type, a database server type, or other application component types. Based on the component type to which the current server belongs and the corresponding loading result, the configuration information corresponding to the current server is collected, the collected configuration information is integrated, and output in a preset output format. Through this solution, there is no need to manually determine the server component type and adopt the corresponding information collection method. It only requires batch collection and encapsulation of the configuration information of various cluster components that previously required manual implementation, achieving automation and batch processing. It periodically collects the configuration information of each server within the database cluster and aggregates and outputs it according to a fixed format, reducing the manual cost of obtaining configuration information and improving the efficiency of configuration information acquisition and query. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0049] Figure 1 This is a flowchart illustrating a configuration information processing method disclosed in an embodiment of this application;

[0050] Figure 2 This is a schematic diagram of the structure of a configuration information processing system disclosed in an embodiment of this application;

[0051] Figure 3 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. Detailed Implementation

[0052] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0053] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0054] As the background technology indicates, the OceanBase database cluster consists of various components, and the methods for obtaining configuration information for different components are inconsistent. Furthermore, given the large number of distributed database servers, collecting configuration information requires technical personnel to determine the server component type and adopt the corresponding information collection method. Because the manual cost of obtaining configuration information is high, the information integration is insufficient, and the configuration information has a certain time sensitivity, a large amount of repetitive work is required each time the database cluster configuration information is obtained. Therefore, the existing methods for obtaining OceanBase database cluster configuration information are costly and inefficient.

[0055] To address the aforementioned issues, this application discloses a method, system, storage medium, and electronic device for processing configuration information. This eliminates the need for manual identification of server component types and corresponding information collection methods. Instead, it automates and batches the collection of configuration information from various cluster components that previously required manual intervention. The system periodically collects configuration information from each server within the database cluster and aggregates and outputs it in a fixed format, reducing the manual cost of obtaining configuration information and improving the efficiency of both acquisition and querying. Specific implementation details are provided in the following embodiments.

[0056] refer to Figure 1 The image shows a method for processing configuration information disclosed in an embodiment of this application. This method mainly includes the following steps:

[0057] S101: Determine whether the current server with the collection script belongs to the OceanBase distributed database cluster, and obtain the determination result. If the determination result is that the current server belongs to the OceanBase distributed database cluster, then execute S102. If the determination result is that the current server does not belong to the OceanBase distributed database cluster, then execute S106.

[0058] In S101, the collection script is distributed to each node of the database cluster to determine whether the current server (current node) with the collection script belongs to the distributed database OceanBase cluster.

[0059] OceanBase is a domestically developed, fully self-developed distributed database software that achieves financial-grade high availability on ordinary hardware. OceanBase is a domestically developed financial-grade distributed database with features such as strong data consistency, high availability, high performance, online scalability, high compatibility with the Structured Query Language (SQL) standard and mainstream relational databases, and low cost.

[0060] The servers within a distributed database OceanBase cluster can be functionally divided into different components, primarily including the database management platform (OceanBase Cloud Platform, OCP), the database-specific service proxy (OceanBaseDatabase Proxy, OBProxy), the database server (OBServer), and other application components. The OB database cluster is divided into multiple availability zones, each containing multiple OceanBase servers.

[0061] Among them, OBServer is the OceanBase kernel service process, which can be understood as the data node of OceanBase.

[0062] OBProxy serves as the entry point for Oceanbase, acting as a stateless service process between the application and the database server. Business applications route requests to OBServer through OBProxy.

[0063] A cluster refers to the OceanBase distributed database, which consists of multiple database nodes. The OBServer data node contains a business database to form a business cluster, which stores actual business data and configuration information of other components. The OCP contains a metadata database to form an OCP cluster, which stores monitoring data of the business cluster.

[0064] The process of determining whether the current server containing the data collection script belongs to a distributed database cluster and obtaining the determination result is shown in A1-A3.

[0065] A1: Determine whether the operating system of the current server containing the data collection script has a super administrator account, and whether a distributed database directory exists in the current server's directory.

[0066] The configuration collection program first determines whether the current server belongs to the OceanBase cluster by checking whether the operating system has a super administrator (admin) user and whether there is an Oceanbase directory in its home directory.

[0067] The super administrator account is used to run processes that require the admin user to start in OceanBase.

[0068] A2: If the current server's operating system has a super administrator account and the current server's directory contains a distributed database directory, then the current server is determined to belong to a distributed database cluster.

[0069] A3: If the current server's operating system does not have a super administrator account, or if the current server's directory does not contain a distributed database directory, then the current server is determined not to belong to the distributed database cluster.

[0070] If the current server does not belong to the distributed database cluster, the global flag is updated; the global flag is used to disable all collection items to end the collection of configuration information.

[0071] S102: Obtain and load the configuration file of the distributed database OceanBase cluster, and obtain the loading result; the configuration file is used to characterize the configuration items that should be collected for different types of components.

[0072] In S102, the configuration file is loaded to obtain the configuration items to be collected, component types (Observer type, Obproxy type, OCP type, OceanBase middleware (ODP type, OceanBase Migration Service (OMS) type, etc.), OCP management component IP address, database user and encrypted user password, etc.

[0073] ODP is the middleware for the OceanBase distributed database. It is used to solve bottlenecks in data access under massive requests and to address database disaster recovery issues, providing online distributed database services such as horizontal partitioning, smooth scaling, and read / write separation.

[0074] OMS is a service provided by OceanBase that supports data interaction between homogeneous or heterogeneous RDBMS and OceanBase. It provides online data migration and real-time incremental synchronization data replication capabilities. OMS is a data migration tool, not a traditional database, but a business and application-related component.

[0075] The distributed database OceanBase consists of components with different functions. Each server deploys one or more components (generally only one, at most two, to reuse server resources).

[0076] The loading results include at least the configuration items collected from different types of components, the component type, the IP address of the database management platform OCP management component, the database user, and the encrypted user password; the configuration items are the configuration items collected from different types of components.

[0077] S103: Determine the component type of the current server; the component type must include at least the database management platform OCP type, the database server OBServer type, or other application component types.

[0078] The process of determining the component type of the current server is shown in B1-B4.

[0079] B1: Determine if a preset file directory exists on the current server, and / or if a preset application container engine is installed.

[0080] The default file directory is / data / 1 (the data file directory of the distributed database OceanBase).

[0081] The default application container engine is the open-source application container engine Docker. Docker allows developers to package their applications and dependencies into a portable image, which can then be deployed to machines running any popular Linux or Windows operating system, thus achieving virtualization.

[0082] To determine the type of components deployed on the current server, check if the / data / 1 directory (the data file directory of the OB database) exists and if Docker is installed. If both conditions are met, the current server belongs to OCP. If only the / data / 1 directory exists, it belongs to OBServer. If only Docker is deployed, it belongs to other application components (ODP and OMS).

[0083] B2: If the current server has a preset file directory and a preset application container engine is installed, then the component type of the current server is determined to be the database management platform OCP type.

[0084] B3: If the current server only has the preset file directory, then the component type of the current server is determined to be the database server OBServer type.

[0085] B4: If the current server has a default application container engine installed, then the component type of the current server is determined to be other application component type; other application component types include at least the middleware ODP of distributed databases and the data interaction component OMS.

[0086] If the current server only has the default application container engine Docker installed, then the component type of the current server is determined to be another application component type.

[0087] S104: Collect the configuration information corresponding to the current server by using the component type to which the current server belongs and the loading result corresponding to the component type to which the current server belongs.

[0088] The specific process of collecting the configuration information corresponding to the current server by using the component type to which the current server belongs and the loading result corresponding to the component type to which the current server belongs is shown in C1-C7.

[0089] C1: If the current server belongs to the database management platform OCP type, obtain the database cluster name according to the path name in the preset file directory, and log in to OCP using the database cluster name and the pre-obtained local IP address.

[0090] Specifically, the database cluster name is obtained based on the path name under the / data / 1 directory, and the local machine IP address is also obtained.

[0091] C2: Collect status monitoring information from the database management platform OCP; the status monitoring information includes at least the performance monitoring status information of all tenants within OCP and the performance monitoring status information of all tenants within OBServer.

[0092] OceanBase database supports multi-tenant mode, with physical resource isolation between tenants. The SYS tenant is created by default and is responsible for managing the entire cluster, while other tenants are created as needed to store business data or configuration information.

[0093] The performance monitoring status information for all tenants within OBServer includes resource usage, TPS, QPS, slow SQL queries, etc.

[0094] C3: If the current server belongs to the database server type, log in to the database server to query the database server tenant list; the database server tenant list includes at least the system SYS tenant, the business proxy tenant, and the application component tenant.

[0095] Specifically, log in to the SYS tenant in the OCP / OBServer database and query the database server tenant list (_all_tenant table) to obtain a list of all tenants (SYS tenants, business tenants, application component tenants, etc.).

[0096] C4: Log in to the database server to collect the cluster deployment structure and business cluster configuration parameters; the cluster deployment structure includes at least the cluster host status information, availability zone (Zone) status information, and database version.

[0097] C5: Log in to the database server OBServer application component SYS tenant to collect cluster configuration parameters of the application component.

[0098] C6: Login to the database server's business proxy tenant to collect database-specific service proxy and OBProxy cluster configuration parameters.

[0099] C7: If the current server belongs to another application component type, then collect the local configuration information of the application component from the application component's configuration file.

[0100] S105: Integrate the collected configuration information and output it in a preset output format.

[0101] In S105, the default output format can be JSON format text representing key-value pairs or JSON text text representing table data structures. The specific default output format is determined by the technical personnel according to the actual situation, and this application does not impose any specific limitations. The preferred default output formats of this application are JSON format text representing key-value pairs and JSON text text representing table data structures.

[0102] The collected configuration information is formatted into JSON text with both Key-Value and Table structures to adapt to the corresponding front-end pages, and is finally displayed on the front-end.

[0103] S106: Update global flag bit; the global flag bit is used to disable all collection items to end the collection configuration information.

[0104] This solution reduces the steps required for information collection by using relatively sophisticated algorithm control, a dynamically expandable configuration item structure, and a comprehensive range of collection categories. It significantly reduces human intervention, prevents information bias caused by human error, and ensures that the collected information is updated regularly, thus having good timeliness. This is of great significance for the operation and maintenance of OceanBase.

[0105] In this embodiment, there is no need to manually determine the server component type and adopt the corresponding information collection method. Instead, the configuration information of various cluster components that require manual implementation is collected in batches and packaged, which realizes automation and batch processing. The configuration information of each server in the database cluster is collected periodically and aggregated and output in a fixed format, reducing the manual cost of obtaining configuration information and improving the efficiency of obtaining and querying configuration information.

[0106] Based on the configuration information processing method disclosed in the above embodiments, this application also discloses a configuration information processing system, such as... Figure 2As shown, the configuration information processing system includes a judgment unit 201, an acquisition unit 202, a determination unit 203, a collection unit 204, and an integration output unit 205.

[0107] The judgment unit 201 is used to determine whether the current server with the collection script belongs to the distributed database cluster and obtain the judgment result.

[0108] The acquisition unit is used to acquire and load the configuration file of the distributed database cluster if the judgment result is that the current server belongs to the distributed database cluster, and obtain the loading result; the configuration file is used to represent the configuration items that should be collected for different types of components.

[0109] The determination unit 203 is used to determine the component type to which the current server belongs; the component type includes at least the database management platform type, the database server type, or other application component types.

[0110] The acquisition unit 204 is used to acquire the configuration information corresponding to the current server by using the component type to which the current server belongs and the loading result corresponding to the component type to which the current server belongs.

[0111] The integrated output unit 205 is used to integrate the collected configuration information and output it in a preset output format.

[0112] Furthermore, the judgment unit 201 includes a first judgment module, a first determination module, and a second determination module.

[0113] The judgment module is used to determine whether the operating system of the current server containing the collection script has a super administrator account, and whether a distributed database directory exists in the current server's directory.

[0114] The first determining module is used to determine whether the current server belongs to a distributed database cluster if the current server's operating system has a super administrator account and the current server's directory contains a distributed database directory.

[0115] The second determining module is used to determine whether the current server does not belong to the distributed database cluster if the current server's operating system does not have a super administrator account or the current server's directory does not contain a distributed database directory.

[0116] Furthermore, the configuration information processing system also includes an update unit.

[0117] The update unit is used to update the global flag if the judgment result is that the current server does not belong to the distributed database cluster. The global flag is used to disable all collection items to end the collection of configuration information.

[0118] Furthermore, the determining unit 203 includes a second determining module, a third determining module, a fourth determining module, and a fifth determining module.

[0119] The second judgment module is used to determine whether the current server has a preset file directory and / or whether a preset application container engine is installed.

[0120] The third determination module is used to determine the component type of the current server as a database management platform if the current server has a preset file directory and a preset application container engine is installed.

[0121] The fourth determination module is used to determine the component type of the current server as a database server type if a preset file directory exists on the current server.

[0122] The fifth determining module is used to determine the component type of the current server as other application component type if the current server has the preset application container engine installed; other application component types include at least middleware and data interaction components of distributed databases.

[0123] Furthermore, the acquisition unit 204 includes an acquisition module, a first acquisition module, a query module, a second acquisition module, a third acquisition module, a fourth acquisition module, and a fifth acquisition module.

[0124] The acquisition module is used to obtain the database cluster name based on the path name in the preset file directory if the current server belongs to the database management platform type, and then log in to the database management platform using the database cluster name and the pre-obtained local IP address.

[0125] The first acquisition module is used to collect status monitoring information from the database management platform. The status monitoring information includes at least the performance monitoring status information of all tenants within the database management platform and the performance monitoring status information of all tenants within the database server.

[0126] The query module is used to log in to the database server and query the database server tenant list if the current server belongs to the database server component type. The database server tenant list includes at least system tenants, business tenants, and application component tenants.

[0127] The second acquisition module is used to collect cluster deployment structure and business cluster configuration parameters from system tenants who log in to the database server; the cluster deployment structure includes at least cluster host status information, availability zone status information, and database version.

[0128] The third data collection module is used to collect cluster configuration parameters of application components from application component tenants who log in to the database server.

[0129] The fourth data acquisition module is used by business tenants that log in to the database server to collect cluster configuration parameters.

[0130] The fifth acquisition module is used to acquire the local configuration information of the application component from the configuration file of the application component if the current server belongs to another application component type.

[0131] In this embodiment, there is no need to manually determine the server component type and adopt the corresponding information collection method. Instead, the configuration information of various cluster components that require manual implementation is collected in batches and packaged, which realizes automation and batch processing. The configuration information of each server in the database cluster is collected periodically and aggregated and output in a fixed format, reducing the manual cost of obtaining configuration information and improving the efficiency of obtaining and querying configuration information.

[0132] This application also provides a storage medium, which includes stored instructions, wherein the device where the storage medium is located is controlled to execute the above-mentioned configuration information processing method when the instructions are executed.

[0133] This application also provides an electronic device, the structural schematic diagram of which is shown below. Figure 3 As shown, it specifically includes a memory 301 and one or more instructions 302, wherein one or more instructions 302 are stored in the memory 301 and configured to be executed by one or more processors 303 to perform the above-mentioned configuration information processing method.

[0134] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0135] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system-type embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0136] The steps in the methods of the various embodiments of this application can be adjusted, combined, or deleted according to actual needs.

[0137] Finally, it should be noted that in this paper, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0138] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0139] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A processing method of configuration information, characterized by, The method includes: Determine whether the current server containing the data collection script belongs to a distributed database cluster, and obtain the determination result; If the judgment result is that the current server belongs to a distributed database cluster, then the configuration file of the distributed database cluster is obtained and loaded to obtain the loading result; the configuration file is used to characterize the configuration items that should be collected for different types of components; Determine the component type to which the current server belongs; the component type includes at least a database management platform type, a database server type, or other application component types; Based on the component type of the current server and the loading result corresponding to the component type of the current server, collect the configuration information corresponding to the current server. The step of collecting configuration information corresponding to the current server by using the component type of the current server and the loading result corresponding to the component type of the current server includes: If the component type of the current server is a database management platform, obtain the database cluster name according to the path name in the preset file directory, and log in to the database management platform using the database cluster name and the pre-obtained local IP address. Collect status monitoring information from the database management platform; the status monitoring information includes at least the performance monitoring status information of all tenants within the database management platform and the performance monitoring status information of all tenants within the database server. If the component type of the current server is a database server, log in to the database server to query the database server tenant list; the database server tenant list includes at least system tenants, business tenants and application component tenants; System tenants logging into the database server collect cluster deployment structure and business cluster configuration parameters; the cluster deployment structure includes at least cluster host status information, availability zone status information, and database version; Application component tenants who log into the database server collect cluster configuration parameters of the application components; Business tenants who log into the database server collect configuration parameters for the database-specific service agent cluster. If the component type of the current server is another application component type, then the local configuration information of the application component is collected from the configuration file of the application component; The collected configuration information is integrated and output in a preset output format.

2. The method of claim 1, wherein, The determination of whether the current server containing the data collection script belongs to a distributed database cluster, and the resulting determination, includes: Determine whether the operating system of the current server containing the data collection script has a super administrator account, and whether a distributed database directory exists in the current server's directory. If the operating system of the current server has a super administrator account and the directory of the distributed database exists in the directory of the current server, then the current server is determined to belong to the distributed database cluster. If the operating system of the current server does not have a super administrator account, or if the directory of the distributed database does not exist in the directory of the current server, then the current server is determined not to belong to the distributed database cluster.

3. The method of claim 2, wherein, Also includes: If the judgment result is that the current server does not belong to the distributed database cluster, then update the global flag bit; The global flag is used to disable all collection items to end the collection configuration information.

4. The method according to claim 1, characterized in that, Determining the component type to which the current server belongs includes: Determine whether the current server has a preset file directory and / or whether a preset application container engine is installed; If the current server has the preset file directory and the preset application container engine is installed, then the component type of the current server is determined to be a database management platform type. If the preset file directory exists on the current server, then the component type of the current server is determined to be a database server type; If the current server has the preset application container engine installed, then the component type of the current server is determined to be other application component type; the other application component type includes at least middleware and data interaction components of distributed database.

5. A configuration information processing system, characterized in that, The system includes: The judgment unit is used to determine whether the current server containing the collection script belongs to the distributed database cluster and obtain the judgment result. The acquisition unit is used to acquire and load the configuration file of the distributed database cluster if the judgment result is that the current server belongs to the distributed database cluster, and obtain the loading result; the configuration file is used to represent the configuration items that should be collected for different types of components. The determining unit is used to determine the component type to which the current server belongs; the component type includes at least a database management platform type, a database server type, or other application component types; The acquisition unit is used to acquire the configuration information corresponding to the current server by using the component type to which the current server belongs and the loading result corresponding to the component type to which the current server belongs; Specifically, the acquisition unit is used for: If the component type of the current server is a database management platform, obtain the database cluster name according to the path name in the preset file directory, and log in to the database management platform using the database cluster name and the pre-obtained local IP address. Collect status monitoring information from the database management platform; the status monitoring information includes at least the performance monitoring status information of all tenants within the database management platform and the performance monitoring status information of all tenants within the database server. If the component type of the current server is a database server, log in to the database server to query the database server tenant list; the database server tenant list includes at least system tenants, business tenants and application component tenants; System tenants logging into the database server collect cluster deployment structure and business cluster configuration parameters; the cluster deployment structure includes at least cluster host status information, availability zone status information, and database version; Application component tenants who log into the database server collect cluster configuration parameters of the application components; Business tenants who log into the database server collect configuration parameters for the database-specific service agent cluster. If the component type of the current server is another application component type, then the local configuration information of the application component is collected from the configuration file of the application component; The integrated output unit is used to integrate the collected configuration information and output it in a preset output format.

6. The system according to claim 5, characterized in that, The judgment unit includes: The first judgment module is used to determine whether the operating system of the current server containing the collection script has a super administrator account and whether a distributed database directory exists in the current server's directory. The first determining module is used to determine the judgment result that the current server belongs to a distributed database cluster if the current server's operating system has a super administrator account and the current server's directory contains a distributed database directory. The second determining module is used to determine the judgment result that the current server does not belong to the distributed database cluster if the operating system of the current server does not have a super administrator account or the distributed database directory does not exist in the directory of the current server.

7. The system according to claim 6, characterized in that, Also includes: The update unit is used to update the global flag bit if the judgment result is that the current server does not belong to the distributed database cluster. The global flag is used to disable all collection items to end the collection configuration information.

8. A storage medium, characterized in that, The storage medium includes stored instructions, wherein, when the instructions are executed, the device containing the storage medium is controlled to perform the configuration information processing method as described in any one of claims 1 to 4.

9. An electronic device, characterized in that, It includes a memory, and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors using the configuration information processing method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Server performance data acquisition method and device

    CN110347569A

  • Database configuration information acquisition method and device, computer equipment and storage medium

    CN113094088A