Cloud platform resource abnormality automatic processing system and method
Through the cloud platform resource exception automatic processing system, the rule module and function computing component are used to automatically handle abnormal resources, which solves the problem of operation and maintenance personnel locating and processing abnormal resources in the cloud computing environment, and achieves efficient resource utilization and traceability of problems.
Patent Information
- Application Number
- CN202110834688.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-23
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-07-23
AI Technical Summary
In a cloud computing environment, it is difficult for operation and maintenance personnel to quickly and accurately locate and handle abnormal resources. Existing script checking methods increase learning costs and waste resources, and it is difficult to trace the cause of the problem.
An automatic processing system for cloud platform resource exceptions is designed. It filters abnormal information through customized rule templates and log modules through the rule module, uses the cloud platform function computing component to perform exception processing, and records historical information through the API module to realize automatic processing of abnormal resources. and problem backtracking.
It reduces the learning cost and resource waste of operation and maintenance personnel, improves the utilization of abnormal resources, enables fault archiving and traceability, and optimizes the computing resource management of the cloud platform.
Smart Images

Figure CN113553238B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of abnormal resource query and automatic processing of cloud platforms, and in particular to a system and method for automatically processing abnormal resources of cloud platforms. Background Art
[0002] Currently, cloud computing is in a rapid development stage, and technological industry innovations are constantly emerging. Enterprise cloud is gradually becoming a trend. With the surge in cloud infrastructure resources, how to efficiently manage and operate massive resources has become an important issue that cloud providers and platform operators need to solve.
[0003] Usually, cloud computing vendors need to regularly perform security compliance checks, label checks, configurations, and security baseline checks on resources within the cloud platform. At the same time, due to platform anomalies and unconventional operations by customers, some resources may be in an abnormal state. For operation and maintenance personnel, it is increasingly important to quickly and accurately locate abnormal resources, extract problem logs for problem analysis, and fix simple anomalies.
[0004] At present, for cloud platforms with fewer resources, operators can manually execute commands to check abnormal resources in each project; for environments with more than 100 resource virtual machines, manual inspection becomes extremely difficult, and generally scripts are executed to check and handle abnormal resources in the environment. However, executing scripts will increase the learning cost of operators on the one hand, and on the other hand, as the number of scripts increases, the cost of code maintenance will also increase. At the same time, a large number of scripts are run on the cloud platform in the form of scheduled tasks, which will also cause a waste of resources invisibly, and the computing resources of physical devices cannot be maximized. It is also not easy to record the history of exception handling executed by scripts, trace and locate the cause of the problem. It is now recommended to use cloud platform hosting services to implement this function. Many cloud platforms provide resource compliance inspection services, such as OpenStack's Congress service and AWS Config service. Taking open source openstack as an example, the congress syntax is similar to functional writing, which is relatively complex, and will also increase the learning cost of operators, and the usage scenario is single. It is no longer maintained by the openstack community. Summary of the invention
[0005] The technical task of the present invention is to provide a cloud platform resource anomaly automatic processing system and method to solve the problem of how to quickly and accurately locate abnormal resources, extract problem logs for problem analysis and repair simple anomalies.
[0006] The technical task of the present invention is achieved in the following way: a cloud platform resource exception automatic processing system, which uses a rule module to customize a rule template to query and filter log exception information or resource information in the log module to filter abnormal resources in the cloud platform, and exports functions adapted to the function computing components of each manufacturer's cloud platform through the exception handling module. The operation and maintenance personnel use the serverless architecture to trigger the function processing logic defined in the function calculation according to the defined rule template, pass in the corresponding parameters, and perform abnormal resource repair and processing; or feedback the error log, related abnormal resources and related information to the operation and maintenance personnel in the form of messages for manual processing; at the same time, by calling the API module to query the record information in the database module, historical abnormal problems can be traced back.
[0007] Preferably, the system comprises:
[0008] API module, used to query database historical query information and exception handling information or call rule module to query and handle exception resources;
[0009] The rule module is used to receive requests, extract target data, and customize rule templates;
[0010] The log module is used to call elasticsearchsdk to filter the platform WORNING and ERROR abnormal logs collected by Prometheus or Grafana on the cloud platform;
[0011] Database module, used to record query information, query results, trigger events and execution results to the database;
[0012] The exception handling module is used to record the mapping relationship between the custom rule template and the exception handling template, parse the corresponding exception resources, and trigger the corresponding function computing component events. The exception handling template includes a script library composed of several exception scripts. The exception scripts correspond to the actions in the rule template one by one. By triggering the actions event, the exception script is triggered to process the corresponding exception data.
[0013] The cloud platform function computing component is used to execute the corresponding function code according to the triggered event, fix the abnormal problem or push the abnormal resources and log information to the operation and maintenance personnel for subsequent processing.
[0014] Preferably, the rule template is a simple DSL language declarative cloud resource configuration based on YAML; the rule template includes resources, filters and actions;
[0015] Among them, resources defines resource types, and resource sources include cloud platform logs and resource information queried through API modules;
[0016] Filters define methods for filtering resources, including commonly used value filtering and regular matching;
[0017] Actions define operations on abnormal resources. For log ERROR resources, manually execute actions after querying and analyzing the abnormal log information.
[0018] Preferably, the template file of the rule template includes a log rule template file, and the log resource template file includes the following fields:
[0019] name: customize the name of this query;
[0020] description: customize the detailed description of this query;
[0021] resource: uses openstack.log.<component name>.<service name> to identify the resource type. It also supports query filtering of cloud platform-related services and physical machine logs such as rabbitmq.log, mysql.log, and system.log.
[0022] Filters: define filter conditions to filter the nodes where the service is located and the log level;
[0023] Actions: For log query processing, it is generally set to wating, which means that no processing is done for the time being and only the log information is filtered. After analysis, new policies are created to define actions to handle abnormal resources based on the query results.
[0024] Preferably, the template file of the rule template also includes a resource rule template file, and the resource rule template file includes the following fields:
[0025] name: customize the name of this query;
[0026] description: customize the detailed description of this query;
[0027] Resource: The service engine has built-in resource types that can be obtained through openstacksdk. Refer to the usage documentation to match the corresponding resources;
[0028] Filters: filter resource information by value filtering and regular matching;
[0029] Actions: The service engine has built-in resource processing methods that can be operated through OpenStack SDK. Refer to the usage documentation to match the needs of operation and maintenance personnel, trigger the events defined in Function Compute, and handle abnormal resources.
[0030] A method for automatically processing cloud platform resource anomalies, wherein operation and maintenance personnel customize query attributes through rule templates, query and filter log anomaly information or resource information to filter abnormal resources in the cloud platform, automatically generate processing functions based on the results, and execute corresponding functions through cloud platform function computing components to process abnormal resources; or feed back error logs, related abnormal resources and related information to operation and maintenance personnel in the form of messages for manual processing.
[0031] Preferably, the method is as follows:
[0032] The operation and maintenance personnel write resources, filters and actions indicators, call the log module to use elasticsearchsdk to query and filter the abnormal information of the target component log, or call openstacksdk to query and filter the cloud platform resource information, obtain abnormal resources, and trigger abnormal processing events;
[0033] The background of the exception handling module records each query information, query results, trigger events and execution results to the database through the database module, and provides an API module for operation and maintenance personnel to query historical queries and process operations;
[0034] The exception handling module records the mapping relationship between the custom rule template and the exception handling template, and the developer develops the exception handling function according to the processing engine structure;
[0035] The operation and maintenance personnel call the API module to export the function template that adapts the function computing component and pass it into the cloud platform function computing component. According to the engine usage document, the corresponding actions attribute is defined in the template file to call and trigger the exception handling function to handle abnormal resources.
[0036] Preferably, the rule template is a simple DSL language declarative cloud resource configuration based on YAML; the rule template includes resources, filters and actions;
[0037] Among them, resources defines resource types, and resource sources include cloud platform logs and resource information queried through API modules;
[0038] Filters define methods for filtering resources, including commonly used value filtering and regular matching;
[0039] Actions define operations on abnormal resources. For log ERROR resources, manually execute actions after querying and analyzing the abnormal log information.
[0040] More preferably, the template file of the rule template includes a log rule template file and a resource rule template file;
[0041] The log resource template file includes the following fields:
[0042] name: customize the name of this query;
[0043] description: customize the detailed description of this query;
[0044] resource: uses openstack.log.<component name>.<service name> to identify the resource type. It also supports query filtering of cloud platform-related services and physical machine logs such as rabbitmq.log, mysql.log, and system.log.
[0045] Filters: define filter conditions to filter the nodes where the service is located and the log level;
[0046] Actions: For log query processing, it is generally set to wating, which means that no processing is done for the time being and only the log information is filtered. After analysis, new policies are created to define actions to handle abnormal resources based on the query results;
[0047] The resource rule template file includes the following fields:
[0048] name: customize the name of this query;
[0049] description: customize the detailed description of this query;
[0050] Resource: The service engine has built-in resource types that can be obtained through openstacksdk. Refer to the usage documentation to match the corresponding resources;
[0051] Filters: filter resource information by value filtering and regular matching;
[0052] Actions: The service engine has built-in resource processing methods that can be operated through OpenStack SDK. Refer to the usage documentation to match the needs of operation and maintenance personnel, trigger the events defined in Function Compute, and handle abnormal resources.
[0053] A computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the above-mentioned method for automatically handling abnormalities of cloud platform resources is implemented.
[0054] The cloud platform resource abnormality automatic processing system and method of the present invention have the following advantages:
[0055] (1) The present invention defines rule indicators, obtains abnormal resource information, triggers events, repairs abnormalities or pushes messages to operation and maintenance personnel for manual processing; and reduces the abnormal resource collection and learning costs of operation and maintenance personnel by defining structured rule templates, optimizes the operation and maintenance process, and introduces function calculation mode to standardize the management of abnormal processing scripts. At the same time, it realizes that fault problems can be archived and traced, refines the script processing frequency, and changes from the original scheduled task form to a combination of manual inspection and scheduled tasks, further optimizes cloud platform computing resources and improves resource utilization;
[0056] (ii) The present invention refers to the implementation idea of the open source project: cloud-custodian, and implements resource management by defining simple rule strategies; at the same time, it expands the open source project cloud-custodian, and combines the function computing model to propose an automatic processing method for resource anomalies of the openstack cloud platform based on the function computing architecture. Operation and maintenance personnel can customize query attributes through the rule model, filter abnormal logs collected by the log module or query resource information; automatically generate processing functions based on the results, execute corresponding functions through the function computing component of the cloud platform, and process abnormal resources. For more complex anomalies that require manual intervention, send messages to feedback the abnormal resource information and the queried logs to the operation and maintenance management personnel for further analysis and processing.
[0057] Among them, cloud-custodian is an automated compliance check tool for public cloud scenarios. It is a declarative cloud resource configuration baseline check tool based on the YAML simple DSL language. It can retrieve cloud resources that do not meet the baseline configuration through standard YAML language definition rules and can automatically correct them to achieve cloud infrastructure management. However, cloud-custodian currently only supports AWS, Azure and GCP environments;
[0058] Serverless is a cloud-native development model that allows developers to focus on building and running applications without having to manage servers. It is a more fine-grained service architecture model than microservices. It further splits each API operation that users want to perform, that is, it further splits operations such as creating, reading, deleting, and updating resources. Each operation is abstracted as a function. Serverless is published by directly exposing these functions. Therefore, Serverless is often called Function as Service (FaaS). Currently, AWS, Alibaba Cloud, Tencent Cloud, and Huawei Cloud all provide function computing services. With the rise of Serverless as a new computing model after microservices, serverless further splits operations such as creating, reading, deleting, and updating resources. Each operation is abstracted as a function and published directly in the form of exposing these functions. It is a more fine-grained service architecture model than microservices, providing more advanced resource abstraction capabilities. From the perspective of cloud computing, Serverless maximizes the use of computing resources and reduces resource idleness and fragmentation.
[0059] (III) The operation and maintenance personnel of the present invention can query the processing history information by calling the API module. All historical call requests, abnormal data, processing events, processing results and other information will be archived in the database, and the RestFul API will be exposed to the outside world for the operation and maintenance personnel to track the processing history, analyze the abnormal causes, and realize the tracing of abnormal problems;
[0060] (IV) The present invention simplifies the processing logic of operation and maintenance personnel by defining a structured rule module; further classifies and abstracts the logs collected by monitoring and the resource information obtained by calling the platform openstacksdk into information that can be queried by the rule module, reduces the learning cost of operation and maintenance personnel, improves the readability of operation and maintenance personnel, greatly increases operation and maintenance efficiency, and accurately locates abnormal resources and services;
[0061] (V) The backend obtains abnormal logs, platform resource status information, platform service status, physical machine and virtual machine system logs and other information by calling the monitoring log interface, platform openstacksdk, shell commands, etc., and abstracts the corresponding calls into structured rule modules for use by operation and maintenance personnel. It has rich sources of abnormal resource data, from log information of platform components, physical devices, and related services to resource status information such as cloud platform virtual machines, images, volumes, etc. obtained by calling openstacksdk, covering cloud platform nodes, services, and resources;
[0062] (VI) The present invention exports functions that can be used by cloud platform function computing components by calling APIs, standardizes the management of exception handling scripts, and maps them with actions in the rule engine to implement exception handling logic; the present invention introduces cloud platform function computing components to run exception resource processing scripts by triggering events. Through the exception handling module, operation and maintenance personnel can call API interfaces to export functions that are adapted to each cloud platform function computing component, use serverless architecture to trigger events in function computing according to customized rule templates, pass in corresponding parameters, and perform abnormal resource repair and processing;
[0063] (VII) The exception handling module of the present invention records the mapping relationship between the rule template and the exception handling template. Developers can develop exception handling functions according to the processing engine structure without paying attention to the underlying physical environment, simplifying the development process and making it more convenient to maintain the processing script in the form of services; and the operation and maintenance personnel only need to call the API interface to export the function template of the adaptation function computing component and pass it into the cloud platform function computing component, and define the corresponding actions attribute in the template file according to the engine usage document, so as to call and trigger the exception handling function and process the abnormal resources without paying attention to the underlying implementation logic, thus reducing the learning cost and improving the operation and maintenance efficiency. The cloud platform function computing component can also fine-grainedly control and manage the operation history of the operation and maintenance personnel, handle exceptions when calling, and optimize the cloud platform resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The present invention is further described below in conjunction with the accompanying drawings.
[0065] Attached Figure 1 This is a structural block diagram of the automatic processing system for cloud platform resource exceptions. DETAILED DESCRIPTION
[0066] The cloud platform resource abnormality automatic processing system and method of the present invention are described in detail below with reference to the drawings and specific embodiments of the specification.
[0067] In the description of the present invention, it should be understood that the terms "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description. They do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0068] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0069] Embodiment 1:
[0070] The cloud platform resource exception automatic processing system of the present invention uses a rule module to customize a rule template to query and filter the log exception information or resource information in the log module to filter abnormal resources in the cloud platform, and exports functions that are adapted to the function computing components of each manufacturer's cloud platform through the exception processing module. The operation and maintenance personnel use the serverless architecture to trigger the function processing logic defined in the function calculation according to the defined rule template, pass in the corresponding parameters, and perform abnormal resource repair and processing; or feedback the error log, related abnormal resources and related information to the operation and maintenance personnel in the form of messages for manual processing; at the same time, by calling the API module to query the record information in the database module, historical abnormal problems can be traced back. As shown in the attached Figure 1 As shown, the system includes,
[0071] API module, used to query database historical query information and exception handling information or call rule module to query and handle exception resources;
[0072] The rule module is used to receive requests, extract target data, and customize rule templates;
[0073] The log module is used to call elasticsearchsdk to filter the platform WORNING and ERROR abnormal logs collected by Prometheus or Grafana on the cloud platform;
[0074] Database module, used to record query information, query results, trigger events and execution results to the database;
[0075] The exception handling module is used to record the mapping relationship between the custom rule template and the exception handling template, parse the corresponding exception resources, and trigger the corresponding function computing component events. The exception handling template includes a script library composed of several exception scripts. The exception scripts correspond to the actions in the rule template one by one. By triggering the actions event, the exception script is triggered to process the corresponding exception data.
[0076] The cloud platform function computing component is used to execute the corresponding function code according to the triggered event, fix the abnormal problem or push the abnormal resources and log information to the operation and maintenance personnel for subsequent processing.
[0077] The rule template in this embodiment is a simple DSL language declarative cloud resource configuration based on YAML; the rule template includes resources, filters and actions;
[0078] Among them, resources defines resource types, and resource sources include cloud platform logs and resource information queried through API modules;
[0079] Filters define methods for filtering resources, including commonly used value filtering and regular matching;
[0080] Actions define operations on abnormal resources. For log ERROR resources, manually execute actions after querying and analyzing the abnormal log information.
[0081] The template file of the rule template in this embodiment includes a log rule template file, and the log resource template file includes the following fields:
[0082] name: customize the name of this query;
[0083] description: customize the detailed description of this query;
[0084] resource: uses openstack.log.<component name>.<service name> to identify the resource type. It also supports query filtering of cloud platform-related services and physical machine logs such as rabbitmq.log, mysql.log, and system.log.
[0085] Filters: define filter conditions to filter the nodes where the service is located and the log level;
[0086] Actions: For log query processing, it is generally set to wating, which means that no processing is done for the time being and only the log information is filtered. After analysis, new policies are created to define actions to handle abnormal resources based on the query results. The following is an example of a log rule template file:
[0087]
[0088]
[0089] The template file of the rule template in this embodiment also includes a resource rule template file, and the resource rule template file includes the following fields:
[0090] name: customize the name of this query;
[0091] description: customize the detailed description of this query;
[0092] Resource: The service engine has built-in resource types that can be obtained through openstacksdk. Refer to the usage documentation to match the corresponding resources;
[0093] Filters: filter resource information by value filtering and regular matching;
[0094] Actions: The service engine has built-in resource processing methods that can be operated through OpenStack SDK. Refer to the usage documentation to match the needs of operation and maintenance personnel, trigger the events defined in Function Compute, and handle abnormal resources. The following is an example of a resource rule template file:
[0095]
[0096]
[0097] The working process of the system is as follows:
[0098] (1) Operation and maintenance personnel query the database historical query information and exception handling information by calling the API module or query and handle abnormal resources by calling the rule module;
[0099] (2) The rule module receives the request and extracts the target data. The data comes from the log module calling elasticsearchsdk to filter the platform WORNING and ERROR abnormal logs collected by Prometheus or Grafana on the cloud platform according to the request resources parameter; or from the bottom layer calling openstacksdk to query the cloud platform resource status information;
[0100] (3) Based on the query results, the exception handling module will analyze the corresponding exception and trigger the corresponding cloud platform function computing component event;
[0101] (4) The cloud platform function computing component executes the corresponding function code according to the triggered event, fixes the abnormal problem or pushes the abnormal resources and log information to the operation and maintenance personnel for subsequent processing.
[0102] Embodiment 2:
[0103] The method for automatically handling abnormal cloud platform resources of the present invention is that the operation and maintenance personnel customize the query attributes through the rule template, query and filter the abnormal log information or resource information to filter the abnormal resources in the cloud platform, automatically generate the processing function according to the result, and execute the corresponding function to handle the abnormal resources through the cloud platform function calculation component; or feedback the error log, related abnormal resources and related information to the operation and maintenance personnel in the form of messages for manual processing. The method is as follows:
[0104] S1. The operation and maintenance personnel write resources, filters and actions indicators, call the log module to use elasticsearchsdk to query and filter the abnormal information of the target component log, or call openstacksdk to query and filter the cloud platform resource information, obtain abnormal resources, and trigger abnormal processing events;
[0105] S2. The background of the exception handling module records each query information, query result, trigger event and execution result to the database through the database module, and provides an API module for operation and maintenance personnel to query historical queries and process operations;
[0106] S3. The exception handling module records the mapping relationship between the custom rule template and the exception handling template, and the developer develops the exception handling function according to the processing engine structure;
[0107] S4. The operation and maintenance personnel call the API module to export the function template of the adaptive function computing component and pass it into the cloud platform function computing component. According to the engine usage document, the corresponding actions attribute is defined in the template file to call and trigger the exception handling function to handle the abnormal resources.
[0108] In this embodiment, the rule template of step S3 is a simple DSL language declarative cloud resource configuration based on YAML; the rule template includes resources, filters and actions;
[0109] Among them, resources defines resource types, and resource sources include cloud platform logs and resource information queried through API modules;
[0110] Filters define methods for filtering resources, including commonly used value filtering and regular matching;
[0111] Actions define operations on abnormal resources. For log ERROR resources, manually execute actions after querying and analyzing the abnormal log information.
[0112] The template file of step S4 in this embodiment includes a log rule template file and a resource rule template file;
[0113] The log resource template file includes the following fields:
[0114] name: customize the name of this query;
[0115] description: customize the detailed description of this query;
[0116] resource: uses openstack.log.<component name>.<service name> to identify the resource type. It also supports query filtering of cloud platform-related services and physical machine logs such as rabbitmq.log, mysql.log, and system.log.
[0117] Filters: define filter conditions to filter the nodes where the service is located and the log level;
[0118] Actions: For log query processing, it is generally set to wating, which means that no processing is done for the time being and only the log information is filtered. After analysis, new policies are created to define actions to handle abnormal resources based on the query results;
[0119] The resource rule template file includes the following fields:
[0120] name: customize the name of this query;
[0121] description: customize the detailed description of this query;
[0122] Resource: The service engine has built-in resource types that can be obtained through openstacksdk. Refer to the usage documentation to match the corresponding resources;
[0123] Filters: filter resource information by value filtering and regular matching;
[0124] Actions: The service engine has built-in resource processing methods that can be operated through OpenStack SDK. Refer to the usage documentation to match the needs of operation and maintenance personnel, trigger the events defined in Function Compute, and handle abnormal resources.
[0125] Embodiment 3:
[0126] The embodiment of the present invention further provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions are loaded by a processor, so that the processor executes the cloud platform resource abnormality automatic processing method in any embodiment of the present invention. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code that implements the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device reads and executes the program code stored in the storage medium.
[0127] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0128] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0129] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0130] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A cloud platform resource abnormality automatic processing system, characterized in that: The system uses the rule module to customize the rule template to query and filter the log exception information or resource information in the log module to filter the abnormal resources in the cloud platform. The exception handling module exports the functions that adapt to the function computing components of each manufacturer's cloud platform. The operation and maintenance personnel use the serverless architecture to trigger the function processing logic defined in the function calculation according to the defined rule template, pass in the corresponding parameters, and perform abnormal resource repair and processing; at the same time, by calling the API module to query the record information in the database module, historical abnormal problems can be traced back; the system includes: API module, used to query database historical query information and exception handling information or call rule module to query and handle exception resources; The rule module is used to receive requests, extract target data, and customize rule templates; The log module is used to call elasticsearchsdk to filter the platform WORNING and ERROR abnormal logs collected by Prometheus or Grafana on the cloud platform; Database module, used to record query information, query results, trigger events and execution results to the database; The exception handling module is used to record the mapping relationship between the custom rule template and the exception handling template, parse the corresponding exception resources, and trigger the corresponding function computing component events; The cloud platform function computing component is used to execute the corresponding function code according to the triggered event, fix the abnormal problem or push the abnormal resources and log information to the operation and maintenance personnel for subsequent processing; Among them, the rule template is a simple DSL language declarative cloud resource configuration based on YAML; the rule template includes resources, filters and actions; Among them, resources defines resource types, and resource sources include cloud platform logs and resource information queried through API modules; Filters define methods for filtering resources, including commonly used value filtering and regular matching; Actions define operations on abnormal resources. For log ERROR resources, manually execute actions after querying and analyzing the abnormal log information.
2. The cloud platform resource abnormality automatic processing system according to claim 1 is characterized in that: The template file of the rule template includes a log rule template file, and the log resource template file includes the following fields: name: customize the name of this query; description: customize the detailed description of this query; resource: uses openstack.log.<component name>.<service name> to identify the resource type. It also supports query filtering of cloud platform-related services and physical machine logs such as rabbitmq.log, mysql.log, and system.log. Filters: define filter conditions to filter the nodes where the service is located and the log level; Actions: For log query processing, it is generally set to wating, which means that no processing is done for the time being and only the log information is filtered. After analysis, new policies are created to define actions to handle abnormal resources based on the query results.
3. The cloud platform resource abnormality automatic processing system according to claim 1 or 2, characterized in that: The template file of the rule template also includes a resource rule template file, and the resource rule template file includes the following fields: name: customize the name of this query; description: customize the detailed description of this query; Resource: The service engine has built-in resource types that can be obtained through openstacksdk. Refer to the usage documentation to match the corresponding resources; Filters: filter resource information by value filtering and regular matching; Actions: The service engine has built-in resource processing methods that can be operated through OpenStack SDK. Refer to the usage documentation to match the needs of operation and maintenance personnel, trigger the events defined in Function Compute, and handle abnormal resources.
4. A method for automatically handling abnormal cloud platform resources, characterized in that: This method is that the operation and maintenance personnel customize the query attributes through the rule template, query and filter the log exception information or resource information to filter the abnormal resources in the cloud platform, automatically generate the processing function according to the result, and execute the corresponding function through the cloud platform function calculation component to process the abnormal resources; the details are as follows: Operation and maintenance personnel write resources, filters, and actions indicators, call the log module to use elasticsearchsdk to query and filter target component log exception information, or call openstacksdk to query and filter cloud platform resource information, obtain abnormal resources, and trigger exception handling events; The background of the exception handling module records each query information, query results, trigger events and execution results to the database through the database module, and provides an API module for operation and maintenance personnel to query historical queries and process operations; The exception handling module records the mapping relationship between the custom rule template and the exception handling template, and the developer develops the exception handling function according to the processing engine structure; The operation and maintenance personnel call the API module to export the function template that adapts the function computing component and pass it into the cloud platform function computing component. According to the engine usage document, the corresponding actions attribute is defined in the template file to call and trigger the exception handling function to handle the abnormal resources. Among them, the rule template is a simple DSL language declarative cloud resource configuration based on YAML; the rule template includes resources, filters and actions; Among them, resources defines resource types, and resource sources include cloud platform logs and resource information queried through API modules; Filters define methods for filtering resources, including commonly used value filtering and regular matching; Actions define operations on abnormal resources. For log ERROR resources, manually execute actions after querying and analyzing the abnormal log information.
5. The method for automatically handling abnormal cloud platform resources according to claim 4, characterized in that: The template files of the rule template include a log rule template file and a resource rule template file; The log resource template file includes the following fields: name: customize the name of this query; description: customize the detailed description of this query; resource: uses openstack.log.<component name>.<service name> to identify the resource type. It also supports query filtering of cloud platform-related services and physical machine logs such as rabbitmq.log, mysql.log, and system.log. Filters: define filter conditions to filter the nodes where the service is located and the log level; Actions: For log query processing, it is generally set to wating, which means that no processing is done for the time being and only the log information is filtered. After analysis, new policies are created to define actions to handle abnormal resources based on the query results; The resource rule template file includes the following fields: name: customize the name of this query; description: customize the detailed description of this query; Resource: The service engine has built-in resource types that can be obtained through openstacksdk. Refer to the usage documentation to match the corresponding resources; Filters: filter resource information by value filtering and regular matching; Actions: The service engine has built-in resource processing methods that can be operated through OpenStack SDK. Refer to the usage documentation to match the needs of operation and maintenance personnel, trigger the events defined in Function Compute, and handle abnormal resources.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method for automatically handling cloud platform resource anomalies as described in claim 4 or 5 is implemented.
