Disclosure of Invention
The embodiment of the application provides a server monitoring method, a device, electronic equipment and a storage medium, which are used for improving convenience in a multi-server monitoring process, reducing complexity of user operation and improving monitoring efficiency.
In a first aspect, an embodiment of the present application provides a server monitoring method, including:
The method comprises the steps of acquiring a monitoring data checking request, wherein the monitoring data checking request carries an identifier of a target server, the target server is any one of N monitored servers, and each monitored server is managed by a corresponding micro-application system;
Determining a target micro-application system for managing a target server in N micro-application systems associated with a main application system;
and displaying the monitoring data of the target server acquired by the target micro-application system through the main application system.
According to the embodiment of the application, one main application system and N micro application systems are constructed, and the association relation between the main application system and the N micro application systems is established. Each micro-application system is configured to monitor or manage one server, for example, to obtain monitoring data of the server it manages, so that N micro-application systems can monitor or manage N servers. The target server is any one of the N servers, and when a user wants to view the monitoring data of the target server, the electronic device can generate a monitoring data viewing request aiming at the target server, so that the target micro-application system for managing the target server can be determined in N micro-application systems associated with the main application system, and the monitoring data of the target server acquired by the target micro-application system is displayed through a display page of the main application system. According to the design, multiple micro-application systems do not need to be frequently switched among different micro-application systems or manually logged in, and monitoring data of multiple servers can be displayed through the display page of a single main application system, so that the operation complexity is greatly reduced, the time cost is balanced, and the monitoring efficiency is improved.
In an alternative embodiment, before displaying, by the host application system, the monitoring data of the target server acquired by the target micro application system, the method further includes:
And if the main application system is in a single sign-on state and the target server supports single sign-on, controlling the target micro-application system to execute single sign-on operation.
In the above embodiment, the differential login mode is proposed by using the characteristic of single sign-on. In supporting single sign-on in multiple application systems, a user only needs to log in once to access all mutually trusted application systems. Therefore, when the main application system is in the single sign-on state, the electronic equipment can control the target micro-application system to automatically execute the single sign-on operation under the condition that the target server supports the single sign-on, the user does not need to input an account password of the target micro-application system to execute the single-point application operation, the user operation is saved, and the method is convenient and quick.
In an alternative embodiment, before displaying, by the host application system, the monitoring data of the target server acquired by the target micro application system, the method further includes:
if the main application system is in a single sign-on state and the target server does not support single sign-on, displaying a first page, wherein the first page comprises a sign-on control for prompting a user to input a sign-on target micro-application system;
And verifying login information input by a user on the first page, and determining that the target micro-application system is in a common login state.
In the above embodiment, in the differential login process, when the main application system is in the single sign-on state, the electronic device may display the first page to the user under the condition that the target server does not support single sign-on, and determine that the target micro-application system is in the normal login state after the user inputs the login information of the target micro-application system on the first page. The normal login state is only used for distinguishing the single sign-on state, and the normal login state is actually obtained. The differential design of different micro-application systems can be applied to the micro-application systems supporting single sign-on or the micro-application systems not supporting single-point application.
In an alternative embodiment, the method further comprises:
If the login cancellation operation of the user is detected, or if the residence time of the user on any page of the main application system exceeds the preset time, responding to a login cancellation request of the main application system, and modifying a global session token carried in the login cancellation request into an invalid state through the main application system;
If the target micro-application system does not support single sign-on, a log-off event is sent to the target micro-application system through the main application system, and the local session token corresponding to the target micro-application system is modified to be in an invalid state through the target micro-application system.
In the above embodiment, for the case that login is required to be logged out, the method of destroying the global session token may be adopted for the main application system, so that for the target micro-application system supporting single sign-on, the local session token thereof may be destroyed by itself along with the destruction of the global session token, that is, the target micro-application system may be logged out by itself, and for the target micro-application system not supporting single sign-on, login-out event may be received from the main application system, and login-out may be performed by destroying the local session token thereof. Thus, the differentiation operation is also performed for log-out, the operation steps are reduced, and the processing speed is increased.
In an alternative embodiment, the method further comprises:
The method comprises the steps of responding to operation of a user on a configuration page, obtaining configuration information for configuring a main application system, wherein the configuration information comprises server parameter configuration information, monitoring index configuration information, instruction task configuration information and incidence relation configuration information, and the incidence relation configuration information comprises a first relation between an instruction task and a server, a second relation between a monitoring index and the server and a third relation between the monitoring index and an alarm contact;
And configuring the main application system and the N micro application systems according to the configuration information.
According to the embodiment, the user can flexibly configure the server parameter configuration information, the monitoring index configuration information, the instruction task configuration information, the association relationship configuration information and the like, and can also change in real time, so that more flexible configuration of the configuration information is realized compared with the related technology.
In an alternative embodiment, the method further comprises:
And the control main application system sends the target event to the target micro application system through the event bus, wherein the target event is a login event, an execution instruction event or an alarm event.
According to the embodiment, the main application system and the target micro application system can communicate through the event bus, so that login events, execution instruction events and alarm events can be timely shared between the main application system and the target micro application system, and synchronization of information and data between the main application system and the target micro application system is ensured.
In an alternative embodiment, the method further comprises:
the login state, the list of monitorable servers, and the global monitoring state information of the main application system and the N micro application systems are stored.
According to the embodiment, the login states of the main application system and the N micro application systems, the list of the monitorable servers and the global monitoring state information are stored, so that the information and the data of the main application system and each micro application system can be conveniently synchronized.
In a second aspect, an embodiment of the present application provides a server monitoring apparatus, including:
the system comprises a data acquisition module, a data processing module and a data processing module, wherein the data acquisition module is used for acquiring a monitoring data viewing request, wherein the monitoring data viewing request carries an identifier of a target server, the target server is any one of N monitored servers, and each monitored server is managed by a corresponding micro application system;
the processing module is used for determining a target micro-application system for managing the target server in N micro-application systems associated with the main application system;
and the display module is used for displaying the monitoring data of the target server acquired by the target micro-application system through the main application system.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of any of the methods described above when the processor executes the computer program.
In a fourth aspect, an embodiment of the application provides a computer readable storage medium having stored thereon computer program instructions which when executed by a processor perform the steps of any of the methods described above.
In a fifth aspect, an embodiment of the application provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the methods described above.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
For convenience of understanding, the terms involved in the embodiments of the present application are explained below:
(1) The monolithic front end architecture (Monolithic Frontend Architecture, MFA) is an architecture that integrates all the functions and modules of the front end application into a single application. Typically comprising a separate code library, a flow for construction and deployment, and a runtime container.
(2) The micro front end architecture (Micro Frontend Architecture, MFA) is an architecture model that splits a front end application into multiple small, independent, autonomous applications (i.e., micro front ends), each of which can be independently developed, tested, deployed.
(3) The micro front end application (Micro Frontend Application, MFA) is a specific implementation under the micro front end architecture, and refers to front end applications that can be independently developed, tested, deployed, and combined and exposed through the host application. In the embodiment of the application, the micro front-end application may be called a micro application, and the system supporting the operation of each micro application may be called a micro application system.
(4) A baseboard management controller (Baseboard Manager Controller, BMC) is a core component in a server management architecture defined by the IPMI (INTELLIGENT PLATFORM MANAGEMENT INTERFACE ) protocol. Is a hardware manager integrated in servers, network devices, and other computer systems, and serves to monitor, manage, and control the devices. The main functions of the BMC include monitoring the hardware status of the device, performing remote management operations, and providing comprehensive monitoring and control functions for the device.
(5) The World Wide Web (Web), also known as the global Wide area network, is a hypertext-based, global, dynamic interactive, cross-platform, distributed graphical information system.
(6) BMC WEB refers to front-end WEB application developed based on BMC functions and is used for remotely monitoring and managing the state of server hardware. The BMC WEB micro front-end application can be independently developed, tested and deployed. The micro applications in the embodiment of the application are BMC WEB applications.
(7) Single sign On (SINGLE SIGN On, SSO) is one of the more popular solutions for enterprise business integration. SSO is defined as the ability of a user to access all mutually trusted applications by logging in only once in multiple applications. In the embodiment of the application, the main application system supports single sign-on, for example, M micro application systems supporting single sign-on exist in N micro systems, and the mutual trust relationship between the M micro application systems and the main application system can be established, so that when the main application system is in a single sign-on state, the micro application systems with the mutual trust relationship can automatically log in without user logging in.
(8) The Redfish interface is used to manage and monitor hardware devices in the data center, such as servers, storage and network devices. It is designed to replace the traditional intelligent platform management (INTELLIGENT PLATFORM MANAGEMENT INTERFACE, IPMI) interface, providing better security, scalability and ease of use.
(9) The uniform resource location system (Uniform Resource Locator, URL) is a representation on the web service of the internet for specifying the location of information.
Any number of elements in the figures are for illustration and not limitation, and any naming is used for distinction only and not for any limiting sense.
Under the conditions that cloud technology is continuously developed, data volume is larger and data volume is larger, and real-time processing requirements are higher and higher, service deployment by utilizing a plurality of servers becomes a necessary choice for ensuring system stability and high availability. However, this also places higher demands on the management and monitoring of the server.
In the related art, in the process of managing and monitoring multiple servers, a monitoring management system based on a single front-end architecture is applied. The monomer front end architecture has the following characteristics:
(1) The system architecture adopts a centralized design mode, and integrates all monitoring modules and functions into one front-end application. The backend service is responsible for collecting data (e.g., performance metrics, logs, running state, etc.) from each monitored server and transmitting the data to the front-end application via an application programming interface (Application Programming Interface, API). Meanwhile, a database is used as a storage medium for monitoring data so as to perform historical query and trend analysis.
(2) And the back-end service comprehensively and efficiently collects data from all the monitored servers by means of timing tasks, event triggering or polling and the like. The raw data collected is subjected to fine cleaning, conversion and aggregation at the back-end service to generate highly valuable monitoring metrics and reports. The processed monitoring data may be securely stored in a database for flexible retrieval and visual presentation by the front-end application.
(3) The front-end display is that the front-end application provides an intuitive and comprehensive monitoring interface, and a user can view monitoring information or monitoring data of all monitored servers on the interface. Although all functions are integrated in one front-end application, different monitoring modules (such as central processing unit (Central Processing Unit, CPU) monitoring, memory monitoring, network monitoring and the like) are organized through a modularized design, so that the integrity of the functions is ensured, and the maintainability and the expandability of the system are improved. The front-end application acquires the latest monitoring data from the back-end service in real time through technologies such as polling or WebSocket and the like, and dynamically updates the latest monitoring data to an interface, so that a user can be ensured to master the latest state of each monitored server at any time.
(4) User interaction, that is, the user can check the current state, performance index and the like of each monitored server through an interface. The system supports a threshold setting function, and once the monitored data exceeds a preset threshold, an alarm notification (such as mail, short message, message pushing and the like) is automatically triggered, so that a user can be ensured to acquire processing information of abnormal conditions in time. The user can also query historical monitoring data and analyze the performance trend and potential problems of the server deeply.
(5) Maintenance and upgrade since all functions are concentrated in one front-end application, code maintenance and updating are relatively concentrated, but any modification may affect the operation of the overall system. To ensure system stability and security, system upgrades typically involve redeployment and testing of front-end applications, which requires ensuring that monitoring services are not interrupted during the upgrade process
However, the monitoring and management system based on the single-body front-end architecture has the following defects:
(1) The expansibility is limited, namely, as the number of servers increases, the system expansion is difficult, which often leads to complex system structure and further influences the overall performance of the system.
(2) The maintainability is poor because all functions are concentrated in one front-end application, any minor modification or upgrade may involve the redeployment and testing of the entire system, which not only increases maintenance costs, but also increases maintenance time. In addition, the complex system architecture makes maintenance and management difficult, further increasing the complexity and difficulty of maintenance.
(3) The complexity is improved, namely, as the number of servers is increased, the data volume and monitoring items to be monitored are increased, which aggravates the complexity of the front-end interface. The user needs to face a large and complex monitoring interface, so that not only is the learning cost increased, but also the use efficiency is reduced.
(4) In a huge monitoring management system, once faults occur, the problem is more complicated and time-consuming due to the concentration of a single front-end architecture.
(5) The flexibility is insufficient, and the requirement of independent monitoring among different servers is difficult to deal with. Each server may have unique monitoring requirements and technology stacks, and a single front-end architecture is difficult to provide a personalized solution. This greatly limits the flexibility of the system, making it difficult to implement when faced with new business needs.
(6) Independent monitoring and management challenges the single front-end architecture presents difficulties in implementing independent monitoring and management between different servers, which is particularly prominent in complex business scenarios, which may lead to failure to be effectively isolated, thereby affecting the stability and usability of the overall system.
(7) And the monitoring data of different servers are scattered in each system, and a unified data management and analysis platform is lacked. The method not only increases the difficulty of data integration, but also causes the loss of key decision data, and cannot provide powerful support for business decisions.
In the micro front-end architecture, a micro application is arranged for each server to be monitored, and the micro front-end architecture solves the problem of high maintenance and upgrading difficulty in the single front-end architecture.
However, in the server monitoring system based on the micro front end architecture, when monitoring data of each server is checked, a micro application system of the server needs to be logged in, and if monitoring data of different servers needs to be checked back and forth, the back and forth switching is needed. That is, users need to frequently switch between different micro-application systems or manually log in a plurality of micro-application systems to monitor different servers, and the operation is complex and the efficiency is low.
To this end, the application provides a server monitoring method, in which a main application system is designed, the main application system is associated with a plurality of micro application systems, and each micro application system is responsible for monitoring a server. When a user has a request for checking the monitoring data of a certain server, the monitoring data of the server acquired by the corresponding micro-application system can be displayed through the main application system. According to the method, when monitoring data of different servers are checked, the micro application systems which are different in login are not required to be frequently switched, the operation is simple, the monitoring efficiency is high, and the user experience is good.
After the design idea of the embodiment of the present application is introduced, some simple descriptions are made below for application scenarios applicable to the technical solution of the embodiment of the present application, and it should be noted that the application scenarios described below are only used for illustrating the embodiment of the present application and are not limiting. In the specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
Referring to fig. 1, an application scenario diagram of a server monitoring method according to an embodiment of the present application is shown. In fig. 1, an electronic device is configured to execute the server monitoring method provided by the present application, where a main application system and N micro-application systems associated with the main application system are deployed in the electronic device, and each system is provided with a data support by a corresponding back-end service, so as to monitor the status and data of a corresponding server. And when a request for checking the monitoring data exists, displaying the monitoring data acquired by the corresponding micro-application system through a display page of the main application system.
Of course, the method provided by the embodiment of the present application is not limited to the application scenario shown in fig. 1, but may be used in other possible application scenarios, and the embodiment of the present application is not limited. The functions that can be implemented by each device in the application scenario shown in fig. 1 will be described together in the following method embodiments, which are not described in detail herein.
In order to further explain the technical solution provided by the embodiments of the present application, the following details are described with reference to the accompanying drawings and the detailed description. Although embodiments of the present application provide the method operational steps shown in the following embodiments or figures, more or fewer operational steps may be included in the method based on routine or non-inventive labor. In steps where there is logically no necessary causal relationship, the execution order of the steps is not limited to the execution order provided by the embodiments of the present application.
The technical scheme provided by the embodiment of the application is described below with reference to an application scenario shown in fig. 1.
Referring to fig. 2, an embodiment of the present application provides a server monitoring method, which is applied to an electronic device, and includes the following steps:
s201, acquiring a monitoring data viewing request.
S202, determining a target micro application system for managing the target server in N micro application systems associated with the main application system.
And S203, displaying the monitoring data of the target server acquired by the target micro-application system through the main application system.
According to the embodiment of the application, one main application system and N micro application systems are constructed, and the association relation between the main application system and the N micro application systems is established. Each micro-application system is configured to monitor and manage one server, for example, to obtain monitoring data of the server managed by the micro-application system, so that N micro-application systems can monitor or manage N servers. The target server is any one of the N servers, and when a user wants to view the monitoring data of the target server, the electronic device can generate a monitoring data viewing request aiming at the target server, so that the target micro-application system for managing the target server can be determined in N micro-application systems associated with the main application system, and the monitoring data of the target server acquired by the target micro-application system is displayed through a display page of the main application system. According to the design, multiple micro-application systems do not need to be frequently switched among different micro-application systems or manually logged in, and monitoring data of multiple servers can be displayed through the display page of a single main application system, so that the operation complexity is greatly reduced, the time cost is balanced, and the monitoring efficiency is improved.
In one exemplary scenario, it is assumed that there are N monitored servers, each of which is managed by a corresponding one of the micro-application systems, e.g., by which the corresponding backend service obtains the monitoring data of the corresponding server. Alternatively, the monitoring data may include monitoring metrics including, for example, operating status, CPU, memory, hard disk, power supply, fan, usage of graphics processor (Graphics Processing Unit, GPU), etc.
Before a specific monitoring operation is performed, the monitoring index and the like can be flexibly configured, and the process can be realized through steps A11-A12:
a11, responding to the operation of the user on the configuration page, and acquiring configuration information for configuring the main application system.
The configuration information comprises server parameter configuration information, monitoring index configuration information, instruction task configuration information and incidence relation configuration information. The association relationship configuration information comprises a first relationship between the instruction task and the server, a second relationship between the monitoring index and the server, and a third relationship between the monitoring index and the alarming contact.
Alternatively, the parameter configuration information may be a configuration of parameters, including, for example, parameters to be monitored including the number of the server, account, access BMC WEB IP address, location, longitude, latitude, and description information. The monitoring index configuration information can be the configuration condition of the monitoring index, for example, the configuration condition comprises the operation condition of the indexes to be monitored, such as an operation state, a CPU, a memory, a hard disk, a power supply, a fan, a GPU and the like, and the configuration information also comprises the type of the monitoring index, the monitoring time, the monitoring frequency, an alarm mode, emergency response efficiency, an alarm contact and the like. The instruction task configuration information may include the configuration situation of the task of the instruction person, for example, each instruction task may set information such as instruction content (such as important instructions related to power control, such as shutdown, startup, etc.), execution time, execution period, and bound micro-application systems, and execute the instruction task through an execution button or a timer, so that the instruction task may be configured for a server responsible for one or more micro-application systems.
In addition, the configuration information also comprises association relationship configuration information, wherein the association relationship configuration information comprises a first relationship between the instruction task and the server, a second relationship between the monitoring index and the server, and a third relationship between the monitoring index and the alarming contact.
For example, 1 instruction task may configure a plurality of servers, 1 server may configure a plurality of instruction tasks, the servers process the corresponding instruction tasks by executing the instruction tasks onto the corresponding servers, 1 monitor index may configure a plurality of servers, 1 server may configure a plurality of monitor indexes, monitor the indexes of the corresponding servers by registering monitor events, the servers return monitor index data, 1 monitor index may configure a plurality of alert contacts, 1 alert contact may receive a plurality of monitor index alert information, and alert contacts are notified by monitor index alert actions. Fig. 3 is a schematic diagram of an association relationship according to an embodiment of the present application.
The embodiment of the application can solve the problem that the alarm function in the prior art is not timely or flexible enough. The method provides a powerful alarm mechanism, configures the alarm mode and the threshold of the key monitoring index through the server configuration management module, and improves the flexibility and the efficiency of development. The design not only greatly shortens the time for upgrading and maintaining the system, but also effectively reduces the cost and ensures that the problems are timely processed. In addition, the system also allows the user to flexibly configure the monitoring items, such as adding new monitoring indexes, adjusting alarm thresholds and the like, so as to meet the continuously changing business demands and the like.
In addition, aiming at the problem that the prior art may not support batch instruction issuing operation on multiple servers, the embodiment of the application flexibly configures important instructions for the multiple servers through the server configuration management module, supports single-server instruction sending, multiple-server instruction sending and batch issuing operation, and improves the efficiency.
A12, configuring a main application system and N micro-application systems according to the configuration information.
Optionally, the configuration information of the instruction task, the configuration information of the association relation and the like can be screened from the configuration information to configure the main application system, and the server parameter configuration information and the monitoring index configuration information of each micro application system are screened to configure the corresponding micro application system. For example, for the micro application system 3 of the monitoring server 3, the configuration information thereof includes the server parameter configuration information and the monitoring index configuration information among the above configuration information.
As described above, after the configuration of the main application system and the N micro application systems is completed, the monitoring of the N servers to be monitored may be started.
S201, a browser is deployed in the electronic device, N micro-service systems can be accessed through the browser, the electronic device can acquire a monitoring data viewing request of a user, and the monitoring data viewing request carries an identification of a target server. For example, the user wants to view the monitoring data of the server 3.
Referring to S202, since each of the N micro-application systems is associated with each of the main application systems, each of the N micro-application systems is used to monitor or manage one server, a target micro-application system for managing a target server can be determined among the N micro-application systems associated with the main application system.
The association is a binding relationship, and the monitoring data of the N micro application systems with the binding relationship with the main application system to the respective servers can be displayed through the display page of the main application system.
In order to improve monitoring efficiency and simplify operation, the embodiment of the application provides a differential login mode, that is, different login modes are adopted according to whether a main application system is in a single sign-on state or not and whether a micro application system supports single sign-on for sign-on, and the method mainly comprises the following cases:
In case 1, the main application system is in a single sign-on state, and the target server supports single sign-on.
In this case, since the target server supports single sign-on, the electronic device may control the target micro-application system to perform a single sign-on operation at this time. This operation is performed automatically without user operation.
The invention adopts a high-efficiency communication mechanism and a differential login authentication function, and a user can access all related micro-application systems only by logging in once, thereby ensuring the real-time performance and stability of data transmission and improving the convenience and safety.
In case2, the main application system is in a single sign-on state, and the target server does not support single sign-on.
In this case, the target micro-application system needs to log in separately, and the process can implement the login of the target micro-application system through steps B1-B2.
B1, displaying the first page.
Wherein the first page includes a login control prompting a user to enter a login target micro-application system.
And B2, verifying login information input by a user on the first page, and determining that the target micro-application system is in a common login state.
Optionally, the electronic device responds to the login information input by the user on the first page and performs verification, and when the verification passes, it can be determined that the target micro-application system is in a login state.
And S203, displaying the monitoring data of the target server acquired by the target micro-application system through the main application system after ensuring that the target micro-application system is in a login state.
In the actual application process, the display page of the main application system can also display the monitoring data of a plurality of servers at the same time.
Fig. 4 is a display page of monitoring data according to an embodiment of the present application, where monitoring data of a plurality of servers may be displayed. Optionally, the display page can use a multi-dimensional Echarts chart as a statistical chart for displaying multiple monitoring indexes of multiple servers, and can also be configured with multiple display modules for display. The monitoring data of different servers can be switched to display, and the full-screen check function is supported.
In addition, the two-dimensional map can be used for displaying, and the two-dimensional map of the server position distribution and the server running state of different areas can be checked. For example, after clicking on a point on the two-dimensional map, the corresponding server detailed information and monitoring data can be checked.
In view of the display aspect of the monitoring data, in the related art, the monitoring data are often scattered in each component or system, unified management and analysis are difficult, and the diversified monitoring data of multiple servers cannot be intuitively displayed. According to the embodiment of the application, through unified management of data, a rich data analysis function is provided. In addition, through a visual large screen and a stable communication mechanism, the position distribution, the running state and the key monitoring index of the server are displayed in an intuitive map and statistical diagram mode, so that a user can quickly grasp the real-time state and the performance trend of multiple servers, potential risks can be responded quickly, and powerful support is provided for decision making.
Based on the above technical solution, in the embodiment of the present application, the main application system may also communicate with N micro-application systems in real time, and optionally, may control the main application system to send the target event to the target micro-application system through the event bus. The target event is a login event, an execution instruction event or an alarm event.
Optionally, the event communication module may implement information interaction between the respective micro application systems based on an event bus mechanism, and information interaction between the main application system and the respective micro application systems. In a specific example, after the main application system logs in, a server information list is obtained, and a login event is notified to the target micro-application system through an event bus, so that the target micro-application system can be ensured to log in normally. For example, after the micro application system 3 is in the login state, the micro application system 3 may notify the host application system of the login event through the event bus.
In addition, when the main application system executes the instruction task, the event bus can be used for transmitting the event of executing the instruction task to other micro application systems, so that the corresponding micro application systems can respond to and process the instruction task. When a certain micro-application system triggers a specific event, the event information can be transmitted to other micro-application systems by means of an event bus, so that linkage response among the back-end services of each micro-application system in a cooperation task is ensured.
On the basis of the technical scheme, in order to realize the data synchronization of the main application system and the N micro application systems, login states, a monitorable server list and global monitoring state information of the main application system and the N micro application systems can be stored. In this way, data or state synchronization between the host application system and the N micro-application systems may be achieved.
Optionally, the synchronization process may be implemented by a global state management module, where the global state management module may be used to share and synchronously access a global state among the micro application systems, for example, store a login state, a monitorable server list, global monitoring state information of each micro application system of the main application system, and so on, so as to ensure that the global state can be shared and synchronously accessed among the micro application systems, and promote consistency and instantaneity of data.
Fig. 5 is a flowchart of a method for a host application system to obtain a list of monitorable servers according to an embodiment of the present application, and fig. 6 is a flowchart of a method for a micro application system to obtain a list of monitorable servers according to an embodiment of the present application.
As can be seen from fig. 5 and fig. 6, when a request of a user to access a main application page is detected, whether the main application system is in a single sign-on state is first determined, and if yes, single sign-on is performed. After the single sign-on of the main application system is successful, a server information list can be obtained, and the list is traversed and login event notification is sent to each micro application system. And for the micro application system which does not support single sign on, executing the login authentication flow of the micro application system, and adding the micro application system into a monitorable server list of the global state management module after successful login.
Fig. 7 is a flowchart of a method for processing a monitoring index of a host application system according to an embodiment of the present application, and fig. 8 is a flowchart of a method for processing a monitoring index of a micro application system according to an embodiment of the present application.
As can be seen from fig. 7 and 8, the monitoring server list is obtained from the global status management module, the monitoring server information list is traversed through the event bus mechanism, and after the monitoring event is registered to the micro application system in each micro application system to process the monitoring event, monitoring data is returned to the event bus. And processing the monitoring data returned by each micro application system based on the event bus mechanism to generate data such as a visual large-screen monitoring index chart, monitoring alarm and the like. If alarm data to be notified exist in the monitoring data, the alarm notification is sent to a specific responsible person in a configured alarm mode.
To accurately illustrate the differential login process of the host application system and the N micro-application systems, a specific example is described. Fig. 9 is an example of a login procedure provided in an embodiment of the present application, where the example of fig. 9 includes a main application system a (a.com), a micro application system B (b.com) supporting single sign-on, a micro application system C (c.com) not supporting single sign-on, and a single sign-on authentication platform S (sso.com).
The login procedure shown in fig. 9 is as follows:
The browser accesses the address of the main application system, accesses the page A1 of the main application system, judges whether the main application system A logs in, and if the main application system A does not log in, returns a redirection address URL1 and jumps to a single sign-on authentication platform S, wherein the address carries the URL of the main application system. And judging whether the single sign-on authentication platform logs in or not, and if not, displaying a login form page. And the user inputs a user name and a password on the login form page, performs login operation, and judges whether login authentication is successful or not. If login authentication is successful, a global session and an authorization token are created, a redirection address URL2 is returned and then is jumped to a main application system A, and the address carries the authorization token and browser cache information of the single sign-on authentication platform. The main application system A stores browser cache information of the single sign-on authentication platform, accesses the main application system page A1 again, the address of the main application system page A1 carries an authorization token, and the main application system A judges whether the authorization token is valid or not through the single sign-on authentication platform. If the authorization token is valid, the main application system creates a local session, writes browser cache information, wherein the browser cache information comprises the session ID of the main application system, and returns to the page A1 resource of the main application system.
And accessing the main application system page A2 again, and judging whether the registered browser cache information exists or not. And if the registered browser cache information exists, returning to the main application system page A2 resource. The browser accesses a micro-application system B in the main application system page, and the micro-application system B judges whether to log in or not. If not, returning a redirection address URL3, and judging whether single sign-on is supported by the micro application system. If single sign-on is supported, the single sign-on authentication process is automatically executed, a redirect address URL4 is returned, and if single sign-on is not supported, whether the micro application system C is logged in is judged. And if the login is not performed, displaying a login form page, taking out an account configured in the server configuration management module for login, and judging whether login authentication is successful. If the login authentication is successful, the micro-application system creates a local session, writes browser cache information, wherein the browser cache information comprises a session ID of the micro-application system, and returns to the page C1 resource. And accessing the micro application system C in the main application system page again, and judging whether the registered browser cache information exists or not. If the registered browser cache information exists, returning to the page C2 resource.
Optionally, in the embodiment of the present application, a differential login logout operation may also be performed, which is mainly implemented through the following steps D1-D2:
And D1, if the login cancellation operation of the user is detected, or if the residence time of the user on any page of the main application system is detected to exceed the preset time, responding to a login cancellation request of the main application system, and modifying a global session token carried in the login cancellation request into an invalid state through the main application system.
In the actual application process, all session tokens carried in the login cancellation request are destroyed directly, for example, the session tokens can be destroyed by modifying the session tokens into invalid states.
And D2, if the target micro-application system does not support single sign-on, sending a log-off event to the target micro-application system through the main application system, and modifying the local session token corresponding to the target micro-application system into an invalid state through the target micro-application system.
The step is to log out and log in operation for any one micro application system (for example, the target micro application system), and the target micro application system only needs to modify the local session token corresponding to the target micro application system to be in an invalid state after receiving a log out and log in event from the target application system.
In the process, the user does not need to independently execute login-logout operation of each micro-application system.
To accurately illustrate the differential log-in process of the main application system and the N micro-application systems, a specific example is described. Fig. 10 is an example of a log-in procedure provided in the embodiment of the present application, and the log-in procedure shown in fig. 10 is as follows:
The browser initiates a logout request, the main application system acquires an authorization token, and the authorization token is carried to initiate the logout request to the single sign-on authentication platform. The single sign-on authentication platform judges whether the authorization token of the global session is valid, if so, the authorization token of the global session (global session token for short) is destroyed, and then the authorization tokens of all local sessions (local session tokens for short) are acquired for destruction. The main application system screens out the micro-application system which does not support single sign-on, and sends out a log-off event notification to the micro-application system through the event notification module. After receiving the notice of logging-off event, the micro application system destroys the local session token. After the above process is finished, the browser displays the login form.
Based on the above technical solution, fig. 11 is a schematic diagram of a multi-server monitoring system according to an embodiment of the present application, where the system includes a server configuration management module, a login authentication module, an event communication module, a Redfish universal interface module, and a visualization large screen module.
The server configuration management module is used for executing server configuration management functions, such as server information maintenance, monitoring index configuration, instruction task configuration and entity contact configuration.
The login authentication module is used for executing the login process of the main application system and the micro application system, for example, the single sign-on authentication unit can be used for generating, issuing and verifying login tokens to ensure the legitimacy of the user identity, and the module can be used for recovering and destroying the corresponding tokens when the user logs off or the session is overtime to ensure the safety of the system and the effective management of resources.
The Redfish universal interface module can be used for data exchange and communication of a plurality of micro front-end applications, including key operations such as single sign-on authentication, monitoring index data collection and processing, instruction task execution and the like. The monitoring index data collecting and processing process is implemented by monitoring the monitoring index according to configuration, collecting monitoring index information periodically or according to requirements, and carrying out deep analysis, arrangement and standardization processing on the data. For example, the following operations in the execution process of the instruction task are executed, namely, executing important instructions such as shutdown, startup and the like related to power control of the instruction task received by page interaction, so as to ensure the correct analysis and safe execution of the instruction task.
According to the embodiment of the application, the high efficiency, flexibility and expandability of the system are ensured through the integration of the multi-micro application system, the communication protocol among modules and the cooperative work mechanism in the modularized construction method based on the micro front end architecture. In fine granularity control of server configuration management, server information, instruction tasks, detailed configuration of monitoring indexes and interrelation processing logic and flow thereof can ensure the accuracy and the customizability of monitoring. In the unified and differentiated processing of the login authentication system, the complete login authentication flow comprises a single sign-on mechanism, a session management mechanism and special processing which does not support single sign-on application, so that the safety and user friendliness of the system are ensured. The efficient event communication module realizes an efficient and stable event communication mechanism between the micro application systems, and ensures real-time synchronization and collaborative operation of information of each micro application system. Visual monitoring and large screen display technology can improve the intuitiveness and readability of monitoring information
The embodiment of the application provides a method and a system for realizing monitoring and management of multiple servers based on a micro front end architecture. Specifically, a micro front-end application is independently constructed for each server, each server is responsible for monitoring and managing one server, and the micro front-end applications can adopt the most suitable technical stack according to respective requirements, so that the development efficiency is remarkably improved, and the flexibility of a system is enhanced. The micro front-end applications and the main application cooperate with each other through the efficient event communication module to ensure that the whole system realizes unified monitoring and management. Through centralized monitoring of a plurality of micro-application systems, operation complexity is reduced, time cost is reduced, and monitoring efficiency is improved.
In addition, in the embodiment of the application, the micro front end architecture supports independent development, deployment and updating among modules, so that the overall complexity of the system is reduced, and the flexibility and the efficiency of development are improved. The design not only greatly shortens the time of system upgrading and maintenance, but also effectively reduces the cost.
In addition, as an alternative embodiment, the multi-server monitoring management system based on the micro front end structure in the embodiment of the present application may also be implemented by using a hypertext markup language (Hyper Text Markup Language, HTML) inline frame element iframe technology. But the micro front end architecture has higher-level modularized design, higher independence, stronger expandability and more excellent safety, and is more suitable for the monitoring management scene of the server.
As shown in fig. 12, based on the same inventive concept as the above-mentioned server monitoring, an embodiment of the present application further provides a server monitoring apparatus, which includes a data acquisition module 121, a processing module 122, and a display module 123.
The data acquisition module 121 is configured to acquire a monitoring data viewing request, where the monitoring data viewing request carries an identifier of a target server, where the target server is any one of N monitored servers, and each monitored server is managed by a corresponding micro application system;
A processing module 122, configured to determine a target micro-application system for managing the target server from N micro-application systems associated with the main application system;
And the display module 123 is used for displaying the monitoring data of the target server acquired by the target micro-application system through the main application system.
In an alternative embodiment, the processing module 122 is further configured to, prior to displaying, by the host application system, the monitoring data of the target server acquired by the target micro application system:
And if the main application system is in a single sign-on state and the target server supports single sign-on, controlling the target micro-application system to execute single sign-on operation.
In an alternative embodiment, the processing module 122 is further configured to, prior to displaying, by the host application system, the monitoring data of the target server acquired by the target micro application system:
if the main application system is in a single sign-on state and the target server does not support single sign-on, displaying a first page, wherein the first page comprises a sign-on control for prompting a user to input a sign-on target micro-application system;
And verifying login information input by a user on the first page, and determining that the target micro-application system is in a common login state.
In an alternative embodiment, the processing module 122 is further configured to:
If the login cancellation operation of the user is detected, or if the residence time of the user on any page of the main application system exceeds the preset time, responding to a login cancellation request of the main application system, and modifying a global session token carried in the login cancellation request into an invalid state through the main application system;
If the target micro-application system does not support single sign-on, a log-off event is sent to the target micro-application system through the main application system, and the local session token corresponding to the target micro-application system is modified to be in an invalid state through the target micro-application system.
In an alternative embodiment, the processing module 122 is further configured to:
The method comprises the steps of responding to operation of a user on a configuration page, obtaining configuration information for configuring a main application system, wherein the configuration information comprises server parameter configuration information, monitoring index configuration information, instruction task configuration information and incidence relation configuration information, and the incidence relation configuration information comprises a first relation between an instruction task and a server, a second relation between a monitoring index and the server and a third relation between the monitoring index and an alarm contact;
And configuring the main application system and the N micro application systems according to the configuration information.
In an alternative embodiment, the processing module 122 is further configured to:
And the control main application system sends the target event to the target micro application system through the event bus, wherein the target event is a login event, an execution instruction event or an alarm event.
In an alternative embodiment, the processing module 122 is further configured to:
the login state, the list of monitorable servers, and the global monitoring state information of the main application system and the N micro application systems are stored.
The server monitoring device and the server monitoring method provided by the embodiment of the application adopt the same inventive concept, can obtain the same beneficial effects, and are not described herein again.
Based on the same inventive concept as the above-mentioned server monitoring method, the embodiment of the application also provides an electronic device, which may be a desktop computer, a portable computer, a smart phone, a tablet computer, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a server, and the like. As shown in fig. 13, the electronic device may include a processor 131 and a memory 132.
The Processor 131 may be a general purpose Processor such as a Central Processing Unit (CPU), digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field programmable gate array (Field Programmable GATE ARRAY, FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution.
The memory 132 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory may include at least one type of storage medium, which may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, EEPROM), magnetic Memory, magnetic disk, optical disk, and the like. The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 132 in embodiments of the present application may also be circuitry or any other device capable of performing memory functions for storing program instructions and/or data.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of implementing the above-described method embodiments may be implemented by hardware associated with program instructions, and that the above-described program may be stored in a computer readable storage medium that, when executed, performs the steps comprising the above-described method embodiments, and that the above-described computer storage medium may be any available medium or data storage device that can be accessed by a computer, including, but not limited to, a removable storage device, a random access memory (RAM, random Access Memory), a magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), an optical memory (e.g., CD, DVD, BD, HVD, etc.), and a semiconductor memory (e.g., ROM, EPROM, EEPROM, nonvolatile memory (NAND FLASH), solid State Disk (SSD)), etc. various media that can store program code.
Or the above-described integrated units of the application may be stored in a computer-readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in essence or a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods of the embodiments of the present application. The storage medium includes various media capable of storing program codes such as a mobile storage device, a random access memory (RAM, random Access Memory), a magnetic memory (e.g., a floppy disk, a hard disk, a magnetic tape, a magneto-optical disk (MO), etc.), an optical memory (e.g., CD, DVD, BD, HVD, etc.), and a semiconductor memory (e.g., ROM, EPROM, EEPROM, a nonvolatile memory (NAND FLASH), a Solid State Disk (SSD)).
Based on the same inventive concept, embodiments of the present application also provide a computer program product comprising computer program code which, when run on a computer, causes the computer to perform a data reading method of a hard disk as any of the preceding discussion. Since the principle of the solution of the problem of the computer program product is similar to that of the data reading method of the hard disk, the implementation of the computer program product can refer to the implementation of the method, and the repetition is omitted.
The foregoing embodiments are only used for describing the technical scheme of the present application in detail, but the descriptions of the foregoing embodiments are only used for helping to understand the method of the embodiments of the present application, and should not be construed as limiting the embodiments of the present application. Variations or alternatives readily apparent to those skilled in the art are intended to be encompassed within the scope of the embodiments of the present application.