Non-intrusive container data processing method and device
Through the method of non-invasive collection of container data and converting it into configuration item format, the problem of the impact of container performance in the cloud-native era is solved, and effective collection of container data and monitoring and health checks of cloud-based products are realized.
Patent Information
- Application Number
- CN202411530172.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-21
AI Technical Summary
In the cloud native era, the resources in the container are effectively configured and managed. Invasive collection methods may have a great impact on the performance of the container. How to collect cloud-based product data such as software, databases, etc. deployed in the container without affecting the performance of the container , conduct monitoring and health checks of cloud-based products.
Collect container data in a non-invasive way, use the container platform interface to obtain the type attributes of the cloud software, and convert the format of the data serialization result file into the configuration item format to be entered into the database according to the configuration model and attributes, and then convert it to the following The result file is stored.
It realizes that container data is collected while ensuring the comprehensiveness and accuracy of configuration management data, avoiding the impact on container performance, so that downstream systems can monitor and health check cloud-based products based on the result files entered.
Smart Images

Figure CN119493630A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of container data processing, and more specifically, to a non-invasive container data processing method and device. Background Art
[0002] With the advent of the cloud-native era, container technology packaging and application deployment have been widely used to achieve rapid deployment and elastic scaling of applications. Currently, configuration items such as containers (pods) have been pushed to configuration management by the container platform, but cloud products such as software and databases deployed in containers have not found a way to obtain them, and downstream systems need these data to monitor and check the health of cloud products.
[0003] In the current virtual machine era, configuration management software, databases and other cloud products are all provided by collection or upstream supply systems. In the process of collecting data of cloud products such as software and databases deployed in containers, it is necessary to send collection scripts and execute them on the machine. This intrusive collection method is feasible in the virtual machine era, but in the cloud native era, the resources in the container are effectively configured and managed, and the intrusive collection method may have a greater impact on the performance of the container.
[0004] Therefore, how to collect cloud product data such as software and databases deployed in the container without significantly affecting the performance of the container, so that the downstream system can monitor and perform health checks on the cloud products based on the stored result files, is an urgent problem to be solved in this application. Summary of the invention
[0005] In view of this, the present application discloses a non-invasive container data processing method and device, which aims to ensure the comprehensiveness and accuracy of configuration management data, so that under the premise of ensuring the comprehensiveness and accuracy of configuration management data, the downstream system can monitor and perform health checks on cloud products based on the stored result files.
[0006] In order to achieve the above purpose, the disclosed technical solution is as follows:
[0007] In a first aspect, the present application discloses a non-intrusive container data processing method, the method comprising:
[0008] During the execution of the collection task, when the configuration management federation service instance pushed by the upstream system is received, the result file corresponding to the collection package returned by the collection virtual machine is collected; wherein the result file is a data serialization result file collected in a non-intrusive manner;
[0009] Calling a container platform interface, and obtaining, through the container platform interface, an attribute corresponding to the type of cloud software in the result file;
[0010] According to the configuration model and the attributes, converting the format of the result file into the format of the configuration item to be stored in the database;
[0011] The result files after conversion are stored in the database.
[0012] Preferably, during the execution of the collection task, when the configuration management federation service instance pushed by the upstream system is received, the result file corresponding to the collection package returned by the collection virtual machine includes:
[0013] Send the collection package to the collected virtual machine to trigger the collection task execution;
[0014] During the execution of the collection task, when the configuration management federation service instance pushed by the upstream system is received, the collection script is executed to obtain the cloud software type on the federation service;
[0015] Determine corresponding configuration items according to the cloud software type;
[0016] The federated service interface is called, and a result file corresponding to the collection package returned by the virtual machine is collected according to the federated service interface, the attributes in the configuration item model and the corresponding configuration items.
[0017] Preferably, the calling of the container platform interface and obtaining the attribute corresponding to the type of cloud software in the result file through the container platform interface includes:
[0018] Determine the correspondence between the type of cloud software and the result file;
[0019] The container platform interface is called, and the attribute corresponding to the type of cloud software in the result file is obtained through the container platform interface and the corresponding relationship.
[0020] Preferably, converting the format of the result file into the format of the configuration item to be stored in the library according to the configuration model and the attribute includes:
[0021] Determine the mapping relationship between the configuration model and the attribute by looking up the table;
[0022] Determine the format of the configuration item to be stored according to the mapping relationship;
[0023] The format of the result file is converted according to the format of the configuration item to be stored in the library, so as to complete the process of converting the format of the result file into the format of the configuration item to be stored in the library.
[0024] Preferably, storing the converted result file in a database comprises:
[0025] The configuration management warehousing interface is called, and the result file after the format conversion is configured and stored in the warehousing through the configuration management warehousing interface.
[0026] A second aspect of the present application discloses a non-intrusive container data processing device, the device comprising:
[0027] A collection unit is used to collect the result file corresponding to the collection package returned by the virtual machine when receiving the configuration management federation service instance pushed by the upstream system during the execution of the collection task; wherein the result file is a data serialization result file collected in a non-intrusive manner;
[0028] A calling acquisition unit, configured to call a container platform interface, and acquire, through the container platform interface, an attribute corresponding to the type of cloud software in the result file;
[0029] A conversion unit, used for converting the format of the result file into the format of the configuration item to be stored in the library according to the configuration model and the attribute;
[0030] The storage unit is used to store the result files after format conversion.
[0031] Preferably, the collection unit comprises:
[0032] The sending module is used to send the collection package to the virtual machine to be collected to trigger the execution of the collection task;
[0033] The monitoring execution module is used to execute the collection script when receiving the configuration management federation service instance pushed by the upstream system during the collection task execution to obtain the cloud software type on the federation service;
[0034] A first determination module, configured to determine a corresponding configuration item according to the cloud software type;
[0035] The collection module is called to call the federated service interface, and collect the result file corresponding to the collection package returned by the virtual machine according to the federated service interface, the attributes in the configuration item model and the corresponding configuration items.
[0036] Preferably, the call acquisition unit includes:
[0037] A second determination module is used to determine the correspondence between the type of cloud software and the result file;
[0038] The calling acquisition module is used to call the container platform interface, and obtain the attribute corresponding to the type of cloud software in the result file through the container platform interface and the corresponding relationship.
[0039] Preferably, the conversion unit comprises:
[0040] A third determination module, used to determine the mapping relationship between the configuration model and the attribute by looking up a table;
[0041] A fourth determination module, used to determine the format of the configuration item to be stored according to the mapping relationship;
[0042] The conversion module is used to convert the format of the result file according to the format of the configuration item to be stored, so as to complete the process of converting the format of the result file into the format of the configuration item to be stored.
[0043] Preferably, the storage unit is specifically used for:
[0044] The configuration management warehousing interface is called, and the result file after the format conversion is configured and stored in the warehousing through the configuration management warehousing interface.
[0045] Through the above technical scheme, it can be known that the present application discloses a non-intrusive container data processing method and device. During the execution of the collection task, when the configuration management federation service instance pushed by the upstream system is received, the result file corresponding to the collection package returned by the collection virtual machine is collected, wherein the result file is a data serialization result file collected in a non-intrusive manner, and the container platform interface is called to obtain the corresponding attributes of the type of cloud software in the result file through the container platform interface. According to the configuration model and attributes, the format of the result file is converted into the format of the configuration item to be stored, and the result file after the conversion format is stored. Through the above scheme, since the intrusive collection method may have a greater impact on the performance of the container, the data serialization result file collected in a non-intrusive manner in this scheme is parsed into the format of the corresponding configuration item to be stored according to the mapping relationship between the configuration item attributes and the attributes in the data serialization result file, and the result file after the conversion format is stored, and the result file successfully stored is configured and managed to meet the consumption of the downstream system, so as to ensure the comprehensiveness and accuracy of the configuration management data, thereby avoiding the impact on the performance of the container, so that under the premise of ensuring the comprehensiveness and accuracy of the configuration management data, the downstream system monitors and checks the health of the cloud product according to the stored result file. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0047] Figure 1 A flowchart of a non-invasive container data processing method disclosed in an embodiment of the present application;
[0048] Figure 2A schematic diagram of a virtual machine collection disclosed in an embodiment of the present application;
[0049] Figure 3 A schematic diagram of cloud product collection disclosed in the embodiments of this application;
[0050] Figure 4 A schematic diagram of the structure of a non-invasive container data processing device disclosed in an embodiment of the present application;
[0051] Figure 5 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0053] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising 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 "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0054] As can be seen from the background technology, in the existing virtual machine era, configuration management software, databases and other cloud products are all provided by collection or upstream supply systems. In the process of collecting data of cloud products such as software and databases deployed in containers, it is necessary to issue collection scripts and execute them on the machine. This intrusive collection method is feasible for the virtual machine era, but for the cloud native era, the resources in the container are effectively configured and managed, and the intrusive collection method may have a greater impact on container performance. Therefore, how to collect cloud product data such as software and databases deployed in containers without having a significant impact on container performance, so that the downstream system can monitor and check the health of cloud products based on the stored result files, is a problem that this application urgently needs to solve.
[0055] In order to solve the above problems, the present application discloses a non-invasive container data processing method and device. Since the invasive collection method may have a significant impact on the performance of the container, the present solution uses the data serialization result file collected by the non-invasive method, and according to the mapping relationship between the configuration item attributes and the attributes in the data serialization result file, the configuration management parses it into the format of the corresponding configuration item to be stored, stores the result file after the format conversion, and performs configuration management on the result file successfully stored to meet the consumption of downstream systems, so as to ensure the comprehensiveness and accuracy of the configuration management data, thereby avoiding the impact on the performance of the container, so that under the premise of ensuring the comprehensiveness and accuracy of the configuration management data, the downstream system monitors and performs health checks on the cloud products according to the stored result file. The specific implementation method is specifically described through the following embodiments.
[0056] refer to Figure 1 FIG. 1 is a flow chart of a non-invasive container data processing method disclosed in an embodiment of the present application. The non-invasive container data processing method mainly includes the following steps:
[0057] S101: During the execution of the collection task, when a configuration management federation service instance pushed by an upstream system is received, a result file corresponding to a collection package returned by the collection virtual machine is collected; wherein the result file is a data serialization result file collected in a non-intrusive manner.
[0058] Configuration management federation services usually involve the centralized management of resources and services in distributed systems so as to share and optimize resource utilization in multiple geographic locations or environments. For example, in the Hadoop ecosystem, the Hadoop Distributed File System (HDFS) Federation is a typical configuration management federation service instance, which allows multiple namespaces (NameNodes) to manage the file system in a Hadoop cluster, and each NameNode manages a different file system namespace, thereby improving the scalability and isolation of the cluster.
[0059] In the container era, resources in containers are effectively configured and managed. The existing intrusive collection method (the collection package is directly sent to the collected host, and the script is executed on the current host) may have a significant impact on container performance. Therefore, this solution proposes to call the container's readable data serialization language (YAML A in 't Markup Language, YAML) file to realize the collection of cloud products, replacing the collection package execution in the container. The data serialization result file is the YAML file.
[0060] The method of calling the container's YAML file is a non-intrusive method. The collection of cloud products is achieved through a non-intrusive method, replacing the collection package execution in the container.
[0061] The non-intrusive method is a method in which the acquisition package is not directly sent to the host being acquired, and the script is not executed on the current host. The non-intrusive method means that there is no need to physically modify the system or device or interrupt its normal operation during the data acquisition process.
[0062] Non-intrusive data collection does not require the installation of sensors or physical modifications inside the user's device or system, so it does not directly access user data or personal information, which helps protect user privacy. Since there is no need to install dedicated monitoring equipment on each device, non-intrusive data collection is usually low-cost and particularly suitable for large-scale deployment. Data collected non-intrusively can maintain data integrity because it is not affected by changes in the status of a single device and can provide a continuous and comprehensive view of the data.
[0063] A data serialization result file is a result file that converts a data structure or object state into a format that can be stored or transmitted.
[0064] The data serialization result file at least includes various software and database information running on the virtual machine, such as: Java framework, Oracle database, Apache middleware, etc. The data serialization result file returns too much content, and only a small amount of content is extracted here. The specific code of the data serialization result file is as follows:
[0065] According to the container platform interface
[0066]
[0067] Specifically, during the execution of the collection task, when the configuration management federation service instance pushed by the upstream system is received, the result file corresponding to the collection package returned by the virtual machine is collected, such as A1-A4 and Figure 2 shown. Figure 2 A schematic diagram of virtual machine acquisition is shown.
[0068] Figure 2 In the virtual machine era, the following steps are included: 1. Sending collection packages; 2. Triggering the execution of collection tasks; 3. Receiving collection results.
[0069] Figure 2 In the process, the collection package is directly sent to the collected virtual machine. After the collection script is executed, the corresponding result file is generated, and the result file is pushed to the configuration management, and the configuration management parses and stores it in the database.
[0070] A1: Send the collection package to the virtual machine to trigger the collection task execution.
[0071] The collection package encapsulates collection instructions for collecting data running on the virtual machine.
[0072] A2: During the execution of the collection task, when the configuration management federated service instance pushed by the upstream system is received, the collection script is executed to obtain the cloud software type on the federated service.
[0073] It should be noted that when the program is running, the federated service can be a component of the business system or a single application.
[0074] Execute the collection script to obtain the cloud-based software types on the federated service to complete the collection of cloud-based products. Figure 3 shown.
[0075] Figure 3 In the configuration, the collection module sends a request to the container to obtain the podYAML;
[0076] When the container receives the podYAML request sent by the configuration collection module, the container platform interface is called to confirm the corresponding relationship according to the cloud software type;
[0077] Get the attributes in the YAML file according to the corresponding relationship;
[0078] Since YAML contains necessary information about the service, configuration management can determine the corresponding configuration item service type based on the cloud software product type (Ticbase database, Zookeeper middleware, etc.) on the federated service, and call the federated service interface to obtain the corresponding data based on the attributes of the service type in the configuration item model;
[0079] Determine the corresponding configuration items based on the cloud software type;
[0080] The federated service interface is called through the container, and the result file (YAML result) corresponding to the collection package is returned according to the federated service interface, the attributes in the configuration item model and the corresponding configuration items.
[0081] A3: Determine the corresponding configuration items based on the cloud software type.
[0082] You can create the required services through YAML files. YAML contains the necessary information of the service, and configuration management can parse the YAML file to create corresponding configuration items. The corresponding configuration items are the configuration items that can be created.
[0083] A4: Call the federation service interface, and collect the result file corresponding to the collection package returned by the virtual machine according to the federation service interface, the attributes in the configuration item model, and the corresponding configuration items.
[0084] In A4, configuration management can determine the corresponding configuration items based on the cloud software type on the federated service, and call the federated service interface to obtain the corresponding data based on the attributes in the configuration item model.
[0085] Cloud software types include Ticbase database, Zookeeper middleware, etc.
[0086] To ensure the timeliness of configuration data, when the upstream system pushes a configuration management federation service instance, configuration management calls the corresponding interface to obtain the YAML data related to this instance.
[0087] S102: Calling a container platform interface, and obtaining, through the container platform interface, an attribute corresponding to the type of cloud software in the result file.
[0088] The type of cloud software is the type of cloud software for the federated service.
[0089] In S102, the correspondence between the type of cloud-based software and the result file is determined, and the container platform interface is called to obtain the attribute corresponding to the type of cloud-based software in the result file through the container platform interface and the correspondence.
[0090] In the virtual machine era, since the collection results have been adjusted into a format that can be stored or transmitted (such as JS key-value pair data (JavaScript Object Notation, JSON) format, etc.) according to the configuration management storage requirements, there is no need to configure the parsing module.
[0091] In the container era, because configuration management is a direct call to the container platform interface, the corresponding relationship is confirmed according to the cloud software type. Taking Kafka as an example, the YAML file returned by the call interface is obtained according to the corresponding relationship of the code of the data serialization result file, and the attributes in the YAML file are parsed into the json format for storage according to the model.
[0092] For reference, spec.components[Kafka].version in Table 1, the data returned in the code of the above data serialization result file is 2.8.1, and the format converted into the configuration item is {"kafka_version":"2.8.1"}. Table 1 shows the mapping relationship between the Kafka configuration model and the YAML file.
[0093] Table 1
[0094]
[0095]
[0096]
[0097] S103: According to the configuration model and attributes, the format of the result file is converted into the format of the configuration item to be stored in the database.
[0098] It should be noted that, regardless of whether it is the container era or the cloud-native era, the configuration collection or configuration parsing modules have been encapsulated into a format that can be directly stored in the database according to the configuration model, and the configuration management storage interface is called to store the configuration item data.
[0099] Specifically, according to the configuration model and attributes, the process of converting the format of the result file into the format of the configuration item to be stored is shown in B1-B3.
[0100] B1: Determine the mapping relationship between the configuration model and the attribute by looking up the table.
[0101] The mapping relationship between the configuration model and the attributes is determined by looking up Table 1 above.
[0102] B2: Determine the format of the configuration items to be stored based on the mapping relationship.
[0103] In B2, the format of the configuration item to be stored is determined according to the mapping relationship between the configuration model and the attributes in Table 1.
[0104] B3: The format of the result file is converted according to the format of the configuration item to be stored, so as to complete the process of converting the format of the result file into the format of the configuration item to be stored.
[0105] For example, for the configuration item Kafka, the configuration attribute Code is kafka_version, and the attribute in the YAML file corresponding to kafka_version is spec.components[Kafka].version. If the data returned in the code of the above data serialization result file is 2.8.1, the format of the configuration item to be stored is {"kafka_version":"2.8.1"}.
[0106] S104: storing the converted result file in the database.
[0107] In S104, the configuration management warehousing interface is called, and the result file after the format conversion is configured and stored in the warehousing through the configuration management warehousing interface.
[0108] In order to ensure the timeliness of configuration data, once the configuration management finds that the federated server has changed, it calls the corresponding interface to obtain the YAML file, thereby enhancing the timeliness of data acquisition.
[0109] Because it is not recommended to use intrusive collection methods for containers, and there is no suitable platform to push configuration management corresponding data, and cloud products in containers are necessary configuration items for monitoring and health checks. Therefore, this application proposes a YAML file for obtaining federal services. According to the mapping relationship between configuration item attributes and attributes in the YAML file, configuration management parses it into the corresponding data format, and successfully enters configuration management to meet downstream system consumption. This application proposes a solution for configuration management to directly obtain YAML files from the container platform, parse them into configuration management models and store them in the database to ensure the comprehensiveness and accuracy of configuration management data.
[0110] Beneficial effects of the embodiments of the present application: Since the invasive collection method may have a significant impact on the container performance, the data serialization result file collected by the present solution in a non-invasive manner is configured and parsed into the format of the corresponding configuration item to be stored according to the mapping relationship between the configuration item attributes and the attributes in the data serialization result file, and the result file after the format conversion is stored in the warehouse. The successfully stored result file is configured and managed to meet the consumption of downstream systems, so as to ensure the comprehensiveness and accuracy of the configuration management data, thereby avoiding the impact on the container performance, so that under the premise of ensuring the comprehensiveness and accuracy of the configuration management data, the downstream system can monitor and perform health checks on the cloud products according to the stored result file.
[0111] Based on the above embodiments Figure 1 A non-intrusive container data processing method is disclosed, and an embodiment of the present application also discloses a non-intrusive container data processing device, such as Figure 4 As shown, the non-invasive container data processing device includes:
[0112] The collection unit 401 is used to collect the result file corresponding to the collection package returned by the virtual machine when receiving the configuration management federation service instance pushed by the upstream system during the execution of the collection task; wherein the result file is a data serialization result file collected in a non-intrusive manner;
[0113] The calling acquisition unit 402 is used to call the container platform interface and obtain the attribute corresponding to the type of cloud software in the result file through the container platform interface;
[0114] The conversion unit 403 is used to convert the format of the result file into the format of the configuration item to be stored in the database according to the configuration model and the attributes;
[0115] The storage unit 404 is used to store the result file after the format conversion.
[0116] Furthermore, the collection unit 401 includes:
[0117] The sending module is used to send the collection package to the virtual machine to be collected to trigger the execution of the collection task;
[0118] The monitoring execution module is used to execute the collection script when receiving the configuration management federation service instance pushed by the upstream system during the collection task execution to obtain the cloud software type on the federation service;
[0119] A first determination module is used to determine corresponding configuration items according to the cloud software type;
[0120] The collection module is called to call the federated service interface, and collects the result file corresponding to the collection package returned by the virtual machine according to the federated service interface, the attributes in the configuration item model and the corresponding configuration items.
[0121] Further, calling the acquisition unit 402 includes:
[0122] The second determination module is used to determine the correspondence between the type of cloud software and the result file;
[0123] The calling acquisition module is used to call the container platform interface, and obtain the corresponding attributes of the cloud software type in the result file through the container platform interface and the corresponding relationship.
[0124] Furthermore, the conversion unit 403 includes:
[0125] A third determination module is used to determine the mapping relationship between the configuration model and the attribute by looking up a table;
[0126] A fourth determination module is used to determine the format of the configuration item to be stored according to the mapping relationship;
[0127] The conversion module is used to convert the format of the result file according to the format of the configuration item to be stored in the warehouse, so as to complete the process of converting the format of the result file into the format of the configuration item to be stored in the warehouse.
[0128] Furthermore, the storage unit 404 is specifically used to call the configuration management storage interface, and configure the converted result file into the storage through the configuration management storage interface.
[0129] Beneficial effects of the embodiments of the present application: Since the invasive collection method may have a significant impact on the container performance, the data serialization result file collected by the present solution in a non-invasive manner is configured and parsed into the format of the corresponding configuration item to be stored according to the mapping relationship between the configuration item attributes and the attributes in the data serialization result file, and the result file after the format conversion is stored in the warehouse. The successfully stored result file is configured and managed to meet the consumption of downstream systems, so as to ensure the comprehensiveness and accuracy of the configuration management data, thereby avoiding the impact on the container performance, so that under the premise of ensuring the comprehensiveness and accuracy of the configuration management data, the downstream system can monitor and perform health checks on the cloud products according to the stored result file.
[0130] An embodiment of the present application further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, a device where the storage medium is located is controlled to execute the non-invasive container data processing method as described above.
[0131] The present application also provides an electronic device, whose structural diagram is as follows: Figure 5 As shown, it specifically includes a memory 501 and one or more instructions 502, wherein the one or more instructions 502 are stored in the memory 501 and are configured to be executed by one or more processors 503 to execute the one or more instructions 602 to perform the above-mentioned non-invasive container data processing method.
[0132] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0133] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0134] The steps in the methods of the embodiments of the present application can be adjusted in order, combined, and deleted according to actual needs.
[0135] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0136] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
[0137] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A non-intrusive container data processing method, characterized in that: The method comprises: During the execution of the collection task, when the configuration management federation service instance pushed by the upstream system is received, the result file corresponding to the collection package returned by the collection virtual machine is collected; wherein the result file is a data serialization result file collected in a non-intrusive manner; Calling a container platform interface, and obtaining, through the container platform interface, an attribute corresponding to the type of cloud software in the result file; According to the configuration model and the attributes, converting the format of the result file into the format of the configuration item to be stored in the database; The result files after conversion are stored in the database.
2. The method according to claim 1, characterized in that In the process of executing the collection task, when receiving the configuration management federation service instance pushed by the upstream system, the result file corresponding to the collection package returned by the collection virtual machine includes: Send the collection package to the collected virtual machine to trigger the collection task execution; During the execution of the collection task, when the configuration management federation service instance pushed by the upstream system is received, the collection script is executed to obtain the cloud software type on the federation service; Determine corresponding configuration items according to the cloud software type; The federated service interface is called, and a result file corresponding to the collection package returned by the virtual machine is collected according to the federated service interface, the attributes in the configuration item model and the corresponding configuration items.
3. The method according to claim 2, characterized in that The calling of the container platform interface and obtaining the attribute corresponding to the type of cloud software in the result file through the container platform interface include: Determine the correspondence between the type of cloud software and the result file; The container platform interface is called, and the attribute corresponding to the type of cloud software in the result file is obtained through the container platform interface and the corresponding relationship.
4. The method according to claim 1, characterized in that The converting the format of the result file into the format of the configuration item to be stored in the library according to the configuration model and the attribute includes: Determine the mapping relationship between the configuration model and the attribute by looking up the table; Determine the format of the configuration item to be stored according to the mapping relationship; The format of the result file is converted according to the format of the configuration item to be stored in the library, so as to complete the process of converting the format of the result file into the format of the configuration item to be stored in the library.
5. The method according to claim 1, characterized in that The step of storing the converted result file in a database includes: The configuration management warehousing interface is called, and the result file after the format conversion is configured and stored in the warehousing through the configuration management warehousing interface.
6. A non-invasive container data processing device, characterized in that: The device comprises: A collection unit is used to collect the result file corresponding to the collection package returned by the virtual machine when receiving the configuration management federation service instance pushed by the upstream system during the execution of the collection task; wherein the result file is a data serialization result file collected in a non-intrusive manner; A calling acquisition unit, configured to call a container platform interface, and acquire, through the container platform interface, an attribute corresponding to the type of cloud software in the result file; A conversion unit, used for converting the format of the result file into the format of the configuration item to be stored in the library according to the configuration model and the attribute; The storage unit is used to store the result files after format conversion.
7. The device according to claim 6, characterized in that The acquisition unit comprises: The sending module is used to send the collection package to the virtual machine to be collected to trigger the execution of the collection task; The monitoring execution module is used to execute the collection script when receiving the configuration management federation service instance pushed by the upstream system during the collection task execution to obtain the cloud software type on the federation service; A first determination module, configured to determine a corresponding configuration item according to the cloud software type; The collection module is called to call the federated service interface, and collect the result file corresponding to the collection package returned by the virtual machine according to the federated service interface, the attributes in the configuration item model and the corresponding configuration items.
8. The device according to claim 7, characterized in that The call acquisition unit includes: A second determination module is used to determine the correspondence between the type of cloud software and the result file; The calling acquisition module is used to call the container platform interface, and obtain the attribute corresponding to the type of cloud software in the result file through the container platform interface and the corresponding relationship.
9. The device according to claim 6, characterized in that The conversion unit comprises: A third determination module, used to determine the mapping relationship between the configuration model and the attribute by looking up a table; A fourth determination module, used to determine the format of the configuration item to be stored according to the mapping relationship; The conversion module is used to convert the format of the result file according to the format of the configuration item to be stored, so as to complete the process of converting the format of the result file into the format of the configuration item to be stored.
10. The device according to claim 6, characterized in that The storage unit is specifically used for: The configuration management warehousing interface is called, and the result file after the format conversion is configured and stored in the warehousing through the configuration management warehousing interface.