Middleware monitoring host creation method and system
By automating the process to obtain the target proxy object identifier from the monitoring server, traversing the list of monitored hosts, and using machine learning models to determine legality and port status, this approach solves the problems of low efficiency and poor accuracy in traditional manual creation of middleware monitoring hosts, and achieves efficient and accurate creation of middleware monitoring hosts.
Patent Information
- Application Number
- CN202510072356.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The traditional method of manually creating middleware monitoring hosts on a monitoring server is inefficient and inaccurate, and it is difficult to adapt to dynamically changing IT environments.
The system retrieves the identifier of the target proxy object from the list of proxy objects in the monitoring server, traverses the list of monitoring hosts, determines whether to create a middleware monitoring host based on the middleware service port and address, and uses a multilayer perceptron model and random forest algorithm model to improve the accuracy of the judgment, and adopts an automated process for creation.
It improves the efficiency and accuracy of middleware monitoring host creation, adapting to dynamically changing IT environments.
Smart Images

Figure CN119938361B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a method and system for creating a middleware monitoring host. Background Technology
[0002] In complex information technology (IT) architectures, various middleware components are typically used to support diverse business applications, such as Nginx, Kafka, Elasticsearch, and Tomcat. As systems grow in scale, operations and maintenance personnel need to efficiently and accurately monitor these middleware components to ensure stable system operation and performance optimization. The traditional method of manually creating middleware monitoring hosts on monitoring servers is inefficient. Furthermore, manual processing is prone to omissions or errors due to human negligence, resulting in poor accuracy and difficulty adapting to dynamically changing IT environments.
[0003] Therefore, improving 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 this application is to provide a method and system for creating middleware monitoring hosts, so as to improve the efficiency and accuracy of middleware monitoring host creation.
[0005] In conjunction with the first aspect of this application, a method for creating a middleware monitoring host is provided, the method comprising: Retrieve the target proxy object identifier from the proxy object list in the monitoring server, wherein the proxy object list includes the proxy object identifier; Based on the target proxy object identifier, obtain the list of monitored hosts under the target proxy object; The monitoring hosts included in the monitoring host list are traversed to determine whether to request the creation of 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. The monitoring host includes one or more middlewares. If it is determined that it is necessary to request the creation of 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; Based on the result of creating the middleware monitoring host by the monitoring server, an alert message is output.
[0006] In one possible implementation of the first aspect, determining whether to request the creation of the middleware monitoring host in the monitoring server based on the address of each monitoring host, the middleware service port, and whether a middleware monitoring host corresponding to the middleware service port exists in the monitoring server includes: Based on the address of the monitoring host, determine whether the address of the monitoring host is a valid address; If the address of the monitoring host is a valid address, then attempt to connect to the middleware service port of the monitoring host and obtain the connection result of the connection attempt; If the connection result is successful, then a check request is constructed based on the middleware monitoring host corresponding to the middleware service port. Send 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 based on the response information of the monitoring server to the inspection request. If the monitoring server does not have a middleware monitoring host corresponding to the middleware service port, then a request is made to create the middleware monitoring host on the monitoring server.
[0007] In one possible implementation of the first aspect, it further includes: If the address of the monitoring host is not a valid address, then 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, then traverse the next monitoring host of the monitoring host and output the second abnormal information; And / or, If it is determined that there is a middleware monitoring host corresponding to the middleware service port in the monitoring server, then the next monitoring host is traversed.
[0008] In one possible implementation of the first aspect, before retrieving the target proxy object identifier of the target proxy object from the list of proxy objects in the monitoring server, the method further includes: Obtain the connection information of the monitoring server, which includes the connection address, authentication information, and request headers; A connection is established with the monitoring server based on the connection address, the authentication information, and the request header, so as to obtain the target proxy object identifier of the target proxy object from the proxy object list in the monitoring server; If the connection to the monitoring server fails to be established, a third exception message will be output. After iterating through all the monitored hosts in the list of monitored hosts, the process also includes: Disconnect from the monitoring server.
[0009] In one possible implementation of the first aspect, determining whether the address of the monitoring host is a valid address based on the address of the monitoring host includes: Collect a set of legitimate addresses from network configuration files, and / or historical data from network monitoring tools, and / or from publicly available address databases, wherein the set of legitimate addresses includes at least one address type; Obtain a set of illegal addresses, wherein the illegal addresses in the set include at least one of the following: generated illegal addresses, collected illegal addresses with misconfigurations, and addresses obtained from network logs that caused connection failures due to address errors; Based on the address type of the legal address, extract the address features corresponding to each address type. The address features include at least one of address structure features, subnet mask related features, and hostname related features. Different address types correspond to different address features. Training data is generated based on the legal address set, the illegal address set, and the address features corresponding to each address type. A multilayer perceptron model is then trained using the training data to obtain a trained multilayer perceptron model. The number of input layers of the multilayer perceptron model is related to the number of address features. The output of the multilayer perceptron model is used to determine the legality of the input data. Based on the address of the monitoring host, determine the address type corresponding to the address of the monitoring host, and input the hostname of the monitoring host and the address of the monitoring host into the trained multilayer perceptron model corresponding to the address type to obtain the probability value of whether the address of the monitoring host is a valid address; If the probability value is greater than or equal to a preset probability threshold, then the address of the monitoring host is determined to be a valid address.
[0010] In one possible implementation of the first aspect, it further includes: Obtain historical middleware service port status data, and the configuration information of the monitoring host. The historical middleware service port status data includes the port availability status, and the configuration information of the monitoring host includes operating system configuration and application configuration. Based on the historical middleware service port status data, the middleware service port status characteristics are determined, including port type characteristics and port availability change characteristics. Based on the configuration information of the monitoring host, the operating system characteristics and application characteristics are determined. The operating system characteristics are related to the operating system type and version, and the application characteristics are related to the application type and version. An initial random forest algorithm model is trained based on the port type characteristics, port availability change characteristics, operating system characteristics, and application characteristics. The performance of the initial random forest algorithm model is evaluated through cross-validation. The model parameters of the initial random forest algorithm model are adjusted according to the performance. After achieving the preset training effect, a trained random forest algorithm model is generated. The trained random forest algorithm model is used to predict the availability of the middleware service port. Based on the middleware service port of the monitoring host and the configuration information of the monitoring host, extract 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. 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 are used as input data and input into the trained random forest algorithm model to obtain the availability prediction results of the middleware service port. If the availability prediction result of the middleware service port is the same as the connection test result, then the connection result is determined.
[0011] In one possible implementation of the first aspect, it is characterized by further comprising: Acquire computing resources and determine the number of tasks that can be executed in parallel based on the computing resources; A process pool is constructed based on the number of tasks that can be executed in parallel, wherein the number of processes in the process pool is related to the number of tasks that can be executed in parallel; Based on the process pool and the number of monitoring hosts included in the monitoring host list, tasks are allocated to each process in the process pool in a round-robin manner. The task is used to determine whether to request the creation of 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. The process pool iterates in parallel through the monitoring hosts included in the monitoring host list.
[0012] In conjunction with the second aspect of this application, a middleware monitoring host creation system is provided. The middleware monitoring host creation system includes a machine-readable storage medium and a processor. The machine-readable storage medium stores machine-executable instructions. 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 a third aspect of this application, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, 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 this application, a computer program product is provided, wherein when the computer program is executed by a processor, it implements the aforementioned middleware monitoring host creation method.
[0015] Combining any of the above aspects, the target proxy object identifier of the target proxy object is obtained from the proxy object list in the monitoring server. Based on the target proxy object identifier, a list of monitoring hosts under the target proxy object is obtained. The monitoring hosts included in the monitoring host list are traversed to determine whether to request the creation of the middleware monitoring host in the monitoring server based on the address of each monitoring host, the middleware service port, and whether a middleware monitoring host corresponding to the middleware service port exists in the monitoring server. Each monitoring host includes one or more middleware components. If it is determined that the creation of the middleware monitoring host in the monitoring server needs to be requested, then the monitoring server is requested to create the middleware monitoring host according to the middleware type corresponding to the middleware monitoring host. Based on the result of the monitoring server creating the middleware monitoring host, a prompt message is output, thereby improving the efficiency and accuracy of middleware monitoring host creation through automation. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained in conjunction with these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating the middleware monitoring host creation method provided in this application embodiment. Detailed Implementation
[0018] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, 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 not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.
[0020] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0021] First, let me introduce the terminology used in this application: Zabbix Server is the core of the Zabbix monitoring system. It collects data from monitored devices (such as servers and network devices) and stores the data in a database, including basic device information and historical values of monitored items. It also manages monitored items and triggers, sending alerts via email, SMS, etc., when trigger conditions are met (such as monitoring data exceeding a threshold). In the system architecture, it is central, connecting monitored devices and the front-end interface.
[0022] Zabbix Proxy: This is an intermediary layer between the Zabbix Server and the monitored hosts. It can offload the server's load and manage local host monitoring tasks in complex environments such as network partitions. By executing scheduled tasks on the proxy nodes, the localization advantage of the proxy can be effectively utilized to quickly check the status of the hosts under it.
[0023] The Zabbix API is an HTTP-based interface that communicates with the Zabbix Server by sending HTTP requests within scripts. When performing operations such as retrieving a host list or creating a monitored host, the script sends requests carrying authentication information (username and password) and operation instructions (such as parameters for retrieving the host list or detailed data for creating a host). Upon receiving the request, the Zabbix Server processes it according to its internal business logic, such as querying the database to retrieve the host list or storing the creation information of the new host in the database.
[0024] Figure 1This document illustrates a flowchart of a middleware monitoring host creation method provided in an embodiment of this application. 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 according to actual needs, or some steps can be omitted or maintained. The detailed middleware monitoring host creation method includes: Step S110: Obtain the target proxy object identifier of the target proxy object from the proxy object list in the monitoring server.
[0025] The list of proxy objects includes proxy object identifiers. In one embodiment, the monitoring server may be, for example, the Zabbix Server of the Zabbix monitoring system, and the proxy object may be the Zabbix Proxy, an intermediate layer between the Zabbix Server and the monitored host. The Zabbix Proxy connects to the Zabbix Server via the Zabbix API. The following description will use this embodiment as an example.
[0026] In this step, within a large enterprise IT monitoring environment, the monitoring server is responsible for monitoring numerous devices and services. Internally, the monitoring server maintains a list of proxy objects, storing information about all proxy objects, each with a unique identifier—the proxy object identifier. To obtain the identifier of the target proxy object, a connection to the monitoring server must first be established. This is done by sending a request to retrieve the proxy object list through a specific Application Programming Interface (API) or communication protocol. Upon receiving the request, the monitoring server extracts the proxy object list from its stored data structures (such as database tables or in-memory datasets) and returns it to the requester. The requester, upon receiving the proxy object list, uses certain filtering criteria, such as the proxy object's name, region, and the scope of business it monitors, to locate the target proxy object and obtain its identifier. In practice, this process can be implemented using programming languages and related libraries. For example, Python's `requests` library can be used to send a Hypertext Transfer Protocol (HTTP) request to the monitoring server's API endpoint, carrying necessary authentication information to ensure legitimate access. After receiving the list of proxy objects in JSON format from the server, a JSON parsing library (such as Python's `json` library) is used to parse the data into operable objects. Then, by iterating through the list elements and comparing the attribute values of each proxy object, the target proxy object is determined, and its identifier is extracted. Simultaneously, to ensure data accuracy and stability, error handling mechanisms may need to be added, such as retrying requests when they fail, or capturing potential exceptions during data parsing and logging relevant information for subsequent troubleshooting.
[0027] For example, you can use the Python requests library to construct proxy_data request data and send it to the monitoring server Zabbix Server to obtain the corresponding target proxy object Zabbix Proxy and extract the proxyid (target proxy object identifier) from it.
[0028] Step S120: Obtain the list of monitored hosts under the target proxy object based on the target proxy object identifier.
[0029] In this step, after obtaining the target proxy object identifier, this identifier is used as a key parameter to interact with the monitoring server again. A request containing the target proxy object identifier is sent by calling a specific interface provided by the monitoring server, informing the monitoring server that a list of monitored hosts under that proxy object is needed. Upon receiving the request, the monitoring server searches relevant data tables or datasets based on its internal storage structure and query logic. For example, the monitoring server may maintain a table recording the association between proxy objects and monitored hosts. The target proxy object identifier is matched against this table to find all associated monitored host information, which is then compiled into a list and returned to the requester. After receiving the list of monitored hosts, the requester may need to further process and verify the list. For example, it may check whether the basic information of each monitored host in the list is complete, including the accuracy of key information such as hostname and Internet Protocol (IP) address. If any information is missing or incomplete, it may need to be recorded and appropriate measures taken, such as requesting more detailed information from the monitoring server again or marking these hosts for later manual processing. Furthermore, to improve the efficiency and stability of list retrieval, some caching mechanisms may be employed. If you need to retrieve the list of monitored hosts under the same target proxy object multiple times within a short period, first check if the list already exists in your local cache. If it exists and the cache has not expired, use the cached data directly to avoid sending repeated requests to the monitoring server, thus reducing network traffic and server load.
[0030] For example, the obtained proxyid can be used as a parameter to construct request data using the Python requests library, requesting the Zabbix Server monitoring server to obtain the list of hosts under the proxy. If the request successfully obtains the list of hosts, the traversal process begins; 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 the creation of 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] The monitoring host includes one or more middleware components.
[0033] In this step, after obtaining the list of monitored hosts, we begin iterating through each host. For each host, we first obtain its address information, which may be in the form of an IP address or a domain name. Next, we obtain the port information of the middleware service running on that host. This may be done by querying configuration files on the host, using relevant service management tools, or by using information collected by monitoring software. After obtaining the middleware service port, we send a specific query request to the monitoring server to inquire whether the middleware monitoring host corresponding to that port already exists. Upon receiving the query request, the monitoring server searches and compares its stored monitoring configuration information. If the corresponding middleware monitoring host record is found, it returns an "existence" message; otherwise, it returns a "non-existence" message. Based on this information, we make a comprehensive judgment. If the monitoring host address is valid, the middleware service port is open, and the corresponding middleware monitoring host does not exist on the monitoring server, then we determine that we need to request the creation of the middleware monitoring host on the monitoring server. Optionally, we can perform format validation and validity checks on the obtained address information to ensure that it conforms to network address specifications. The middleware service port information can be verified to ensure it is within a reasonable port range and indeed corresponds to a running middleware service.
[0034] Optionally, some optimization measures can be adopted to improve the efficiency of traversal and judgment. For example, during the traversal process, the inspection tasks of multiple monitoring hosts can be processed in parallel, and multi-threading or multi-processing technology can be used to make full use of the system's computing resources and speed up the execution speed of the entire process.
[0035] For example, for each monitored host, the process of performing port checks, existence checks, and host creation operations can be sequentially performed on middleware such as Nginx, Tomcat, Kafka, and Elasticsearch. Specifically, the Python `socket.inet_aton` module can be used to determine whether the monitored hostname is a valid IP address; the Python `socket` module can be used to create sockets of type `AF_INET` (IPv4) and `SOCK_STREAM` (TCP), and the `connect_ex` method can be used to attempt to connect to a specific middleware service port on the target host, with a timeout set (e.g., 5 seconds). If the connection is successful (`connect_ex` returns 0), the port is considered open; otherwise, the port is considered closed or the connection is abnormal; the Python `requests` library can be used 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 the creation of 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, once it's determined that a middleware monitoring host needs to be created, a creation request is constructed based on the middleware type. Different types of middleware may require different parameters and configuration information when creating them on the monitoring server. For example, for Nginx middleware, information such as the Nginx version number, configuration file path, and listening port may be required; for Kafka middleware, Kafka cluster configuration information and topic information may be required. Based on 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 via the creation interface provided by the monitoring server. Upon receiving the creation request, the monitoring server parses and verifies it. It checks whether the information provided in the request is complete, correctly formatted, and conforms to the system's creation rules and permission requirements. If the request information passes verification, the monitoring server creates the corresponding record in its internal monitoring configuration database based on the information in the request, completing the creation operation of the middleware monitoring host. During the creation process, relevant log information may need to be recorded, including the time the creation request was sent, the request content, the monitoring server's response time, and the response result. This log information is crucial for subsequent auditing, troubleshooting, and performance optimization.
[0038] For example, different request data structures can be constructed based on the middleware type (such as Nginx, Tomcat, Kafka, Elasticsearch, etc.). For example, the request data includes the monitoring hostname, proxy hostid, interface information (the client interface or JMX interface and corresponding port are determined according to the middleware type), group ID, associated template ID, etc. The requests library is used to send a POST request to the monitoring server to create the middleware monitoring host.
[0039] Step S150: Based on the result of the middleware monitoring host being created by the monitoring server, output a prompt message.
[0040] In this step, after the monitoring server completes the creation of the middleware monitoring host, it will return creation result information. This result information may include a success or failure indicator, as well as some additional explanatory information, such as the reason for failure. Upon receiving the creation result, a corresponding prompt message is generated based on the result content. If creation is successful, the generated prompt message could be something like "Middleware monitoring host created successfully; monitoring configuration has been successfully added to the [middleware type] middleware on [monitoring host address]," clearly letting the user know that the creation operation has been successfully completed. If creation fails, the prompt message can explain the reason for failure in detail, such as "Middleware monitoring host creation failed; the reason is [specific reason for failure]." To ensure that users can receive these prompt messages in a timely manner, it may be necessary to output them through multiple channels. The prompt messages can be displayed on the front-end interface of the monitoring system in the form of pop-ups or message lists, making it convenient for users to see them directly when operating the monitoring system. Alternatively, the prompt messages can be sent to relevant operations and maintenance personnel via email, SMS, etc., to ensure that they can understand the result of the creation operation in a timely manner.
[0041] Optionally, to facilitate subsequent querying and statistics, these notification messages can also be logged to a log file or database. The logged information may include the content of the notification message, the generation time, and related monitoring host and middleware information.
[0042] Based on the above steps, the target proxy object identifier of the target proxy object is obtained from the proxy object list in the monitoring server. Based on the target proxy object identifier, a list of monitoring hosts under the target proxy object is obtained. The monitoring hosts included in the monitoring host list are traversed to determine whether to request the creation of the middleware monitoring host on the monitoring server, based on the address of each monitoring host, the middleware service port, and whether a middleware monitoring host corresponding to the middleware service port exists on the monitoring server. Each monitoring host includes one or more middleware components. If it is determined that the creation of the middleware monitoring host on the monitoring server needs to be requested, the middleware monitoring host is requested to be created on the monitoring server according to its corresponding middleware type. Based on the result of the monitoring server creating the middleware monitoring host, a prompt message is output, thereby improving the efficiency and accuracy of middleware monitoring host creation through automation.
[0043] In one possible implementation, determining whether to request the creation of the middleware monitoring host on the monitoring server based on the address of each monitoring host, the middleware service port, and whether a middleware monitoring host corresponding to the middleware service port exists on the monitoring server includes: Based on the address of the monitoring host, determine whether the address of the monitoring host is a valid address; If the address of the monitoring host is a valid address, then attempt to connect to the middleware service port of the monitoring host and obtain the connection result of the connection attempt; If the connection result is successful, then a check request is constructed based on the middleware monitoring host corresponding to the middleware service port. Send 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 based on the response information of the monitoring server to the inspection request. If the monitoring server does not have a middleware monitoring host corresponding to the middleware service port, then a request is made to create the middleware monitoring host on the monitoring server.
[0044] In this embodiment, determining the legitimacy of the monitored host address is a crucial prerequisite for ensuring the smooth operation of subsequent steps. First, judgment rules can be formulated based on common network address specifications. For example, for IPv4 addresses, the format should consist of four numbers between 0 and 255, separated by periods. For IPv6 addresses, the format is more complex, typically consisting of eight groups of four-digit hexadecimal numbers separated by colons. Simultaneously, a legitimate address must also be considered for its location within a specific network range, which may involve information such as the subnet mask. During implementation, a dedicated address verification function will be written. For IPv4 addresses, verification can be performed through string splitting and numerical range checks. The address string is first split 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 verification can be performed based on hexadecimal number rules. In addition to format verification, network reachability checks may also be performed. The system's network tools (such as the ping command) are used to test whether the address can respond. If the address format is correct but cannot be pinged, it may indicate that the address is unavailable on the network and cannot be considered a legitimate address.
[0045] Once the monitoring host address is confirmed to be valid, you can begin attempting to connect to the middleware service port on that host. First, you need to specify the port number of the middleware service you want to connect to. This can be obtained by querying the monitoring host's configuration file, relevant service management tool records, or previously collected information. For example, for Tomcat middleware running on the monitoring host, its default HTTP service port might be 8080. After obtaining the port number, use network programming libraries and tools to establish a connection. In Python, the socket library can be used. Create a socket object, specifying the use of the IPv4 protocol (AF_INET) and the TCP protocol (SOCK_STREAM), as most middleware services use the TCP protocol for communication. Then, try using the socket's connect method to connect to the specified port on the monitoring host. During the connection process, you can set a reasonable timeout to avoid the program waiting for a long time due to the host not responding. For example, set the timeout to 5 seconds. If the connection is successfully established within the timeout period, the connection is successful, and the socket's connect method returns 0; if the connection fails before the timeout expires, the connect method returns a non-zero value. The result of a successful or failed connection will be recorded.
[0046] Optionally, to ensure the reliability of the connection operation, multiple attempts can be made. If the first connection fails, it will wait for a short period of time before trying again, up to a certain number of times (e.g., 3 times).
[0047] Once the connection is successful, a check request needs to be constructed to determine whether the monitoring server already hosts the middleware service corresponding to that middleware port. First, the information required for the check request must be clearly defined. This information typically includes the monitoring host's identifier (such as IP address or hostname), the middleware service port number, and the middleware type. For example, if the middleware is Nginx, the request will explicitly specify the "Nginx" type and the corresponding service port (such as 80 or 443). This information is then organized into a specific data structure for easy transmission and parsing. Common data structure formats include JSON and XML. Taking JSON as an example, a dictionary object can be created, with the monitoring host identifier, middleware service port number, and middleware type as key-value pairs. Then, this data structure is further wrapped according to the interface specifications supported by the monitoring server. Some common request header information may need to be added, such as the request version number and authentication information. Authentication information is used to ensure the legitimacy of the request and may be a token or a combination of username and password. The wrapped request data is then converted into a string format for transmission over the network.
[0048] After constructing the inspection request, it is sent to the monitoring server over the network. Taking the HTTP protocol as an example, an HTTP POST request can be created, sending the request data as the request body to the specified API endpoint of the monitoring server. For example, a request object can be created using Python's requests library, setting the request URL, request headers, and request body. The request headers contain authentication information and data format type (e.g., "application / json" indicates the request body is in JSON format). After sending the request, wait for the monitoring server's response. Upon receiving the request, the monitoring server first parses it. It checks whether the authentication information in the request headers is valid and whether the data format of the request body is correct. If authentication fails or the data format is incorrect, an error response is returned. If the request is successfully parsed, the monitoring server queries its internal monitoring configuration database. Based on the monitoring host identifier, middleware service port number, and middleware type information in the request, it searches for a corresponding middleware monitoring host record. If a matching record is found, a response indicating existence is returned, which may contain detailed configuration information for the middleware monitoring host; otherwise, a response indicating non-existence is returned.
[0049] Upon receiving a response from the monitoring server, the response information is parsed. If the response status code indicates success (e.g., HTTP status code 200), the response body is further analyzed. Based on the identification information in the response body, it is determined whether the monitoring server has the middleware monitoring host corresponding to the middleware service port. If the response status code indicates failure (e.g., 401 for unauthorized, 400 for erroneous request), the error is recorded and appropriate processing is performed based on the specific status code and error information in the response body.
[0050] When it's determined that the corresponding middleware monitoring host does not exist on the monitoring server, a request needs to be made to create the middleware monitoring host on the monitoring server. Specifically, a creation request can be constructed based on the middleware type and relevant information about the monitoring host. The creation request needs to include more detailed information, including not only the monitoring host identifier, middleware service port number, and middleware type, but also possibly middleware configuration parameters and monitoring metric settings. For example, for MySQL middleware, it might need to include configuration parameters such as the database username, password, and database name, as well as the metrics to be monitored (such as CPU utilization, memory utilization, query response time, etc.). This information should be organized into a suitable data structure, which can also be in JSON or XML format.
[0051] Then, according to the monitoring server's creation interface specification, the request is packaged and sent to the monitoring server over the network. Upon receiving the creation request, if the request is verified, the monitoring server can create a new middleware monitoring host record in its internal monitoring configuration database. The record will contain all the information from the request, as well as some automatically generated identifiers and configuration information. After successful creation, the monitoring server returns a response indicating successful creation, which may include the unique identifier of the newly created middleware monitoring host. If the request verification fails, the monitoring server can return a failure response, detailing the reason for the failure, such as "configuration parameter error" or "monitoring metric setting conflict." Upon receiving the response, appropriate processing is performed based on the response information. If creation is successful, the relevant information of the newly created middleware monitoring host is recorded for subsequent monitoring and management; if creation fails, the reason for failure is corrected, the request is reconstructed, and sent again.
[0052] In one possible implementation, it also includes: If the address of the monitored host is not a valid address, then the system iterates through the next monitored host and outputs a first exception message. The first exception message indicates that the address of the monitored host is not a valid address.
[0053] And / or, If the connection result is a connection failure, then the system iterates through the next monitored host and outputs a second exception message. The second exception message indicates that the connection result was a connection failure.
[0054] And / or, If it is determined that there is a middleware monitoring host corresponding to the middleware service port in the monitoring server, then the next monitoring host is traversed.
[0055] In one possible implementation, before retrieving the target proxy object identifier of the target proxy object from the list of proxy objects in the monitoring server, the method further includes: Obtain the connection information of the monitoring server, which includes the connection address, authentication information, and request headers; A connection is established with the monitoring server based on the connection address, the authentication information, and the request header, so as to obtain the target proxy object identifier of the target proxy object from the proxy object list in the monitoring server; If the connection to the monitoring server fails to be established, a third exception message will be output. After iterating through all the monitored hosts in the list of monitored hosts, the process also includes: Disconnect from the monitoring server.
[0056] In this embodiment, the connection information includes a connection address, authentication information, and request headers. The connection address is generally obtained from a configuration file. The authentication information is read from a specific configuration or obtained through an authentication interface, depending on the authentication method (such as username / password, token authentication). The request headers are constructed according to the monitoring server API specification, covering information such as data format and client identifier, and are verified for accuracy and completeness.
[0057] Using a network library (such as Python's requests library), determine the request URL based on the connection address, add the required authentication information to the request (e.g., use the auth parameter for username / password authentication, and add the request header for token authentication), and send the request with the header attached. Set a reasonable timeout, and upon receiving the response, check the status code. If successful, parse the response content to filter out the target proxy object identifier; otherwise, handle the issue according to the status code.
[0058] Connection failures can have various causes, such as network problems, authentication failures, and monitoring server malfunctions. Network problems can be identified 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 (e.g., 401 indicating authentication failure). Exception information can be output to the console, logged, and relevant personnel can be notified via email and SMS.
[0059] Determine the network connection library used (e.g., requests library, socket library, aiohttp framework), and call the appropriate close method (e.g., close, session.close) to disconnect. Before disconnecting, clean up temporary data and cache, 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 one possible implementation, determining whether the address of the monitoring host is a valid address based on the address of the monitoring host includes: Collect a set of legitimate addresses from network configuration files, and / or historical data from network monitoring tools, and / or from publicly available address databases, wherein the set of legitimate addresses includes at least one address type; Obtain a set of illegal addresses, wherein the illegal addresses in the set include at least one of the following: generated illegal addresses, collected illegal addresses with misconfigurations, and addresses obtained from network logs that caused connection failures due to address errors; Based on the address type of the legal address, extract the address features corresponding to each address type. The address features include at least one of address structure features, subnet mask related features, and hostname related features. Different address types correspond to different address features. Training data is generated based on the legal address set, the illegal address set, and the address features corresponding to each address type. A multilayer perceptron model is then trained using the training data to obtain a trained multilayer perceptron model. The number of input layers of the multilayer perceptron model is related to the number of address features. The output of the multilayer perceptron model is used to determine the legality of the input data. Based on the address of the monitoring host, determine the address type corresponding to the address of the monitoring host, and input the hostname of the monitoring host and the address of the monitoring host into the trained multilayer perceptron model corresponding to the address type to obtain the probability value of whether the address of the monitoring host is a valid address; If the probability value is greater than or equal to a preset probability threshold, then the address of the monitoring host is determined to be a valid address.
[0061] In this embodiment, within the enterprise network environment, network configuration files are stored on a network management server, recording the legitimate IP address ranges of the internal network. Relevant address information is read from the network configuration files and organized into a set of legitimate addresses. Network monitoring tools continuously record network device connection status; their historical data includes the addresses of successfully connected devices, from which legitimate addresses are filtered out. Publicly available address databases, such as those provided by IANA (Internet Assigned Numbers Authority), can also serve as sources of legitimate addresses, allowing for the integration of these addresses from different sources.
[0062] The program generates illegal addresses according to illegal address generation rules (such as strings that do not conform to IP address format specifications). During network device configuration, illegal addresses generated due to human configuration errors are collected. Network logs record network connection attempts and results in detail; addresses that failed due to incorrect addresses are filtered out, and these different types of illegal addresses are aggregated into an illegal address set.
[0063] Extracting address features enables the model to learn the characteristics of different types of legitimate addresses, thereby more accurately determining address legitimacy. For IPv4 addresses, we analyze their structural features, such as the presence of four digits between 0 and 255 separated by dots; we also extract subnet mask-related features, such as common subnet mask formats and their correspondence with addresses. For IPv6 addresses, we study their hexadecimal number composition and colon-separated structural features. If hostnames are involved, we analyze their naming rules, length restrictions, and other characteristics to establish corresponding feature sets for different address types.
[0064] The sets of legal and illegal addresses are transformed according to their corresponding address features to form training data containing these features. For example, features such as address structure and subnet masks are quantified to form training samples. This training data is then input into a multilayer perceptron model for training. The model learns and adjusts its weights based on the input address features. The number of input layers is determined by the number of address features. After multiple rounds of training, the model is able to determine the legality of addresses based on the input data, resulting in a well-trained model.
[0065] First, determine whether the monitored host address is in IPv4, IPv6, or hostname format. After determining the address type, process the hostname and address of the monitored host according to the format of the previously trained data to extract the corresponding address feature values. These feature values are then input into a pre-trained multilayer perceptron model corresponding to the address type. The model calculates and outputs a probability value, representing the likelihood that the monitored host address is a legitimate address. A preset probability threshold, such as 0.9, is used. After obtaining the probability value of a legitimate monitored host address from the multilayer perceptron model, this probability value is compared with the preset threshold. If the probability value is greater than or equal to 0.9, the monitored host address is determined to be a legitimate address; if it is less than the threshold, it is determined to be an illegitimate address.
[0066] In one possible implementation, it also includes: Obtain historical middleware service port status data, and the configuration information of the monitoring host. The historical middleware service port status data includes the port availability status, and the configuration information of the monitoring host includes operating system configuration and application configuration. Based on the historical middleware service port status data, the middleware service port status characteristics are determined, including port type characteristics and port availability change characteristics. Based on the configuration information of the monitoring host, the operating system characteristics and application characteristics are determined. The operating system characteristics are related to the operating system type and version, and the application characteristics are related to the application type and version. An initial random forest algorithm model is trained based on the port type characteristics, port availability change characteristics, operating system characteristics, and application characteristics. The performance of the initial random forest algorithm model is evaluated through cross-validation. The model parameters of the initial random forest algorithm model are adjusted according to the performance. After achieving the preset training effect, a trained random forest algorithm model is generated. The trained random forest algorithm model is used to predict the availability of the middleware service port. Based on the middleware service port of the monitoring host and the configuration information of the monitoring host, extract 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. 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 are used as input data and input into the trained random forest algorithm model to obtain the availability prediction results of the middleware service port. If the availability prediction result of the middleware service port is the same as the connection test result, then 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. This database records the availability status of each middleware service port over a period of time, including information such as when the port was open and when it was closed. Simultaneously, by reading the system configuration file and application configuration file on the monitoring host, the operating system configuration (such as operating system name and version number) and application configuration (such as the middleware installation path and startup parameters) of the monitoring host can be obtained.
[0068] Analyze historical middleware service port status data to determine port type characteristics, such as distinguishing between HTTP, TCP, and UDP ports. Simultaneously, statistically analyze port availability changes to identify port availability variation characteristics, such as the frequency and period of port opening and closing.
[0069] Extract operating system characteristics from the operating system configuration information of the monitored host, such as whether the operating system is Windows or Linux, and the specific version number. Determine application characteristics from the application configuration information, including the type of middleware (e.g., Nginx, Tomcat) and its version number.
[0070] Port type features, port availability variation features, operating system features, and application features are compiled into training data. This data is used to train an initial random forest algorithm model. During training, the dataset is divided into multiple subsets using cross-validation; one subset is used for model training, and the other for performance evaluation. Model parameters, such as the number of trees and maximum depth, are adjusted based on the evaluation results. Training is repeated until the preset training effect is achieved, resulting in a well-trained random forest algorithm model.
[0071] For the middleware service ports of the currently monitored host, determine their port type characteristics and examine their usage protocols. Analyze the port's past availability to identify port availability change characteristics. Extract operating system and application characteristics from the monitored host's configuration information to ensure the accuracy and timeliness of the information.
[0072] The extracted port type characteristics, port availability variation characteristics, operating system characteristics, and application characteristics of the middleware service ports are organized into data conforming to the input format of the trained random forest algorithm model. This data is then input into the model, which calculates and analyzes the data to output the availability prediction result for the middleware service port, i.e., whether the port is open or closed.
[0073] Perform actual connection tests on the middleware service port of the monitoring host to obtain the connection test results (successful or failed). Compare this result with the availability result predicted by the random forest algorithm model. If the two are the same, determine the connection result as the final connection status, and use it as the basis for subsequent operations.
[0074] In one possible implementation, it also includes: Acquire computing resources and determine the number of tasks that can be executed in parallel based on the computing resources; A process pool is constructed based on the number of tasks that can be executed in parallel, wherein the number of processes in the process pool is related to the number of tasks that can be executed in parallel; Based on the process pool and the number of monitoring hosts included in the monitoring host list, tasks are allocated to each process in the process pool in a round-robin manner. The task is used to determine whether to request the creation of 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. The process pool iterates in parallel through the monitoring hosts included in the monitoring host list.
[0075] In this embodiment, within an enterprise-level data processing environment, there are multiple ways to obtain computing resource information. First, the system's built-in performance monitoring tools can be used to obtain key data such as CPU utilization, core count, memory usage, and idle time in real time. These tools continuously collect data, reflecting the server's current resource consumption status. Simultaneously, other tasks running on the server should be considered to clarify their computing resource requirements. Some tasks may have higher CPU resource requirements, while others rely more heavily on memory.
[0076] Based on the acquired computing resource information, and taking into account the resource reservation required for stable server operation, 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 their current utilization rate is low, while there is sufficient free memory, then the number of tasks that can be executed in parallel can be appropriately increased; conversely, if resources are scarce, the number of tasks should be reduced accordingly. This process requires combining past experience and system performance evaluation to ensure that system performance does not degrade due to excessive resource contention during parallel task execution.
[0077] Based on the determined 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 the process pool, the number of processes in the pool is set to match the number of tasks that can be executed in parallel.
[0078] After the process pool is created, each process within it is in a ready state, waiting to be assigned a task. 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 contention between processes, avoid resource waste, improve overall resource utilization efficiency, and provide a guarantee for the efficient execution of subsequent tasks.
[0079] Tasks are allocated using a round-robin strategy based on the number of processes in the process pool and the number of hosts in the monitored host list. The monitored host list is grouped according to the number of processes, aiming to distribute the number of hosts evenly among each group. For example, if the process pool has 8 processes and the monitored host list has 40 hosts, the host list is divided into 8 groups of 5 hosts each (there may be surplus hosts, which can be handled individually or distributed evenly among other groups).
[0080] Each process sequentially retrieves a group of tasks from the grouped task list. For each group of monitored hosts, the process performs a series of operations on each host. First, it obtains the address of the monitored host; then, it determines the port of the middleware service running on it; next, it sends a query request to the monitoring server to determine if the middleware monitoring host corresponding to that middleware service port already exists on the monitoring server. If it does not exist, it sends a creation request to the monitoring server based on the relevant information, requesting the creation of the middleware monitoring host on the monitoring server. This round-robin task allocation method ensures that each process has tasks to execute and can complete the relevant operations of its assigned monitored hosts within a relatively even timeframe.
[0081] Each process in the process pool simultaneously begins executing its assigned task, enabling parallel traversal of the monitored host list. Each process independently processes its assigned set of monitored hosts, without interference. During the traversal, each process handles each monitored host according to a predetermined task flow. From obtaining the address and determining the middleware service port to querying the monitoring server and creating the monitored host, these operations are completed sequentially within each process, but multiple processes run in parallel.
[0082] Because multiple processes work in parallel, the efficiency of traversing the list of monitored hosts is greatly improved. Compared to processing monitored hosts one by one, parallel processing can make full use of the server's computing resources, completing the inspection of a large number of monitored hosts and the creation of related monitoring configurations in a shorter time. Once all processes have completed their processing tasks for the monitored hosts they are responsible for, the traversal of the entire monitored host list and related operations are also completed. The system can quickly obtain the status of all monitored hosts and perform corresponding configurations, ensuring the efficient operation of the monitoring system.
[0083] In the above embodiments, the middleware monitoring host creation system for performing the above method embodiments has at least one processor, a control module (chipset) coupled to at least one of the 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 may include any combination of general-purpose processors or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some alternative implementations, the middleware monitoring host creation system can serve as the gateway or other middleware monitoring host creation system device described in the embodiments of this application.
[0085] In some alternative implementations, 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 fused with the at least one computer-readable medium and configured to execute the instructions to implement the module thereby performing the actions described in this disclosure.
[0086] In one embodiment, the control module may include any suitable interface controller to provide any suitable interface to at least one of the processors and / or any suitable device or component communicating 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 can be used, for example, to create and store system-loaded data and / or instructions for a middleware monitoring host. In one embodiment, the memory may include any suitable volatile memory, such as suitable DRAM.
[0089] In 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, an NVM / storage device can be used to store data and / or instructions. An 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 optical disc (CD) drive, and / or at least one digital universal optical disc (DVD) drive).
[0091] An NVM / storage device may include storage resources that are physically part of a device on which a middleware monitoring host creation system is installed, or that can be accessed by the device without being part of that device. For example, an NVM / storage device may be accessed via a network through at least one input / output device.
[0092] At least one input / output device may provide an interface for the middleware monitoring host creation system to communicate with any other suitable device. The input / output device may include communication components, input components, sensor components, etc. A network interface may provide an interface for the middleware monitoring host creation system to communicate via at least one network. The middleware monitoring host creation system may wirelessly communicate with at least one component of a wireless network according to any of at least one wireless network standard and / or protocol, such as accessing a wireless network based on a communication standard.
[0093] In one embodiment, at least one of the processors may be integrated with the logic of at least one controller of the control module (e.g., a memory controller module). In one embodiment, at least one of the processors may be integrated with the logic of at least one controller of the control module to form a system-on-a-chip (SoC). In one embodiment, at least one of the processors may be integrated with the logic of at least one controller of the control module on the same die. In one embodiment, at least one of the processors may be integrated with the logic of at least one controller of the control module on the same die to form a system-on-a-chip (SoC).
[0094] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
[0095] This invention discloses a computer read storage medium that stores a computer program for electronic data interchange, wherein the computer program causes a computer to execute the steps in the middleware monitoring host creation method described in the foregoing embodiments.
[0096] This 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 cause a computer to perform the steps in the middleware monitoring host creation method described in the foregoing embodiments.
[0097] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0098] Through the detailed 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 necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electronically erasable rewritable read-only memory (EEPROM), compact optical disc (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to have or store data.
[0099] Finally, it should be noted that the above-disclosed embodiments are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for creating a middleware monitoring host, characterized in that, include: Retrieve the target proxy object identifier from the proxy object list in the monitoring server, wherein the proxy object list includes the proxy object identifier; Based on the target proxy object identifier, obtain the list of monitored hosts under the target proxy object; The monitoring hosts included in the monitoring host list are traversed to determine whether to request the creation of 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. The monitoring host includes one or more middlewares. If it is determined that it is necessary to request the creation of 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; Based on the result of creating the middleware monitoring host by the monitoring server, output a prompt message; The step of determining whether to request the creation of the middleware monitoring host on the monitoring server based on the address of each monitoring host, the middleware service port, and whether a middleware monitoring host corresponding to the middleware service port exists on the monitoring server includes: Based on the address of the monitoring host, determine whether the address of the monitoring host is a valid address; If the address of the monitoring host is a valid address, then attempt to connect to the middleware service port of the monitoring host and obtain the connection result of the connection attempt; If the connection result is successful, then a check request is constructed based on the middleware monitoring host corresponding to the middleware service port. Send 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 based on the response information of the monitoring server to the inspection request. If the monitoring server does not have a middleware monitoring host corresponding to the middleware service port, then request the creation of the middleware monitoring host in the monitoring server. Also includes: Obtain historical middleware service port status data, and the configuration information of the monitoring host. The historical middleware service port status data includes the port availability status, and the configuration information of the monitoring host includes operating system configuration and application configuration. Based on the historical middleware service port status data, the middleware service port status characteristics are determined, including port type characteristics and port availability change characteristics. Based on the configuration information of the monitoring host, the operating system characteristics and application characteristics are determined. The operating system characteristics are related to the operating system type and version, and the application characteristics are related to the application type and version. An initial random forest algorithm model is trained based on the port type characteristics, port availability change characteristics, operating system characteristics, and application characteristics. The performance of the initial random forest algorithm model is evaluated through cross-validation. The model parameters of the initial random forest algorithm model are adjusted according to the performance. After achieving the preset training effect, a trained random forest algorithm model is generated. The trained random forest algorithm model is used to predict the availability of the middleware service port. Based on the middleware service port of the monitoring host and the configuration information of the monitoring host, extract 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. 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 are used as input data and input into the trained random forest algorithm model to obtain the availability prediction results of the middleware service port. If the availability prediction result of the middleware service port is the same as the connection test result, then the connection result is determined.
2. The middleware monitoring host creation method according to claim 1, characterized in that, Also includes: If the address of the monitoring host is not a valid address, then 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, then traverse the next monitoring host of the monitoring host and output the second abnormal information; And / or, If it is determined that there is a middleware monitoring host corresponding to the middleware service port in the monitoring server, then the next monitoring host is traversed.
3. The middleware monitoring host creation method according to claim 2, characterized in that, Before retrieving the target proxy object identifier from the list of proxy objects in the monitoring server, the method further includes: Obtain the connection information of the monitoring server, which includes the connection address, authentication information, and request headers; A connection is established with the monitoring server based on the connection address, the authentication information, and the request header, so as to obtain the target proxy object identifier of the target proxy object from the proxy object list in the monitoring server; If the connection to the monitoring server fails to be established, a third exception message will be output. After iterating through all the monitored hosts in the list of monitored hosts, the process also includes: Disconnect from the monitoring server.
4. The method for creating a middleware monitoring host according to claim 1, characterized in that, The step of determining whether the address of the monitoring host is a valid address based on the address of the monitoring host includes: Collect a set of legitimate addresses from network configuration files, and / or historical data from network monitoring tools, and / or from publicly available address databases, wherein the set of legitimate addresses includes at least one address type; Obtain a set of illegal addresses, wherein the illegal addresses in the set include at least one of the following: generated illegal addresses, collected illegal addresses with misconfigurations, and addresses obtained from network logs that caused connection failures due to address errors; Based on the address type of the legal address, extract the address features corresponding to each address type. The address features include at least one of address structure features, subnet mask related features, and hostname related features. Different address types correspond to different address features. Training data is generated based on the legal address set, the illegal address set, and the address features corresponding to each address type. A multilayer perceptron model is then trained using the training data to obtain a trained multilayer perceptron model. The number of input layers of the multilayer perceptron model is related to the number of address features. The output of the multilayer perceptron model is used to determine the legality of the input data. Based on the address of the monitoring host, determine the address type corresponding to the address of the monitoring host, and input the hostname of the monitoring host and the address of the monitoring host into the trained multilayer perceptron model corresponding to the address type to obtain the probability value of whether the address of the monitoring host is a valid address; If the probability value is greater than or equal to a preset probability threshold, then the address of the monitoring host is determined to be a valid address.
5. The method for creating a middleware monitoring host according to any one of claims 1-4, characterized in that, Also includes: Acquire computing resources and determine the number of tasks that can be executed in parallel based on the computing resources; A process pool is constructed based on the number of tasks that can be executed in parallel, wherein the number of processes in the process pool is related to the number of tasks that can be executed in parallel; Based on the process pool and the number of monitoring hosts included in the monitoring host list, tasks are allocated to each process in the process pool in a round-robin manner. The task is used to determine whether to request the creation of 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. The process pool iterates in parallel through the monitoring hosts included in the monitoring host list.
6. A middleware monitoring host creation system, characterized in that, The device includes a processor and a computer-readable storage medium storing machine-executable instructions, which, when executed by a computer, implement the middleware monitoring host creation method according to any one of claims 1-5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores machine-executable instructions, which, when executed by a computer, implement the middleware monitoring host creation method according to any one of claims 1-5.
8. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-5.
Citation Information
Patent Citations
Mpm model-based full-automatic database monitoring system
CN107179977A
Monitoring and managing applications on virtual machines
US20160314010A1
