CN108650337A - A kind of server detection method, system and storage medium - Google Patents
A kind of server detection method, system and storage medium Download PDFInfo
- Publication number
- CN108650337A CN108650337A CN201810344956.1A CN201810344956A CN108650337A CN 108650337 A CN108650337 A CN 108650337A CN 201810344956 A CN201810344956 A CN 201810344956A CN 108650337 A CN108650337 A CN 108650337A
- Authority
- CN
- China
- Prior art keywords
- server
- detection
- address
- destination
- packet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2521—Translation architectures other than single NAT servers
- H04L61/2528—Translation at a proxy
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention discloses a kind of server detection method, system and storage medium, the embodiment of the present invention obtains detection packet in basic network, and the detection packet is for detecting destination server;The address that the destination server maps in basic network is obtained, the first address is obtained;It is second address of the destination server in private network by first address conversion;Based on second address detection packet is sent to the destination server positioned at private network;Receive the result of detection that the destination server is returned based on the detection packet.The program can dispose server detection system in the basic network outside private network, so that the resource that server detection system can flexibly allocate each server detects destination server, the convenience detected to server and flexibility are improved.
Description
Technical field
The present invention relates to Internet technical fields, and in particular to a kind of server detection method, system and storage medium.
Background technology
In Internet service, it is often necessary to detecting server state, so as to allow the clothes according to server state
Business device executes corresponding business, safety when ensureing that server executes business and reliability.
In the prior art, it is detected to the server in private network (Virtual Private Cloud, VPC)
During, it needs detecting server being deployed in inside VPC, and need to dispose detecting server respectively to each VPC
(often generate a VPC, be required to carry out a full set of detecting server deployment), the detecting server need to occupy the resource of VPC and
Then equipment etc. carries out server detection based on VPC internal networks.For example, ping orders can be passed through in VPC internal networks
Internet Control Message Protocol (Internet Control Message Protocol, ICMP) data packet is sent to server,
And based on whether receive server return response message, come determine server whether in normal operating condition or with clothes
Whether the connecting link between business device is in normal connection status etc..
In the research and practice process to the prior art, it was found by the inventors of the present invention that detecting server is disposed VPC
Network internal, occupy VPC Internet resources to the deployment of detecting server with build, be not merely limited to VPC resources in network pipes
Reason ability (such as some resources can not flexible dispatching in VPC), and need to change the composition of resource in VPC networks, very not
It is convenient.
Invention content
The embodiment of the present invention provides a kind of server detection method, system and storage medium, it is intended to improve to server into
The convenience of row detection.
In order to solve the above technical problems, the embodiment of the present invention provides following technical scheme:
A kind of server detection method, the method are applied to server detection system, the method includes:
Detection packet is obtained in basic network, the detection packet is for detecting destination server;
The address that the destination server maps in basic network is obtained, the first address is obtained;
It is second address of the destination server in private network by first address conversion;
Based on second address detection packet is sent to the destination server positioned at private network;
Receive the result of detection that the destination server is returned based on the detection packet.
A kind of server detection system, the server detection system include management server, detecting server and agency
Server, the management server, detecting server and proxy server are connected with each other between any two, server detection system
System is transmitted to the data of internal system by management server reception, and passes through the proxy server and exterior
Destination server connects, wherein
The detecting server, for obtaining detection packet in basic network, the detection packet is for detecting destination service
Device, and detection packet is sent to the proxy server;
The management server, the address mapped in basic network for obtaining the destination server, obtains first
Address, and first address is sent to the proxy server, first address is contained in the data;
The proxy server, for being the of the destination server in private network by first address conversion
Double-address;
The proxy server, for being sent to the destination server positioned at private network based on second address
The detection packet;
The proxy server, the result of detection returned based on the detection packet for receiving the destination server.
A kind of storage medium, the storage medium are stored with a plurality of instruction, and described instruction is loaded suitable for processor, with
Execute the step in any server detection method that the embodiment of the present invention is provided.
The embodiment of the present invention can obtain the detection packet for being used to indicate the destination server for needing to detect in basic network,
And the address that destination server maps in basic network is obtained, obtain the first address;Then, it is mesh by the first address conversion
Second address of the server in private network is marked, and is sent and is visited to the destination server positioned at private network based on the second address
Packet is surveyed, the result of detection that destination server is returned based on detection packet is received.The program can be in the facilities network outside private network
In network dispose server detection system so that server detection system can flexibly allocate each server (such as detection clothes
Business device or proxy server etc.) resource destination server is detected, improve the convenience detected to server
And flexibility.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 is the schematic diagram of a scenario of server detection system provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of server detection method provided in an embodiment of the present invention;
Fig. 3 is the Organization Chart of server detection system provided in an embodiment of the present invention;
Fig. 4 is another Organization Chart of server detection system provided in an embodiment of the present invention;
Fig. 5 is another flow diagram of server detection method provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of server detection system provided in an embodiment of the present invention;
Fig. 7 is the structural schematic diagram of server provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, the every other implementation that those skilled in the art are obtained without creative efforts
Example, shall fall within the protection scope of the present invention.
A kind of server detection method of offer of the embodiment of the present invention, system and storage medium.
Referring to Fig. 1, the schematic diagram of a scenario for the server detection system that Fig. 1 is provided by the embodiment of the present invention, the service
Device detection system may include management server, detecting server and proxy server etc., management server, detecting server and
Proxy server etc. can be attached between any two by cable network or wireless network.
Wherein, management server can be used for managing each detecting server and agency service etc. in private network, and
Address mapping relation, triggering detection are provided and receive result of detection etc., which can receive transmits from exterior
To the data of internal system, for example, can receive user passes through terminal (such as mobile phone, tablet computer, laptop and desk-top
Computer etc.) the detection configuration information that sends, which may include detection cycle and detection agreement etc., management clothes
Business device may include one or more.Detecting server can be used for detecting specified destination server, detection week
Phase is scheduled with detection mode by management server, while reporting result of detection to management server, for example, can be according to connecing
The detection configuration information of management server transmission is received, generates detection packet, and detection packet is sent to proxy server, the detection
Server may include one or more.Proxy server can be used for converting address and forwarding detection to wrap or detect knot
Fruit etc. should connect with the destination server of exterior, which may include one or more, for example, agency's clothes
Business device can receive the address mapping relation of management server transmission, and after the detection packet for receiving detecting server transmission,
It is the address in private network that will need address conversion of the destination server detected in basic network, and is based on after converting
Address accessing private network, into private network destination server forwarding detection packet;It is returned receiving destination server
Result of detection after, be the address be converted in basic network, base by address conversion of the destination server in private network
Forward result of detection to detecting server in transformed address.
Management server, detecting server and proxy server etc. are located at basic network, which is physics object
Reason, for example, underlay networks, can build virtualization network on the basis of the basic network, for example, overlay nets
Network, virtualize network can have public cloud virtualization network or private clound to virtualize network (it is required that higher virtualization net
Network) etc..The basic network can be the network of current data central site network basis forwarding plane, as long as data center network is taken up an official post
2 points of routings of anticipating are reachable, refer to physical basis layer;It can be set by the technique improvement of physical network device itself, expansion
Standby quantity, Bandwidth etc. improve basic network, and it comprises conventional network techniques.
Destination server in Fig. 1 is the server being detected, which is located at private network (i.e. VPC), should
Private network can be one piece of cyberspace that can customize (such as overlay network), and clothes can be disposed in private network
Be engaged in device, load balancing, database, non-relational database (Not OnlySQL, Nosql) block storage etc. Service Sources, may be used also
Freely to divide the network segment or formulation routing policy etc. in private network;Private network can configure public network gateway to access interconnection
Net (i.e. Internet), while also configuration public network or access via telephone line being supported to build mixed cloud, between private network cellular logic every
From etc..The private network can be the virtualization technology pattern being superimposed in a kind of network architecture, and general framework is to facilities network
Under conditions of network is without wholesale revision, the carrying on network is applied in realization, and can be detached with other network services, i.e., should
Private network can be built upon the virtual net on underlay networks, may make up by logical node and logical links privately owned
Network.
The server detection system can obtain detection packet in basic network, and the detection packet is for detecting destination service
Device, and the address that destination server maps in basic network is obtained, obtain the first address;It is target by the first address conversion
Second address of the server in private network, and detection is sent to the destination server positioned at private network based on the second address
Packet;Receive the result of detection that destination server is returned based on detection packet;Etc..
For example, server detection system can receive the detection configuration information that terminal is sent by management server, and lead to
It crosses management server and is sent to detecting server by configuration information is detected, may then pass through detecting server and matched according to the detection
Confidence breath generates detection packet, and detection packet is sent to proxy server by detecting server, can pass through management server
Address mapping relation between basic network and private network is sent to proxy server, or obtains destination server in base
The address mapped in plinth network obtains the first address, and the first address is sent to proxy server by management server.This
When, can by proxy server can according to address mapping relation by the first address conversion be destination server in private network
In the second address, and and the second address will detection packet be sent to destination server.Finally, it can be connect by proxy server
The result of detection that destination server is returned based on detection packet is received, and result of detection is passed through by proxy server by proxy server
It is sent to management server;Etc..
It should be noted that server detection system can also a kind of server, which has management server, visits
The repertoire of server and proxy server etc. is surveyed, server detection system can be realized by the server to destination service
Device is detected, referring specifically to the description to management server, detecting server and proxy server etc. in Fig. 1, herein also not
It repeats again.
It should be noted that the schematic diagram of a scenario of server detection system shown in FIG. 1 is only an example, the present invention
Embodiment description server detection system and scene be in order to more clearly illustrate the technical solution of the embodiment of the present invention,
The restriction for technical solution provided in an embodiment of the present invention is not constituted, those of ordinary skill in the art are it is found that with service
The appearance of the differentiation and new business scene of device detection system, technical solution provided in an embodiment of the present invention ask similar technology
Topic, it is equally applicable.
It is described in detail separately below.
In the present embodiment, it will be described from the angle of server detection system, which specifically may be used
To be integrated in the network equipments such as server or gateway.
A kind of server detection method, including:Detection packet is obtained in basic network, detection packet is for detecting destination service
Device;The address that destination server maps in basic network is obtained, the first address is obtained;It is destination service by the first address conversion
Second address of the device in private network;Based on the second address detection packet is sent to the destination server positioned at private network;It connects
Receive the result of detection that destination server is returned based on detection packet.
Referring to Fig. 2, Fig. 2 is the flow diagram for the server detection method that one embodiment of the invention provides.The service
Device detection method may include:
In step S101, detection packet is obtained in basic network, detection packet is for detecting destination server.
Wherein, server detection system can be deployed in basic network, and the destination server detected is needed to be located at private
There is network, therefore, server detection system can obtain detection packet in basic network, which may include needing to detect
The address that is mapped in basic network of destination server (for example, the address can be the agreement interconnected between network
(Internet Protocol, IP)), detection cycle and detection agreement etc..The detection agreement may include Internet Control Message Protocol
(Internet Control Message Protocol, ICMP) or wait remote terminal protocols (Teletype Network,
Telnet) etc..
Server detection system can obtain detection packet at interval of preset time or obtain when there is configuration update to visit
Packet etc. is surveyed, specific acquisition opportunity can be flexibly arranged according to actual needs, be not construed as limiting here.
In some embodiments, the step of detection is wrapped is obtained in basic network may include:(1) in basic network
Obtain detection configuration information;(2) it is based on detection configuration information and generates detection packet.
Specifically, server detection system can obtain detection configuration information from information bank in basic network, or
It is to receive the detection configuration information that configurating terminal is sent, certainly, which can also obtain by other means.
The configurating terminal can be the terminal configured to detection configuration information, which can be mobile phone, tablet computer, notebook
Computer and desktop computer etc..The detection configuration information may include that the destination server detected is needed to be mapped in basic network
IP address, detection cycle and detection agreement etc..
After obtaining detection configuration information, detection configuration information can be based on and generate detection packet, the detection packet is in addition to including
Can also include source address, destination address, source port number, destination port number and transmission except detection cycle and detection agreement etc.
The five-tuples such as layer protocol can initiate the detection to destination server after obtaining detection packet.
Wherein, it may include one or more to need the destination server detected, can be with when destination server is multiple
The corresponding detection configuration information of each destination server is obtained respectively, and confidence is matched based on the corresponding detection of each destination server
Breath generates the corresponding detection packet of each destination server respectively.
In some embodiments, the step of detecting configuration information is obtained in basic network may include:In facilities network
Configuration-direct is received in network, and the destination server for needing to detect, detection cycle and detection agreement are determined according to configuration-direct;Root
Detection configuration information is generated according to destination server, detection cycle and detection agreement.
The mode that server detection system obtains detection configuration information can be that user is received in basic network by matching
The configuration-direct of terminal transmission is set, the configuration-direct is for being arranged detection configuration information.Then it can be determined according to configuration-direct
It is to detect configuration information to need the information such as the destination server detected, detection cycle and detection agreement, these information.
For example, the content example that detection configuration information includes can be:(1) IPs of the destination server A in basic network
Address:UnderLayIP A;(2) detection cycle:10 seconds;(3) agreement is detected:ICMP;Destination server B is in basic network
IP address:UnderLayIP B, detection cycle:20 seconds, detect agreement:Telnet.
In some embodiments, server detection system includes multiple detecting servers, based on detection configuration information life
May include at the step of detection packet:
(a) status information of each detecting server is obtained;
(b) according to the status information of each detecting server, the priority of each detecting server is determined;
(c) according to the priority of each detecting server, at least one detection service is determined from multiple detecting servers
Device obtains target acquisition server;
(d) control targe detecting server is based on detection configuration information and generates detection packet.
Specifically, server detection system can obtain detection packet by detecting server, when server detection system packet
When including a detecting server, one or more detection packets can be obtained by the detecting server.When server detection system
When including multiple detecting servers, the priority of each detecting server, and detection preferentially high by priority can be obtained
Server obtains one or more detection packets.
For example, the status information of each detecting server can be obtained, which may include detecting server
Capacity is initiating to detect and do not initiate detection etc., then can be determined each according to the status information of each detecting server
The priority of detecting server, for example, can be the various information setting weighted value in status information, total weight of status information
It is higher to be worth more high priority, or carries out determining priority according to the size of the capacity of each detecting server, capacity it is bigger
Priority is more high.
At this point it is possible to according to the priority of each detecting server, at least one spy is determined from multiple detecting servers
Server is surveyed, target acquisition server is obtained, for example, can be arranged from high to low each detecting server according to priority
Sequence determines a detecting server of highest priority from multiple detecting servers, obtains a target acquisition server, or
Person determines that priority near preceding multiple detecting servers, obtains multiple target acquisition servers from multiple detecting servers
Deng.After determining destination server, it can be based on detection configuration information by target acquisition server and generate one or more visit
Survey packet.
In step s 102, the address that destination server maps in basic network is obtained, the first address is obtained.
Server detection system can obtain the address for needing the destination server detected to be mapped in basic network, obtain
First address refers to for example, the first address can be extracted from the detection configuration information received alternatively, receiving address setting
It enables, instruction, which is arranged, according to the address determines first address etc..First address can be include one, i.e. a destination server
Corresponding address;Either, the first address is carried in detection packet, the first address is extracted in being wrapped from detection;This first
Address can also be including multiple, i.e., each corresponding address of destination server, obtains multiple addresses in multiple destination servers.
In step s 103, it is second address of the destination server in private network by the first address conversion.
Since server detection system is deployed in basic network, and the destination server detected is needed to be located at private network
In, the first address that server detection system obtains in basic network is the ground that destination server maps in basic network
Location, therefore, in order to carry out data transmission with destination server, server detection system can take the first address conversion for target
It is engaged in address of the device in private network, obtaining the second address.
In some embodiments, it is two address step of the destination server in private network by the first address conversion
Suddenly may include:
(1) address mapping relation between basic network and private network is obtained;
(2) it is second address of the destination server in private network by the first address conversion according to address mapping relation.
Specifically, server detection system can from the database of storage address mapping relations, obtain basic network with
Address mapping relation between private network, either, server detection system can receive terminal transmission basic network with
Address mapping relation between private network, either, server detection system can receive foundation instruction, and be based on the foundation
Instruction determines that each destination server corresponding address and each destination server in basic network are right in private network
The address answered, then according to each destination server in basic network corresponding address and in private network correspondingly
The address mapping relation between basic network and private network is established in location;Etc..
It should be noted that the acquisition modes of address mapping relation can be flexibly arranged according to actual needs, specifically
Content is not construed as limiting here.
The address mapping relation can have (such as address mapping relation table) or in a text form in the form of a list
It, can be according to address mapping relation by first after obtaining address mapping relation in the presence of (such as address mapping relation text) etc.
Address conversion is second address of the destination server in private network, for example, the can be searched from address mapping relation table
One address UnderLayIP A, after obtaining the first address, it may be determined that second address OverlayIP corresponding with the first address
B can replace first address etc., so that can subsequently use the second address OverlayIP B to visiting with the second address at this time
Packet is surveyed to be transmitted.
In some embodiments, server detection system may include multiple proxy servers, be closed according to address of cache
The step of first address conversion is the second address of the destination server in private network by system may include:
(a) status information of each proxy server is obtained;
(b) according to the status information of each proxy server, the priority of each proxy server is determined;
(c) according to the priority of each proxy server, at least one agency service is determined from multiple proxy servers
Device obtains target proxy server;
(d) control targe proxy server is according to address mapping relation, is destination server in private by the first address conversion
There is the second address in network.
Specifically, server detection system can carry out address conversion by proxy server, when server detection system
When including a proxy server, address conversion can be carried out by the proxy server, when server detection system includes more
When a proxy server, the priority of each proxy server, and proxy server preferentially high by priority can be obtained
Carry out address conversion.
For example, the status information of each proxy server can be obtained, which may include proxy server
Capacity is initiating to act on behalf of and do not initiate agency etc., then can be determined each according to the status information of each proxy server
The priority of proxy server, for example, can be the various information setting weighted value in status information, total weight of status information
It is higher to be worth more high priority, or carries out determining priority according to the size of the capacity of each proxy server, capacity it is bigger
Priority is more high.
At this point it is possible to according to the priority of each proxy server, at least one generation is determined from multiple proxy servers
Server is managed, target proxy server is obtained, for example, can be arranged from high to low each proxy server according to priority
Sequence determines a proxy server of highest priority from multiple proxy servers, obtains a target proxy server, or
Person determines that priority near preceding multiple proxy servers, obtains multiple target proxy servers from multiple proxy servers
Deng.After determining destination server, can be by the first address conversion by target proxy server according to address mapping relation
Second address of the destination server in private network, wherein first address may include one or more, second address
It can also include one or more.
In step S104, detection packet is sent to the destination server positioned at private network based on the second address.
After being converted to the second address, it can be sent and be visited to the destination server positioned at private network based on the second address
Packet is surveyed, for example, the second address can be added in detection packet, and address, the destination address are used as a purpose by the second address
In the destination server that instruction needs to detect, therefore can be based on the second address will send detection packet to be sent to destination server.
In some embodiments, when the second address includes multiple, based on the second address to the mesh positioned at private network
Mark server sends the step of detection is wrapped:
Multiple threads are called, and each second address is based on by multiple threads, detection packet transmitted in parallel is given and is located at private
There is the destination server of network.
Specifically, when the second address includes multiple, illustrate to need to detect multiple destination servers, at this point, visiting
It may include multiple to survey packet, and server detection system can call multiple threads, and be based on each second ground by multiple threads
The destination server that detects of needs is given each detection packet transmitted in parallel in location respectively, alternatively, being based on each the by multiple threads
Each detection packet is serially sent to the destination server for needing to detect by double-address.
In step S105, the result of detection that destination server is returned based on detection packet is received.
Destination server can parse detection packet, and after receiving detection packet based on the detection packet after parsing
Result of detection, which is returned, to server detection system is then based on second for example, the second address can be extracted from the detection packet
Address returns to result of detection.After obtaining result of detection, server detection system can be by the spy being arranged in detection configuration information
The survey period re-starts detection.It realizes and is based on VPC network environments, by each server in basic network, in VPC networks
Server detected;Specifically can be under the premise ofs not changing VPC network configurations and network architecture etc., and it is not necessarily to extended resources
With adjustment framework, you can realization detects the disparate networks state of VPC network servers.
In some embodiments, server detection system may include management server, receives destination server and is based on
Detection packet return result of detection the step of may include:
(1) result of detection that destination server is returned based on detection packet is received;
(2) the second address is extracted from result of detection;
(3) it is the first address by the second address conversion according to address mapping relation;
(4) result of detection is sent to by management server based on the first address.
Specifically, server detection system may include management server, and by management server to result of detection into
Row manages, and may include destination server corresponding second address in private network, server detection system in result of that probe
It unites after receiving the result of detection that destination server is returned based on detection packet, the second ground can be extracted from result of detection
Location, in order to basis can in management server carry out data transmission, can be according to address mapping relation, by the second address
Address of the destination server in basic network is converted to, the first address is obtained, at this point it is possible to be tied detection based on the first address
Fruit is sent to management server.
In some embodiments, the step of receiving the result of detection that destination server is returned based on detection packet can wrap
It includes:
When destination server generates probe response packet in the preset time for receiving detection packet, destination server is received
Normal first result of detection of destination server of return, the first result of detection are generated based on probe response packet;Work as destination service
When device does not generate probe response packet in the preset time for receiving detection packet, the destination server that destination server returns is received
The second abnormal result of detection.
Wherein, result of detection may include destination server is normal or destination server is abnormal etc., and destination server is normal
Can be that destination server is in normal operating condition, or the connecting link between destination server is in and normally connect shape
State or destination server can be used etc.;Destination server can be that destination server is in not operating status, Huo Zheyu extremely
Connecting link between destination server, which is in, disconnects state destination server denied access or target
It services unavailable etc..
Specifically, destination server can generate probe response packet, this is pre- after receiving detection packet in preset time
If the time can be flexibly arranged according to actual needs, specific value is not construed as limiting here.When destination server is receiving
When generating probe response packet in the preset time of detection packet, illustrate that destination server is normal, at this point, server detection system can
To receive normal first result of detection of destination server of destination server return, which can be target clothes
Device be engaged in based on the generation of probe response packet.When destination server does not generate probe response packet in the preset time for receiving detection packet
When, illustrate destination server exception, at this point, the destination server that server detection system can receive destination server return is different
The second normal result of detection, second result of detection can not generate probe response packet in destination server.
From the foregoing, it will be observed that the embodiment of the present invention can obtain the destination server for being used to indicate and needing to detect in basic network
Detection packet, and obtain the address that is mapped in basic network of destination server, obtain the first address;Then, by the first
Location is converted to second address of the destination server in private network, and based on the second address to the target clothes positioned at private network
Business device, which is sent, detects packet, receives destination server based on the result of detection for detecting packet return.The program can be outside private network
Server detection system is disposed in the basic network in portion, so that server detection system can flexibly allocate each server
The resource of (such as detecting server or proxy server etc.) detects destination server, improves and is visited to server
The convenience of survey and flexibility.
According to method described in above-described embodiment, citing is described in further detail below.
The present embodiment will be deployed in basic network with server detection system, the server detected needed to be located at private network
For (i.e. VPC), by taking server detection system includes management server, detecting server and proxy server as an example, wherein pipe
Reason server, detecting server and proxy server can be attached between any two by cable network or wireless network.
For example, as shown in figure 3, server detection system may include a management server, multiple detecting server (examples
Such as, detecting server A to detecting server B, specific number can be flexibly arranged according to actual needs) and multiple agencies clothes
It is engaged in device (for example, proxy server A to proxy server B, specific number can be flexibly arranged according to actual needs), it can be with
By a proxy server, to multiple servers, (for example, server 1 is to proxy server n, the value of n can be according to reality
Need flexibly to be arranged) detected, wherein the multiple servers that need to be detected can in the same private network (example
Such as, server 1 and server 2 etc. are in the same VPC-a) in, can also be in different private networks (for example, server 5
It is equal in different VPC with server 6).
In another example as shown in figure 4, server detection system may include a management server, a detecting server
And a proxy server, multiple servers (i.e. destination server) can be detected by a proxy server,
In, which can also be in different private networks in the same private network.In order to
Facilitate explanation, below by by taking the framework of Fig. 4 as an example, server detection process is described in detail.
It should be noted that in a server detection system may not only there are one management server, one detection clothes
Business device and a proxy server etc., the present embodiment should not be understood as only to facilitate description institute illustrated example to service
The restriction of the type and quantity of server in device detection system, but no matter how many a and how many type service of all kinds of servers
The process of device, server detection is all similar, can be understood according to the example.
Referring to Fig. 5, Fig. 5 is the flow diagram of server detection method provided in an embodiment of the present invention.This method stream
Journey may include:
201, management server sends address mapping relation to proxy server.
Management server can be obtained from the database of storage address mapping relations between basic network and private network
Address mapping relation, either, management server can receive terminal transmission basic network and private network between ground
Location mapping relations etc..The address mapping relation can have (such as address mapping relation table) or in the form of a list with text
There is (such as address mapping relation text) etc. in form, particular content is not construed as limiting here.
After obtaining address mapping relation, management server can be mark or address etc. based on proxy server, often
It is spaced preset time and sends address mapping relation to proxy server, or there are when address mapping relation update, taken to agency
Business device sends address mapping relation etc., can be flexibly arranged according to actual needs, particular content is not construed as limiting here.
202, proxy server storage address mapping relations.
Proxy server receive management server transmission address mapping relation after, can to address mapping relation into
Row storage.
203, management server sends detection configuration information to detecting server.
Management server can obtain detection configuration information from information bank, either, reception configurating terminal (such as electricity
Brain) send detection configuration information, certainly, which can also obtain by other means.Confidence is matched in the detection
Breath may include the IP address for needing the destination server detected to be mapped in basic network, detection cycle and detection agreement etc..
Wherein, it may include one or more to need the destination server detected, when destination server is multiple, management
Server can obtain the corresponding detection configuration information of each destination server respectively.
After obtaining detection configuration information, management server can be mark or address etc. based on detecting server, often
When being spaced preset time and send detection configuration information to detecting server, or there is detection configuration information update, taken to detection
Business device sends detection configuration information etc., can be flexibly arranged according to actual needs, particular content is not construed as limiting here.
It should be noted that when there are multiple detecting servers, management server can obtain each detecting server
Priority, and send detection configuration information to the high detecting server of priority.
204, detecting server generates detection packet according to detection configuration information.
Detecting server, can be according to detection configuration information after the detection configuration information for receiving management server transmission
Generate detection packet, which may include address (such as the IP for needing the destination server that detects to be mapped in basic network
Address), detection cycle (such as 10 seconds) and detection agreement (such as ICMP and Telnet etc.) etc..
For different agreements, the information for including in detection packet can be different, for example, for the detection packet of ICMP, it can
May include mesh for the detection packet of Telnet with the size etc. of address and packet including destination server in basic network
Mark address, port information and secret key etc. of the server in basic network.
Wherein, it may include one or more to need the destination server detected, can be with when destination server is multiple
According to the corresponding detection configuration information of each destination server, the corresponding detection packet of each destination server is generated respectively.
205, detecting server sends detection packet to proxy server.
After obtaining detection packet, mark that detecting server can be based on proxy server or address etc., to agency service
Device sends one or more detection packets.
It should be noted that when there are multiple proxy servers, management server can obtain each proxy server
Priority, and determine that the higher one or more proxy servers of priority obtain target proxy server, then by target generation
Mark or the address etc. for managing server are sent to detecting server, at this point, detecting server can be to the high agency's clothes of priority
Business device sends detection packet.
206, first address conversion of the proxy server according to address mapping relation by destination server in basic network is
The second address in private network.
Wherein, the first address can be carried in detection packet, proxy server is in the spy for receiving detecting server transmission
After surveying packet, the first address is extracted in being wrapped from detection.Since server detection system is deployed in basic network, and need
The destination server of detection is located in private network, and the first address that proxy server obtains in basic network is destination service
The address that device maps in basic network, therefore, in order to carry out data transmission with destination server, proxy server can basis
First address conversion is address of the destination server in private network, obtains the second address by the address mapping relation of storage.
207, proxy server is based on the second address and detection packet is sent to destination server.
After being converted to the second address, proxy server can be based on the second address to the target clothes positioned at private network
Device of being engaged in sends detection packet, for example, the second address can be added in detection packet, and by the second address address as a purpose, it should
Destination address is used to indicate the destination server for needing to detect, therefore can be based on the second address will send detection packet to be sent to target
Server.
When needing to detect multiple destination servers, proxy server can call multiple threads, and by more
A thread is based on each second address, will detect packet transmitted in parallel to the destination server positioned at private network.
208, destination server generates result of detection.
Destination server can parse detection packet, and after receiving detection packet based on the detection packet after parsing
Result of detection is generated, for example, the second address can be extracted from the detection packet, the second address is then based on and generates detection knot
Fruit.
For example, for the detection packet of ICMP, destination server can extract the second address and packet from the detection packet
The information such as size, and generate result of detection;For the detection packet of Telnet, destination server can be extracted from the detection packet
The information such as the second address, port information and secret key, and generate result of detection.
209, destination server returns to result of detection to proxy server.
Destination server can be returned along the path of detection packet transmission to proxy server after generating result of detection
Result of detection is then based on the second address and is returned to proxy server for example, the second address can be extracted from the detection packet
Result of detection.
210, the second address conversion is the first address according to address mapping relation by proxy server.
May include that destination server corresponding second address, proxy server in private network exist in result of that probe
After receiving the result of detection that destination server is returned based on detection packet, the second address can be extracted from result of detection, so
Can be afterwards the ground that destination server maps in basic network by the second address conversion according to the address mapping relation of storage
Location obtains the first address.
211, proxy server is based on the first address and returns to result of detection to detecting server.
After obtaining the first address, result of detection can be sent detecting server by proxy server based on the first address.
212, detecting server returns to result of detection to management server.
After obtaining result of detection, detecting server returns to result of detection to management server, and management server is receiving
To after result of detection, detection can be re-started by the detection cycle being arranged in detection configuration information.
Wherein, result of detection may include destination server is normal or destination server is abnormal etc., and destination server is normal
Can be that destination server is in normal operating condition, or the connecting link between destination server is in and normally connect shape
State or destination server can be used etc.;Destination server can be that destination server is in not operating status, Huo Zheyu extremely
Connecting link between destination server, which is in, disconnects state destination server denied access or target
It services unavailable etc..
The embodiment of the present invention can be based on VPC network environments, by each server in basic network, in VPC networks
Server detected, specifically can under the premise ofs not changing existing VPC network configurations and network architecture etc., without occupy
Or expand and have VPC Internet resources (for example, the resources such as server hardware or IP address) and adjustment framework, you can realizes detection work(
Energy;And network architecture suitability is strong, can be adapted to a variety of VPC network architectures, for example, generic route encapsulation (Generic
Routing Encapsulation, GRE) or network void seemingly change technology (Virtual Extensible LAN, VXLAN) etc.;With
And operation deployment is flexible and reliability is high, above offline at any time detection service can be carried out, to all kinds of nets of VPC network servers
Network state is detected, and the operation management of all kinds of services can be assisted;In addition, by increase act on behalf of, solve basic network with
The communication issue of VPC networks, the resource that can flexibly allocate detecting server or proxy server etc. carry out destination server
Detection, improves the convenience detected to server and flexibility.
For ease of preferably implementing server detection method provided in an embodiment of the present invention, the embodiment of the present invention also provides one
System of the kind based on above-mentioned server detection method.Wherein the meaning of noun is identical with above-mentioned server detection method, specifically
Realize that details can be with the explanation in reference method embodiment.
Referring to Fig. 6, Fig. 6 is the structural schematic diagram of server detection system provided in an embodiment of the present invention, the wherein clothes
Device detection system of being engaged in may include management server 301, detecting server 302 and proxy server 303 etc..
Wherein, detecting server 302, for obtaining detection packet in basic network, detection packet is for detecting destination service
Device, and detection packet is sent to proxy server 303.
Wherein, management server 301, detecting server 302 and proxy server 303 etc. can be deployed in basic network
In, and the destination server detected is needed to be located at private network, therefore, detecting server 302 can obtain in basic network
Detection packet, the detection packet may include need the destination server that detects to be mapped in basic network address (for example, the address
Can be IP address), detection cycle and detection agreement etc..The detection agreement may include ICMP agreements or Telnet agreements etc..
Detecting server 302 can be obtained detection packet at interval of preset time or obtain detection when there is configuration update
Packet etc., specific acquisition opportunity can be flexibly arranged according to actual needs, be not construed as limiting here.
In some embodiments, management server 301, for obtaining detection configuration information in basic network, and will
Detection configuration information is sent to detecting server 302;Detecting server 302, for generating detection packet based on detection configuration information.
Specifically, management server 301 can obtain detection configuration information from information bank in basic network, or
It is to receive the detection configuration information that configurating terminal is sent, certainly, which can also obtain by other means.
The configurating terminal can be the terminal configured to detection configuration information, which can be mobile phone, tablet computer, notebook
Computer and desktop computer etc..The detection configuration information may include that the destination server detected is needed to be mapped in basic network
IP address, detection cycle and detection agreement etc..
After obtaining detection configuration information, detection configuration information can be sent to detecting server by management server 301
302, detecting server 302 can be based on detection configuration information generation detection packet at this time, and the detection packet is in addition to including detection cycle
Can also include source address, destination address, source port number, destination port number and transport layer protocol etc. and except detection agreement etc.
Five-tuple, after obtaining detection packet, detecting server 302 can initiate the detection to destination server.
Wherein, it may include one or more to need the destination server detected, when destination server is multiple, management
Server 301 can obtain the corresponding detection configuration information of each destination server respectively, and each destination server is corresponded to
Detection configuration information send detecting server 302, detecting server 302 can be based on the corresponding detection of each destination server
Configuration information generates the corresponding detection packet of each destination server respectively.
In some embodiments, management server 301, for receiving configuration-direct in basic network, and according to
It sets instruction and determines the destination server for needing to detect, detection cycle and detection agreement;Management server 301, for according to target
Server, detection cycle and detection agreement generate detection configuration information.
The mode that management server 301 obtains detection configuration information can be that user is received in basic network by matching
The configuration-direct of terminal transmission is set, the configuration-direct is for being arranged detection configuration information.Then it can be determined according to configuration-direct
It is to detect configuration information to need the information such as the destination server detected, detection cycle and detection agreement, these information.
For example, the content example that detection configuration information includes can be:(1) IPs of the destination server A in basic network
Address:UnderLayIP A;(2) detection cycle:10 seconds;(3) agreement is detected:ICMP;Destination server B is in basic network
IP address:UnderLayIP B, detection cycle:20 seconds, detect agreement:Telnet.
In some embodiments, detecting server 302 includes multiple, management server 301, for obtaining each detection
The status information of server 302;
Management server 301 determines each detecting server for the status information according to each detecting server 302
302 priority;
Management server 301, for the priority according to each detecting server 302, from multiple detecting servers 302
It determines at least one detecting server 302, obtains target acquisition server 302;
Management server 301 is based on detection configuration information for control targe detecting server 302 and generates detection packet.
Specifically, when server detection system includes a detecting server 302, which can give birth to
It is wrapped at one or more detection.When server detection system includes multiple detecting servers 302, management server 301 can be with
The priority of each detecting server 302 is obtained, and one or more is preferentially generated by the high detecting server 302 of priority
Detection packet.
For example, management server 301 can obtain the status information of each detecting server 302, which can be with
Capacity including detecting server 302 is initiating to detect and do not initiate detection etc., and then management server 301 can basis
The status information of each detecting server 302 determines the priority of each detecting server 302, for example, can be status information
In various information be arranged weighted value, total weighted value more high priority of status information is higher, or carry out according to each detection
The size of the capacity of server 302 determines that priority, the bigger priority of capacity are more high.
At this point, management server 301 can be according to the priority of each detecting server 302, from multiple detecting servers
At least one detecting server 302 is determined in 302, obtains target acquisition server 302, for example, can be according to priority from height
Each detecting server 302 is ranked up to low, a detection of highest priority is determined from multiple detecting servers 302
Server 302 obtains a target acquisition server 302, alternatively, from multiple detecting servers 302 determine priority near
Preceding multiple detecting servers 302 obtain multiple target acquisition servers 302 etc..After determining destination server 302, management
Server 301 can be based on detection configuration information with control targe detecting server 302 and generate detection packet, for example, management server
Detection configuration information can be sent to target acquisition server 302 by 301 so that target acquisition server 302 can be based on visiting
It surveys configuration information and generates one or more detection packets.
Management server 301, the address mapped in basic network for obtaining destination server, obtains the first address,
And the first address is sent to proxy server 303.
Management server 301 can obtain the address for needing the destination server detected to be mapped in basic network, obtain
First address refers to for example, the first address can be extracted from the detection configuration information received alternatively, receiving address setting
It enables, instruction, which is arranged, according to the address determines first address etc..First address can be include one, i.e. a destination server
Corresponding address;Either, the first address is carried in detection packet, the first address is extracted in being wrapped from detection;This first
Address can also be including multiple, i.e., each corresponding address of destination server, obtains multiple addresses in multiple destination servers.
Proxy server 303, for being second address of the destination server in private network by the first address conversion.
Since proxy server 303 is deployed in basic network, and the destination server detected is needed to be located at private network
In, the first address for being obtained in basic network is the address that destination server maps in basic network, therefore, in order to mesh
Mark server carries out data transmission, and the first address conversion can be destination server in private network by proxy server 303
Address, obtain the second address.
In some embodiments, management server 301, the address for obtaining between basic network and private network are reflected
Relationship is penetrated, and address mapping relation is sent to proxy server 303;
Proxy server 303, for according to address mapping relation by the first address conversion be destination server in privately owned net
The second address in network.
Specifically, management server 301 can obtain basic network and private from the database of storage address mapping relations
Have an address mapping relation between network, either, management server 301 can receive the basic network of terminal transmission with it is privately owned
Address mapping relation between network, either, management server 301 can receive foundation instruction, and be instructed based on the foundation
Determine that each destination server corresponding address and each destination server in basic network are corresponding in private network
Address, then according to each destination server in basic network corresponding address and the corresponding address in private network, build
Vertical address mapping relation between basic network and private network;Etc..
It should be noted that the acquisition modes of address mapping relation can be flexibly arranged according to actual needs, specifically
Content is not construed as limiting here.
The address mapping relation can have (such as address mapping relation table) or in a text form in the form of a list
In the presence of (such as address mapping relation text) etc., after obtaining address mapping relation, management server 301 can be by address of cache
Relationship is sent to proxy server 303.At this point, proxy server 303 can be according to address mapping relation by the first address conversion
The second address for being destination server in private network, for example, the first address can be searched from address mapping relation table
UnderLayIP A, after obtaining the first address, it may be determined that second address OverlayIP B corresponding with the first address, this
When the second address can be used to replace first address etc. so that can subsequently the second address OverlayIP B be used to wrap detection
It is transmitted.
In some embodiments, proxy server 303 includes multiple, management server 301, for obtaining each agency
The status information of server 303;
Management server 301 determines each proxy server for the status information according to each proxy server 303
303 priority;
Management server 301, for the priority according to each proxy server 303, from multiple proxy servers 303
It determines at least one proxy server 303, obtains target proxy server 303;
Management server 301 turns the first address for control targe proxy server 303 according to address mapping relation
It is changed to second address of the destination server in private network.
Specifically, when server detection system includes a proxy server 303, the proxy server can be passed through
303 carry out address conversion, and when server detection system includes multiple proxy servers 303, management server 301 can obtain
The priority of each proxy server 303, and address conversion is preferentially carried out by the high proxy server 303 of priority.
For example, management server 301 can obtain the status information of each proxy server 303, which can be with
Capacity including proxy server 303 is initiating to act on behalf of and do not initiate agency etc., and then management server 301 can basis
The status information of each proxy server 303 determines the priority of each proxy server 303, for example, can be status information
In various information be arranged weighted value, total weighted value more high priority of status information is higher, or carry out according to each agency
The size of the capacity of server 303 determines that priority, the bigger priority of capacity are more high.
At this point, management server 301 can be according to the priority of each proxy server 303, from multiple proxy servers
At least one proxy server 303 is determined in 303, obtains target proxy server 303, for example, can be according to priority from height
Each proxy server 303 is ranked up to low, an agency of highest priority is determined from multiple proxy servers 303
Server 303 obtains a target proxy server 303, alternatively, from multiple proxy servers 303 determine priority near
Preceding multiple proxy servers 303 obtain multiple target proxy servers 303 etc..After determining destination server 303, management
First address conversion can be destination server with control targe proxy server 303 according to address mapping relation by server 301
The second address in private network, wherein first address may include one or more, which can also include
It is one or more.
Proxy server 303, for sending detection packet to the destination server positioned at private network based on the second address.
After being converted to the second address, proxy server 303 can be based on the second address to the mesh positioned at private network
It marks server and sends detection packet, for example, the second address can be added in detection packet, and as a purpose by the second address
Location, the destination address are used to indicate the destination server for needing to detect, therefore can be based on the second address will send detection packet to send
To destination server.
In some embodiments, when the second address includes multiple, proxy server 303, for calling multiple threads,
And it is based on each second address by multiple threads, packet transmitted in parallel will be detected to the destination server positioned at private network.
Specifically, when the second address includes multiple, illustrate to need to detect multiple destination servers, at this point, visiting
It may include multiple to survey packet, and proxy server 303 can call multiple threads, and be based on each second ground by multiple threads
The destination server that detects of needs is given each detection packet transmitted in parallel in location respectively, alternatively, being based on each the by multiple threads
Each detection packet is serially sent to the destination server for needing to detect by double-address.
Proxy server 303, the result of detection returned based on detection packet for receiving destination server.
Destination server can parse detection packet, and after receiving detection packet based on the detection packet after parsing
Result of detection, which is returned, to proxy server 303 is then based on second for example, the second address can be extracted from the detection packet
Address returns to result of detection.After obtaining result of detection, server detection system can be by the spy being arranged in detection configuration information
The survey period re-starts detection.It realizes and is based on VPC network environments, by each server in basic network, in VPC networks
Server detected;Specifically can be under the premise ofs not changing VPC network configurations and network architecture etc., and it is not necessarily to extended resources
With adjustment framework, you can realization detects the disparate networks state of VPC network servers.
In some embodiments, proxy server 303, the detection returned based on detection packet for receiving destination server
As a result;
Proxy server 303, for extracting the second address from result of detection;
Proxy server 303 is used to according to address mapping relation be the first address by the second address conversion;
Result of detection is sent to management clothes by proxy server 303 for being based on the first address by detecting server 302
Business device 301.
Specifically, management server 301 can be managed result of detection, may include target clothes in result of that probe
Business device corresponding second address in private network, proxy server 303 are receiving destination server based on detection packet return
Result of detection after, the second address can be extracted from result of detection, in order to basis can in management server into
Second address conversion can be destination server on basis according to address mapping relation by row data transmission, proxy server 303
Address in network obtains the first address, at this point it is possible to result of detection is sent to by detecting server 302 based on the first address,
Result of detection is sent to management server 301 by detecting server 302 again.
In some embodiments, proxy server 303, for when destination server receive detection packet it is default when
When interior generation probe response packet, normal first result of detection of destination server that destination server returns is received, first visits
Result is surveyed to generate based on probe response packet;
Proxy server 303, for being rung when destination server does not generate detection in the preset time for receiving detection packet
When should wrap, the second result of detection of the destination server exception that destination server returns is received.
Wherein, result of detection may include destination server is normal or destination server is abnormal etc., and destination server is normal
Can be that destination server is in normal operating condition, or the connecting link between destination server is in and normally connect shape
State or destination server can be used etc.;Destination server can be that destination server is in not operating status, Huo Zheyu extremely
Connecting link between destination server, which is in, disconnects state destination server denied access or target
It services unavailable etc..
Specifically, destination server can generate probe response packet, this is pre- after receiving detection packet in preset time
If the time can be flexibly arranged according to actual needs, specific value is not construed as limiting here.When destination server is receiving
When generating probe response packet in the preset time of detection packet, illustrate that destination server is normal, at this point, proxy server 303 can
To receive normal first result of detection of destination server of destination server return, which can be target clothes
Device be engaged in based on the generation of probe response packet.When destination server does not generate probe response packet in the preset time for receiving detection packet
When, illustrate destination server exception, at this point, the destination server that proxy server 303 can receive destination server return is different
The second normal result of detection, second result of detection can not generate probe response packet in destination server.
It needs to visit from the foregoing, it will be observed that detecting server of the embodiment of the present invention 302 can obtain to be used to indicate in basic network
The detection packet and management server 301 of the destination server of survey obtain the address that destination server maps in basic network,
The first address is obtained, and the first address is sent to proxy server 303;Then, proxy server 303 is by the first address conversion
The second address for being destination server in private network, and based on the second address to the destination server hair positioned at private network
It send detection to wrap, receives the result of detection that destination server is returned based on detection packet.The program can be in the base outside private network
Server detection system is disposed in plinth network, so that server detection system can flexibly allocate the resource pair of each server
Destination server is detected, and the convenience detected to server and flexibility are improved.
The embodiment of the present invention also provides a kind of server, which can be the server in server detection system,
For example, the structure of the servers such as management server, detecting server or proxy server in server detection system can be with
The structure of the server is similar, as shown in fig. 7, it illustrates the structural schematic diagram of the server involved by the embodiment of the present invention,
Specifically:
The server may include one or processor 401, one or more meters of more than one processing core
The components such as memory 402, power supply 403 and the input unit 404 of calculation machine readable storage medium storing program for executing.Those skilled in the art can manage
It solves, server architecture does not constitute the restriction to server shown in Fig. 7, may include than illustrating more or fewer portions
Part either combines certain components or different components arrangement.Wherein:
Processor 401 is the control centre of the server, utilizes each of various interfaces and the entire server of connection
Part by running or execute the software program and/or module that are stored in memory 402, and calls and is stored in memory
Data in 402, the various functions and processing data of execute server, to carry out integral monitoring to server.Optionally, locate
Reason device 401 may include one or more processing cores;Preferably, processor 401 can integrate application processor and modulatedemodulate is mediated
Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main
Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 401.
Memory 402 can be used for storing software program and module, and processor 401 is stored in memory 402 by operation
Software program and module, to perform various functions application and data processing.Memory 402 can include mainly storage journey
Sequence area and storage data field, wherein storing program area can storage program area, the application program (ratio needed at least one function
Such as sound-playing function, image player function) etc.;Storage data field can be stored uses created data according to server
Deng.In addition, memory 402 may include high-speed random access memory, can also include nonvolatile memory, for example, at least
One disk memory, flush memory device or other volatile solid-state parts.Correspondingly, memory 402 can also include
Memory Controller, to provide access of the processor 401 to memory 402.
Server further includes the power supply 403 powered to all parts, it is preferred that power supply 403 can pass through power management system
System is logically contiguous with processor 401, to realize the work(such as management charging, electric discharge and power managed by power-supply management system
Energy.Power supply 403 can also include one or more direct current or AC power, recharging system, power failure monitor electricity
The random components such as road, power supply changeover device or inverter, power supply status indicator.
The server may also include input unit 404, which can be used for receiving the number or character letter of input
Breath, and generation keyboard related with user setting and function control, mouse, operating lever, optics or trace ball signal are defeated
Enter.
Although being not shown, server can also be including display unit etc., and details are not described herein.Specifically in the present embodiment,
Processor 401 in server can according to following instruction, by the process of one or more application program is corresponding can
It executes file to be loaded into memory 402, and the application program being stored in memory 402 is run by processor 401, to
Realize various functions, it is as follows:
Detection packet is obtained in basic network, detection packet is for detecting destination server;Destination server is obtained on basis
The address mapped in network obtains the first address;It is second ground of the destination server in private network by the first address conversion
Location;Based on the second address detection packet is sent to the destination server positioned at private network;It receives destination server and is based on detection packet
The result of detection of return.
From the foregoing, it will be observed that the embodiment of the present invention can obtain the destination server for being used to indicate and needing to detect in basic network
Detection packet, and obtain the address that is mapped in basic network of destination server, obtain the first address;Then, by the first
Location is converted to second address of the destination server in private network, and based on the second address to the target clothes positioned at private network
Business device, which is sent, detects packet, receives destination server based on the result of detection for detecting packet return.The program can be outside private network
Server detection system is disposed in the basic network in portion, so that server detection system can flexibly allocate each server
Resource detects destination server, improves the convenience detected to server and flexibility.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, the detailed description above with respect to server detection method is may refer to, details are not described herein again.
It will appreciated by the skilled person that all or part of step in the various methods of above-described embodiment can be with
It is completed by instructing, or controls relevant hardware by instructing and complete, which can be stored in one and computer-readable deposit
In storage media, and is loaded and executed by processor.
For this purpose, the embodiment of the present invention provides a kind of storage medium, wherein being stored with a plurality of instruction, which can be handled
Device is loaded, to execute the step in any server detection method that the embodiment of the present invention is provided.For example, the instruction
Following steps can be executed:
Detection packet is obtained in basic network, detection packet is for detecting destination server;Destination server is obtained on basis
The address mapped in network obtains the first address;It is second ground of the destination server in private network by the first address conversion
Location;Based on the second address detection packet is sent to the destination server positioned at private network;It receives destination server and is based on detection packet
The result of detection of return.
The specific implementation of above each operation can be found in the embodiment of front, and details are not described herein.
Wherein, which may include:Read-only memory (ROM, Read Only Memory), random access memory
Body (RAM, Random Access Memory), disk or CD etc..
By the instruction stored in the storage medium, any server that the embodiment of the present invention is provided can be executed
Step in detection method, it is thereby achieved that any server detection method institute that the embodiment of the present invention is provided can be real
Existing advantageous effect refers to the embodiment of front, and details are not described herein.
A kind of server detection method, system and storage medium is provided for the embodiments of the invention above to have carried out in detail
It introduces, principle and implementation of the present invention are described for specific case used herein, the explanation of above example
It is merely used to help understand the method and its core concept of the present invention;Meanwhile for those skilled in the art, according to the present invention
Thought, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be understood
For limitation of the present invention.
Claims (19)
1. a kind of server detection system, which is characterized in that the server detection system includes management server, detection service
Device and proxy server, the management server, detecting server and proxy server are connected with each other between any two, the service
Device detection system is received by the management server and is transmitted to the data of internal system, and by the proxy server be
Destination server connection outside system, wherein
Detection packet for obtaining detection packet in basic network, and is sent to the agency and taken by the detecting server
Business device, the detection packet is for detecting destination server;
The management server, the address mapped in basic network for obtaining the destination server, obtains the first address,
And first address is sent to the proxy server, first address is contained in the data;
The proxy server, for being second ground of the destination server in private network by first address conversion
Location;
The proxy server is used for based on second address to described in the destination server transmission positioned at private network
Detection packet;
The proxy server, the result of detection returned based on the detection packet for receiving the destination server.
2. server detection system according to claim 1, which is characterized in that the management server, for obtaining base
Address mapping relation between plinth network and private network, and described address mapping relations are sent to the proxy server;
The proxy server is used to according to described address mapping relations be the destination server by first address conversion
The second address in private network.
3. server detection system according to claim 2, which is characterized in that the proxy server includes multiple, institute
Management server is stated, the status information for obtaining each proxy server;
The management server determines each proxy server for the status information according to each proxy server
Priority;
The management server is determined for the priority according to each proxy server from the multiple proxy server
At least one proxy server obtains target proxy server;
The management server, for controlling the target proxy server according to described address mapping relations, by described first
Address conversion is second address of the destination server in private network.
4. server detection system according to claim 2, which is characterized in that the proxy server, for receiving
State the result of detection that destination server is returned based on the detection packet;
The proxy server, for extracting second address from the result of detection;
The proxy server is used to according to described address mapping relations be first address by second address conversion;
The result of detection is sent to by the proxy server for being based on first address by the detecting server
The management server.
5. server detection system according to claim 4, which is characterized in that the proxy server, for when described
When destination server generates probe response packet in the preset time for receiving the detection packet, receives the destination server and return
Normal first result of detection of the destination server returned, first result of detection are generated based on the probe response packet;
The proxy server, for not generating spy in the preset time for receiving the detection packet when the destination server
When surveying response bag, the second result of detection of the destination server exception that the destination server returns is received.
6. server detection system according to any one of claims 1 to 5, which is characterized in that when second address is wrapped
When including multiple, the proxy server is based on each second address, by institute for calling multiple threads, and by multiple threads
Detection packet transmitted in parallel is stated to the destination server positioned at private network.
7. server detection system according to any one of claims 1 to 5, which is characterized in that the management server is used
Configuration information is detected in being obtained in basic network, and the detection configuration information is sent to the detecting server;
The detecting server, for generating detection packet based on the detection configuration information.
8. server detection system according to claim 7, which is characterized in that the management server, on basis
Configuration-direct is received in network, and destination server, detection cycle and the detection for needing to detect are determined according to the configuration-direct
Agreement;
The management server, for generating detection configuration information according to the destination server, detection cycle and detection agreement.
9. server detection system according to claim 7, which is characterized in that the detecting server includes multiple, institute
Management server is stated, the status information for obtaining each detecting server;
The management server determines each detecting server for the status information according to each detecting server
Priority;
The management server is determined for the priority according to each detecting server from the multiple detecting server
At least one detecting server obtains target acquisition server;
The management server is based on detection configuration information generation detection packet for controlling the target acquisition server.
10. a kind of server detection method, which is characterized in that the method is applied to server detection system, the method packet
It includes:
Detection packet is obtained in basic network, the detection packet is for detecting destination server;
The address that the destination server maps in basic network is obtained, the first address is obtained;
It is second address of the destination server in private network by first address conversion;
Based on second address detection packet is sent to the destination server positioned at private network;
Receive the result of detection that the destination server is returned based on the detection packet.
11. server detection method according to claim 10, which is characterized in that described to be by first address conversion
The step of the second address of the destination server in private network includes:
Obtain the address mapping relation between basic network and private network;
According to described address mapping relations by first address conversion be the destination server in private network second
Address.
12. server detection method according to claim 11, which is characterized in that the server detection system includes more
A proxy server, it is described according to described address mapping relations by first address conversion be the destination server privately owned
The step of the second address in network includes:
Obtain the status information of each proxy server;
According to the status information of each proxy server, the priority of each proxy server is determined;
According to the priority of each proxy server, at least one proxy server is determined from the multiple proxy server,
Obtain target proxy server;
The target proxy server is controlled according to described address mapping relations, first address conversion is taken for the target
Second address of the business device in private network.
13. server detection method according to claim 11, which is characterized in that the server detection system includes pipe
Server is managed, the reception destination server includes based on the step of result of detection for detecting packet return:
Receive the result of detection that the destination server is returned based on the detection packet;
Second address is extracted from the result of detection;
According to described address mapping relations by second address conversion be first address;
The result of detection is sent to the management server based on first address.
14. server detection method according to claim 13, which is characterized in that described to receive the destination server base
Include in the step of result of detection that the detection packet returns:
When the destination server generates probe response packet in the preset time for receiving the detection packet, the mesh is received
Normal first result of detection of the destination server that server returns is marked, first result of detection is rung based on the detection
Generation should be wrapped;
When the destination server does not generate probe response packet in the preset time for receiving the detection packet, described in reception
Second result of detection of the destination server exception that destination server returns.
15. according to claim 10 to 14 any one of them server detection method, which is characterized in that when second address
Including it is multiple when, it is described based on second address to the destination server positioned at private network send it is described detection packet
Step includes:
Multiple threads are called, and each second address is based on by multiple threads, the detection packet transmitted in parallel is given and is located at private
There is the destination server of network.
16. according to claim 10 to 14 any one of them server detection method, which is characterized in that described in basic network
The step of middle acquisition detection packet includes:
Detection configuration information is obtained in basic network;
Detection packet is generated based on the detection configuration information.
17. server detection method according to claim 16, which is characterized in that described to obtain detection in basic network
The step of configuration information includes:
Configuration-direct is received in basic network, and the destination server for needing to detect, detection are determined according to the configuration-direct
Period and detection agreement;
Detection configuration information is generated according to the destination server, detection cycle and detection agreement.
18. server detection method according to claim 16, which is characterized in that the server detection system includes more
A detecting server, it is described based on the detection configuration information generate detection wrap the step of include:
Obtain the status information of each detecting server;
According to the status information of each detecting server, the priority of each detecting server is determined;
According to the priority of each detecting server, at least one detecting server is determined from the multiple detecting server,
Obtain target acquisition server;
It controls the target acquisition server and is based on detection configuration information generation detection packet.
19. a kind of storage medium, which is characterized in that the storage medium is stored with a plurality of instruction, and described instruction is suitable for processor
It is loaded, the step in 10 to 18 any one of them server detection methods is required with perform claim.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810344956.1A CN108650337B (en) | 2018-04-17 | 2018-04-17 | Server detection method, system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810344956.1A CN108650337B (en) | 2018-04-17 | 2018-04-17 | Server detection method, system and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108650337A true CN108650337A (en) | 2018-10-12 |
CN108650337B CN108650337B (en) | 2021-10-08 |
Family
ID=63746356
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810344956.1A Active CN108650337B (en) | 2018-04-17 | 2018-04-17 | Server detection method, system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108650337B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112187584A (en) * | 2020-09-30 | 2021-01-05 | 腾讯科技(深圳)有限公司 | Path fault detection method, system, server and storage medium |
CN112399226A (en) * | 2020-10-19 | 2021-02-23 | 广州视源电子科技股份有限公司 | Cross-screen playing method, device, equipment and storage medium |
CN114499921A (en) * | 2021-11-26 | 2022-05-13 | 中国南方电网有限责任公司 | Data packet file playback method, data packet file acquisition method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030065791A1 (en) * | 2001-09-28 | 2003-04-03 | Ajay Garg | System and method for remotely accessing a home server while preserving end-to-end security |
CN102437931A (en) * | 2011-12-29 | 2012-05-02 | 华为技术有限公司 | Service path detection method and device |
CN102685262A (en) * | 2012-04-16 | 2012-09-19 | 中兴通讯股份有限公司 | Method, device and system for detecting network address translation (NAT) information |
CN103532818A (en) * | 2013-10-24 | 2014-01-22 | 福建师范大学 | Quick test method of accessibility of VPN link |
CN103944760A (en) * | 2014-04-17 | 2014-07-23 | 杭州华三通信技术有限公司 | NAT-traversal network managing method and device |
CN107707377A (en) * | 2017-06-12 | 2018-02-16 | 贵州白山云科技有限公司 | A kind of method and system for analyzing network node availability |
-
2018
- 2018-04-17 CN CN201810344956.1A patent/CN108650337B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030065791A1 (en) * | 2001-09-28 | 2003-04-03 | Ajay Garg | System and method for remotely accessing a home server while preserving end-to-end security |
CN102437931A (en) * | 2011-12-29 | 2012-05-02 | 华为技术有限公司 | Service path detection method and device |
CN102685262A (en) * | 2012-04-16 | 2012-09-19 | 中兴通讯股份有限公司 | Method, device and system for detecting network address translation (NAT) information |
CN103532818A (en) * | 2013-10-24 | 2014-01-22 | 福建师范大学 | Quick test method of accessibility of VPN link |
CN103944760A (en) * | 2014-04-17 | 2014-07-23 | 杭州华三通信技术有限公司 | NAT-traversal network managing method and device |
CN107707377A (en) * | 2017-06-12 | 2018-02-16 | 贵州白山云科技有限公司 | A kind of method and system for analyzing network node availability |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112187584A (en) * | 2020-09-30 | 2021-01-05 | 腾讯科技(深圳)有限公司 | Path fault detection method, system, server and storage medium |
CN112187584B (en) * | 2020-09-30 | 2023-07-21 | 腾讯科技(深圳)有限公司 | Path fault detection method, system, server and storage medium |
CN112399226A (en) * | 2020-10-19 | 2021-02-23 | 广州视源电子科技股份有限公司 | Cross-screen playing method, device, equipment and storage medium |
CN114499921A (en) * | 2021-11-26 | 2022-05-13 | 中国南方电网有限责任公司 | Data packet file playback method, data packet file acquisition method and device |
Also Published As
Publication number | Publication date |
---|---|
CN108650337B (en) | 2021-10-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108777640A (en) | A kind of server detection method, device, system and storage medium | |
US10825212B2 (en) | Enhanced user interface systems including dynamic context selection for cloud-based networks | |
US10708342B2 (en) | Dynamic troubleshooting workspaces for cloud and network management systems | |
CN104243265B (en) | A kind of gateway control method, apparatus and system based on virtual machine (vm) migration | |
CN105594166B (en) | For the method for configuration data stream, computer readable storage medium and device | |
CN103491129B (en) | A kind of service node collocation method, pool of service nodes Register and system | |
CN105409172B (en) | Logical switch | |
CN103475722B (en) | A kind of business cooperation platform realizes system | |
CN105912448B (en) | Server system and its to strengthen the method for memory fault-tolerant ability | |
CN103514245B (en) | Creation user it is visible processing tracking can search for and global data base | |
JP6441950B2 (en) | Centralized network configuration in distributed systems | |
CN105554015A (en) | Management network and method for multi-tenant container cloud computing system | |
CN105052078A (en) | Extending routing rules from external services | |
CN108650337A (en) | A kind of server detection method, system and storage medium | |
CN110808857B (en) | Network intercommunication method, device, equipment and storage medium for realizing Kubernetes cluster | |
CN106034077A (en) | Dynamic route configuration method, device and system thereof | |
CN104104534A (en) | Realization method of virtual network (VN) management and virtual network management system | |
CN106063194B (en) | Monitoring system and monitoring method for software defined network | |
CN107959614A (en) | A kind of self-defined network-building method of multi-tenant based on network namespace, system | |
CN106953945A (en) | Domain name intelligently parsing method and device, server based on SDN realizations | |
CN106155264B (en) | Manage the computer approach and computer system of the power consumption of storage subsystem | |
CN108449272A (en) | A kind of implementation method that port forwarding service is provided based on OpenStack frameworks | |
CN105391635A (en) | Network virtualization method based on software defined network (SDN) | |
CN106301822A (en) | A kind of methods, devices and systems that AP is configured | |
CN109639511A (en) | Self-adaptive container networking method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |