Middleware monitoring host creation method and system

Through automated means, the identification of the target proxy object is obtained from the proxy object list of the monitoring server, and the monitoring host list is obtained and traversed to determine whether to create a middleware monitoring host. This solves the problems of low efficiency and poor accuracy of traditional manual creation, and realizes efficient and accurate monitoring host creation.

CN119938361APending Publication Date: 2025-05-06JIANGSU CHANGSHU RURAL COMMERICAL BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510072356.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The traditional manual method of creating middleware monitoring hosts on monitoring servers is inefficient and poorly accurate, making it difficult to adapt to dynamically changing IT environments.

Method used

By obtaining the identification of the target proxy object from the list of proxy objects of the monitoring server, obtaining the monitoring host list, traversing the monitoring host list, and deciding whether to request the creation of a middleware monitoring host based on the address, middleware service port and whether the middleware monitoring host exists in the monitoring server.

Benefits of technology

Improve the efficiency and accuracy of middleware monitoring host creation, and realizes an automated monitoring host creation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938361A_ABST
    Figure CN119938361A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a middleware monitoring host creation method and system. The method comprises the following steps: acquiring a target proxy object identifier of a target proxy object from a proxy object list in a monitoring server; and obtaining a monitoring host list under the target proxy object according to the target proxy object identifier. And traversing the monitoring hosts included in the monitoring host list to determine whether to request to create the middleware monitoring host in the monitoring server or not according to the address of each monitoring host, the middleware service port and whether the middleware monitoring host corresponding to the middleware service port exists in the monitoring server or not. And if it is determined that the middleware monitoring host needs to be requested to be created in the monitoring server, requesting the monitoring server to create the middleware monitoring host according to the middleware type corresponding to the middleware monitoring host. And outputting the prompt message according to the result of creating the middleware monitoring host by the monitoring server, thereby improving the efficiency and accuracy of creating the middleware monitoring host.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and more specifically, to a method and system for creating a middleware monitoring host. Background Art

[0002] In complex information technology (IT) architectures, a variety of middleware are usually used to support various business applications, such as Nginx, Kafka, Elasticsearch, Tomcat, etc. As the scale of the system continues to expand, operation and maintenance personnel need to monitor these middleware efficiently and accurately to ensure stable operation and performance optimization of the system. The traditional method of manually creating a middleware monitoring host on the monitoring server has the problem of low efficiency. In addition, since the manual processing method is prone to omissions or errors due to human negligence, it also has the problem of poor accuracy and is difficult to adapt to the dynamically changing IT environment.

[0003] Therefore, how to improve the efficiency and accuracy of middleware monitoring host creation is an urgent problem to be solved. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a method and system for creating a middleware monitoring host to improve the efficiency and accuracy of creating a middleware monitoring host.

[0005] In conjunction with the first aspect of the present application, a method for creating a middleware monitoring host is provided, the method comprising: Acquire a target proxy object identifier of a target proxy object from a proxy object list in a monitoring server, wherein the proxy object list includes proxy object identifiers; According to the target proxy object identifier, obtain a list of monitoring hosts under the target proxy object; Traversing the monitoring hosts included in the monitoring host list to determine whether to request to create the middleware monitoring host in the monitoring server according to the address of each monitoring host, the middleware service port, and whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server, wherein the monitoring host includes one or more middlewares; If it is determined that it is necessary to request to create the middleware monitoring host in the monitoring server, then request the monitoring server to create the middleware monitoring host according to the middleware type corresponding to the middleware monitoring host; According to the result of the monitoring server creating the middleware monitoring host, a prompt message is output.

[0006] In a possible implementation of the first aspect, determining whether to request to create the middleware monitoring host in the monitoring server according to the address of each monitoring host, the middleware service port, and whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server includes: According to the address of the monitoring host, determining whether the address of the monitoring host is a legal address; If the address of the monitoring host is a legal address, then attempt to connect to the middleware service port of the monitoring host, and obtain the connection result of the attempted connection; If the connection result is successful, constructing a check request according to the middleware monitoring host corresponding to the middleware service port; Sending the inspection request to the monitoring server to determine whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server according to the response information of the monitoring server to the inspection request; If the middleware monitoring host corresponding to the middleware service port does not exist in the monitoring server, a request is made to create the middleware monitoring host in the monitoring server.

[0007] In a possible implementation of the first aspect, the present invention further includes: If the address of the monitoring host is not a legal address, traverse the next monitoring host of the monitoring host and output the first abnormal information; and / or, If the connection result is a connection failure, traverse the next monitoring host of the monitoring host and output a second abnormal information; and / or, If it is determined that a middleware monitoring host corresponding to the middleware service port exists in the monitoring server, the next monitoring host of the monitoring host is traversed.

[0008] In a possible implementation manner of the first aspect, before acquiring the target proxy object identifier of the target proxy object from the proxy object list in the monitoring server, the method further includes: Obtaining connection information of the monitoring server, wherein the connection information includes a connection address, authentication information, and a request header; Establishing a connection with the monitoring server according to the connection address, the authentication information, and the request header, so as to obtain a target proxy object identifier of a target proxy object from a proxy object list in the monitoring server; If the connection with the monitoring server fails, outputting third abnormal information; After the monitoring hosts included in the monitoring host list are traversed, the method further includes: Disconnect from the monitoring server.

[0009] In a possible implementation of the first aspect, judging whether the address of the monitoring host is a legal address according to the address of the monitoring host includes: Collecting a legal address set from a network configuration file, and / or historical data of a network monitoring tool, and / or a public address database, wherein the legal address set includes at least one address type; Obtaining an illegal address set, wherein the illegal addresses in the illegal address set include at least one of a generated illegal address, a collected illegal address with a configuration error, and an address obtained from a network log that results in a connection failure due to an address error; Extracting address features corresponding to each address type according to the address type of the legal address, wherein the address features include at least one of address structure features, subnet mask related features, and host name related features, and different address types correspond to different address features; Generate training data according to the legal address set, the illegal address set, and the address features corresponding to each of the address types, and train a multilayer perceptron model using the training data to obtain a trained multilayer perceptron model, wherein the number of input layers of the multilayer perceptron model is related to the number of the address features, and the output of the multilayer perceptron model is used to judge the legitimacy of the input data; According to the address of the monitoring host, determine the address type corresponding to the address of the monitoring host, and input the host name of the monitoring host and the address of the monitoring host into the trained multi-layer perceptron model corresponding to the address type to obtain a probability value of whether the address of the monitoring host is a legal address; If the probability value is greater than or equal to a preset probability threshold, the address of the monitoring host is determined to be a legal address.

[0010] In a possible implementation of the first aspect, the present invention further includes: Acquire historical middleware service port status data and the configuration information of the monitoring host, wherein the historical middleware service port status data includes the availability status of the port, and the configuration information of the monitoring host includes the operating system configuration and the application configuration; Determining middleware service port status characteristics according to the historical middleware service port status data, wherein the middleware service port status characteristics include port type characteristics and port availability change characteristics; Determine operating system characteristics and application program characteristics according to the configuration information of the monitoring host, wherein the operating system characteristics are related to the operating system type and version, and the application program characteristics are related to the application program type and version; An initial random forest algorithm model is trained according to the port type feature, the port availability change feature, the operating system feature, and the application feature, and the performance of the initial random forest algorithm model is evaluated by cross-validation to adjust the model parameters of the initial random forest algorithm model according to the performance, and after achieving a preset training effect, a trained random forest algorithm model is generated, and the trained random forest algorithm model is used to predict the availability of the middleware service port; Extracting, according to the middleware service port of the monitoring host and the configuration information of the monitoring host, the port type characteristics of the middleware service port, the port availability change characteristics of the middleware service port, the operating system characteristics of the monitoring host, and the application characteristics of the monitoring host; Input the port type characteristics of the middleware service port, the port availability change characteristics of the middleware service port, the operating system characteristics of the monitoring host, and the application characteristics of the monitoring host as input data into the trained random forest algorithm model to obtain the availability prediction result of the middleware service port; If the availability prediction result of the middleware service port is the same as the connection test result, the connection result is determined.

[0011] In a possible implementation of the first aspect, it is characterized by further comprising: Acquiring computing resources, and determining the number of tasks that can be executed in parallel based on the computing resources; According to the number of tasks that can be executed in parallel, a process pool is constructed, wherein the number of processes in the process pool is related to the number of tasks that can be executed in parallel; According to the process pool and the number of monitoring hosts included in the monitoring host list, polling and allocating tasks for each process in the process pool, the tasks being used to determine whether to request to create the middleware monitoring host in the monitoring server according to the address of each monitoring host, the middleware service port, and whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server; The monitoring hosts included in the monitoring host list are traversed in parallel through the process pool.

[0012] In combination with the second aspect of the present application, a middleware monitoring host creation system is provided, wherein the middleware monitoring host creation system includes a machine-readable storage medium and a processor, wherein the machine-readable storage medium stores machine-executable instructions, and when the processor executes the machine-executable instructions, the middleware monitoring host creation system implements the aforementioned middleware monitoring host creation method.

[0013] In conjunction with the third aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed, the aforementioned middleware monitoring host creation method is implemented.

[0014] In conjunction with the fourth aspect of the present application, a computer program product is provided, and when the computer program is executed by a processor, the aforementioned middleware monitoring host creation method is implemented.

[0015] In combination with any of the above aspects, by obtaining the target proxy object identifier of the target proxy object from the proxy object list in the monitoring server, a monitoring host list under the target proxy object is obtained according to the target proxy object identifier. The monitoring hosts included in the monitoring host list are traversed to determine whether to request to create the middleware monitoring host in the monitoring server according to the address of each monitoring host, the middleware service port, and whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server, wherein the monitoring host includes one or more middleware. If it is determined that it is necessary to request to create the middleware monitoring host in the monitoring server, then according to the middleware type corresponding to the middleware monitoring host, the monitoring server is requested to create the middleware monitoring host. According to the result of the monitoring server creating the middleware monitoring host, a prompt message is output, thereby improving the efficiency and accuracy of the creation of the middleware monitoring host in an automated manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained by combining these drawings without paying creative work.

[0017] Figure 1 A flowchart of a method for creating a middleware monitoring host provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. According to the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.

[0020] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0021] First, the terms involved in this application are introduced: Zabbix Server: is the core of Zabbix monitoring system. It collects data from monitored devices (such as servers and network devices) and stores the data in the database, including basic device information, historical values ​​of monitored items, etc. It also manages monitored items and triggers. When the trigger conditions are met (such as monitoring data exceeding the threshold), it will alarm through emails, SMS, etc. In the system architecture, it is at the center, connecting the monitored devices and the front-end interface.

[0022] Zabbix Proxy: It is the middle layer between Zabbix Server and the monitored host. It can share the load of the server and manage local host monitoring tasks in complex environments such as network partitions. By executing scheduled tasks on the proxy node, you can effectively use the localization advantage of the proxy to quickly check the status of the host under it.

[0023] Zabbix API: It is an interface based on HTTP protocol, which communicates with ZabbixServer by sending HTTP requests in the script. When obtaining the host list, creating a monitoring host, etc., the request sent by the script carries authentication information (user name and password) and operation instructions (such as parameters for obtaining the host list, detailed data for creating a host, etc.). After receiving the request, ZabbixServer processes these requests according to its internal business logic, such as querying the database to obtain the host list or storing the creation information of the new host in the database.

[0024] Figure 1The flowchart of the middleware monitoring host creation method provided by the embodiment of the present application is shown. It should be understood that in other embodiments, the order of some steps in the middleware monitoring host creation method of this embodiment can be shared with each other according to actual needs, or some steps can be omitted or maintained. The details of the middleware monitoring host creation method include: Step S110: acquiring a target proxy object identifier of a target proxy object from a proxy object list in a monitoring server.

[0025] The proxy object list includes a proxy object identifier. In one embodiment, the monitoring server may be, for example, a Zabbix Server of a Zabbix monitoring system, and the proxy object may be a Zabbix Proxy, an intermediate layer between the Zabbix Server and the monitored host. The Zabbix Proxy is connected to the Zabbix Server via a Zabbix API. This embodiment is used as an example for the following description.

[0026] In this step, in an IT monitoring environment of a large enterprise, the monitoring server is responsible for monitoring many devices and services. The monitoring server maintains a proxy object list, which stores the relevant information of all proxy objects, and each proxy object has a unique identifier, namely, the proxy object identifier. In order to obtain the identifier of the target proxy object, it is first necessary to establish a connection with the monitoring server and send a request to obtain the proxy object list through a specific application programming interface (API) interface or communication protocol. After receiving the request, the monitoring server extracts the proxy object list from the relevant data structure stored in it (such as a database table or a data set in memory) and returns it to the requester. After receiving the proxy object list, the requester locates the target proxy object from the list according to certain screening conditions, such as the name of the proxy object, the region where it is located, the business scope responsible for monitoring, and other information, and then obtains its target proxy object identifier. In actual operation, some programming languages ​​and related libraries can be used to implement this process. For example, use Python's requests library to send a HyperText Transfer Protocol (HTTP) request to the API endpoint of the monitoring server, and the request carries the necessary authentication information to ensure legal access. After receiving the proxy object list data in JSON format returned by the server, use the JSON parsing library (such as Python's json library) to parse the data into operable objects, and then determine the target proxy object by traversing the list elements, comparing the attribute values ​​of each proxy object, and extracting its identifier. At the same time, in order to ensure the accuracy and stability of the data, it may be necessary to add some error handling mechanisms, such as retrying when the request fails, or capturing possible exceptions when parsing the data, and recording relevant log information for subsequent troubleshooting.

[0027] Exemplarily, for example, the python requests library can be used to construct proxy_data request data and send it to the monitoring server Zabbix Server, obtain the corresponding target proxy object Zabbix Proxy and extract the proxyid (target proxy object identifier) ​​therein.

[0028] Step S120: acquiring a list of monitoring hosts under the target proxy object according to the target proxy object identifier.

[0029] In this step, after obtaining the target proxy object identifier, the identifier is used as a key parameter to interact with the monitoring server again. By calling the specific interface provided by the monitoring server, a request containing the target proxy object identifier is sent to inform the monitoring server that the list of monitoring hosts under the proxy object needs to be obtained. After receiving the request, the monitoring server searches in the relevant data table or data set according to the internal storage structure and query logic. For example, the monitoring server may have a table that records the association between the proxy object and the monitoring host. The target proxy object identifier is matched in this table to find all the monitoring host information associated with it, and the monitoring host information is sorted into a list and returned to the requester. After receiving the list of monitoring hosts, the requester may need to further process and verify the list. For example, check whether the basic information of each monitoring host in the list is complete, including whether the key information such as the host name and Internet Protocol (IP) address is accurate. If it is found that there is missing or incomplete information, it may be necessary to record it and take corresponding measures, such as requesting detailed information from the monitoring server again or marking these hosts for subsequent manual processing. In addition, in order to improve the efficiency and stability of obtaining the list, some caching mechanisms may be adopted. If you need to obtain the list of monitored hosts under the same target proxy object multiple times in a short period of time, you can first check whether the list already exists in the local cache. If it exists and the cache has not expired, the data in the cache is directly used to avoid sending repeated requests to the monitoring server, reducing network traffic and server load.

[0030] For example, the obtained proxyid can be used as a parameter, and the python requests library can be used to construct request data, and the monitoring server Zabbix Server can be requested to obtain the host list under the proxy. If the request successfully obtains the host list, the traversal phase is entered. If the request fails, an error message can be output.

[0031] Step S130, traverse the monitoring hosts included in the monitoring host list to determine whether to request to create the middleware monitoring host in the monitoring server based on the address of each monitoring host, the middleware service port, and whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server.

[0032] Wherein, the monitoring host includes one or more middlewares.

[0033] In this step, after obtaining the list of monitoring hosts, each monitoring host is traversed one by one. For each monitoring host, its address information is first obtained, which may be in the form of an IP address or a domain name. Next, the middleware service port information running on the monitoring host is obtained. This may need to be obtained by querying the configuration file on the monitoring host, the relevant service management tool, or the information collected by some monitoring software. After obtaining the middleware service port, a specific query request is sent to the monitoring server to inquire whether the middleware monitoring host corresponding to the middleware service port already exists in the monitoring server. After receiving the query request, the monitoring server searches and compares the monitoring configuration information stored in it. If the corresponding middleware monitoring host record is found, the existing information is returned; if not found, the non-existent information is returned. A comprehensive judgment is made based on the obtained information. If the monitoring host address is valid, the middleware service port is open, and the corresponding middleware monitoring host does not exist in the monitoring server, then it is determined that it is necessary to request to create the middleware monitoring host in the monitoring server. Optionally, the obtained address information can be format verified and validity checked to ensure that it meets the specifications of the network address. For the middleware service port information, you can verify whether it is within a reasonable port range and indeed corresponds to the running middleware service.

[0034] Optionally, in order to improve the efficiency of traversal and judgment, some optimization measures can be adopted. For example, during the traversal process, the inspection tasks of multiple monitoring hosts can be processed in parallel, and multi-threading or multi-process technology can be used to fully utilize the computing resources of the system and speed up the execution of the entire process.

[0035] Exemplarily, for each monitoring host, you can perform port checks, existence checks, and host creation operations on middleware such as Nginx, Tomcat, Kafka, and Elasticsearch in turn. Specifically, you can use the python socket.inet_aton module to determine whether the monitored host name is a legal IP address; you can use Python's socket module to create sockets of the AF_INET (IPv4) and SOCK_STREAM (TCP) types, use the connect_ex method to try to connect to the specific middleware service port of the target host, and set a timeout (for example, 5 seconds). If the connection is successful (the return value of connect_ex is 0), the port is considered open, otherwise it is considered that the port is not open or the connection is abnormal; you can use the python requests library to construct proxy_data request data and send it to the Zabbix server to query the Zabbix server whether the middleware host already exists; Step S140: If it is determined that it is necessary to request to create the middleware monitoring host in the monitoring server, then according to the middleware type corresponding to the middleware monitoring host, request the monitoring server to create the middleware monitoring host.

[0036] In this step, after it is determined that a middleware monitoring host needs to be created, a creation request is constructed according to the type of middleware. Different types of middleware may require different parameters and configuration information when they are created in the monitoring server. For example, for Nginx middleware, you may need to provide information such as Nginx version number, configuration file path, and listening port; for Kafka middleware, you may need to provide Kafka cluster configuration information, topic information, etc. According to these different requirements, the middleware type related information corresponding to the middleware monitoring host is organized into a suitable request format.

[0037] Then, the constructed request is sent to the monitoring server through the creation interface provided by the monitoring server. After receiving the creation request, the monitoring server will parse and verify the request. Check whether the information provided in the request is complete, the format is correct, and whether it complies with the system's creation rules and permission requirements. If the request information passes the verification, the monitoring server will create a corresponding record in its internal monitoring configuration database based on the information in the request to complete the creation operation of the middleware monitoring host. During the creation process, it may be necessary to record relevant log information, including the sending time of the creation request, the request content, the response time of the monitoring server, and the response result. These log information are of great significance for subsequent auditing, troubleshooting, and performance optimization.

[0038] For example, request data with different structures can be constructed according to the middleware type (such as Nginx, Tomcat, Kafka, Elasticsearch, etc.). For example, the request data includes the monitoring host name, proxy hostid, interface information (determine the client interface or JMX interface and the corresponding port according to the middleware type), group id, associated template id and other information. Use the requests library to send a POST request to the monitoring server to create a middleware monitoring host.

[0039] Step S150: output a prompt message according to the result of the monitoring server creating the middleware monitoring host.

[0040] In this step, after the monitoring server completes the creation operation of the middleware monitoring host, it will return the creation result information. This result information may include the identification of success or failure of the creation, as well as some additional explanatory information, such as the reason for failure. After receiving the creation result, a corresponding prompt message is generated according to the result content. If the creation is successful, the generated prompt message can be, for example, "The middleware monitoring host is created successfully, and the monitoring configuration has been successfully added to the [middleware type] middleware on [monitoring host address]", so that the user knows clearly that the creation operation has been successfully completed. If the creation fails, the prompt message can explain the reason for the failure in detail, such as "The creation of the middleware monitoring host failed because of [specific failure reason]". In order for users to obtain these prompt messages in a timely manner, it may be necessary to output them through multiple channels. The prompt message can be displayed in the form of a pop-up window or a message list on the front-end interface of the monitoring system, so that users can see it directly when operating the monitoring system. The prompt message can also be sent to relevant operation and maintenance personnel through emails, text messages, etc. to ensure that they can understand the results of the creation operation in a timely manner.

[0041] Optionally, in order to facilitate subsequent query and statistics, these prompt messages can also be recorded in a log file or database. The recorded information may include the content of the prompt message, the generation time, the relevant monitoring host and middleware information, etc.

[0042] Based on the above steps, by obtaining the target proxy object identifier of the target proxy object from the proxy object list in the monitoring server, the monitoring host list under the target proxy object is obtained according to the target proxy object identifier. The monitoring hosts included in the monitoring host list are traversed to determine whether to request to create the middleware monitoring host in the monitoring server according to the address of each monitoring host, the middleware service port, and whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server, wherein the monitoring host includes one or more middleware. If it is determined that it is necessary to request to create the middleware monitoring host in the monitoring server, then according to the middleware type corresponding to the middleware monitoring host, the monitoring server is requested to create the middleware monitoring host. According to the result of the monitoring server creating the middleware monitoring host, a prompt message is output, thereby improving the efficiency and accuracy of the creation of the middleware monitoring host in an automated manner.

[0043] In a possible implementation manner, determining whether to request to create the middleware monitoring host in the monitoring server according to the address of each monitoring host, the middleware service port, and whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server includes: According to the address of the monitoring host, determining whether the address of the monitoring host is a legal address; If the address of the monitoring host is a legal address, then attempt to connect to the middleware service port of the monitoring host, and obtain the connection result of the attempted connection; If the connection result is successful, constructing a check request according to the middleware monitoring host corresponding to the middleware service port; Sending the inspection request to the monitoring server to determine whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server according to the response information of the monitoring server to the inspection request; If the middleware monitoring host corresponding to the middleware service port does not exist in the monitoring server, a request is made to create the middleware monitoring host in the monitoring server.

[0044] In this embodiment, judging whether the monitoring host address is legal is an important prerequisite for ensuring the smooth progress of subsequent operations. First, judgment rules can be formulated based on common network address specifications. For example, for IPv4 addresses, the format should be composed of four numbers between 0 and 255, separated by periods. For IPv6 addresses, the format is more complicated, usually composed of 8 groups of 4-digit hexadecimal numbers, separated by colons. At the same time, a legal address also needs to consider whether it is within a specific network range, which may involve information such as a subnet mask. During the implementation process, a special address verification function will be written. For IPv4 addresses, it can be verified by string segmentation and value range checking. First, the address string is divided into four parts by periods, and then each part is checked to see if it can be converted into an integer between 0 and 255. For IPv6 addresses, character checks and length verifications can be performed according to the rules of hexadecimal numbers. In addition to format verification, network reachability checks may also be performed. Try to use the system's network tools (such as the ping command) to test whether the address can respond. If the address format is correct but cannot be pinged, it may mean that the address is not available in the network and cannot be considered a legal address.

[0045] After confirming that the monitoring host address is legal, you can start trying to connect to the middleware service port on the host. First, you need to specify the middleware service port number to be connected. This may be obtained by querying the configuration file of the monitoring host, the relevant service management tool records, or the information collected previously. For example, for the Tomcat middleware running on the monitoring host, its default HTTP service port may be 8080. After obtaining the port number, use the network programming related libraries and tools to establish a connection. In Python, you can use the socket library. Create a socket object and specify the use of IPv4 protocol (AF_INET) and TCP protocol (SOCK_STREAM), because most middleware services use TCP protocol for communication. Then, try to use the socket's connect method to connect to the specified port of the monitoring host. During the connection process, you can set a reasonable timeout to avoid the program waiting for a long time due to no response from the host. For example, set the timeout to 5 seconds. If the connection is successfully established within the timeout, it means that the connection is successful, and the socket's connect method returns a value of 0; if the timeout period ends and the connection is still not successfully connected, the connection fails, and the connect method returns a non-zero value. The success or failure of the connection is recorded.

[0046] Optionally, multiple attempts can be made to ensure the reliability of the connection operation. If the first connection fails, the server will wait for a short period of time before trying again, with a maximum of a certain number of attempts (such as 3).

[0047] When the connection is successful, in order to determine whether the middleware monitoring host corresponding to the middleware service port already exists in the monitoring server, a check request needs to be constructed. First, clarify the information that the check request needs to contain. This information usually includes the identification of the monitoring host (such as IP address or host name), the middleware service port number, and the type of the middleware. For example, if the middleware is Nginx, the request will clearly indicate the "Nginx" type and the corresponding service port (such as 80 or 443). Organize this information into a specific data structure for easy transmission and parsing. Common data structure formats are JSON and XML. Taking JSON format as an example, you can create a dictionary object with the monitoring host identification, middleware service port number, and middleware type as the key-value pairs of the dictionary. Then, according to the interface specifications supported by the monitoring server, this data structure is further packaged. You may need to add some common request header information, such as the version number of the request, authentication information, etc. The authentication information is used to ensure the legitimacy of the request, which may be a token or a combination of a username and password. Convert the packaged request data into a string format for transmission over the network.

[0048] After the check request is constructed, send the request to the monitoring server through the network. Taking the HTTP protocol as an example, you can create an HTTP POST request and send the request data as the request body to the specified API endpoint of the monitoring server. For example, create a request object through Python's requests library, set the request URL, request header, and request body. The request header contains authentication information and data format type (such as "application / json" indicates that the request body is in JSON format). After sending the request, wait for the response of the monitoring server. After receiving the request, the monitoring server first parses the request. Check whether the authentication information in the request header is valid and whether the data format of the request body is correct. If the authentication fails or the data format is incorrect, an error response will be returned. If the request is parsed successfully, the monitoring server will query its internal monitoring configuration database. According to the monitoring host identifier, middleware service port number, and middleware type in the request, check whether there is a corresponding middleware monitoring host record. If a matching record is found, a response message indicating existence is returned, which may contain detailed configuration information of the middleware monitoring host; if no matching record is found, a response message indicating non-existence is returned.

[0049] After receiving the response from the monitoring server, parse the response information. If the response status code indicates success (such as HTTP status code 200), further analyze the content in the response body. According to the identification information in the response body, determine whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server. If the response status code indicates failure (such as 401 for unauthorized, 400 for wrong request, etc.), record the error situation and perform corresponding processing according to the specific status code and the error information in the response body.

[0050] When it is determined that the corresponding middleware monitoring host does not exist in the monitoring server, it is necessary to request to create the middleware monitoring host in the monitoring server. Specifically, a creation request can be constructed according to the type of middleware and the relevant information of the monitoring host. The creation request needs to contain more detailed information. In addition to the monitoring host identifier, the middleware service port number and the middleware type, it may also include the configuration parameters of the middleware, the monitoring indicator settings, etc. For example, for MySQL middleware, it may be necessary to include configuration parameters such as the database username, password, database name, and the indicators that need to be monitored (such as CPU usage, memory usage, query response time, etc.). Organize this information into a suitable data structure, which can also be in JSON or XML format.

[0051] Then, according to the creation interface specification of the monitoring server, the request is packaged and sent to the monitoring server through the network. After the monitoring server receives the creation request, if the request passes the verification, the monitoring server can create a new middleware monitoring host record in its internal monitoring configuration database. The record will contain all the information in the request, as well as some identification and configuration information automatically generated by the system. After the creation is successful, the monitoring server returns a response message indicating the successful creation, and the response message may contain information such as the unique identification of the newly created middleware monitoring host. If the request verification fails, the monitoring server can return a response message indicating the failure, detailing the reason for the failure, such as "configuration parameter error", "monitoring indicator setting conflict", etc. After receiving the response, the corresponding processing is performed according to the response information. If the creation is successful, the relevant information of the newly created middleware monitoring host is recorded for subsequent monitoring and management; if the creation fails, it is corrected according to the reason for the failure, and the request is rebuilt and sent.

[0052] In a possible implementation, it further includes: If the address of the monitoring host is not a legal address, the next monitoring host of the monitoring host is traversed and the first abnormal information is output, wherein the first abnormal information is used to indicate that the address of the monitoring host is not a legal address.

[0053] and / or, If the connection result is a connection failure, the next monitoring host of the monitoring host is traversed and the second abnormal information is output, wherein the second abnormal information is used to indicate that the connection result is a connection failure.

[0054] and / or, If it is determined that a middleware monitoring host corresponding to the middleware service port exists in the monitoring server, the next monitoring host of the monitoring host is traversed.

[0055] In a possible implementation manner, before acquiring the target proxy object identifier of the target proxy object from the proxy object list in the monitoring server, the method further includes: Obtaining connection information of the monitoring server, wherein the connection information includes a connection address, authentication information, and a request header; Establishing a connection with the monitoring server according to the connection address, the authentication information, and the request header, so as to obtain a target proxy object identifier of a target proxy object from a proxy object list in the monitoring server; If the connection with the monitoring server fails, outputting third abnormal information; After the monitoring hosts included in the monitoring host list are traversed, the method further includes: Disconnect from the monitoring server.

[0056] In this embodiment, the connection information includes the connection address, authentication information, and request header. The connection address is generally obtained from the configuration file, the authentication information is read from a specific configuration or obtained through the authentication interface according to the authentication method (such as username / password, token authentication), and the request header is constructed according to the monitoring server API specification, covering information such as data format and client identification, and accuracy and completeness verification is required.

[0057] Use network libraries (such as Python's requests library) to determine the request URL according to the connection address, add authentication information to the request as required (such as username / password authentication using the auth parameter, token authentication in the request header), and send the request with the request header attached. Set a reasonable timeout, check the status code after receiving the response, parse the response content to filter out the target proxy object identifier if successful, and handle the problem according to the status code if failed.

[0058] Connection failures can be caused by a variety of reasons, such as network failures, authentication failures, and monitoring server failures. Network failures can be determined by capturing network library exceptions (such as requests.exceptions.ConnectionError), and authentication issues can be determined based on the status code returned by the monitoring server (such as 401 for authentication failure). Exception information can be output in console printing and log recording, and relevant personnel can also be notified via email or SMS.

[0059] Determine the network connection library used (such as requests library, socket library, aiohttp framework), and call the corresponding closing method (such as close, session.close) to disconnect. Clean up temporary data and cache before disconnecting, and handle unfinished requests; after disconnecting, check the connection status and record relevant logs, including disconnection time, server address, etc., to release resources.

[0060] In a possible implementation manner, judging whether the address of the monitoring host is a legal address according to the address of the monitoring host includes: Collecting a legal address set from a network configuration file, and / or historical data of a network monitoring tool, and / or a public address database, wherein the legal address set includes at least one address type; Obtaining an illegal address set, wherein the illegal addresses in the illegal address set include at least one of a generated illegal address, a collected illegal address with a configuration error, and an address obtained from a network log that results in a connection failure due to an address error; Extracting address features corresponding to each address type according to the address type of the legal address, wherein the address features include at least one of address structure features, subnet mask related features, and host name related features, and different address types correspond to different address features; Generate training data according to the legal address set, the illegal address set, and the address features corresponding to each of the address types, and train a multilayer perceptron model using the training data to obtain a trained multilayer perceptron model, wherein the number of input layers of the multilayer perceptron model is related to the number of the address features, and the output of the multilayer perceptron model is used to judge the legitimacy of the input data; According to the address of the monitoring host, determine the address type corresponding to the address of the monitoring host, and input the host name of the monitoring host and the address of the monitoring host into the trained multi-layer perceptron model corresponding to the address type to obtain a probability value of whether the address of the monitoring host is a legal address; If the probability value is greater than or equal to a preset probability threshold, the address of the monitoring host is determined to be a legal address.

[0061] In this embodiment, in an enterprise network environment, a network configuration file is stored in a network management server, which records the legal IP address segments of the internal network. Relevant address information is read from the network configuration file and organized into a legal address set. The network monitoring tool records the connection status of network devices for a long time, and its historical data includes the addresses of successfully connected devices, from which legal addresses are screened. Public address databases such as the address information provided by IANA (Internet Assigned Numbers Authority) can also be used as a source of legal addresses to integrate legal addresses from these different sources.

[0062] Generate some illegal addresses through the program according to the illegal address generation rules (such as strings that do not conform to the IP address format specification). In the process of network device configuration, collect illegal addresses generated by human configuration errors. The network log records the attempts and results of network connections in detail, and selects the addresses that fail to connect due to address errors, and aggregates these different types of illegal addresses into an illegal address set.

[0063] The purpose of extracting address features is to enable the model to learn the characteristics of different types of legal addresses, so as to more accurately judge the legality of the address. For IPv4 addresses, analyze their structural features, such as four 0-255 numbers separated by dots; extract subnet mask related features, such as common subnet mask forms and their corresponding relationship with addresses. For IPv6 addresses, study their hexadecimal digital composition and colon-separated structural features. If host names are involved, analyze the naming rules, length restrictions and other features of the host names, and establish corresponding feature sets for different address types.

[0064] The legal address set and illegal address set are converted according to the corresponding address features to form training data containing address features. For example, address structure, subnet mask and other features are digitized to form training samples. These training data are input into the multi-layer perceptron model for training. The model learns and adjusts the weights according to the input address features. The number of input layers is determined according to the number of address features. After multiple rounds of training, the model can judge the legitimacy of the address based on the input data and obtain a trained model.

[0065] First, determine whether the monitoring host address is in the form of IPv4, IPv6, or host name. After determining the address type, process the host name and address of the monitoring host in the format of the previously trained data to extract the corresponding address feature values. Input these feature values ​​into the trained multi-layer perceptron model of the corresponding address type. The model outputs a probability value after calculation, which represents the possibility that the monitoring host address is a legal address. Preset a probability threshold, such as 0.9. After obtaining the probability value of the monitoring host address being a legal address from the multi-layer perceptron model, compare the probability value with the preset threshold. If the probability value is greater than or equal to 0.9, the monitoring host address is determined to be a legal address; if it is less than the threshold, it is determined to be an illegal address.

[0066] In a possible implementation, it further includes: Acquire historical middleware service port status data and the configuration information of the monitoring host, wherein the historical middleware service port status data includes the availability status of the port, and the configuration information of the monitoring host includes the operating system configuration and the application configuration; Determining middleware service port status characteristics according to the historical middleware service port status data, wherein the middleware service port status characteristics include port type characteristics and port availability change characteristics; Determine operating system characteristics and application program characteristics according to the configuration information of the monitoring host, wherein the operating system characteristics are related to the operating system type and version, and the application program characteristics are related to the application program type and version; An initial random forest algorithm model is trained according to the port type feature, the port availability change feature, the operating system feature, and the application feature, and the performance of the initial random forest algorithm model is evaluated by cross-validation to adjust the model parameters of the initial random forest algorithm model according to the performance, and after achieving a preset training effect, a trained random forest algorithm model is generated, and the trained random forest algorithm model is used to predict the availability of the middleware service port; Extracting, according to the middleware service port of the monitoring host and the configuration information of the monitoring host, the port type characteristics of the middleware service port, the port availability change characteristics of the middleware service port, the operating system characteristics of the monitoring host, and the application characteristics of the monitoring host; Input the port type characteristics of the middleware service port, the port availability change characteristics of the middleware service port, the operating system characteristics of the monitoring host, and the application characteristics of the monitoring host as input data into the trained random forest algorithm model to obtain the availability prediction result of the middleware service port; If the availability prediction result of the middleware service port is the same as the connection test result, the connection result is determined.

[0067] In this embodiment, historical middleware service port status data can be extracted from the enterprise's internal monitoring database, which records the availability status of each middleware service port in the past period of time, including information such as when the port is open and when it is closed. At the same time, the operating system configuration (such as the operating system name, version number, etc.) and application configuration (such as the installation path of the middleware, startup parameters, etc.) of the monitoring host are obtained by reading the system configuration file and application configuration file on the monitoring host.

[0068] Analyze historical middleware service port status data to determine port type characteristics, such as distinguishing HTTP ports, TCP ports, or UDP ports. At the same time, count changes in port availability to form port availability change characteristics, such as the frequency and cycle of port opening and closing.

[0069] Extract operating system features from the monitoring host's operating system configuration information, such as whether the operating system is Windows or Linux, and specific version numbers, etc. Determine application features from application configuration information, including the type of middleware (such as Nginx, Tomcat, etc.) and version number.

[0070] The port type features, port availability change features, operating system features, and application features are organized into training data. These data are used to train the initial random forest algorithm model. During the training process, the data set is divided into multiple subsets through the cross-validation method, one for training the model and one for evaluating the model performance. The model parameters, such as the number of trees and the maximum depth, are adjusted according to the evaluation results. The training is repeated until the preset training effect is achieved, and a trained random forest algorithm model is obtained.

[0071] For the middleware service port of the current monitoring host, determine its port type characteristics and check the port usage protocol and other information. Analyze the past availability of the port and obtain the port availability change characteristics. Extract the operating system characteristics and application characteristics from the monitoring host configuration information again to ensure the accuracy and timeliness of the characteristic information.

[0072] The extracted port type features, port availability change features, operating system features, and application features of the middleware service port are organized into data that conforms to the input format of the trained random forest algorithm model. These data are input into the model, which, after calculation and analysis, outputs the availability prediction result of the middleware service port, that is, predicts whether the port is open or closed.

[0073] Perform an actual connection test on the middleware service port of the monitoring host to obtain the connection test result (connection success or failure). Compare this result with the availability result predicted by the random forest algorithm model. If the two are the same, the connection result is determined to be the final connection status, which is used as the basis for subsequent operations.

[0074] In a possible implementation, it further includes: Acquiring computing resources, and determining the number of tasks that can be executed in parallel based on the computing resources; According to the number of tasks that can be executed in parallel, a process pool is constructed, wherein the number of processes in the process pool is related to the number of tasks that can be executed in parallel; According to the process pool and the number of monitoring hosts included in the monitoring host list, polling and allocating tasks for each process in the process pool, the tasks being used to determine whether to request to create the middleware monitoring host in the monitoring server according to the address of each monitoring host, the middleware service port, and whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server; The monitoring hosts included in the monitoring host list are traversed in parallel through the process pool.

[0075] In this embodiment, in an enterprise-level data processing environment, there are multiple ways to obtain computing resource information. First, you can use the system's built-in performance monitoring tools to obtain key data such as CPU usage, core number, memory usage and idle amount in real time. These tools will continue to collect data to reflect the current resource usage of the server. At the same time, consider other types of tasks running on the server to clarify their demand for computing resources. Some tasks may require higher CPU resources, while others are more dependent on memory.

[0076] Based on the acquired computing resource information, the resource reservation required for the stable operation of the server is comprehensively considered, and reasonable rules are formulated to determine the number of tasks that can be executed in parallel. For example, if the server has a large number of CPU cores and the current utilization rate is low, and there is sufficient free memory, then the number of tasks that can be executed in parallel can be appropriately increased; conversely, if resources are tight, the number of tasks can be reduced accordingly. This process needs to be combined with past experience and an evaluation of system performance to ensure that when tasks are executed in parallel, the system performance will not be degraded due to excessive resource competition.

[0077] Based on the number of tasks that can be executed in parallel, a process pool is constructed using the relevant mechanisms provided by the operating system or programming language. The operating system has corresponding process management functions, and programming languages ​​also have rich libraries to support this operation. When constructing a process pool, the number of processes in the process pool is set to match the number of tasks that can be executed in parallel.

[0078] After the process pool is created, each process in it is in a ready state, waiting for tasks to be assigned. The process pool is responsible for managing these processes, allocating system resources to them, and ensuring that each process can run under reasonable resource allocation. At the same time, the process pool can effectively coordinate resource competition between processes, avoid resource waste, improve overall resource utilization efficiency, and provide guarantees for subsequent efficient execution of tasks.

[0079] According to the number of processes in the process pool and the number of hosts in the monitoring host list, a polling strategy is used to allocate tasks. The monitoring host list is grouped according to the number of processes, and the number of hosts in each group is as even as possible. For example, if the process pool has 8 processes and there are 40 hosts in the monitoring host list, the host list is divided into 8 groups, with 5 hosts in each group (there may be excess hosts, which can be processed separately or evenly distributed to other groups).

[0080] Each process obtains a set of tasks from the grouped task list in turn. For a set of monitoring hosts obtained by each process, the process will perform a series of operations on each monitoring host. First, the address of the monitoring host is obtained, and then the middleware service port running on it is determined. After that, a query request is sent to the monitoring server to determine whether the middleware monitoring host corresponding to the middleware service port already exists in the monitoring server. If not, a creation request is sent to the monitoring server based on the relevant information, requesting the creation of the middleware monitoring host in the monitoring server. Through this polling allocation method, it is ensured that each process has tasks to execute and can complete the relevant operations of the monitoring host for which it is responsible in a relatively balanced time.

[0081] Each process in the process pool starts to execute the assigned tasks at the same time, realizing parallel traversal of the monitoring host list. Each process independently handles a set of monitoring hosts assigned to it without interfering with each other. During the traversal process, each process processes each monitoring host according to the established task flow. From obtaining the address, determining the middleware service port, to querying the monitoring server and creating the monitoring host, these operations are completed sequentially in each process, but multiple processes run in parallel.

[0082] Since multiple processes work in parallel, the efficiency of traversing the monitoring host list is greatly improved. Compared with processing the monitoring hosts one by one, parallel processing can make full use of the server's computing resources and complete the inspection of a large number of monitoring hosts and the creation of related monitoring configurations in a shorter time. When all processes complete the processing tasks of the monitoring hosts they are responsible for, the traversal of the entire monitoring host list and related operations are completed. The system can quickly obtain the status of all monitoring hosts and perform corresponding configurations to ensure the efficient operation of the monitoring system.

[0083] In the above embodiments, the middleware monitoring host creation system for executing the above method embodiments has at least one processor, a control module (chip set) coupled to at least one of the (at least one) processors, a memory coupled to the control module, a non-volatile memory (NVM) / storage device coupled to the control module, at least one input / output device coupled to the control module, and a network interface coupled to the control module.

[0084] The processor may include at least one single-core or multi-core processor, and the processor may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). For some alternative implementations, the middleware monitoring host creation system can be used as a middleware monitoring host creation system device such as a gateway described in the embodiments of the present application.

[0085] For some alternative embodiments, the middleware monitoring host creation system may include at least one computer-readable medium (e.g., a memory or NVM / storage device) having instructions and at least one processor integrated with the at least one computer-readable medium and configured to execute the instructions to implement a module to perform the actions described in the present disclosure.

[0086] For one embodiment, the control module may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) and / or any suitable device or component in communication with the control module.

[0087] The control module may include a memory controller module to provide an interface to the memory. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0088] The memory may be used, for example, to load and store data and / or instructions for a middleware monitoring host creation system. For one embodiment, the memory may include any suitable volatile memory, such as a suitable DRAM.

[0089] For one embodiment, the control module may include at least one input / output controller to provide an interface to the NVM / storage device and (at least one) input / output device.

[0090] For example, the NVM / storage device may be used to store data and / or instructions. The NVM / storage device may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (at least one) non-volatile storage device (e.g., at least one hard disk drive (HDD), at least one compact disk (CD) drive, and / or at least one digital versatile disk (DVD) drive).

[0091] The NVM / storage device may include storage resources that are physically part of the device on which the middleware monitoring host creation system is installed, or it may be accessible to the device without being part of the device. For example, the NVM / storage device may be accessed via (at least one) input / output device over a network.

[0092] (At least one) input / output device may provide an interface for the middleware monitoring host creation system to communicate with any other appropriate device, and the input / output device may include a communication component, a phonetic component, a sensor component, etc. The network interface may provide an interface for the middleware monitoring host creation system to communicate based on at least one network, and the middleware monitoring host creation system may wirelessly communicate with at least one component of a wireless network based on any standard and / or protocol of at least one wireless network standard and / or protocol, such as accessing a wireless network based on a communication standard.

[0093] For one embodiment, at least one of the (at least one) processor may be loaded together with the logic of at least one controller of the control module (e.g., a memory controller module). For one embodiment, at least one of the (at least one) processor may be loaded together with the logic of at least one controller of the control module to form a system level load. For one embodiment, at least one of the (at least one) processor may be integrated on the same die with the logic of at least one controller of the control module. For one embodiment, at least one of the (at least one) processor may be integrated on the same die with the logic of at least one controller of the control module to form a system on chip (SoC).

[0094] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0095] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps in the method for creating a middleware monitoring host described in the above embodiment.

[0096] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps in the middleware monitoring host creation method described in the above embodiment.

[0097] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0098] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other medium that can be used to be computer-readable with or store data.

[0099] Finally, it should be noted that what is disclosed above is only a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for creating a middleware monitoring host, characterized in that: include: Acquire a target proxy object identifier of a target proxy object from a proxy object list in a monitoring server, wherein the proxy object list includes proxy object identifiers; According to the target proxy object identifier, obtain a list of monitoring hosts under the target proxy object; Traversing the monitoring hosts included in the monitoring host list to determine whether to request to create the middleware monitoring host in the monitoring server according to the address of each monitoring host, the middleware service port, and whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server, wherein the monitoring host includes one or more middlewares; If it is determined that it is necessary to request to create the middleware monitoring host in the monitoring server, then request the monitoring server to create the middleware monitoring host according to the middleware type corresponding to the middleware monitoring host; According to the result of the monitoring server creating the middleware monitoring host, a prompt message is output.

2. The method for creating a middleware monitoring host according to claim 1, characterized in that: The determining whether to request to create the middleware monitoring host in the monitoring server according to the address of each monitoring host, the middleware service port, and whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server includes: According to the address of the monitoring host, determining whether the address of the monitoring host is a legal address; If the address of the monitoring host is a legal address, then attempt to connect to the middleware service port of the monitoring host, and obtain the connection result of the attempted connection; If the connection result is successful, constructing a check request according to the middleware monitoring host corresponding to the middleware service port; Sending the inspection request to the monitoring server to determine whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server according to the response information of the monitoring server to the inspection request; If the middleware monitoring host corresponding to the middleware service port does not exist in the monitoring server, a request is made to create the middleware monitoring host in the monitoring server.

3. The method for creating a middleware monitoring host according to claim 2, characterized in that: Also includes: If the address of the monitoring host is not a legal address, traverse the next monitoring host of the monitoring host and output the first abnormal information; and / or, If the connection result is a connection failure, traverse the next monitoring host of the monitoring host and output a second abnormal information; and / or, If it is determined that a middleware monitoring host corresponding to the middleware service port exists in the monitoring server, the next monitoring host of the monitoring host is traversed.

4. The method for creating a middleware monitoring host according to claim 3, characterized in that: Before obtaining the target proxy object identifier of the target proxy object from the proxy object list in the monitoring server, the method further includes: Obtaining connection information of the monitoring server, wherein the connection information includes a connection address, authentication information, and a request header; Establishing a connection with the monitoring server according to the connection address, the authentication information, and the request header, so as to obtain a target proxy object identifier of a target proxy object from a proxy object list in the monitoring server; If the connection with the monitoring server fails, outputting third abnormal information; After the monitoring hosts included in the monitoring host list are traversed, the method further includes: Disconnect from the monitoring server.

5. The method for creating a middleware monitoring host according to claim 2, characterized in that: The determining, based on the address of the monitoring host, whether the address of the monitoring host is a legal address includes: Collecting a legal address set from a network configuration file, and / or historical data of a network monitoring tool, and / or a public address database, wherein the legal address set includes at least one address type; Obtaining an illegal address set, wherein the illegal addresses in the illegal address set include at least one of a generated illegal address, a collected illegal address with a configuration error, and an address obtained from a network log that results in a connection failure due to an address error; Extracting address features corresponding to each address type according to the address type of the legal address, wherein the address features include at least one of address structure features, subnet mask related features, and host name related features, and different address types correspond to different address features; Generate training data according to the legal address set, the illegal address set, and the address features corresponding to each of the address types, and train a multilayer perceptron model using the training data to obtain a trained multilayer perceptron model, wherein the number of input layers of the multilayer perceptron model is related to the number of the address features, and the output of the multilayer perceptron model is used to judge the legitimacy of the input data; According to the address of the monitoring host, determine the address type corresponding to the address of the monitoring host, and input the host name of the monitoring host and the address of the monitoring host into the trained multi-layer perceptron model corresponding to the address type to obtain a probability value of whether the address of the monitoring host is a legal address; If the probability value is greater than or equal to a preset probability threshold, the address of the monitoring host is determined to be a legal address.

6. The method for creating a middleware monitoring host according to claim 2, characterized in that: Also includes: Acquire historical middleware service port status data and the configuration information of the monitoring host, wherein the historical middleware service port status data includes the availability status of the port, and the configuration information of the monitoring host includes the operating system configuration and the application configuration; Determining middleware service port status characteristics according to the historical middleware service port status data, wherein the middleware service port status characteristics include port type characteristics and port availability change characteristics; Determine operating system characteristics and application program characteristics according to the configuration information of the monitoring host, wherein the operating system characteristics are related to the operating system type and version, and the application program characteristics are related to the application program type and version; An initial random forest algorithm model is trained according to the port type feature, the port availability change feature, the operating system feature, and the application feature, and the performance of the initial random forest algorithm model is evaluated by cross-validation to adjust the model parameters of the initial random forest algorithm model according to the performance, and after achieving a preset training effect, a trained random forest algorithm model is generated, and the trained random forest algorithm model is used to predict the availability of the middleware service port; Extracting, according to the middleware service port of the monitoring host and the configuration information of the monitoring host, the port type characteristics of the middleware service port, the port availability change characteristics of the middleware service port, the operating system characteristics of the monitoring host, and the application characteristics of the monitoring host; Input the port type characteristics of the middleware service port, the port availability change characteristics of the middleware service port, the operating system characteristics of the monitoring host, and the application characteristics of the monitoring host as input data into the trained random forest algorithm model to obtain the availability prediction result of the middleware service port; If the availability prediction result of the middleware service port is the same as the connection test result, the connection result is determined.

7. The method for creating a middleware monitoring host according to any one of claims 1 to 6, characterized in that: Also includes: Acquiring computing resources, and determining the number of tasks that can be executed in parallel based on the computing resources; According to the number of tasks that can be executed in parallel, a process pool is constructed, wherein the number of processes in the process pool is related to the number of tasks that can be executed in parallel; According to the process pool and the number of monitoring hosts included in the monitoring host list, polling and allocating tasks for each process in the process pool, the tasks being used to determine whether to request to create the middleware monitoring host in the monitoring server according to the address of each monitoring host, the middleware service port, and whether there is a middleware monitoring host corresponding to the middleware service port in the monitoring server; The monitoring hosts included in the monitoring host list are traversed in parallel through the process pool.

8. A middleware monitoring host creation system, characterized in that: It comprises a processor and a computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by a computer, the method for creating a middleware monitoring host according to any one of claims 1 to 7 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by a computer, the method for creating a middleware monitoring host described in any one of claims 1 to 7 is implemented.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.