Configuration monitoring method and device of proxy server and storage medium
By listening to the target port on the proxy server and comparing the configuration information, the problem of unmonitored distribution of proxy server configuration files is solved, and monitoring configuration files and remote procedure call requests is realized, ensuring their correctness and reliability.
Patent Information
- Application Number
- CN202310738128.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2024-12-20
AI Technical Summary
In the prior art, whether the configuration file of the proxy server is issued normally and has no monitoring mechanism, and it cannot be alerted in time, resulting in the configuration file being not issued correctly or the remote procedure call request is lost.
By sending a acquisition request to the target proxy server on the target port, receiving and comparing the current configuration information with the configuration information in the database, if it does not match, it is determined that there is an exception in the remote procedure call request, and monitoring the issuance and request of configuration files are realized.
Ensures the correct issuance of configuration files and the reliability of remote procedure call requests, avoiding configuration loss and request exceptions.
Smart Images

Figure CN119172280A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a configuration monitoring method, device and storage medium of a proxy server. Background Art
[0002] In the prior art, there are many nodes on the cluster, and the nodes may include an agent service. The agent service may generate a configuration file according to a remote procedure call (rpc) request sent by the server, and send the configuration file to the bottom layer.
[0003] In the prior art, there is no mechanism to monitor whether the configuration file is sent normally, and timely alarm cannot be issued. Summary of the invention
[0004] The embodiment of the present invention provides a configuration monitoring method, device and storage medium of a proxy server, so as to at least solve the technical problem of whether the configuration is normally sent and not monitored.
[0005] According to one aspect of an embodiment of the present invention, a configuration monitoring method for a proxy server is provided, comprising: sending an acquisition request to a target proxy server through a target port, wherein the acquisition request is used to acquire current configuration information of the target proxy server; receiving the current configuration information returned by a target thread in the target proxy server, wherein the target thread is used to listen to the target port; comparing the current configuration information with first configuration information in a database, wherein the first configuration information is used to represent configuration information generated by the target proxy server when a remote procedure call request is received; and determining that an abnormality exists in the remote procedure call request when the current configuration information does not match the first configuration information.
[0006] According to another aspect of an embodiment of the present invention, a configuration monitoring device for a proxy server is provided, comprising: a sending module, used to send an acquisition request to a target proxy server through a target port, wherein the acquisition request is used to acquire current configuration information of the target proxy server; a receiving module, used to receive the current configuration information returned by a target thread in the target proxy server, wherein the target thread is used to monitor the target port; a comparing module, used to compare the current configuration information with first configuration information in a database, wherein the first configuration information is used to represent configuration information generated by the target proxy server when a remote procedure call request is received; and a first determining module, used to determine that an abnormality exists in the remote procedure call request when the current configuration information does not match the first configuration information.
[0007] As an optional example, the target thread is also used to: before returning the current configuration information to the monitoring service that sent the acquisition request, when the target proxy server is processing the remote procedure call request, place the target thread in a waiting state, and when the target proxy server completes processing the remote procedure call request, acquire the current configuration information.
[0008] As an optional example, the above-mentioned receiving module includes: a configuration unit, which is used to set the waiting period after sending the above-mentioned acquisition request to the above-mentioned target proxy server when the above-mentioned target proxy server is processing the above-mentioned remote procedure call request; a first determination unit, which is used to determine the received configuration information as the above-mentioned current configuration information when the configuration information is received within the above-mentioned waiting period; a sending unit, which is used to send the above-mentioned acquisition request again when the configuration information is not received within the above-mentioned waiting period; and a second determination unit, which is used to determine the configuration information sent later as the above-mentioned current configuration information according to the timestamp in each configuration information when multiple configuration information is received after sending the above-mentioned acquisition request again.
[0009] As an optional example, the sending module includes: a first writing unit, used to write the network address of the monitoring service used to send the acquisition request into the acquisition request, so that the target thread determines through the network address that the currently received acquisition request is the acquisition request sent by the monitoring service; wherein, the target thread is also used to not respond to the acquisition request when the network address in the received acquisition request is different from the network address of the monitoring service.
[0010] As an optional example, the sending module includes: a second writing unit, used to write the unique identifier of the target proxy server into the acquisition request, so that the target thread determines through the unique identifier that the currently received acquisition request is a request for obtaining the current configuration information of the target proxy server; wherein, the target thread is also used to return a notification message to the monitoring service that sends the acquisition request when the unique identifier in the received acquisition request is different from the unique identifier of the target proxy server, and the notification message is used to prompt that the unique identifier is incorrect.
[0011] As an optional example, the sending module includes: a third determination unit, used to take one or more servers to be monitored among all proxy servers as the target proxy servers, and send the acquisition request to each of the target proxy servers according to the respective monitoring cycle of each of the target proxy servers.
[0012] As an optional example, the above-mentioned device also includes: a second determination module, which is used to determine the above-mentioned first configuration information corresponding to the above-mentioned server name, network address and unique identifier from the database based on the server name, network address and unique identifier of any one of the above-mentioned target proxy servers before comparing the above-mentioned current configuration information with the first configuration information in the database, when the current configuration information of any one of the above-mentioned target proxy servers is received.
[0013] According to another aspect of the embodiments of the present invention, a storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the configuration monitoring method of the proxy server is executed.
[0014] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the configuration monitoring method of the proxy server through the computer program.
[0015] In an embodiment of the present invention, a method is adopted in which a get request is sent to a target proxy server through a target port, wherein the get request is used to obtain the current configuration information of the target proxy server; the current configuration information returned by the target thread in the target proxy server is received, wherein the target thread is used to monitor the target port; the current configuration information is compared with the first configuration information in the database, wherein the first configuration information is used to represent the configuration information generated by the target proxy server when receiving a remote procedure call request; when the current configuration information does not match the first configuration information, a method is determined to determine that the remote procedure call request is abnormal, because in the above method, the target thread can monitor the target port, send a get request to the proxy server through the monitoring service, obtain the current configuration information of the proxy server, and compare it with the first configuration information in the database when the rpc request is normal, so that the current configuration information in the proxy server can be compared to determine whether it is correct. If it is not correct, it indicates that the rpc request is abnormal. The purpose of monitoring whether the rpc request is lost and whether the configuration is sent normally is achieved, thereby solving the technical problem of whether the configuration is sent normally without monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0017] Figure 1 is a flow chart of an optional proxy server configuration monitoring method according to an embodiment of the present invention;
[0018] Figure 2 is a flow chart of an optional proxy server configuration monitoring method according to an embodiment of the present invention;
[0019] Figure 3 is a flow chart of an optional proxy server configuration monitoring method according to an embodiment of the present invention;
[0020] Figure 4 is a flow chart of an optional proxy server configuration monitoring method according to an embodiment of the present invention;
[0021] Figure 5 is a flow chart of an optional proxy server configuration monitoring method according to an embodiment of the present invention;
[0022] Figure 6 is a flow chart of an optional proxy server configuration monitoring method according to an embodiment of the present invention;
[0023] Figure 7 is a diagram of a configuration monitoring system of an optional proxy server according to an embodiment of the present invention;
[0024] Figure 8 is a monitoring service diagram of an optional configuration monitoring method of a proxy server according to an embodiment of the present invention;
[0025] Fig. 9 is a schematic structural diagram of an optional configuration monitoring device of a proxy server according to an embodiment of the present invention;
[0026] Fig.10 is a schematic diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] According to a first aspect of an embodiment of the present invention, a configuration monitoring method of a proxy server is provided. Optionally, as follows Figure 1 As shown, the above method includes:
[0030] S102, sending an acquisition request to the target proxy server through the target port, wherein the acquisition request is used to acquire current configuration information of the target proxy server;
[0031] S104, receiving current configuration information returned by a target thread in a target proxy server, wherein the target thread is used to monitor a target port;
[0032] S106, comparing the current configuration information with first configuration information in the database, wherein the first configuration information is used to represent configuration information generated by the target proxy server when receiving a remote procedure call request;
[0033] S108: When the current configuration information does not match the first configuration information, determine that an abnormality exists in the remote procedure call request.
[0034] Optionally, the configuration monitoring method of the proxy server can be applied in a cluster. There can be multiple nodes in the cluster, and the node can be a master node (host node). Each master node can have one or more slave nodes.
[0035] The above target proxy server can provide proxy services for the master node. Each master node can have a corresponding proxy server.
[0036] The target port can be a port provided by the monitoring service to the proxy server on the master node, and the proxy server monitors the target port. The monitoring service can send a request to the proxy server through the target port, such as sending a request to obtain the current configuration information of the proxy server.
[0037] The above database can be a redis database, which is used to store user data. The user data can include the first configuration information. The first configuration information is the information configured by the user. The monitoring service in this embodiment can only read the data in the database and cannot rewrite the data. The first configuration information can represent the configuration information generated if the target proxy server receives an RPC request. Such as data used for load balancing, gateway data, some metadata created by the user, the longest connection time, etc.
[0038] In the above method, the target thread can monitor the target port, and the monitoring service can be used to send a request to the proxy server to obtain the current configuration information of the proxy server, and compare it with the first configuration information in the database when the rpc request is normal, so that it can be compared whether the current configuration information in the proxy server is correct. If it is not correct, it means that the rpc request is abnormal. The purpose of monitoring whether the rpc request is lost and whether the configuration is sent normally is achieved, thereby solving the technical problem of whether the rpc request is lost and whether the configuration is sent normally without monitoring.
[0039] As an optional example, the target thread is also used to: before returning the current configuration information to the monitoring service that sent the acquisition request, if the target proxy server is processing a remote procedure call request, put the target thread in a waiting state, and obtain the current configuration information after the target proxy server has processed the remote procedure call request.
[0040] In this embodiment, after the monitoring service sends a request to the target proxy server through the target port, when the target thread on the target proxy server receives the request, the target thread can first detect the state of the target proxy server. If the target proxy server is processing the received rpc request, the target thread must wait first. After waiting for the target proxy server to complete processing the rpc request, the current configuration information of the target proxy server is obtained.
[0041] In this embodiment, the above-mentioned target thread is placed in a waiting state, and the waiting time can be set. If the RPC request is still not completed within the waiting time, a notification message can be fed back to the monitoring service to inform the monitoring service that the current target proxy server is processing the RPC request. The estimated processing time can also be fed back to the monitoring service. If it takes another 3 minutes to complete the processing. The monitoring service can adjust the time for sending the acquisition request next time according to the received estimated time.
[0042] As an optional example, receiving the current configuration information returned by the target thread in the target proxy server includes:
[0043] S202, after sending the acquisition request to the target proxy server, in the case where the target proxy server is processing the remote procedure call request, setting the waiting time;
[0044] S204, when configuration information is received within the waiting time, determining the received configuration information as current configuration information;
[0045] S206, if no configuration information is received within the waiting time, send the acquisition request again;
[0046] S208: After sending the acquisition request again, in the case where multiple configuration information are received, determine the configuration information sent later as the current configuration information according to the timestamp in each configuration information.
[0047] In this embodiment, after the monitoring service sends a get request, if the target proxy server is processing an rpc request, the target thread will be in a waiting state. At this time, the target thread can send an estimated duration to the monitoring service, and the monitoring service can decide the time to send the get request next time based on the estimated duration. If the target thread does not send a message to the monitoring service, the monitoring service can set a waiting duration. During the waiting period, you can wait for the target thread to return the current configuration information or return the estimated rpc processing duration. If no message is received during the waiting period, you can send the get request again, and the timestamp of the get request sent again is different from the timestamp of the get request sent last time. After sending the get request again, if multiple configuration information is received, each configuration information has a timestamp representing the sending time, and the configuration information with the later timestamp is used as the current configuration information.
[0048] As an optional example, sending a get request to a target proxy server through a target port includes:
[0049] S302, write the network address of the monitoring service used to send the acquisition request into the acquisition request, so that the target thread determines through the network address that the currently received acquisition request is the acquisition request sent by the monitoring service; wherein, the target thread is also used to not respond to the acquisition request when the network address in the received acquisition request is different from the network address of the monitoring service.
[0050] In this embodiment, before the monitoring service sends the acquisition request or when sending the acquisition request, the network address of the monitoring service can be written into the acquisition request. The network address can be filled in the end of the acquisition request, and spliced with the original acquisition request using a special symbol as a splicing symbol. A network address table can be saved in the target thread as a whitelist. When the acquisition request is received, the splicing symbol is located, and the address after the splicing symbol is compared with the whitelist to determine whether to respond to the acquisition request.
[0051] As an optional example, sending a get request to a target proxy server through a target port includes:
[0052] S402, write the unique identifier of the target proxy server into the acquisition request, so that the target thread determines through the unique identifier that the currently received acquisition request is a request for obtaining the current configuration information of the target proxy server; wherein, the target thread is also used to return a notification message to the monitoring service that sent the acquisition request when the unique identifier in the received acquisition request is different from the unique identifier of the target proxy server, and the notification message is used to prompt that the unique identifier is incorrect.
[0053] In this embodiment, before the monitoring service sends the acquisition request or when sending the acquisition request, the unique identifier of the target proxy server can be written into the acquisition request. The unique identifier can be filled in the beginning of the acquisition request and spliced with the original acquisition request using a special symbol as a splicing character. The special symbol is different from the special symbol filled in the network address mentioned above. When the acquisition request is received, the unique identifier in the acquisition request is compared with the unique identifier of the target proxy server to determine whether to allow the acquisition request to obtain the current configuration information. If the unique identifier in the acquisition request is different from the unique identifier of the target proxy server, a message can be sent to the monitoring service to notify that the unique identifier in the acquisition request is incorrect.
[0054] As an optional example, sending a get request to a target proxy server through a target port includes:
[0055] S502: Among all proxy servers, one or more servers to be monitored are taken as target proxy servers, and an acquisition request is sent to each target proxy server according to the respective monitoring cycle of each target proxy server.
[0056] In this embodiment, the above-mentioned target proxy server can be one or more. Each master control node can include a proxy server, and the proxy server in the master control node to be monitored can be used as the target proxy server. Each target proxy server can have its own monitoring cycle. The monitoring cycle can be set, or the monitoring cycle can be determined based on the error frequency of the RPV request in the historical record. The higher the error frequency, the shorter the monitoring cycle.
[0057] As an optional example, before comparing the current configuration information with the first configuration information in the database, the method further includes:
[0058] S602, upon receiving the current configuration information of any target proxy server, determine first configuration information corresponding to the server name, network address and unique identifier from a database according to the server name, network address and unique identifier of any target proxy server.
[0059] In this embodiment, after the monitoring service obtains the current configuration information of the target proxy server, before the comparison, the first configuration information corresponding to the current configuration information can be first found from all the configuration information in the database. When searching for the first configuration information, the first configuration information can be found according to the server name, network address and unique identifier of the target proxy server. After finding the first configuration information, the first configuration information is compared with the current configuration information. If the two do not match, it is determined that the current configuration information of the target proxy server is incorrect, and it is determined that the rec request is abnormal. For example, the rec request is lost, etc.
[0060] In this embodiment, the agent server can provide a centralized monitoring service, which acts as a monitoring control node. It has its own API interface and service process, and uses the redis database to save its own data. No write operations are performed on the database. It only reads data from the redis cache and database of the network's API service, and then inspects the agent server memory data and some configurations issued in the network through a certain mechanism. For the agent server, a new thread is opened on the agent, and this thread listens to the target port. The monitoring node obtains the agent's memory data through this port. The memory data contains the current configuration information, and compares this current configuration information with the first configuration information in the database. If any inconsistency is found, an alarm is issued.
[0061] like Figure 7 As shown, Figure 7 Schematic diagram of the system of this embodiment. Figure 7In the process, the agent server adds a new target thread. This thread listens to a User Datagram Protocol (UDP) socket port (target port), and the monitoring service sends a request to the agent from this socket. The agent's target thread reads the agent's cache according to the request and returns it to the monitoring service. The cache includes the current configuration information. When reading the cache, the target thread checks whether the current agent is processing rpc. If it is, it waits, otherwise it sends the cache to the monitoring service. That is, the agent's cache is shared by this monitoring thread and the main process, and the monitoring thread can only read but not write. Moreover, the reading time is the time when there is no rpc processing. For the agent exposing a udp listening port, in order to ensure the security of the agent, the agent can only listen to the IP address of the monitoring service, or add a password to each request. The password is the unique identifier of the agent.
[0062] Figure 8 This is a schematic diagram of the monitoring service. The monitoring service includes three modules: automatic inspection module, CLI module and configuration comparison alarm module.
[0063] The CLI module supports the following functions:
[0064] 1. Quickly check whether the specified node configuration is correct. During the inspection, mainly check whether the current configuration information format in the cache is correct and whether the data is within the specified range.
[0065] 2. Compress the cache of the specified node. The purpose of compressing the cache is to reduce the space occupied.
[0066] The inspection module is an infinite loop. It obtains the agent's hostname, IP address, and ID from the agents table in the database through a certain algorithm, such as polling or random methods. It then obtains the agent's cache through the port exposed by the agent, and then sends the information to the comparison alarm module. The CLI module can interrupt this infinite loop and specify a hostname to quickly detect the agent cache corresponding to the specified hostname.
[0067] The comparison alarm module receives information from the inspection module and checks the agent cache for abnormalities by comparing the agent cache with the data in the database. If there is a problem, an alarm is sent.
[0068] In this embodiment, the monitoring service can use multiple workers to share the redis queue so that all workers can evenly undertake the inspection tasks. At the same time, it can also be statelessly expanded and reduced. Generally, this service does not require high performance and timeliness. Too frequent inspections will affect the performance of DB and redis, and cause certain pressure on the agent. Periodic inspections or scheduled inspections can be used, such as checking the cluster's agent cache every three hours starting from the early morning every day.
[0069] The method of this embodiment ensures that the MQ message will not be lost and that the RPC sent by the neutron-api-server can reach the agent. It ensures that the agent can correctly send the configuration without losing the configuration. And because the retry and monitoring mechanism is added, it ensures that the configuration will not fail when there is no problem with the agent memory.
[0070] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0071] According to another aspect of the embodiment of the present application, a configuration monitoring device of a proxy server is also provided. Fig. 9 As shown, including:
[0072] A sending module 902 is used to send an acquisition request to a target proxy server through a target port, wherein the acquisition request is used to acquire current configuration information of the target proxy server;
[0073] A receiving module 904 is used to receive current configuration information returned by a target thread in a target proxy server, wherein the target thread is used to monitor a target port;
[0074] A comparison module 906, used to compare the current configuration information with the first configuration information in the database, wherein the first configuration information is used to represent the configuration information generated by the target proxy server when receiving the remote procedure call request;
[0075] The first determination module 908 is used to determine that there is an abnormality in the remote procedure call request when the current configuration information does not match the first configuration information.
[0076] Optionally, the configuration monitoring method of the proxy server can be applied in a cluster. There can be multiple nodes in the cluster, and the node can be a master node (host node). Each master node can have one or more slave nodes.
[0077] The above target proxy server can provide proxy services for the master node. Each master node can have a corresponding proxy server.
[0078] The target port can be a port provided by the monitoring service to the proxy server on the master node, and the proxy server monitors the target port. The monitoring service can send a request to the proxy server through the target port, such as sending a request to obtain the current configuration information of the proxy server.
[0079] The above database can be a redis database for storing user data. The user data can include the first configuration information. The first configuration information is the information configured by the user. The monitoring service in this embodiment can only read the data in the database and cannot rewrite the data. The first configuration information can represent the configuration information generated if the target proxy server receives an RPC request.
[0080] In the above method, the target thread can monitor the target port, and the monitoring service can be used to send a request to the proxy server to obtain the current configuration information of the proxy server, and compare it with the first configuration information in the database when the rpc request is normal, so that it can be compared whether the current configuration information in the proxy server is correct. If it is not correct, it means that the rpc request is abnormal. The purpose of monitoring whether the rpc request is lost and whether the configuration is sent normally is achieved, thereby solving the technical problem of whether the rpc request is lost and whether the configuration is sent normally without monitoring.
[0081] For other examples of this embodiment, please refer to the above examples and will not be repeated here.
[0082] Fig.10 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Fig.10 As shown, it includes a processor 1002, a communication interface 1004, a memory 1006 and a communication bus 1008, wherein the processor 1002, the communication interface 1004 and the memory 1006 communicate with each other through the communication bus 1008, wherein,
[0083] Memory 1006, used for storing computer programs;
[0084] The processor 1002 is used to execute the computer program stored in the memory 1006 to implement the following steps:
[0085] Sending a request to the target proxy server through the target port, wherein the request is used to obtain current configuration information of the target proxy server;
[0086] Receiving current configuration information returned by a target thread in a target proxy server, wherein the target thread is used to monitor a target port;
[0087] Comparing the current configuration information with the first configuration information in the database, wherein the first configuration information is used to represent the configuration information generated by the target proxy server when receiving the remote procedure call request;
[0088] When the current configuration information does not match the first configuration information, it is determined that an abnormality exists in the remote procedure call request.
[0089] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 The communication interface is used for communication between the above electronic device and other devices.
[0090] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0091] As an example, the memory 1006 may include, but is not limited to, the sending module 902, the receiving module 904, the comparing module 906, and the first determining module 908 in the configuration monitoring device of the proxy server. In addition, it may also include, but is not limited to, other module units in the request processing device, which will not be repeated in this example.
[0092] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0093] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0094] It can be understood by those skilled in the art that Fig.10 The structure shown is for illustration only. The device for implementing the configuration monitoring method of the above-mentioned proxy server may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Fig.10 The structure of the electronic device is not limited. Fig.10 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.10 Different configurations shown.
[0095] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0096] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program executes the steps in the configuration monitoring method of the proxy server when executed by a processor.
[0097] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0098] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0099] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
[0100] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0101] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0102] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0103] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0104] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A configuration monitoring method for a proxy server, characterized in that: include: Sending a request to a target proxy server through a target port, wherein the request is used to obtain current configuration information of the target proxy server; Receiving the current configuration information returned by a target thread in the target proxy server, wherein the target thread is used to monitor the target port; Comparing the current configuration information with first configuration information in a database, wherein the first configuration information is used to represent configuration information generated by the target proxy server when receiving a remote procedure call request; In a case where the current configuration information does not match the first configuration information, it is determined that an abnormality exists in the remote procedure call request.
2. The method according to claim 1, characterized in that The receiving the current configuration information returned by the target thread in the target proxy server includes: After sending the acquisition request to the target proxy server, when the target proxy server is processing the remote procedure call request, setting a waiting time; In the case where configuration information is received within the waiting time, determining the received configuration information as the current configuration information; If no configuration information is received within the waiting time, resending the acquisition request; After the acquisition request is sent again, in the case where multiple configuration information are received, the configuration information sent later is determined as the current configuration information according to the timestamp in each configuration information.
3. The method according to claim 1, characterized in that Sending a request to the target proxy server through the target port includes: Writing the network address of the monitoring service used to send the acquisition request into the acquisition request, so that the target thread determines, through the network address, that the currently received acquisition request is the acquisition request sent by the monitoring service; The target thread is further configured to not respond to the acquisition request when the network address in the received acquisition request is different from the network address of the monitoring service.
4. The method according to claim 1, characterized in that: Sending a request to the target proxy server through the target port includes: Writing the unique identifier of the target proxy server into the acquisition request, so that the target thread determines, through the unique identifier, that the currently received acquisition request is a request for acquiring current configuration information of the target proxy server; The target thread is also used to return a notification message to the monitoring service that sent the acquisition request when the unique identifier in the received acquisition request is different from the unique identifier of the target proxy server, wherein the notification message is used to prompt that the unique identifier is incorrect.
5. The method according to claim 1, characterized in that Sending a request to the target proxy server through the target port includes: One or more servers to be monitored among all proxy servers are taken as the target proxy servers, and the acquisition request is sent to each of the target proxy servers according to the respective monitoring cycle of each of the target proxy servers.
6. The method according to claim 5, characterized in that Before comparing the current configuration information with the first configuration information in the database, the method further includes: When the current configuration information of any one of the target proxy servers is received, the first configuration information corresponding to the server name, network address and unique identifier of the any one of the target proxy servers is determined from a database according to the server name, network address and unique identifier of the any one of the target proxy servers.
7. The method according to claim 1, characterized in that The target thread is also used to: Before returning the current configuration information to the monitoring service that sent the acquisition request, the target thread is placed in a waiting state when the target proxy server is processing the remote procedure call request, and the current configuration information is acquired when the target proxy server has completed processing the remote procedure call request.
8. A configuration monitoring device for a proxy server, characterized in that: include: A sending module, used for sending an acquisition request to a target proxy server through a target port, wherein the acquisition request is used for acquiring current configuration information of the target proxy server; A receiving module, configured to receive the current configuration information returned by a target thread in the target proxy server, wherein the target thread is configured to monitor the target port; A comparison module, used for comparing the current configuration information with first configuration information in a database, wherein the first configuration information is used to represent configuration information generated by the target proxy server when receiving a remote procedure call request; The first determining module is used to determine that an abnormality exists in the remote procedure call request when the current configuration information does not match the first configuration information.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
