Monitoring operation and maintenance system, method and equipment of information system based on Ansible and medium
Through the integration of a modular architecture and custom monitoring scripts, the problems of software version in existing systems are solved, and the problems of monitoring and alarm lag in the existing systems are realized, efficient resource management and real-time response of the information system are achieved, and operation and maintenance efficiency and system stability are improved.
Patent Information
- Application Number
- CN202510256902.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-07-25
AI Technical Summary
The existing Ansible-based operation and maintenance monitoring system has problems such as dispersed software versions, cumbersome deployment processes, difficult version inconsistencies, difficult to guarantee, monitoring indicators rely on manual configuration, and alarm information is prone to lag or omission, which is difficult to meet the real-time response needs of complex distributed systems.
It adopts a modular architecture design, including controlled machine management, monitoring management, operation and maintenance management, software warehouse management and monitoring alarm management modules, integrates third-party tools to achieve real-time monitoring and intelligent alarm through custom monitoring scripts and automated deployment.
It realizes efficient resource management, real-time status synchronization, comprehensive monitoring, automated operation and maintenance and timely alarms of the information system, improves the stability and operation and maintenance efficiency of the system, reduces the complexity and error rate of manual operation, and enhances the accuracy and response speed of monitoring.
Smart Images

Figure CN120371375A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer information technology, and particularly to a monitoring and operation and maintenance system, method, device and medium for an information system based on Ansible. Background Art
[0002] With the rapid development of information technology, information systems have become increasingly complex, and traditional operation and maintenance methods have been difficult to meet the requirements of high efficiency and rapid response. As an open-source automated configuration management tool, Ansible has been widely used in the field of automated operation and maintenance due to its simplicity, easy extensibility, and agentless characteristics.
[0003] In related technologies, although the operation and maintenance monitoring system based on Ansible can achieve basic automated configuration management, there are still significant limitations.
[0004] Related systems generally lack a unified software repository management mechanism, resulting in scattered software versions, cumbersome deployment processes, and difficulty in ensuring version consistency, which easily leads to compatibility problems. Secondly, traditional solutions are relatively weak in real-time monitoring and alarm management. Monitoring indicators rely on manual configuration, lacking flexible monitoring templates and intelligent alarm rules. Alarm information is prone to lag or omission, and it is difficult to meet the real-time response requirements of complex distributed systems.
[0005] Therefore, how to avoid software version compatibility problems, improve the timeliness of alarms, and perform precise monitoring has become an urgent problem for those skilled in the art. Summary of the Invention
[0006] In view of this, the present invention provides a monitoring and operation and maintenance system, method, device and medium for an information system based on Ansible to solve the problems in related technologies that software versions are prone to cause compatibility problems, lack flexible monitoring templates and intelligent alarm rules, and alarm information is prone to lag or omission.
[0007] In a first aspect, the present invention provides a monitoring and operation and maintenance system for an information system based on Ansible, the system comprising:
[0008] A controlled machine management module, configured to construct a list of controlled machines through the Inventory function of Ansible and synchronize the status of the controlled machines in the list of controlled machines to the operation and maintenance management module in real time;
[0009] A controlled machine monitoring and management module, configured to integrate a third-party monitoring tool and monitor preset monitoring indicators in real time based on the third-party monitoring tool by executing a custom monitoring script to obtain real-time monitoring data;
[0010] The operation and maintenance management module is used to build an operation and maintenance task library based on the Ansible Playbook component and display the operation and maintenance task scheduling interface;
[0011] The software repository management module is used to build a software repository based on software packaging tools and Ansible scripts, and automate the construction and deployment of software packages;
[0012] The monitoring and alert management module is used to automatically generate alert information when the real-time monitoring data meets the alert conditions.
[0013] In an alternative embodiment, the controlled machine management module includes:
[0014] The resource group configuration unit is used to divide controlled machines with the same attributes into the same resource group; different resource groups correspond to different attributes; the attributes include: usage, function, geographical location, security level, and operating system type;
[0015] The controlled machine configuration unit is used to update the controlled machine list by performing controlled machine configuration operations; the controlled machine configuration operations include: adding a controlled machine, modifying controlled machine information, deleting a controlled machine, querying the status and detailed information of a controlled machine, and querying and managing software information of software installed on the controlled machine;
[0016] The controlled machine power-on / off unit is used to establish a connection with the controlled machine through a remote communication protocol to send a power-on instruction or a power-off instruction to the controlled machine;
[0017] The controlled machine information configuration unit is used to set, modify, and view the detailed information of the controlled machine;
[0018] The terminal connection unit is used to establish a remote connection between the control terminal and the controlled machine;
[0019] The alert viewing unit is used to collect and analyze alert information, and view the alert information and the analysis results of the alert information through the alert monitoring interface;
[0020] The environment variable configuration unit is used to set, modify, and view the environment variables of the controlled machine; the environment variables are configuration parameters of the operating system running environment.
[0021] In an alternative embodiment, the controlled machine monitoring and management module includes:
[0022] The controlled machine resource monitoring unit is used to monitor key indicators of the controlled machine;
[0023] The network resource monitoring unit is used to monitor key indicators of the network;
[0024] The CPU resource monitoring unit is used to monitor key indicators of the CPU;
[0025] A process resource monitoring unit for monitoring key metrics of a process;
[0026] A memory resource monitoring unit for monitoring key metrics of memory;
[0027] A network connectivity monitoring unit for detecting the connection status between a controlled machine and a network device, and the connection status between the controlled machine and an external network;
[0028] A disk resource monitoring unit for monitoring key metrics of a disk.
[0029] In an alternative embodiment, the operation and maintenance management module includes:
[0030] A script configuration unit for writing, testing, deploying, and maintaining scripts;
[0031] A log management unit for collecting log data, performing anomaly detection based on the log data, and visually displaying the log data;
[0032] A batch environment variable configuration unit for batch-configuring environment variables;
[0033] A task configuration unit for configuring operation and maintenance tasks;
[0034] A batch network configuration unit for batch-configuring and managing the network of a controlled machine through batch network configuration operations;
[0035] A batch startup item configuration unit for batch-setting or modifying programs or services that automatically run when the server starts;
[0036] A batch command execution unit for simultaneously sending and executing the same command to multiple servers through a preset command template or a preset command script;
[0037] A batch firewall configuration unit for simultaneously setting the same firewall rules for multiple servers or multiple network devices through a preset rule template or a preset rule script.
[0038] In an alternative embodiment, the software repository management module includes:
[0039] A packaging management unit for performing packaging operations, compression operations, or encryption operations on software packages through software packaging tools;
[0040] A software online / offline unit for performing decryption operations, online operations, or offline operations on software packages;
[0041] A software deployment unit for deploying an already online software package to a controlled machine;
[0042] A software upgrade unit for batch-updating software packages of a target version to target controlled machines, where the target controlled machines are the controlled machines selected by operation and maintenance personnel.
[0043] In an optional implementation manner, the monitoring and alarm management module includes:
[0044] A collection template management unit for adding, deleting, modifying, and querying the preset monitoring metrics and metrics related to collection operations;
[0045] An alarm notification template management unit for setting alarm conditions corresponding to the real-time monitoring data;
[0046] A monitoring and alarm template management unit for setting the monitoring unit in the controlled machine monitoring management module and the management unit in the monitoring and alarm management module;
[0047] An alarm statistics / management unit for obtaining resource monitoring statistics information, alarm statistics information, operation and maintenance statistics information, software statistics information, and backup statistics information, and generating an operation and maintenance report.
[0048] In a second aspect, the present invention provides a monitoring and operation and maintenance method for an information system based on Ansible, including:
[0049] When batch-updating a target software package to a target controlled machine, uploading the encrypted software package to a software repository to perform a shelving operation on the target software package;
[0050] Performing a decryption operation on the target software package to generate version metadata;
[0051] Selecting a target controlled machine from a list of controlled machines and establishing a task dependency relationship based on the version metadata;
[0052] Batch-deploying the target software package to the target controlled machine based on the task dependency relationship, and synchronizing the status of the target controlled machine to the operation and maintenance management module in real time during the deployment process;
[0053] After the deployment is completed, monitoring preset monitoring metrics, obtaining real-time monitoring data, and automatically generating an alarm message when the real-time monitoring data meets the alarm conditions.
[0054] In a third aspect, the present invention provides a computer device, including: a memory and a processor, which are communicatively connected to each other, where the memory stores computer instructions, and the processor executes the computer instructions to execute the monitoring and operation and maintenance method for the information system based on Ansible in the second aspect above.
[0055] Fourthly, the present invention provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the monitoring and operation and maintenance method of the Ansible-based information system in the second aspect above.
[0056] Fifthly, the present invention provides a computer program product, including computer instructions, and the computer instructions are used to cause a computer to execute the monitoring and operation and maintenance method of the Ansible-based information system in the second aspect above.
[0057] The technical solution provided by the present invention has the following technical effects:
[0058] The embodiments of the present invention can be realized through the controlled machine management module:
[0059] Efficient resource management: By using the Inventory function of Ansible to construct a list of controlled machines, the controlled machines can be flexibly grouped and managed. This facilitates the operation and maintenance personnel to quickly locate and manage specific groups of controlled machines. This greatly improves the efficiency of resource management and reduces the complexity and error rate of manual operations.
[0060] Real-time status synchronization: The status of the controlled machines in the controlled machine list is synchronously updated to the operation and maintenance management module in real time, enabling the operation and maintenance personnel to timely understand the running status of the controlled machines. When a controlled machine appears in an abnormal state (such as shutdown, failure, etc.), the operation and maintenance management module can immediately obtain relevant information, providing a timely and accurate basis for subsequent fault troubleshooting and handling, and effectively shortening the fault repair time.
[0061] The embodiments of the present invention can be realized through the controlled machine monitoring and management module:
[0062] Integrating third-party tools to enhance monitoring capabilities: Integrating third-party monitoring tools makes full use of the mature functions and advantages of these tools. Different third-party monitoring tools may have unique advantages in certain specific monitoring metrics or scenarios. Through integration, more comprehensive and professional monitoring can be achieved. Integrating these tools can improve the accuracy and reliability of monitoring.
[0063] Implementing personalized monitoring through custom monitoring scripts: By executing custom monitoring scripts, the system can flexibly monitor the preset monitoring metrics according to actual needs. Different information systems may have different monitoring focuses and requirements, and custom scripts can meet these personalized monitoring needs.
[0064] Obtaining real-time monitoring data: It can obtain monitoring data in real time, providing timely data support for subsequent analysis and decision-making. The operation and maintenance personnel can timely discover the performance changes and abnormal situations of the system based on the real-time monitoring data, and take corresponding measures for adjustment and optimization to avoid further deterioration of the problems.
[0065] The embodiments of the present invention can be implemented through the operation and maintenance management module:
[0066] Build an operation and maintenance task library to improve efficiency: Build an operation and maintenance task library based on the Ansible Playbook component, standardize and automate common operation and maintenance tasks. Operation and maintenance personnel can directly select appropriate tasks from the task library for execution, without having to manually write complex operation and maintenance scripts each time. This not only improves the operation and maintenance efficiency but also ensures the consistency and accuracy of operation and maintenance operations.
[0067] Visual scheduling interface to enhance the user experience: Display the operation and maintenance task scheduling interface, providing an intuitive and convenient operation platform for operation and maintenance personnel. Operation and maintenance personnel can conveniently schedule and manage operation and maintenance tasks through this interface, reducing the operation difficulty of operation and maintenance personnel and improving the efficiency and operability of operation and maintenance management.
[0068] The embodiments of the present invention can be implemented through the software repository management module:
[0069] Automatically build and deploy software packages: Build a software repository based on software packaging tools and Ansible scripts, realizing the automatic build and deployment of software packages. This greatly reduces the time and workload of software deployment, improving the efficiency and accuracy of software deployment.
[0070] Unify the management of software versions: The software repository provides a unified platform for the management of software versions. All software packages are stored in the software repository, facilitating the management and traceability of software versions.
[0071] The embodiments of the present invention can be implemented through the monitoring and alert management module:
[0072] Discover abnormal situations in a timely manner: When the real-time monitoring data meets the alert conditions, automatically generate alert information, enabling the timely discovery of abnormal situations in the system. Operation and maintenance personnel can quickly locate the problem based on the alert information and take corresponding measures for processing.
[0073] Improve the operation and maintenance response speed: The automatic alert mechanism greatly improves the operation and maintenance personnel's response speed to system abnormal situations. Compared with manual regular inspection of monitoring data, automatic alerts can notify operation and maintenance personnel at the first time when a problem occurs, reducing the problem handling time and the impact of system failures on business.
[0074] The technical solution of the present invention realizes the efficient management, comprehensive monitoring, automated operation and maintenance, and timely alert of the information system through the collaborative work of each module, improving the reliability, stability, and operation and maintenance efficiency of the information system. Brief Description of the Drawings
[0075] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the related art. Obviously, the drawings described below are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0076] Figure 1 It is a schematic structural diagram of a monitoring and operation and maintenance system for an information system based on Ansible according to an embodiment of the present invention;
[0077] Figure 2 It is a schematic structural diagram of another monitoring and operation and maintenance system for an information system based on Ansible according to an embodiment of the present invention;
[0078] Figure 3 It is a schematic flowchart of a monitoring and operation and maintenance method for an information system based on Ansible according to an embodiment of the present invention;
[0079] Figure 4 It is a schematic hardware structure diagram of a computer device according to an embodiment of the present invention. Specific Embodiments
[0080] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0081] A series of complex and urgent technical problems faced by current large-scale distributed information systems during monitoring and operation and maintenance. As the scale of information systems continues to expand and complexity increases day by day, traditional manual operation and maintenance methods are difficult to meet the requirements of efficient, accurate, and real-time operation and maintenance. Specifically, these problems include:
[0082] The management of controlled machines is chaotic, and it is difficult to achieve centralized and dynamic management of a large number of controlled machines;
[0083] There are blind spots in the monitoring of controlled machines, and it is impossible to comprehensively and real-time grasp the system operation status;
[0084] The operation and maintenance process is cumbersome and error-prone, resulting in low operation and maintenance efficiency;
[0085] The management of software repositories is not standardized, and software versions are chaotic, increasing the difficulty and cost of maintenance;
[0086] The monitoring and alarm mechanism is imperfect, and the alarm information is lagged or omitted, making it impossible to respond to system failures in a timely manner.
[0087] To solve the above problems, the present invention achieves a technological breakthrough through the following innovative points:
[0088] 1. Adopt a modular architecture design, dividing it into five independent modules: controlled machine management, monitoring management, operation and maintenance management, software repository management, and monitoring and alarm management, supporting flexible expansion and efficient collaboration.
[0089] 2. Integrate the full life cycle management function of software. Through encrypted packaging, version control, and automated deployment, ensure software version consistency and reduce maintenance costs.
[0090] 3. Deeply combine with the monitoring client and introduce a custom monitoring template. Combine threshold rules with a multi-channel alarm mechanism to achieve precise monitoring and rapid response.
[0091] 4. Build a visual operation and maintenance task library based on Ansible Playbook, supporting batch operations, dependency configuration, and multi-mode triggering, significantly improving the efficiency of automated operation and maintenance. These innovations effectively solve the pain points of the existing system in aspects such as chaotic software management, many monitoring blind spots, alarm lag, and insufficient scalability, providing complete technical support for the intelligent operation and maintenance of large-scale distributed systems.
[0092] The embodiment of the present invention provides a monitoring and operation and maintenance system, method, device, and medium for an information system based on Ansible. By integrating the automated configuration management function of Ansible with real-time monitoring technology, it realizes precise control, efficient monitoring, automated operation and maintenance, and intelligent alarm for each node in the information system, greatly improving the stability and operation and maintenance efficiency of the system.
[0093] The embodiment of the present invention provides an embodiment of a monitoring and operation and maintenance system for an information system based on Ansible. This system is used to implement the following embodiments and preferred implementation manners. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0094] Figure 1 It is a schematic structural diagram of a monitoring and operation and maintenance system for an information system based on Ansible according to an embodiment of the present invention. As Figure 1 shown, the monitoring and operation and maintenance system for an information system based on Ansible includes:
[0095] The managed machine management module 11 is used to build a list of managed machines through the Inventory function of Ansible and synchronize the status of the managed machines in the managed machine list to the operation and maintenance management module in real time.
[0096] In this embodiment, the managed machine management module 11 can utilize the Inventory function of Ansible to build a dynamically updated list of managed machines, supporting flexible management based on dimensions such as groups and tags. Establish a connection with the managed machines through the remote command execution interface, allowing operation and maintenance personnel to directly operate on the managed machines through the remote command execution interface to quickly respond to emergencies.
[0097] In this embodiment, the information system can be a large-scale distributed information system.
[0098] The managed machine monitoring and management module 12 is used to integrate third-party monitoring tools and monitor preset monitoring indicators in real time based on the third-party monitoring tools by executing custom monitoring scripts to obtain real-time monitoring data.
[0099] In this embodiment, the preset monitoring indicators include key indicators in aspects such as managed machines, networks, CPUs, processes, memory, network connectivity, and disks. The real-time monitoring data is the numerical values corresponding to the preset monitoring indicators. The real-time monitoring data can be obtained from system logs and application logs.
[0100] In this embodiment, the managed machine monitoring and management module 12 realizes real-time monitoring of key indicators such as managed machines, CPUs, memory, disks, and networks by integrating third-party monitoring tools. Through the Ansible Playbook component, custom monitoring scripts are periodically executed to collect and analyze key information such as system logs and application logs. The period for executing the custom monitoring scripts can be set and modified according to actual needs.
[0101] In this embodiment, third-party monitoring tools such as Prometheus and Zabbix.
[0102] The operation and maintenance management module 13 is used to build an operation and maintenance task library based on the Ansible Playbook component and display the operation and maintenance task scheduling interface.
[0103] In this embodiment, the operation and maintenance task library includes operation and maintenance tasks in various scenarios such as system configuration, software deployment, version upgrade, and fault recovery. Provide a visual operation and maintenance task scheduling interface, supporting various execution modes such as task dependency configuration, scheduled execution, and manual triggering.
[0104] The software repository management module 14 is used to build a software repository based on software packaging tools and Ansible scripts and automate the construction and deployment of software packages.
[0105] In this embodiment, the software repository management module 14 can provide the software repository function, realizing the full-cycle management of software and functions such as online installation and upgrade. At the same time, it realizes the encrypted packaging of software installation packages to ensure the data security of software installation packages during transmission. The software installation package is submitted to the system platform to realize software security decryption and software shelving.
[0106] The monitoring and alarm management module 15 is used to automatically generate alarm information when the real-time monitoring data meets the alarm conditions.
[0107] In this embodiment, alarm thresholds corresponding to each preset monitoring index are set in the monitoring and alarm management module 15. When the real-time monitoring data reaches the corresponding alarm threshold, it is determined that the alarm condition is met, and alarm information is automatically generated.
[0108] After the client is deployed, the client will establish a long TCP connection with the communication service, monitor the network connectivity of the controlled machine and the client status through the long connection, and send some basic data of the controlled machine to the server through TCP, and then the server returns it to the operation and maintenance service to complete the automatic information completion function of the controlled machine. At the same time, the communication service will also synchronize the corresponding collection template information to the client through TCP. The client collects the resource usage of the controlled machine through the collected information and sends it back to the communication service through TCP. Finally, the communication service processes these data.
[0109] In this embodiment, the alarm information includes but is not limited to: basic information:
[0110] Alarm time: Precisely record the specific moment when the alarm is triggered, which helps the operation and maintenance personnel analyze the time point when the problem occurs and judge the impact range and severity of the problem in combination with the business situation of the system operation (such as whether it is during the business peak period). For example, if the alarm occurs during the business transaction peak period, it may affect a large number of users and needs to be processed preferentially.
[0111] Alarm level: Generally divided into different levels such as severe, important, general, and prompt. Severe-level alarms usually indicate that the system has serious failures, such as critical service crashes and database connection failures, and need to be processed immediately. Important-level alarms indicate problems that may affect the normal operation of the system, such as the disk space approaching full. General-level alarms prompt some potential problems, such as a slight increase in system load. Prompt-level alarms are some information that does not affect the system operation but is worthy of attention.
[0112] Alarm type: Clearly define the type of problem targeted by the alarm, such as performance alarms (high CPU usage, insufficient memory, etc.), availability alarms (service unavailable, network connection interruption), security alarms (abnormal login attempts, virus intrusion detection), etc.
[0113] Monitoring object information:
[0114] Controlled machine identifier: including the hostname, IP address, etc. of the controlled machine, which is used to uniquely identify the device with problems. Through this information, the operation and maintenance personnel can quickly locate the specific physical or virtual device and understand its position and role in the network topology.
[0115] Process information: If the alarm is caused by a certain process, the alarm information will include the name of the process, the process ID, etc. This helps the operation and maintenance personnel to deeply analyze the running status of the process, such as judging whether there is abnormal resource occupation.
[0116] Monitoring metric data:
[0117] Abnormal metric value: Specifically record the current value of the monitoring metric that triggers the alarm. For example, if it is a CPU usage alarm, it will display the actual usage rate of the current CPU. If it is a disk I / O alarm, it will give the specific value of the disk read and write rate.
[0118] Normal metric range: At the same time, provide the normal value range of the monitoring metric, so that the operation and maintenance personnel can intuitively understand the degree to which the current metric deviates from the normal state. For example, under normal circumstances, the CPU usage rate is between 10% - 30%, and when the current alarm occurs, the CPU usage rate reaches 80%, which clearly shows the severity of the problem.
[0119] Related environment information:
[0120] Operating system information: including the type of operating system (such as Linux, Windows), version number, etc. Different operating systems may have different methods and tools for handling problems and troubleshooting. Understanding the operating system information helps the operation and maintenance personnel to select appropriate solutions.
[0121] Software version information: If the alarm is related to a specific software, it will include the version number of the software. Different versions of the software may have different vulnerabilities or compatibility issues. Through the version information, it can be judged whether software upgrade or rollback operations are required.
[0122] Context information:
[0123] Associated events: Display other events or operation records related to this alarm. For example, whether there are operations such as software deployment and system configuration changes before the alarm occurs. These information can help the operation and maintenance personnel analyze the possible causes of the problem.
[0124] Log summary: Intercept part of the system log or application log related to the alarm to provide more detailed information for the operation and maintenance personnel. The log may contain key information such as error codes and exception stacks, which helps to deeply troubleshoot the root cause of the problem.
[0125] Set the threshold of the monitoring metrics. When the metrics exceed the threshold, an alarm is automatically triggered. Multiple alarm methods (such as email, SMS notification, etc.) are supported to ensure that the alarm information can be delivered to relevant personnel in a timely manner.
[0126] Figure 2 It is a schematic structural diagram of another monitoring and operation and maintenance system of an Ansible-based information system according to an embodiment of the present invention.
[0127] As Figure 2 shown, in the monitoring and operation and maintenance system of the Ansible-based information system, the managed machine management module 11 includes: a resource group configuration unit 111, a managed machine configuration unit 112, a managed machine power-on / off unit 113, a managed machine information configuration unit 114, a terminal connection unit 115, an alarm viewing unit 116, and an environment variable configuration unit 117.
[0128] The managed machine monitoring and management module 12 includes: a managed machine resource monitoring unit 121, a network resource monitoring unit 122, a CPU resource monitoring unit 123, a process resource monitoring unit 124, a memory resource monitoring unit 125, a network connectivity monitoring unit 126, and a disk resource monitoring unit 127.
[0129] The operation and maintenance management module 13 includes: a script configuration unit 131, a log management unit 132, a batch environment variable configuration unit 133, a task configuration unit 134, a batch network configuration unit 135, a batch startup item configuration unit 136, a batch command execution unit 137, and a batch firewall configuration unit 138.
[0130] The software repository management module 14 includes: a packaging management unit 141, a software on / off shelf unit 142, a software deployment unit 143, and a software upgrade unit 144.
[0131] The monitoring and alarm management module 15 includes: a collection template management unit 151, an alarm notification template management unit 152, a monitoring and alarm template management unit 153, and an alarm statistics / management unit 154.
[0132] In an alternative embodiment, the managed machine management module 11 includes:
[0133] A resource group configuration unit 111 for dividing managed machines with the same attributes into the same resource group. Different resource groups correspond to different attributes. Attributes include: usage, function, geographical location, security level, and operating system type.
[0134] In this embodiment, the resource group configuration function divides controlled machines (such as servers, network devices, storage devices, etc.) into different resource groups for more efficient and targeted management and monitoring. Through resource grouping, it is easy to uniformly manage controlled machines with similar characteristics or common uses, improving the operation and maintenance efficiency and management level. "Similar characteristics" means that those devices with common uses or similar functions can be grouped into the same resource group to simplify the management process and improve efficiency.
[0135] In this embodiment, purpose or function: This is one of the most important classification criteria. For example, all servers used to run database services can be divided into a resource group named "DB Servers". All front-end application servers can be assigned to the "Web Servers" resource group.
[0136] In this embodiment, geographical location: If the information system is distributed in different geographical locations, it can be grouped according to its physical location. For example, all devices in the data center located in aaz can be classified into the "aaz Data Center" resource group.
[0137] In this embodiment, security level: According to the sensitivity of the data processed by the device, it can also be divided into different groups. For example, systems that process highly sensitive information can be placed in the "High Security" group, while others may be in the "Standard Security" group.
[0138] In this embodiment, operating system type: The operating system type is also one of the considerations, especially when combined with other conditions. For example, all Linux controlled machines can form a resource group, and Windows controlled machines form another group to facilitate the unified execution of certain tasks specific to that operating system.
[0139] In this embodiment, the group of a controlled machine in the resource group is not unique, and a controlled machine can be divided into different resource groups. For example, a certain controlled machine may be divided into both the "DB Servers" group and the "LinuxServers" group. The resource group management function supports flexible adjustment of the classification criteria, and the administrator can customize the label rules through the interface or API to achieve dynamic grouping (such as label matching based on Ansible Inventory).
[0140] As an example, the system marks the "temporary servers newly added during a certain period" as the "Promo-Temp" group, independently configures the elastic scaling policy and the flow limiting and monitoring rules, and automatically removes them from the group after the activity ends.
[0141] In this embodiment, resource group management includes functions such as resource group query, addition, modification, deletion, adding controlled machines, and removing controlled machines.
[0142] The controlled machine configuration unit 112 is used to update the list of controlled machines by performing controlled machine configuration operations. The controlled machine configuration operations include: adding a controlled machine, modifying controlled machine information, deleting a controlled machine, querying the status and detailed information of a controlled machine, and querying and managing the software information of the software installed on the controlled machine.
[0143] In this embodiment, the controlled machine configuration function allows a series of controlled machine configuration operations to be performed to manage all aspects of the controlled machine, including adding a controlled machine, modifying controlled machine information, deleting a controlled machine, querying the status and detailed information of a controlled machine, and querying and managing the software information of the software installed on the controlled machine. These operations together constitute a comprehensive and detailed management system for the controlled machine.
[0144] In this embodiment, the status of the controlled machine includes: working status, offline status, discovered status, and inspection exception status. The working status means that the status of the controlled machine is normal. The offline status means that the connection between the controlled machine and the master control machine system is disconnected. The discovered status means that the client has transmitted the information of the controlled machine to the master control end / master control machine, but the connection has not been established yet. The inspection exception status means that the controlled machine is abnormal.
[0145] In this embodiment, the detailed information of the controlled machine includes but is not limited to: basic configurations such as the number of CPU cores, memory capacity, and hard disk capacity, network configuration, security settings, etc.
[0146] The controlled machine power-on / off unit 113 is used to establish a connection with the controlled machine through a remote communication protocol to send a power-on instruction or a power-off instruction to the controlled machine.
[0147] In this embodiment, the controlled machine power-on / off function establishes a connection with the controlled machine through a remote communication protocol to achieve remote control of the power state of the controlled machine. Select the controlled machine to be operated on the management interface and send a power-on or power-off instruction, thereby achieving remote power management of the controlled machine. The management interface mentioned here refers to the front-end page of the information system monitoring and operation and maintenance platform based on Ansible, that is, the management interface of the monitoring and operation and maintenance system. The administrator selects the controlled machine to be operated on this interface and sends a power-on instruction or a power-off instruction, thereby achieving remote power management of the controlled machine. This management interface provides intuitive operation options, enabling users to easily perform power control operations for batch or individual devices without directly logging in to each controlled machine for manual intervention.
[0148] The controlled machine information configuration unit 114 is used to set, modify, and view the detailed information of the controlled machine.
[0149] In this embodiment, the controlled machine information configuration function provides a comprehensive set of configuration interfaces and tools for setting, modifying, and viewing the detailed information of the controlled machine. These tools include, but are not limited to, Ansible's inventory management tool, Ansible Playbook editor, and web-based configuration management interfaces (such as Ansible Tower or AWX). Through these tools, administrators can efficiently manage and maintain the information of the controlled machine, including but not limited to the basic attributes of the controlled machine (such as hostname, IP address), network configuration (such as subnet mask, default gateway), security settings (such as firewall rules, SSH access control), and software installation status, etc. For example, using the Ansible Playbook editor, administrators can write automation scripts to batch update the security settings of the controlled machine. Ansible Tower provides an intuitive user interface, making it easier to execute complex configuration tasks. Through this function, administrators can not only ensure that the configuration of the controlled machine meets business requirements and security standards but also achieve efficient management and maintenance of the controlled machine.
[0150] The terminal connection unit 115 is used to establish a remote connection between the control terminal and the controlled machine.
[0151] In this embodiment, the terminal connection function realizes the remote connection between the control terminal and the controlled machine through Ansible automated operation and maintenance technology and the WebSocket communication protocol. This remote connection method allows operations such as remote monitoring, management, configuration, and maintenance of the controlled machine without direct physical contact. The implementation method of the terminal connection function generally includes the following steps: configuring the controlled machine, initiating a connection request, establishing a connection, and remote operation.
[0152] In this embodiment, the control terminal refers to the master machine, that is, the server where the monitoring and operation and maintenance system is deployed.
[0153] The alarm viewing unit 116 is used to collect and analyze alarm information and view the alarm information and the analysis results of the alarm information through the alarm monitoring interface.
[0154] In this embodiment, the alarm viewing function provides a centralized and intuitive alarm monitoring interface for administrators by collecting and analyzing various alarm information generated by the system. These alarm information may come from multiple aspects such as abnormal hardware occupancy rate, software anomalies, and security events of the controlled machine, aiming to help administrators quickly locate problems and take corresponding measures.
[0155] The environment variable configuration unit 117 is used to set, modify, and view the environment variables of the controlled machine. The environment variable is a configuration parameter for the operating system running environment.
[0156] In this embodiment, environment variables are some configuration parameters used to specify the operating environment of the operating system in the operating system. The operating system includes, but is not limited to, Windows, Linux, Galaxy Kylin, etc. Environment variables are crucial for the operation of the system and applications. Through the "environment variable configuration" function, administrators can easily set, modify, and view the environment variables of the controlled machine to meet specific business requirements or solve system problems. For example, when deploying some applications that require specific path configurations, administrators can adjust the environment variables to ensure that the applications can correctly identify the required library files and dependencies. This can not only improve the compatibility and stability of the system but also simplify the management and maintenance of applications.
[0157] In an alternative embodiment, the controlled machine monitoring and management module 12 includes:
[0158] The controlled machine resource monitoring unit 121 is used to monitor the key indicators of the controlled machine.
[0159] In this embodiment, the controlled machine resource monitoring unit 121 is specifically used to monitor the key indicators of the controlled machine and obtain the first real-time data. Visualize the first real-time data. The key indicators of the controlled machine include, but are not limited to, CPU usage rate, memory occupancy rate, disk space usage, and network bandwidth occupancy, etc.
[0160] As an example, the controlled machine resource monitoring unit 121 can specifically be used to monitor the key indicators of the master machine (controlled host). By monitoring and collecting various monitoring data of the controlled host and displaying them in a graphical or tabular manner, the running status and resource utilization of the host can be quickly understood.
[0161] The network resource monitoring unit 122 is used to monitor the key indicators of the network.
[0162] In this embodiment, the network resource monitoring unit 122 is specifically used to monitor the key indicators of the network and obtain the second real-time data. Visualize the second real-time data. The key indicators of the network include, but are not limited to, network devices, network bandwidth, network traffic, and network protocols, etc.
[0163] In this embodiment, the network resource monitoring function aims to comprehensively understand the operating status, performance, and potential security risks of network resources by collecting and analyzing second real-time data in the network. This function supports presenting relevant information in a graphical or numerical manner to help administrators intuitively monitor the status and performance of network resources. For example, the network bandwidth usage is displayed through a real-time chart, while the specific network traffic data is listed in a table, facilitating administrators to quickly identify abnormal traffic patterns or bottleneck problems. This display method not only improves the monitoring efficiency but also enhances the understanding and management capabilities of the network security situation.
[0164] The CPU resource monitoring unit 123 is used to monitor the key metrics of the CPU.
[0165] In this embodiment, the CPU resource monitoring unit 123 is specifically used to monitor the key metrics of the CPU and obtain the third real-time data. Visualize the third real-time data. The key metrics of the CPU include, but are not limited to, CPU usage rate, CPU load, and CPU temperature, etc.
[0166] In this embodiment, the visualization can specifically be presented in a graphical or numerical way. By monitoring the key metrics of the CPU, the real-time operating status and performance bottleneck of the CPU can be understood, and corresponding measures can be taken for optimization and adjustment.
[0167] The process resource monitoring unit 124 is used to monitor the key metrics of processes.
[0168] In this embodiment, the process resource monitoring unit 124 is specifically used to monitor the key metrics of processes and obtain the fourth real-time data. Visualize the fourth real-time data. The key metrics of processes include, but are not limited to, process name, process ID, process CPU usage rate, process memory occupancy rate, and process disk read / write rate, etc.
[0169] In this embodiment, the process resource monitoring unit 124 can analyze and display the running status and resource occupancy of each process by collecting and analyzing the key metrics of each process on the controlled machine, thereby performing effective process management and resource optimization.
[0170] The memory resource monitoring unit 125 is used to monitor the key metrics of memory.
[0171] In this embodiment, the memory resource monitoring unit 125 is specifically used to monitor the key metrics of memory and obtain the fifth real-time data. Visualize the fifth real-time data. The key metrics of memory include, but are not limited to, total memory amount, used memory amount, free memory amount, and memory swap usage, etc.
[0172] In this embodiment, the memory resource monitoring unit 125 can analyze the real-time state of the memory, identify problems such as memory leaks or shortages, and take corresponding measures for optimization and adjustment by collecting data on the memory usage of the controlled machine.
[0173] The network connectivity monitoring unit 126 is used to detect the connection status between the controlled machine and the network device, as well as the connection status between the controlled machine and the external network.
[0174] In this embodiment, the network connectivity monitoring unit 126 ensures that the controlled machine can continuously and stably access the network by regularly detecting the connection status between the controlled machine and the network device, as well as the access ability of the controlled machine to the external network. This function is crucial for ensuring the normal operation, data transmission, and remote management of the controlled machine. Specific detection methods include, but are not limited to, Ping tests, Traceroute analysis, SNMP monitoring, port scanning, HTTP / HTTPS request tests, etc. These network connectivity test functions are integrated into the controlled machine client, and the controlled machine regularly performs network connectivity tests to provide direct feedback on the connection status between the controlled machine and the network device.
[0175] The disk resource monitoring unit 127 is used to monitor key metrics of the disk.
[0176] In this embodiment, the disk resource monitoring unit 127 is specifically used to monitor key metrics of the disk and obtain sixth real-time data. Visualize the sixth real-time data. The key metrics of the disk include, but are not limited to, disk usage rate, disk I / O performance, and disk health status, etc.
[0177] In this embodiment, the disk resource monitoring unit 127 can analyze the real-time state and performance bottleneck of the disk by collecting various key metrics of the disk, and thus take corresponding measures for optimization and adjustment to ensure the effective utilization of disk resources and the stable operation of the system.
[0178] In an alternative embodiment, the operation and maintenance management module 13 includes:
[0179] The script configuration unit 131 is used to write, test, deploy, and maintain scripts.
[0180] In this embodiment, the script configuration unit 131 can improve the efficiency and standardization of operation and maintenance work. By centrally managing operation and maintenance scripts, it realizes the standardization, version control, and automated execution of scripts. This function enables operation and maintenance personnel to more conveniently write, test, deploy, and maintain scripts, thereby enhancing the overall operation and maintenance level. It supports multiple scripting languages such as Python, Shell, Ansible, etc. to meet the operation and maintenance requirements in different scenarios. It provides common script templates to reduce the difficulty of writing new scripts. The script allows direct execution of local scripts on the server where the operation and maintenance management module is located. At the same time, it also supports remote execution and supports executing scripts on remote servers through Ansible technology to achieve cross-server automated operation and maintenance. It supports scheduled execution of scripts and sets scheduled tasks for scripts, such as automatically backing up the database every morning.
[0181] The log management unit 132 is used to collect log data, perform anomaly detection based on the log data, and visually display the log data.
[0182] In this embodiment, the log management unit 132 can help operation and maintenance personnel effectively monitor and diagnose the running status of the information system. By centrally managing and analyzing log data, problems can be discovered and solved in a timely manner to ensure the stability and security of the system. This function not only improves the operation and maintenance efficiency but also enhances the ability of fault troubleshooting and response.
[0183] An example of log management is as follows:
[0184] Data collection and collation:
[0185] Uniformly collect the logs on the master control machine and the logs generated on each controlled machine, including server system logs, network logs, and application logs, etc. The logs are stored in different formats and storage locations. Through log collection tools (such as Filebeat, Fluentd, etc.), the collected logs are cleaned and structured, removing invalid or duplicate data, and converting unstructured log content (such as text descriptions) into structured data.
[0186] Pattern recognition and anomaly detection:
[0187] Based on historical log data, establish the patterns and baselines of normal system behavior. By comparing the current log data with the baseline, identify abnormal situations that deviate from the normal pattern.
[0188] Visual display:
[0189] Bar charts show the changing trend of the number of errors in different time periods, and line charts show the fluctuations of system resource utilization over time. Through the visual interface, operation and maintenance personnel can quickly discover the abnormal points and trend changes in the data.
[0190] The batch environment variable configuration unit 133 is used to batch-configure environment variables.
[0191] In this embodiment, the batch environment variable configuration unit 133 can simplify the process of setting environment variables. Through centralized management and batch configuration, it reduces repetitive work and improves operation and maintenance efficiency. Based on the Ansible user module and environment module, a playbook script is implemented. It supports quickly and accurately setting the required environment variables for multiple target systems or applications to ensure that they can run in the correct environment.
[0192] The specific implementation method examples are as follows:
[0193] 1) Write an Ansible Playbook script: First, according to the requirements of the target system or application, write the corresponding Ansible Playbook script. The script defines the environment variables to be set and their values.
[0194] For example, the environment variables can be set for a certain user on all controlled machines in the following way:
[0195] - name: Set environment variables for user
[0196] hosts: all
[0197] tasks:
[0198] - name: Ensure environment variables are set
[0199] ansible.builtin.user:
[0200] name: "{{target_user}}"
[0201] environment:
[0202] PATH: " / usr / local / bin: / bin: / usr / bin"
[0203] JAVA_HOME: " / usr / lib / jvm / java-8-openjdk-amd64"
[0204] 2) Use the environment directive: In the Playbook, the environment directive can be used to directly specify environment variables, which is suitable for task scenarios where environment variables need to be set temporarily.
[0205] - name: Install application requiring special environment
[0206] hosts: webservers
[0207] environment:
[0208] HTTP_PROXY: "http: / / proxy.example.com:8080"
[0209] HTTPS_PROXY: "https: / / proxy.example.com:8080"
[0210] tasks:
[0211] - name: Download and install application
[0212] shell: wget http: / / example.com / app.tar.gz&&tar xzf app.tar.gz&&cd app&&. / install.sh
[0213] 3) Execute the Playbook: The completed Playbook can be executed through the command-line tool ansible-playbook. In the operation and maintenance detection system, the system has implemented a front-end management page. The operation and maintenance personnel can configure the batch environment variables for multiple target systems by selecting the controlled machines, passing in the path parameters, and clicking Execute. This method supports processing multiple servers simultaneously and ensures that the environment variable settings of all target systems are consistent and accurate.
[0214] 4) Verification and inspection: Finally, additional tasks can be written to verify whether the environment variables are correctly set, such as checking the current environment variable values by reading the file content or running commands to ensure that the configuration is correct.
[0215] Through the above technical means, the batch environment variable configuration can not only efficiently complete the task of setting environment variables, but also significantly reduce the error risk brought by manual configuration, greatly improving the efficiency and accuracy of operation and maintenance work.
[0216] The task configuration unit 134 is used to configure operation and maintenance tasks.
[0217] In this embodiment, the task configuration unit 134 can provide a flexible and efficient way to define and manage operation and maintenance tasks. Through this function, operation and maintenance personnel can customize operation and maintenance tasks suitable for their own environment according to business requirements, system architecture, and operation and maintenance strategies, and set corresponding execution plans, trigger conditions, and execution parameters.
[0218] The batch network configuration unit 135 is used to perform batch network configuration and management on the controlled machines through batch network configuration operations.
[0219] In this embodiment, the batch network configuration unit 135 can implement a playbook script based on the nmcli module of Ansible. Through preset scripts and templates, it performs batch network configuration and management on multiple controlled machines. The batch network configuration operations include IP configuration, routing protocol configuration, security policy deployment, performance monitoring parameter adjustment, etc.
[0220] The batch startup item configuration unit 136 is used to batch set or modify the programs or services that the server automatically runs at startup.
[0221] In this embodiment, the batch startup item configuration unit 136 can implement a playbook script based on the copy module and systemd module of Aniblse. It supports batch setting or modifying the programs or services that the server automatically runs at startup. These startup items (programs or services) can be system services, application programs, scripts, etc., which are crucial for ensuring the server runs as expected and for quickly deploying applications.
[0222] The batch command execution unit 137 is used to send and execute the same command to multiple servers simultaneously through a preset command template or a preset command script.
[0223] In this embodiment, the batch command execution unit 137 can implement a playbook script based on the command module and script module of Ansible. It supports sending and executing the same command or script to the selected multiple servers at one time. Through the preset command template or script, it realizes the automated execution of operation and maintenance tasks, reduces manual intervention and errors. During the execution process, the system can monitor the response of each server in real time and provide detailed execution results and logs, which is convenient for problem troubleshooting and performance analysis.
[0224] The batch firewall configuration unit 138 is used to set the same firewall rules for multiple servers or multiple network devices simultaneously through a preset rule template or a preset rule script.
[0225] In this embodiment, the batch firewall configuration unit 138 can implement a playbook based on the firewalld module of Ansible. The operation and maintenance personnel can set the same firewall rules for multiple servers or network devices at one time without manual configuration one by one. Through preset rule templates or scripts, automated management of firewall configuration is achieved, reducing human errors and omissions. Ensure that the firewall policies of all servers or network devices are consistent, improving the overall network security. The system can monitor the status and traffic conditions of the firewall in real time and automatically adjust or prompt the operation and maintenance personnel to make adjustments as needed.
[0226] In an alternative embodiment, the software repository management module 14 includes:
[0227] The packaging management unit 141 is used to perform packaging operations, compression operations, or encryption operations on software packages through software packaging tools.
[0228] In this embodiment, the software packaging assistant, as an independent application software, undertakes the responsibilities of standard software packaging, compression, encryption, etc. Record some basic information of the software, such as software name, software number, software introduction, etc., and then drag the corresponding software packages, support software packages, scripts, etc. into the application software and compress them into a zip file using the packaging assistant. The packaging assistant is developed based on Qt, and the encryption and decryption rules can be configured independently according to requirements.
[0229] The software online / offline unit 142 is used to perform decryption operations, online operations, or offline operations on software packages.
[0230] In this embodiment, the software online / offline unit 142 can enable the software to be fully reused. The operation and maintenance platform provides a software repository function, realizing the full-cycle management of software and functions such as online installation and upgrade. At the same time, to ensure the security of self-developed software, after development is completed, the software installation package needs to be encrypted and packaged through the software packaging assistant (software package encryption is an optional item and can be encrypted according to actual needs) to ensure the data security of the software installation package during transmission. Submit the software installation package to achieve software security decryption and software online listing.
[0231] The software deployment unit 143 is used to deploy the already online software packages to the controlled machines.
[0232] In this embodiment, the software deployment unit 143 can deploy the software that has been put on the shelves in the software repository to any controlled machine. Among the software on the shelves, the software provider provides a startup script. The software repository supports batch deployment of software packages to selected controlled machines with one click, and decompresses and starts the software or service. This function is implemented based on Ansible. The Ansible playbook mainly uses modules such as the shell module, copy module, and command module.
[0233] The software upgrade unit 144 is used to batch update the software packages of the target version to the target controlled machines, where the target controlled machines are the controlled machines selected by the operation and maintenance personnel.
[0234] In this embodiment, the software upgrade unit 144 can manage the software versions in the software repository. For the latest version of the software, it supports batch updating of this version to selected controlled machines with one click. This function is implemented based on Ansible. The Ansible playbook mainly uses modules such as the shell module, copy module, and command module.
[0235] In an alternative embodiment, the monitoring and alarm management module 15 includes:
[0236] The collection template management unit 151 is used to perform operations such as addition, deletion, modification, and query on the preset monitoring metrics and collection operation-related metrics.
[0237] In this embodiment, the collection template management unit 151 can realize the addition, deletion, modification, and query of collection templates, mainly for the management of collection-related index data such as key metrics, CPU, memory, bandwidth, disk, process usage, and their collection frequencies and collection modes of the controlled machines. When the collection template changes, asynchronous multi-threads will be generated to synchronize the information of the collection template to the corresponding controlled machines through TCP for them to save and take effect.
[0238] The alarm notification template management unit 152 is used to set the alarm conditions corresponding to the real-time monitoring data.
[0239] In this embodiment, the operation and maintenance personnel can, through the alarm notification template management unit 152, define under what circumstances various resources will trigger an alarm and for how long, and set the personnel and methods of alarm notification, etc. After the platform collects the resources of each controlled machine, it performs real-time calculations on the data, triggers an alarm when the alarm conditions are met, generates an alarm record, and notifies relevant personnel to process the alarm information.
[0240] The monitoring and alarm template management unit 153 is used to set the monitoring unit in the controlled machine monitoring management module and the management unit in the monitoring and alarm management module.
[0241] In this embodiment, the operation and maintenance personnel can define templates for various resources to be monitored through the monitoring and alarm template management unit 153. For example, the memory resource monitoring unit, the network resource monitoring unit, etc. The source monitoring template includes resource monitoring data items, comparison policies, alarm thresholds, notification templates, resource groups / controlled machines.
[0242] The alarm statistics / management unit 154 is used to obtain resource monitoring statistics information, alarm statistics information, operation and maintenance statistics information, software statistics information, and backup statistics information, and generate an operation and maintenance report.
[0243] In this embodiment, the alarm statistics / management unit 154 is used to provide a comprehensive statistical analysis function. Through a preset statistical period, it obtains resource monitoring statistics information, alarm statistics information, operation and maintenance statistics information, software statistics information, backup statistics information, etc., in order to generate an operation and maintenance report. The preset statistical period can set the period duration according to actual needs.
[0244] In the present invention, a monitoring and operation and maintenance method for an information system based on Ansible is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0245] Figure 3 is a schematic flowchart of the monitoring and operation and maintenance method for an information system based on Ansible according to an embodiment of the present invention. As Figure 3 shown, the monitoring and operation and maintenance method for an information system based on Ansible includes:
[0246] S101: When batch-updating the target software package to the target controlled machine, upload the encrypted software package to the software repository to perform a shelving operation on the target software package.
[0247] In this embodiment, the target software package is a new version software. The target controlled machine can be a device such as a server.
[0248] S102: Perform a decryption operation on the target software package to generate version metadata.
[0249] S103: Select the target controlled machine from the list of controlled machines and establish a task dependency relationship based on the version metadata.
[0250] S104: Batch-deploy the target software package to the target controlled machine based on the task dependency relationship, and synchronize the status of the target controlled machine to the operation and maintenance management module in real time during the deployment process.
[0251] S105: After the deployment is completed, the preset monitoring indicators are monitored to obtain real-time monitoring data, and when the real-time monitoring data meets the alarm condition, alarm information is automatically generated.
[0252] As an example, scenario 1: automated software deployment and monitoring linkage:
[0253] The target software package is version v2.1 and the target controlled machines are 100 servers.
[0254] Requirement background: A system needs to deploy a new version of software (version v2.1) to 100 servers in batches and monitor the deployment status and resource usage in real time.
[0255] The collaborative process between the system modules is as follows:
[0256] 1) Software warehouse management module:
[0257] The administrator uploads the encrypted v2.1 software package to the unified warehouse through the "Software Listing" function. The system automatically decrypts and generates version metadata (such as dependent libraries and startup scripts).
[0258] 2) Operation and maintenance management module:
[0259] Call the predefined Ansible Playbook (including the copy module to transfer the software package and the shell module to execute the installation script), configure the task dependencies (such as installing the dependent library before starting the service), select the target server group through the visual interface and trigger batch deployment.
[0260] 3) Controlled machine management module:
[0261] Based on the dynamic inventory, the target server group (such as servers with the label "transaction node") is filtered, and the server status is synchronized to the operation and maintenance management module in real time during the deployment process.
[0262] 4) Monitoring and alarm module:
[0263] After the deployment is completed, the monitoring template is automatically triggered (the preset thresholds are CPU usage > 80% and memory usage > 90%), and the resource data of the deployed server is collected by integrating Prometheus.
[0264] If a server has a CPU exception due to a version conflict, the system will immediately notify the operation and maintenance personnel via email / Slack, and link the operation and maintenance management module to execute the rollback script (call the historical version software package).
[0265] In the above application scenario, by strongly binding the software version to the deployment task, errors caused by manual version transfer are avoided, and closed-loop management of the software repository and operation and maintenance is achieved. Moreover, real-time linkage between monitoring and operation and maintenance is also realized: after an alarm is triggered, the operation and maintenance task is automatically called to achieve an automated closed-loop of "monitoring - alarming - repairing".
[0266] As an example, Scenario 2: Quick location and repair of sudden network failures:
[0267] Requirement background: Some servers suddenly experience network latency, and the cause needs to be quickly located and repaired.
[0268] The collaborative process between the system modules is as follows:
[0269] 1) Monitoring and alarming module:
[0270] The network connectivity monitoring template detects that the latency of 10 servers with the database cluster exceeds the threshold (>200ms), triggers an alarm, and marks the controlled units.
[0271] 2) Controlled machine monitoring and management module:
[0272] Pull detailed network traffic data through the client, execute the tcpdump script in combination with Ansible Playbook, capture the network packets of the abnormal servers and analyze them, and locate the failure of the load balancing policy.
[0273] 3) Operation and maintenance management module:
[0274] Call the pre-stored "network configuration optimization" Playbook (adjust the network priority based on the nmcli module) and batch distribute it to the faulty server group.
[0275] 4) Software repository management module:
[0276] If the failure is caused by an overly low version of the load balancing software, automatically pull the latest version from the repository and trigger a hot update to ensure that the business is not interrupted.
[0277] In the above scenario, operation and maintenance decisions are driven by monitoring data, and full-link automation from alarm to root cause analysis and repair actions reduces the time of manual intervention. Cross-module data sharing is achieved in the above scenario: the output of the monitoring module is directly used as the input parameter of the operation and maintenance task, improving the response accuracy.
[0278] Compared with the existing ansible operation and maintenance detection system, the present invention has the following advantages:
[0279] 1. Innovation in modular design:
[0280] Existing Ansible systems mostly adopt the "single script + temporary task" mode, with high coupling between functions and difficult to expand. This invention achieves the following innovations through five decoupling modules:
[0281] Dynamic Inventory and Resource Group Linkage (Controlled Machine Management Module): Supports dynamic grouping by business tags, geographic locations, and other dimensions, and is bound to the threshold rules of the monitoring and alarm module (such as independent configuration of the CPU threshold of the "North China Node Group"), breaking through the limitations of traditional static grouping.
[0282] Deep integration of monitoring templates and Playbook (monitoring alarm module): By customizing collection templates (such as defining a "Java application heap memory monitoring" template and associating JVM indicators with log collection scripts), monitoring rules can be converted into reusable Ansible tasks to avoid repeated development.
[0283] The present invention adopts modular design, and realizes clear division of functions and independent operation by dividing the system into five modules: controlled machine management, controlled machine monitoring management, operation and maintenance management, software warehouse management, and monitoring alarm management. This design not only improves the flexibility and scalability of the system, but also makes the interaction between modules clearer and more efficient. Each module can be independently developed and optimized according to actual needs, thereby improving the performance and stability of the entire system.
[0284] 2. Originality of software full life cycle management:
[0285] The existing system lacks a unified software management mechanism, and the present invention achieves this through the chain of encrypted packaging-version control-automated deployment:
[0286] Automation of encryption and decryption: The packaging tool developed using Qt supports dynamic key generation and transmission encryption (such as AES-256) to ensure the security of software packages during transmission and storage. This function requires customized development and is not natively supported by Ansible.
[0287] Intelligent version rollback: The software repository records the version dependency graph, automatically detects compatibility and repairs environment variables during rollback (such as synchronously downgrading the dependent library version when rolling back to v1.0). This logic needs to be implemented in conjunction with a graph database, which has a technical threshold.
[0288] 3. Intelligent linkage between monitoring and operation and maintenance:
[0289] Traditional monitoring tools (such as Zabbix) only provide alarm notifications. The present invention implements active operation and maintenance through the following designs:
[0290] Alarm rules are bound to Playbooks. For example, when the disk utilization rate > 95%, the "log cleaning" Playbook is automatically triggered, and the threshold is dynamically adjusted based on the execution result (e.g., expand the disk if it is still insufficient after cleaning).
[0291] Multi-source data fusion analysis: Integrate system logs (collected through clients), performance metrics (Prometheus), and network traffic (sFlow) data, and analyze potential faults through data analysis (such as analyzing memory leak nodes based on historical data). This solution requires customized data pipelines and algorithms, rather than simply stacking functions.
[0292] Through the construction of a systematic monitoring and operation and maintenance system, the present invention realizes the comprehensive control and efficient operation and maintenance of information systems. This method not only improves the automation level of operation and maintenance, reduces the cost and error rate of manual intervention, but also effectively improves the stability and response speed of the system through real-time monitoring and intelligent alarms, providing a strong guarantee for the stable operation of information systems.
[0293] The present invention can solve the problems faced by current large-scale distributed information systems in the process of operation and maintenance, such as low efficiency, slow response speed, many monitoring blind spots, chaotic software management, and untimely alarm handling. The present invention makes full use of the advantages of Ansible and realizes the automatic execution and batch processing of operation and maintenance tasks by writing Ansible Playbooks. This not only greatly reduces the burden on operation and maintenance personnel, but also improves the accuracy and efficiency of operation and maintenance. At the same time, the flexibility of Ansible also enables the present invention to easily handle various complex operation and maintenance scenarios.
[0294] The present invention integrates monitoring tools and technologies to achieve comprehensive and real-time monitoring of each component of the information system. By setting monitoring thresholds and rules, the system can automatically detect potential problems and trigger alarms. Alarm information is sent to relevant personnel in a timely manner through multiple channels to ensure that faults can be quickly responded to and processed. The present invention realizes the centralized storage, version control, and automatic deployment of software packages. This not only simplifies the software deployment process, but also ensures that all controlled machines use the same software version, reducing compatibility problems caused by version inconsistencies. At the same time, the automatic deployment function of the software repository also improves the efficiency and accuracy of software deployment.
[0295] The present invention makes full use of the advantages of Ansible and realizes the automated execution and batch processing of operation and maintenance tasks by writing Ansible Playbooks. This not only greatly reduces the burden on operation and maintenance personnel but also improves the accuracy and efficiency of operation and maintenance. At the same time, the flexibility of Ansible enables the present invention to easily handle various complex operation and maintenance scenarios. The present invention integrates monitoring tools and technologies to achieve comprehensive and real-time monitoring of each component of the information system. By setting monitoring thresholds and rules, the system can automatically detect potential problems and trigger alarms. The alarm information is sent to relevant personnel in a timely manner through multiple channels to ensure that faults can be quickly responded to and processed. The present invention realizes the centralized storage, version control, and automated deployment of software packages. This not only simplifies the software deployment process but also ensures that all controlled machines use the same software version, reducing compatibility problems caused by inconsistent versions. At the same time, the automated deployment function of the software repository also improves the efficiency and accuracy of software deployment.
[0296] An embodiment of the present invention further provides a computer device. Please refer to Figure 4 , Figure 4 which is a schematic diagram of the hardware structure of a computer device provided by an alternative embodiment of the present invention. As Figure 4 shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as a server array, a set of blade servers, or a multi-processor system). Figure 4 In
[0297] this example, one processor 10 is taken as an example.
[0298] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above programmable logic device can be a complex programmable logic device, a field programmable gate array, a general array logic, or any combination thereof.
[0299] The memory 20 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function. The data storage area can store data created according to the use of the computer device and the like. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely provided with respect to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0300] The memory 20 may include a volatile memory, such as a random access memory. The memory may also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive. The memory 20 may further include a combination of the above types of memories.
[0301] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
[0302] An embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code originally stored in a remote storage medium or a non-transitory machine-readable storage medium and to be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc. Further, the storage medium may also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiment is implemented.
[0303] A part of the present invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the present invention through the operations of the computer. Those skilled in the art should understand that the forms of existence of computer program instructions in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0304] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A monitoring and operation and maintenance system for an information system based on Ansible, characterized in that, Including: A controlled machine management module, which is used to build a list of controlled machines through the Inventory function of Ansible and synchronize the status of the controlled machines in the controlled machine list to the operation and maintenance management module in real time; A controlled machine monitoring and management module, which is used to integrate third-party monitoring tools and monitor preset monitoring metrics in real time based on the third-party monitoring tools by executing custom monitoring scripts to obtain real-time monitoring data; An operation and maintenance management module, which is used to build an operation and maintenance task library based on the Ansible Playbook component and display an operation and maintenance task scheduling interface; A software repository management module, which is used to build a software repository based on software packaging tools and Ansible scripts and automate the construction and deployment of software packages; A monitoring and alarm management module, which is used to automatically generate alarm information when the real-time monitoring data meets the alarm conditions.
2. The system according to claim 1, wherein The controlled machine management module includes: A resource group configuration unit, which is used to divide controlled machines with the same attributes into the same resource group; different resource groups correspond to different attributes; the attributes include: usage, function, geographical location, security level, and operating system type; A controlled machine configuration unit, which is used to update the controlled machine list by executing controlled machine configuration operations; the controlled machine configuration operations include: adding a controlled machine, modifying controlled machine information, deleting a controlled machine, querying the status and detailed information of a controlled machine, and querying and managing software information of software installed on the controlled machine; A controlled machine power-on / off unit, which is used to establish a connection with the controlled machine through a remote communication protocol to send a power-on instruction or a power-off instruction to the controlled machine; A controlled machine information configuration unit, which is used to set, modify, and view the detailed information of the controlled machine; A terminal connection unit, which is used to establish a remote connection between the control terminal and the controlled machine; An alarm viewing unit, which is used to collect and analyze alarm information and view the alarm information and the analysis result of the alarm information through an alarm monitoring interface; An environment variable configuration unit, which is used to set, modify, and view the environment variables of the controlled machine; the environment variables are configuration parameters of the operating system running environment.
3. The system according to claim 1, characterized in that The controlled machine monitoring and management module includes: A controlled machine resource monitoring unit, which is used to monitor key indicators of the controlled machine; A network resource monitoring unit, which is used to monitor key indicators of the network; A CPU resource monitoring unit, which is used to monitor key indicators of the CPU; A process resource monitoring unit, which is used to monitor key indicators of the process; A memory resource monitoring unit, which is used to monitor key indicators of the memory; A network connectivity monitoring unit, which is used to detect the connection status between the controlled machine and the network device and the connection status between the controlled machine and the external network; A disk resource monitoring unit, which is used to monitor key indicators of the disk.
4. The system according to claim 1, wherein The operation and maintenance management module includes: A script configuration unit, which is used to write, test, deploy, and maintain scripts; A log management unit, which is used to collect log data, perform anomaly detection based on the log data, and visually display the log data; A batch environment variable configuration unit, which is used to batch-configure environment variables; A task configuration unit, which is used to configure operation and maintenance tasks. A batch network configuration unit for batch network configuration and management of controlled machines through batch network configuration operations; A batch startup item configuration unit for batch setting or modifying programs or services that automatically run when the server starts; A batch command execution unit for sending and executing the same command to multiple servers simultaneously through a preset command template or a preset command script; A batch firewall configuration unit for setting the same firewall rules for multiple servers or multiple network devices simultaneously through a preset rule template or a preset rule script.
5. The system according to claim 1, characterized in that, The software repository management module includes: A packaging management unit for performing packaging operations, compression operations, or encryption operations on software packages through software packaging tools; A software on / off-shelf unit for performing decryption operations, on-shelf operations, or off-shelf operations on software packages; A software deployment unit for deploying the already on-shelf software packages to controlled machines; A software upgrade unit for batch updating software packages of the target version to target controlled machines, where the target controlled machines are the controlled machines selected by the operation and maintenance personnel.
6. The system according to claim 1, wherein The monitoring and alert management module includes: A collection template management unit for adding, deleting, modifying, and querying the preset monitoring metrics and metrics related to collection operations; An alert notification template management unit for setting alert conditions corresponding to the real-time monitoring data; A monitoring and alert template management unit for setting the monitoring unit in the controlled machine monitoring management module and the management unit in the monitoring and alert management module; An alert statistics / management unit for obtaining resource monitoring statistics information, alert statistics information, operation and maintenance statistics information, software statistics information, and backup statistics information, and generating an operation and maintenance report.
7. A monitoring and operation and maintenance method for an information system based on Ansible, characterized in that, Includes: When batch updating the target software package to the target controlled machine, uploading the encrypted software package to the software repository to perform an on-shelf operation on the target software package; Performing a decryption operation on the target software package to generate version metadata; Selecting a target controlled machine from the list of controlled machines and establishing a task dependency relationship based on the version metadata; Based on the task dependency relationship, batch deploying the target software package to the target controlled machine, and synchronizing the status of the target controlled machine to the operation and maintenance management module in real time during the deployment process; After the deployment is completed, monitoring the preset monitoring metrics, obtaining real-time monitoring data, and automatically generating an alert message when the real-time monitoring data meets the alert conditions.
8. A computer device, characterized in that, Includes: A memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the method according to claim 7.
9. A computer-readable storage medium, characterized in that, Computer instructions are stored on the computer-readable storage medium, and the computer instructions are used to cause a computer to execute the method according to claim 7.
10. A computer program product, characterized in that, Includes computer instructions, and the computer instructions are used to cause a computer to execute the method according to claim 7.